Use a Range File to Setup Multiple IPs
You can in some cases use a range file to set up a whole subnet inside your dedicated server. By using a range file you can quickly deploy a subnet but this does have some disadvantages. When you use a range file you cannot specify a BROADCAST for each individual IP and on some servers, depending on what type of router is used you will need to specify this field or you will see inconsistent results.
Using this method will work on any RedHat based system so this is good for Fedora, CentOS, ClearOS
First create the file
Inside the file add the following information
So, if you had a /29 subnet for example 192.168.0.0/29 you would place 192.168.0.0 in the IPADDR_START field and 192.168.0.7 in the IPADDR_END field. Save and close the file then restart the network or reboot your server and the subnet assigned to that server should start to work.
Adding Multiple Subnets Using a Range File
You can use this method to set up multiple subnets inside your server but to do this you have to make sure that the CLONENUM_START field has a unique number. To set up another subnet in the same server create a new range file;
Then, enter your new subnet details in the new file as you did with the first subnet but this time change the CLONENUM_START field to 2
Again, save the file and restart the network or reboot and this subnet will start to work. You can do this with as many subnets as you like but you must make sure the CLONENUM_START field is unique as each raneg file will be assigned to the IP alias. In our examples eth0:0 and eth0:1.
If you need to specify custom fields a like a BROADCAST field then you should follow the guide here on how to create separate interfaces.
How Was This Article? – Use a Range File to Setup Multiple IPs
You might also like
More from All About Linux
Update CentOS 7 Kernel in your KVM virtual server or dedicated server runs one of the most important functions of …
Setup a website on an Ubuntu Server using Apache Virtual Hosts (Name-Bassed Hosting) In this guide, we will show you how …