Cenots 7 Configure static IP

FreePress發表於2017-03-03

For example:

# cd /etc/sysconfig/ifcfg-enp3s0

# cat ifcfg-enp3s0

TYPE=Ethernet
BOOTPROTO=static
IPADDR=192.168.1.22
NETMASK=255.255.255.0
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
NAME=enp3s0
UUID=22912295-f542-452b-a7b2-70a324161d8d
DEVICE=enp3s0
ONBOOT=yes
PEERDNS=yes # <<<<<<< ----------------------------------------this option you must set to NO !
PEERROUTES=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes

相關文章