系统相关
首页 > 系统相关> > Linux的IP地址的设定

Linux的IP地址的设定

作者:互联网

1.Linux设置静态IP地址
vim /etc/sysconfig/network-scripts/ifcfg-ens33

TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
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=eth0
UUID=4f5f8b5d-4b51-4e1c-98c7-40f0eb90f241
DEVICE=eth0
ONBOOT=yes
IPADDR=192.168.4.12
PREFIX=24

2.Linux设置动态IP地址DHCP
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=dhcp
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=eth0
UUID=4f5f8b5d-4b51-4e1c-98c7-40f0eb90f241
DEVICE=eth0
ONBOOT=no

标签:设定,IP地址,yesIPV6,FAILURE,noIPV6INIT,Linux,FATAL
来源: https://blog.51cto.com/13461673/2475737