Troubleshoot CentOS7.0 networking and centos7.0 networking

Source: Internet
Author: User
Tags nameserver

Troubleshoot CentOS7.0 networking and centos7.0 networking

1. ifconfig command.

Check whether the network configuration is correct.

Configure the network in/etc/sysconfig/network-scripts/ifcfg-ens32, remember the onboot = on option must be set, otherwise the network cannot start

Onboot = on

IPADDR = 192.168.1.31
NETMASK = 255.255.255.0
GATEWAY = 192.168.1.1

Remember to restart after Configuration

[Root @ localhost ~] #/Etc/init. d/network stop
[Root @ localhost ~] #/Etc/init. d/network start

2. ping the host 127.0.0.1 (if the host can be pinged, the TCP/IP protocol is correct) (PS: Ctrl + C)

3. Check whether the gateway can be pinged. Ping 114.114.114.114

Modify dns
[Root @ localhost ~] # Vi/etc/resolv. conf
Add two dns servers:
Nameserver 114.114.114.114
Nameserver 8.8.8.8

 

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.