centos 批量添加连续IP

  • 481

进入网卡eth0

vi /etc/sysconfig/network-scripts/ifcfg-eth0

在最后一行添加

NM_CONTROLLED=NO

 

创建一个range0

vi /etc/sysconfig/network-scripts/ifcfg-eth0-range0

输入以下文件内容格式

DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR_START=起始IP地址
IPADDR_END=结束IP地址
CLONENUM_START=0
GATEWAY=网关地址
NETMASK=子网掩码
NO_ALIASROUTING=yes


Was this answer helpful?

Support Client Area