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
Powered by WHMCompleteSolution