Linux system single network card batch add different IP

  
 

Single NICs add different IP segments in batches. 70.39.112.194 Add IP: 70.39.112.195-222/70.39.83.226-254

vi /etc/sysconfig/network-scripts/ifcfg-eth0-range0DEVICE=eth0ONBOOT =yesBOOTPROTO=staticIPADDR_START=70.39.112.195IPADDR_END=70.39.112.222CLONENUM_START=0GATEWAY=70.39.112.193NETMASK=255.255.255.224NO_ALIASROUTING=yes

service network restart

ifconfig see IP:70.39 .112.195-222 Corresponding network card number: eth0:0-eth0:27, so add IP in batches, the network card starts from eth0:28, the network card eth0 does not change, create a new file: ifcfg-eth0-range1+++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++vi /etc/sysconfig/network-scripts/ifcfg-eth0-range1 #Note this second time change

DEVICE=eth0ONBOOT=yesBOOTPROTO= staticIPADDR_START=70.39.83.226IPADDR_END=70.39.83.254CLONENUM_START=28 #Note this second time to change GATEWAY=70.39.83.225NETMASK=255.255.255.224NO_ALIASROUTING=yes

Copyright © Windows knowledge All Rights Reserved