These are the steps you need to take to configure network on your Solaris machine.
To configure a network using static IP.
# netstat -D
User can use any text editor to edit the configuration files. In my case I will use gedit which is a GUI based text editor.
# gedit /etc/hostname.e1000g0
192.168.0.100
# gedit /etc/defaultdomain
solaris.test
# gedit /etc/inet/netmasks
192.168.0.0 255.255.255.0
# gedit /etc/hosts
192.168.0.100 solaris.test
# gedit /etc/resolv.conf
domain test
nameserver 192.168.0.50
# gedit /etc/defaultrouter
192.168.0.1
# gedit /etc/nsswitch.conf
hosts: files dns
#ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
e1000g0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.0.100 netmask ffffff00 broadcast 192.168.0.255
ether 0:c:29:70:da:5b
To check the default route or gateway
Routing Table: IPv4
Destination Gateway Flags Ref Use Interface
-------------------- -------------------- ----- ----- ---------- ---------
default 192.168.0.1 UG 1 3
192.168.0.0 192.168.0.100 U 1 2 e1000g0
224.0.0.0 192.168.0.100 U 1 0 e1000g0
127.0.0.1 127.0.0.1 UH 4 121 lo0
# ping goole.com
google.com is alive
Related Articles