How to Adding bulk amount of additional IP's in CentOS?

HostSailor

New member
Registered
Joined
May 16, 2014
Messages
9
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:

  1. 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
  2. Add the following lines in the file:
IPADDR_START=192.168.125.3
IPADDR_END=192.168.125.254
NETMASK=255.255.255.255
CLONENUM_START=1
Here you need to replace the start IP and end IP based on what you own.

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.
 
Newer Threads
Replies
0
Views
78
Replies
4
Views
184
Replies
0
Views
152

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top