≡ Menu

How to add IP Address / Default Gateway on Sun Solaris

Adding IP address and default gateway is rather straight forward as long as the interface is loaded. To see whether the interface is loaded, issue the command ifconfig –a

You should see something like the following…

bash-3.00# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet netmask ff000000
rtls0: flags=1000842<BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet netmask 0
ether 0:6:4f:47:76:1e

In this case, we will be adding the IP address and subnet mask to rtls0 along with the default gateway.

IP Address:
Subnet Mask:
Default Gateway:

Here is how its done…

bash-3.00# ifconfig rtls0 netmask up
bash-3.00# route add default
add net default: gateway
bash-3.00# ping is alive

Success! We can now ping a WAN IP! and here is the new output of ifconfig -a

bash-3.00# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv 4,VIRTUAL> mtu 8232 index 1
inet netmask ff000000
rtls0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet netmask ffffff00 broadcast
ether 0:6:4f:47:76:1e

Comments on this entry are closed.

Next post:

Previous post:

Copyright © Nish Vamadevan 2002-2017. All Rights Reserved. Terms and Policies.