CentOS 7 网卡配置对比

1、DHCP模式(原始)

[root@centos7-minimal /]# vim /etc/sysconfig/network-scripts/ifcfg-eno16777736
TYPE="Ethernet"
BOOTPROTO="dhcp"
DEFROUTE="yes"
PEERDNS="yes"
PEERROUTES="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_PEERDNS="yes"
IPV6_PEERROUTES="yes"
IPV6_FAILURE_FATAL="no"
NAME="eno16777736"
UUID="f1dfef8b-5952-4d12-b225-291f672b30fc"
DEVICE="eno16777736"
ONBOOT="yes"

2、静态地址模式(原始)

[root@localhost /]# vi /etc/sysconfig/network-scripts/ifcfg-eno16777728
TYPE=Ethernet
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=no
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=eno16777728
UUID=ce6a859c-5032-4bcf-b88a-00591662b642
DEVICE=eno16777728
ONBOOT=yes
IPADDR=192.168.1.135
PREFIX=24
GATEWAY=192.168.1.1
DNS1=114.114.114.114

3、优化模式:

[root@localhost /]# vi /etc/sysconfig/network-scripts/ifcfg-eno16777728
TYPE=Ethernet
NAME=eno16777728
BOOTPROTO=static
DEFROUTE=yes
ONBOOT=yes
DEVICE=eno16777728
IPADDR=192.168.1.135
PREFIX=24
GATEWAY=192.168.1.1
DNS1=114.114.114.114

4、极简模式:

DEVICE=eno16777728
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.1.135
FREFIX=24
GATEWAY=192.168.1.1
DNS1=114.114.114.114

[THE END]  

  

上一篇:python-web自动化-文件上传操作(非input标签的上传,需要借助第三方工具)


下一篇:scrapy 抓取拉勾网数据