Friday, March 25, 2011

How to create or bind a range of IP address to a redhat or centos linux system

Advertisements

Suppose you have a server with IP 192.168.1.19 with OS rhel5

And you want to bind 10 IPs starting from 192.168.1.20 to 192.168.1.30

All you have to do is create the following file and add these four lines.

[root@server ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0-range0
IPADDR_START=192.168.1.20
IPADDR_END=192.168.1.30

CLONENUM_START=0
NETMASK=255.255.255.0
[root@server ~]#

IPADDR_START is the starting IP in the range.
IPADDR_END is the last IP in the range.
CLONENUM_START is the number that will be assigned to the first IP alias interface (eth0:0 in this example).

No comments:

Post a Comment

Be nice. That's all.