How to configure Virtual Network IP in CentOS/Redhat server ?

18 viewsLinux
0

Would like to  add more IP address to  existing network interface. Please  suggest how to  add Virtal IP address to  existing interface  without  disturbing  currently assigned IP address/network.

 

 

Virtual IP address can be used split excisting active netowk device to multiple virtual devices for configuring different network IPs.

Configure Virtual IP:
=====================

/etc/sysconfig/network-scripts/ifcfg-eth0 – Acive device

Take a back of exicsting device and rename to eth0:1

/etc/sysconfig/network-scripts/ifcfg-eth0:1

Modify /etc/sysconfig/network-scripts/ifcfg-eth0:1

NAME=eth0:1
DEVICE=eth0
IPADDR=XXXX
NETMASK=XXXX
GATEWAY

Save the configuration

Bring up the interface using

# ifup-eth0:1

# Service network retsrat

check the virtual IP details using ifconfig -a

Edited question