How can I configure a ip range in CentOS7?

You have to use a range file

  1. Edit /etc/sysconfig/network-scripts/ifcfg-enp0s3 and make sure that NM_CONTROLLED is set to NO (preventing the network manager to control the interface is required to use range files)

  2. Create /etc/sysconfig/network-scripts/ifcfg-enp0s3-range:

    IPADDR_START=192.168.1.10
    IPADDR_END=192.168.1.254
    PREFIX=24
    CLONENUM_START=0
    
  3. run systemctl restart network and the changes should be effective.

If you wanted to configure multiple ranges you could create other file (ifcfg-enp3s0-range0, ifcfg-enp3s0-range1, ...)

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Adding a Public IPv6 Address to a Linux Server (CentOS 7)

To configure an additional public IPv6 address in CentOS 7, proceed as follows:...

How To Install EPEL Repository On CentOS And RHEL 7

How to install EPEL for Centos 7 [root@localhost ~]# cat  /etc/centos-release CentOS Linux...

Common Commands (CentOS 7)

Basic Configuration Query or System Locale...

Install LAMP Stack on CentOS 7

Install LAMP Stack on CentOS 7 One of the most simple and barebones solutions you can have for...