In the CentOS6, we can easily config a ip range(such as:192.168.1.10-192.168.1.254) to a NIC,but how can we config a ip range in the CentOS7?I can not use the method in the CentOS6, how to do with in CentOS7?I can use below method to configure multi ip, but if I have 200 ip, how to do with that?TYPE=EthernetBOOTPROTO=noneDEFROUTE=yesIPV4_FAILURE_FATAL=noIPV6INIT=yesIPV6_AUTOCONF=yesIPV6_DEFROUTE=yesIPV6_FAILURE_FATAL=noNAME=enp0s3UUID=933cdc9b-b383-4ddd-b219-5a72c69c9cf0ONBOOT=yesHWADDR=08:00:27:3F:AB:68IPADDR0=192.168.1.150IPADDR1=192.168.1.151IPADDR2=192.168.1.152PREFIX0=24GATEWAY0=192.168.1.1DNS1=192.168.1.1IPV6_PEERDNS=yesIPV6_PEERROUTES=yes
How can I configure a ip range in CentOS7?
centos
You can not set the ip range like CentOS6, in CentOS7 you can write script to archive that:for I in {5..250}> do nmcli con mod eth33554960 -ipv4.addresses 192.168.1.${I}/24> nmcli con mod eth33554960 +ipv4.addresses 192.168.1.${I}/24> done