- Joined
- May 16, 2014
- Messages
- 20
- Points
- 1
If we have a dedicated server with Centos 6 or Centos 7 and we need to add a full /24 range of IP's in it, we can do it by adding it as a range by mentioning the start IP and end IP. An example is provided below:
If you own 192.168.125.0/24, and you need to add all of the IP's in that range, we can add it like the following:
If you needed to add first 100 IP's only, you can set the first IP as 192.168.125.3 and end IP as 192.168.125.102. But make sure that any IP's in between these are not used somewhere else.
3. Once the configuration is added you can restart the network service or reboot the server. It is better to have IPMI access before doing such changes.
If you own 192.168.125.0/24, and you need to add all of the IP's in that range, we can add it like the following:
- Create a file '/etc/sysconfig/network-scripts/ifcfg-eth0-range0' based on which ethernet card you are using.
vi /etc/sysconfig/network-scripts/ifcfg-eth0-range0 - Add the following lines in the file:
Here you need to replace the start IP and end IP based on what you own.IPADDR_START=192.168.125.3
IPADDR_END=192.168.125.254
NETMASK=255.255.255.255
CLONENUM_START=1
If you needed to add first 100 IP's only, you can set the first IP as 192.168.125.3 and end IP as 192.168.125.102. But make sure that any IP's in between these are not used somewhere else.
3. Once the configuration is added you can restart the network service or reboot the server. It is better to have IPMI access before doing such changes.