Tuesday 9 July 2013

How to add some extra IP addresses - Solaris and Linux


Linux

Increase the eth0: by 1 and the IP by 1 

/sbin/ifconfig eth0:1 10.xx.xx.xx netmask 255.255.255.xx broadcast 10.xx.xx.xx up

To make permanent after reboot:

Add the lines to the /etc/rc.d/rc.local file as such:

/sbin/ethtool -s eth0 speed 100 duplex full autoneg off

/sbin/ifconfig eth0:1 10.xx.xx.xx netmask 255.255.255.xx broadcast 10.xx.xx.xx up                     

Solaris

ifconfig ce0:1 plumb
ifconfig ce0:1 10.xx.xx.xx netmask 255.255.255.xx up

To make permanent after reboot:

Add IP to /etc/hosts and more importantly

echo 10.xx.xx.xx > /etc/hostname.ce0:1

No comments: