centos7.0 Setting up network Connections (IP, gateway DNS)

Source: Internet
Author: User

With a virtual machine installed a centos7.0 to play, the installation interface than the original 5.x has undergone a great change, but the process is to get through the small difference, it is not recorded. This time the installation of a pure environment, of course, no desktop, no network connection, here to record the configuration of the network process:

1, the virtual device uses the way of bridging, directly connected to the physical network

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

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

hwaddr=00:0c:29:8d:24:73 type=ethernet bootproto=static #启用静态IP地址 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=ae0965e7-22b9-45aa-8ec9-3f0a20a85d11 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! #保存退出 4, service network restart #重启网络 5, ping www.baidu.com #测试网络是否正常

centos7.0 Setting up network Connections (IP, gateway DNS)

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.