Network Change on Solaris 9.0 - My HOWTO
At first the interface bge0 was unplumbed.
ifconfig bge0 unplumb
An 'ifconfig -a' at this stage confirmed that the interface was released as the output showed only the loopback address.
The interface bge0 was given the new IP by plumbing it up (in a single command).
ifconfig bge0 plumb up 10.222.113.218 netmask 255.255.255.0
To make the IP change persistent across reboots, the following file was edited/created by adding the hostname.
vi /etc/hostname.bge0
Routing table was viewed with -
netstat -nr
A new route was added to enable the box to talk with the outside network.
route add 10.0.0.0 -netmask 255.0.0.0 10.222.113.1
route add default 10.222.113.1 (if the default entry is absent in the routing table).
Default gateway was also added to /etc/defaultrouter file.
A configuration reboot was done. Better to do 'sync' 2 times to update the changes before reboot.
reboot -- -r
Reboot produced a strange scenario. I'd be able to ping the members in the same network & outside, but not SSH from outside.
Checking the routing table showed that the entry for 10.0.0.0 --> 10.222.113.1 was absent, i.e that change was not persistent across reboots.
Manually adding the route again solved the problem.
To make this change permanent, I created the following script as /etc/init.d/inetroutes -
ifconfig bge0 unplumb
ifconfig bge0 plumb up 10.222.113.218 netmask 255.255.255.0
route add 10.0.0.0 -netmask 255.0.0.0 10.222.113.1
Gave it 'chmod 755' permission. And a symbolic link was created in run levels 2 & 3 for this file -
ln -s /etc/init.d/inetroutes /etc/rc2.d/S93inetroutes
ln -s /etc/init.d/inetroutes /etc/rc3.d/S93inetroutes
The S93 label is required (I think) for Solaris to pick it up in sequence during the system boot. S90 labelled file relates to NIS or
something. Picked that up from one of the 'rc' scripts.
Apart from the above, the following changes were also made (I'm not sure if these are relevant):
Added the gateway IP and subnet to /etc/netmasks
|