/etc/sysconfig/network-scripts/
找到类似ifcfg-ens32 vi打开

TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens33
UUID=d5f81bf1-562b-4ce6-a7c3-451003af0179
DEVICE=ens33
ONBOOT=yes
IPADDR=192.168.123.166
NETMASK=255.255.255.0
GATEWAY=192.168.123.1
DNS1=223.5.5.5
DNS2=223.6.6.6

重启生效 systemctl restart network

标签: Linux

评论已关闭