Friday, May 18, 2007

Adding a Second IP to an Existing Ethernet Card on Linux

1. Log in as root
2. Change directory
cd /etc/sysconfig/network-scripts
3. Locate the file ifcfg-eth0
4. Make a copy of it with a different name:
cp ifcfg-eth0 ifcfg-eth0:0
5. Edit the new file ifcfg-eth0:0. Locate the word DEVICE and change eth0 to eth0:0
DEVICE=eth0:0
6. Change the IP address besides the word IPADDR to the desired IP
IPADDR=192.168.1.201
7. Now save the changes and issue the command ./ifup eth0:0 to start listening on the new IP address

No comments: