CentOS7 single network card to configure multiple IP

Edit Profile vim / etc / sysconfig / network-scripts / ifcfg-eth1 (MAC address to be added if necessary)

TYPE=Ethernet
BOOTPROTO=static
DEFROUTE=yes
NAME=eth1
DEVICE=eth1
ONBOOT=yes
IPADDR0=192.168.100.207
IPADDR1=192.168.100.208
IPADDR2=192.168.100.209
NETMASK0=255.255.255.0
NETMASK1=255.255.255.0
NETMASK2=255.255.255.0
GATEWAY0= 192.168 . 100.254 
DNS1 = 8.8 . 8.8

As described above, restart the card into effect, different IP can set different masks and gateways, using ip addr validation information.

Guess you like

Origin www.cnblogs.com/itbox/p/11569708.html