Solve the problem that CentOS 7 can't surf the internet

Source: Internet
Author: User

Newly installed CentOS 7 cannot be on the net

But you can ping the IP address of the same network segment

Modify the/etc/sysconfig/network-scripts/ifcfg-enp0s3 file as follows

Vim/etc/sysconfig/network-scripts/ifcfg-enp0s3
Type=ethernet
bootproto=static
defroute=yes
ipv4_failure_fatal=no
ipv6init=yes
ipv6_ Autoconf=yes
ipv6_defroute=yes
ipv6_failure_fatal=no
name=enp0s3
uuid= 1538D24B-770F-44EE-83AF-E1DA305DFABC
device=enp0s3
onboot=yes
ipaddr0=192.168.1.121
PREFIX=
ipv6_peerdns=yes
ipv6_peerroutes=yes
ipv6_privacy=no
dns1=202.96.134.133
dns2= 202.96.128.166
gateway0=192.168.1.1

Restart Network Services

Service  

Problem solving

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.