add virtual ip addresses to red hat 8
Hi i have linux red hat 8, and i want to be able to add multiple ip addresses on the same nic (virtual ip addresses). Does anybody know how?
thanks,
jh
Linux
Hi i have linux red hat 8, and i want to be able to add multiple ip addresses on the same nic (virtual ip addresses). Does anybody know how?
thanks,
jh
by sachuv
Hi
Adding virtual IP address is simple on Linux/Unix box.
#ifconfig eth0:1 192.168.1.1 up
eth0:1 -> logical interface
192.168.1.1 -> virtual IP
by les
use the redhat gui...
#redhat-config-network
Interface configurations are stored in /etc/sysconfig/network-scripts/ifcfg-[cardname]
The machine's first Ethernet network interface is eth0 and is stored in /etc/sysconfig/network-scripts/ifcfg-eth0
Virtual IP addresses are specified with a column ?:? and a number e.g. eth0:1, eth0:2, eth1:1
To create a virtual address simply copy the file ifcfg-eth0 to ifcfg-eth0:1
cp -a ifcfg-eth0 ifcfg-eth0:1
Now edit the new file and change the name to the virtual name
e.g. DEVICE=eth0 to DEVICE=eth0:1
Change the other lines according to your requirements.
Bring the new interface up:
ifup eth0:1
And to display it:
ifconfig eth0:1
This discussion is closed to new replies.
Sort by Trending