Copy etc/sysconfig/network-scripts/ifcfg-eth0 file as /etc/sysconfig/network-scripts/ifcfg-eth0:0
Open file /etc/sysconfig/network-scripts/ifcfg-eth0:0 using vi text editor:
Find entry that read as follows:
# cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0:0
Open file /etc/sysconfig/network-scripts/ifcfg-eth0:0 using vi text editor:
# vi /etc/sysconfig/network-scripts/ifcfg-eth0:0
Find entry that read as follows:
DEVICE=eth0
Replace with:
DEVICE=eth0:0
Find entry that read as follows:
IPADDR=xxx.xxx.xxx.xxx
Replace it with your actual IP address:
IPADDR=200.200.200.1
At the end your file should like as follows:
DEVICE=eth0:0 IPADDR=200.200.200.1 NETMASK=255.255.255.0 NETWORK=200.200.200.0 ONBOOT=yes NAME=eth0:0
Open file /etc/sysconfig/network-scripts/ifcfg-eth0 and make sure file does not have a GATEWAY= entry:
Find the entry that read as follows:
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
Find the entry that read as follows:
GATEWAY=your-ip
Remove or comment it out by prefixing # (hash) :
# GATEWAY=200.200.200.254
Save the file. Add the GATEWAY= to your /etc/sysconfig/network:
# vi /etc/sysconfig/network
Append or modify GATEWAY entry:
GATEWAY=200.200.200.254
Save the file. Reboot the system or run the following command:
# ifup eth0:0
OR
# service network restart
Click Here to visit our facebook page and like.