Sunday, April 13, 2008

SXCE and Basic Networking.

For this instalment we are going to look into basic network knowledge in Solaris.
There are two ways to configure networking in Solaris, the first of which is a tool known as Network Auto-Magic or nwam(1).
By running:

$svcs -x network/physical:nwam

Provides the status if nwam is online or not, Network Auto-Magic is a project to simplify and automate network configuration on Solaris. Basically autoconfigures your NIC from your local DHCP/DNS server.

However, It is some times necessary configure a static IP or provide DNS infomation manually. To to manually configure networking in Solaris one must disable this service in favour of the default by doing the following:

#svcadm enable network/physical:default

Things you should keep at hand are:
* IP Address of the System
* Hostname
* Subnet Files: /etc/netmasks
* Default gateway
* DNS Server list. Files: /etc/nsswitch.conf *and* /etc/resolv.conf

Then you can configure each of the above as follows:


* IP Address ( and Hostname (solarisrox)
#echo ' solarisrox' >> /etc/hosts; echo 'solarisrox' > /etc/hostname.hme0"

N.B. Assuming that hme0 was the interface you wanted to use.
Hint: Can be found with ifconfig -a
*Default gateway (
#echo > /etc/defaultrouter


#echo "" > /etc/hostname.hme0 > /etc/dhcp.hme0 > /etc/defaultrouter
#echo "wait 15" >> /etc/dhcp.hme0


First check /etc/nsswitch.conf for the line "hosts: dns files" is ok.
Then inside /etc/resolv.conf check to make sure it looks something like this:


After all your configuration you can simply restart the network service as follows:

#svcadm restart network/physical:default

Comments are always welcome..


No comments: