zoukankan      html  css  js  c++  java
  • 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接口自动化】httpUtils
    mac上安装chromedriver
    python自动化测试报告(excel篇)
    Fiddler 手机抓包介绍
    Fiddler 简单介绍
    Python splinter 环境搭建
    Python pip 常用命令
    Python Yaml 学习
    Jmeter
    Python3 操作Excel
  • 原文地址:https://www.cnblogs.com/configure/p/9186635.html
Copyright © 2011-2022 走看看