Assign Additional IP Addresses in RedHat or CentOS
To assign a range of addresses to your server you'll need to create a RANGE file:
# cd /etc/sysconfig/network-scripts
# __ls ifcfg-eth1-range*
If a range file has already been created, create a new one for the new range of IPs you are adding. For example, if you have one named range1, name the next range2 and so on.
In the event there isn't, run
# nano ifcfg-eth1-range1.
Place the following text in the file:
IPADDR_START=192.168.0.10 IPADDR_END=192.168.0.110 CLONENUM_START=0
CLONENUM_STARTdefines where the alias will start. If this is the second range file, you will need to set
CLONENUM_STARTto a value higher than the number of IP addresses assigned. To check what you currently have used, you can run:
# ifconfig | grep eth1to list devices such as
eth1:2, and so on.
If you are planning to maximize your ranges up to
eth1:3, you'll set
CLONENUM_START to 4 to assign the IPs correctly.