The next thing you have to do is create a new script named “ifcfg-eth0-range0”. You can do this by using the following command.
Once you went ahead and created that file and its opened in nano or your favorite text editor you will need to add the following.
The way CentOS attaches new ips is by adding devices for example eth:0 eth0:0 eth0:1 eth0:2 and so on. So the example above will start at eth0:0 and will stop at the last IP. The IPADDR_START and the IPADDR_END specify the range. In this example it will add 192.168.1.120 – 192.168.1.130. Replace this with your range you have been given by your datacenter. This is also known as your usable IPs. After you added this to the file save and close out the editor.
This guide assumes that you have already added the primary IP address to your server much like most web hosts provide when you are initially provisioned a server.
Once you have done all of the above you can make the changes take effect by issuing the following command:
service network restart
Note: This will disturb any download in progress.
After you have done that if you didn’t get any strange errors then you have successfully added an IP range to your servers. The only thing you have to do is execute a ifconfig to view all of the devices.