As an example to add a /24 253 ips to a linux server follow these setups. We'll use 192.168.1.0/24 as our range.
# vi /etc/sysconfig/network-scripts/ifcfg-eth0-range0
eth0 being your primary network card and range0 being the first range you are adding. If another range is going to be added use range1 and so on.
This file should be configured as below.
IPADDR_START=192.168.1.2
IPADDR_END=192.168.1.254
CLONENUM_START=2
NETMASK=255.255.255.255
save and exit the file.
#service network restart
Now the ips should be binded to the server and useable.
The clonenum_start needs to be something over 254 if another range will be added. I started it at 2 since the ip range is .2 - .254
for example:
CLONENUM_START: This is the number that will be assigned to the first IP alias interface. For instance, if your Internet interface is eth0 and CLONENUM_START is 2, then this config file will create 252 interfaces starting with eth0:2 (eth0:2, eth0:3, eth0:4 etc) and ending with eth0:254.
I have made the netmask 255.255.255.255 because it is most compatable and leaves less problems if you were to put the correct netmask 255.255.255.0 for a /24
- 1 Users Found This Useful
Related Articles
How can I check my hard disk usage in Linux?
Once you are connected to the server via SSH, run the following command:# df -hThis will output...
Test If Linux Server SCSI / SATA Hard Disk Going Bad
One of our regular sends us a question: How can I test if my hard disk is going bad? I see few...
How to Find Out Hard Disk Specs / Details on Linux
Linux comes with various commands to find out information about your hard drive. I recommend...
Monitoring Hard Drive Health on Linux with smartmontools
S.M.A.R.T. is a system in modern hard drives designed to report conditions that may indicate...
Linux: What Type of Installation?
What type of installation should I do? (Dual Boot / Live CD / Fresh Install / Virtual...
Powered by WHMCompleteSolution