IP Range CentOS

Create a file /etc/sysconfig/network-scripts/ifcfg-eth0-range0 if it doesn't exist. /etc/sysconfig/network-scripts/ifcfg-eth0-range0

Add the 3 lines to the file and save.

IPADDR_START=xxx.xxx.xxx.xxx

IPADDR_END=xxx.xxx.xxx.xxx

CLONENUM_START=0

where: IPADDR_START is the first IP and 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).

If you need to add more ranges of IPs then just use a different file for ex. ifcfg-eth0-range1, for each one of the ranges. You need to be careful and use the proper CLONENUM_START to not overwrite other aliases. Once you have configured the range/s of IPs you just need to restart the network service in order to activate it:

service network restart

  • 8 Users Found This Useful
Was this answer helpful?

Related Articles

Change Time Zone in CentOS

Changing the time zone on a CentOS server is fairly easy.   First, you'll need to know your...

Change Time Zone in CentOS

Changing the time zone on a CentOS server is fairly easy.   First, you'll need to know your...

Configure Speed and Duplex in CentOS

If you have a colocated CentOS server with CeraNet then you may need to modify the speed and...

Configure Speed and Duplex in CentOS

If you have a colocated CentOS server with CeraNet then you may need to modify the speed and...

Configure Speed and Duplex in Ubuntu

If you have a colocated Ubuntu server with CeraNet then you may need to modify the speed and...