Operating System - Linux
1819804 Members
3346 Online
109607 Solutions
New Discussion юеВ

how to add virtual IP in redhat linux

 
SOLVED
Go to solution
Binu_5
Regular Advisor

how to add virtual IP in redhat linux

Hi All


Can somebody help me how to added virtual IPs in redhat linux .....I want to to add 100 dummy IPS to be simulated to a singe system with one ethernet card


Thanks
Binu
3 REPLIES 3
GGA
Trusted Contributor
Solution

Re: how to add virtual IP in redhat linux

hello

ifconfig eth0:1 ipadress up
regards gga
Steven E. Protter
Exalted Contributor

Re: how to add virtual IP in redhat linux

Hello Binu,

If you want it to be permenent:

cd /etc/sysconfig/network-scripts

cp eth0 eth0:0

Edit it, make sure the inside reference says eth0:0 instead of eth0.

Some prefer eth0:1

cest la vive

service network restart

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Alexander Chuzhoy
Honored Contributor

Re: how to add virtual IP in redhat linux


or if you need a 100 IPs:

create a file
/etc/sysconfig/network-scripts/ifcfg-eth0-range0

Containing something like...
IPADDR_START=xxx.xxx.xxx.1
IPADDR_END=xxx.xxx.xxx.100
CLONENUM_START=1

and do:
service network restart
P.S.
The ip addresses must be in the same subnet as the primary card (i.e. if you create ifcfg-eth0-range0,then use the same subnet as eth0).