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
- 10 Users Found This Useful