Home > Operation and Maintenance > Linux Operation and Maintenance > Linux external network cannot ping

Linux external network cannot ping

王林
Release: 2020-02-15 15:06:10
Original
3025 people have browsed it

Linux external network cannot ping

The solution is as follows:

Method 1:

Modify resolv.conf

vi /etc/resolv.conf
Copy after login

Add the following content:

   nameserver 114.114.114.114 (电信的DNS)
   nameserver 8.8.8.8(googel的DNS)
Copy after login

You can ping the external network.

(Free learning video sharing: linux video tutorial)

Method 2:

ip a or ifconfig check the network card used, and then Enter /etc/sysconfig/network-scripts, find the corresponding network card and modify it.

vi /etc/sysconfig/network-scripts/ifcfg-ethx
Copy after login

Linux external network cannot ping

Restart the network card

service network restart
Copy after login

Recommended related articles and tutorials: linux tutorial

The above is the detailed content of Linux external network cannot ping. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template