Single NIC bulk add different IP segments
70.39.112.194 adding ip:70.39.112.195-222/70.39.83.226-254
Vi/etc/sysconfig/network-scripts/ifcfg-eth0-range0
Device=eth0
Onboot=yes
Bootproto=static
ipaddr_start=70.39.112.195
ipaddr_end=70.39.112.222
Clonenum_start=0
gateway=70.39.112.193
netmask=255.255.255.224
No_aliasrouting=yes
Service Network restart
ifconfig see ip:70.39.112.195-222 corresponding network card number: eth0:0-eth0:27,
So then batch add IP, Nic from eth0:28 onwards,
Nic Eth0 unchanged, create new file: Ifcfg-eth0-range1
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Vi/etc/sysconfig/network-scripts/ifcfg-eth0-range1 #注意这个第二次要变
Device=eth0
Onboot=yes
Bootproto=static
ipaddr_start=70.39.83.226
ipaddr_end=70.39.83.254
Clonenum_start=28 #注意这个第二次要变
gateway=70.39.83.225
netmask=255.255.255.224
No_aliasrouting=yes
This article is from the "Thai Sea Technology" blog, please be sure to keep this source http://taihaikj.blog.51cto.com/3571955/1660567
CentOS single NIC batch add different IP segments