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

Cenots 7 Configure static IP的更多相关文章

  1. 给ubuntu设置静态ip —— How to set static IP Address in Ubuntu Server 16.04

    原文: http://www.configserverfirewall.com/ubuntu-linux/ubuntu-set-static-ip-address/ ----------------- ...

  2. How to configure a static IP address on CentOS 7(CentOS7静态IP地址设置)

    Question: On CentOS 7, I want to switch from DHCP to static IP address configuration with one of my ...

  3. Ubuntu setup Static IP Address

    Change Ubuntu Server from DHCP to a Static IP Address If the Ubuntu Server installer has set your se ...

  4. ubuntu16.04 在/etc/network/interfaces设置static ip无效

    双网卡使用无线网卡上互联网,使用以太网卡连局域网,在/etc/network/interfaces里对以太网卡设置static ip无效,使用ifconfig临时设置也仅能工作一会,设置的ip马上就消 ...

  5. Config Static IP Address manually in Ubuntu

    The process of the configuration of static IP address in Ubuntu is as follows: ``` $ sudo vim /etc/n ...

  6. AWS Intro - Static IP with ssh

    Notes:  Please config static ip when launch instance. Because change dynamic public ip to static ip, ...

  7. 【Linux】Mac PD set centos static ip

    2,修改Centos的网络设置. (1)进入脚本. vi /etc/sysconfig/network-scripts/ifcfg-eth0 My Mac ip: # 从dhcp改成static BO ...

  8. Setting up a static IP address in Ubuntu

    sudo gedit /etc/network/interfaces Change the line iface eth0 inet dhcp to iface eth0 inet static an ...

  9. Win10 DHCP和Static IP 切换

    创建两个.bat文件,分别命名为static.bat和dhcp.bat static.bat文件写入 netsh interface ip set address "Wi-Fi" ...

随机推荐

  1. 除去a标签target="_blank"的方法

    用Jquery:$(function(){$("div>a").attr("target","_blank");});先查找页面上的d ...

  2. [C#]读文件

    代码段来自 支付宝接口代码示例 /// <summary> /// 从文件读取公钥转公钥字符串 /// </summary> /// <param name=" ...

  3. Centos编译Redis4.0.9源码过程记录

    mkdir /home/redis cd /home/redis 下载源码 wget https://codeload.github.com/antirez/redis/tar/4.0.9 解压源码包 ...

  4. solr删除全部索引数据

    SOLR 删除全部索引数据: <delete><query>*:*</query></delete><commit/>

  5. Python2.X如何将Unicode中文字符串转换成 string字符串

    Python2.X如何将Unicode中文字符串转换成 string字符串   普通字符串可以用多种方式编码成Unicode字符串,具体要看你究竟选择了哪种编码:unicodestring = u&q ...

  6. 关于python-生成HTMLTestRunner测试报告

    一.HTMLTestRunner 是 Python 标准库的 unittest 模块的一个扩展,它可以生成 HTML的 测试报告. 1.首先要下 HTMLTestRunner.py 文件,将下载的文件 ...

  7. C# 窗体常用API函数 应用程序窗体查找

    常用的处理窗体的API函数如下(注意:API函数必须放在窗体中...): 使用C#语言,要引用DllImport,必须要添加using System.Runtime.InteropServices命名 ...

  8. Selenium Webdriver——Chrome调试Xpath

    自己通过手写的Xpath要验证是否正确定位到元素,可以通过谷歌浏览器的Console功能(F12) 在console 输入:$x("") 定位去哪儿网的出发输入框: <inp ...

  9. ASP.NET中高级程序员 面试题

    1. 简要说一下.Net的编译过程. 2.ASP.NET与ASP的区别 3.谈一下ASP.NET页面生命周期 4.ASP.NET程序的运行机制.可以从一个页面的请求到返回的角度谈 5.Javascri ...

  10. java web 开发 IDE 下载地址

    https://www.eclipse.org/downloads/eclipse-packages/