Wednesday, January 23, 2008

Add an IP address to the Server

Very Simple..........:)
--------------------
cd /etc/sysconfig/network-scripts
cp ifcfg-eth0 ifcfg-eth0:1
vi ifcfg-eth0:1
modify DEVICE to DEVICE=eth0:1
change IPADDR to the new IP
./ifup ifcfg-eth0:1

this for one IP

do the same for rest of the IPS
give eth0:2 eth0:3 etc

Also You can use these steps.
-----------------------------
$ /sbin/ifconfig eth0:0 192.168.0.4
$ /sbin/route add -host 192.168.0.4 dev eth0:0


(replace that IP with the one you'd like to add)
This change will no longer be in effect after rebooting. Therefor you must add the two commands to the bottom of your /etc/rc.local file. Your NIC should now be listening and responding on both this and the original IP address found in /etc/sysconfig/network-scripts/ifcfg-eth0

No comments: