CentOS 7.0 Set IP address, gateway DNS

Source: Internet
Author: User

cd/etc/sysconfig/network-scripts/#进入网络配置文件目录

650) this.width=650; "alt=" CentOS 7.0 system installation configuration steps in detail "src=" http://filesimg.111cn.net/2014/07/08/20140708165019615.jpg " Style= "border:1px solid rgb (230,230,230); margin:0px auto;height:auto;"/>

VI ifcfg-eno16777736 #编辑配置文件, add modify the following content

650) this.width=650; "alt=" CentOS 7.0 system installation configuration steps in detail "src=" http://filesimg.111cn.net/2014/07/08/20140708165022697.jpg " Style= "border:1px solid rgb (230,230,230); margin:0px auto;height:auto;"/>

hwaddr=00:0c:29:8d:24:73

Type=ethernet

Bootproto=static #启用静态IP地址

Onboot=yes #开启自动启用网络连接

ipaddr0=192.168.21.128 #设置IP地址

Prefixo0=24 #设置子网掩码

gateway0=192.168.21.2 #设置网关

dns1=8.8.8.8 #设置主DNS

dns2=8.8.4.4 #设置备DNS

: wq! #保存退出

Service Network Restart #重启网络

Ping www.baidu.com #测试网络是否正常

650) this.width=650; "alt=" CentOS 7.0 system installation configuration steps in detail "src=" http://filesimg.111cn.net/2014/07/08/20140708165026506.jpg " Style= "border:1px solid rgb (230,230,230); margin:0px auto;height:auto;"/>

IP addr #查看IP地址

650) this.width=650; "alt=" CentOS 7.0 system installation configuration steps in detail "src=" http://filesimg.111cn.net/2014/07/08/20140708165030452.jpg " Style= "border:1px solid rgb (230,230,230); margin:0px auto;height:auto;"/>


This article from the "Small Sky" blog, reproduced please contact the author!

CentOS 7.0 Set IP address, gateway DNS

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.