Home>Article>Operation and Maintenance> What should I do if CentOS cannot ping the external network?

What should I do if CentOS cannot ping the external network?

angryTom
angryTom Original
2020-03-20 14:41:01 14725browse

What should I do if CentOS cannot ping the external network?

What to do if CentOS cannot ping the external network

1. First enter the command: ifconfig to view the IP and mac address of CentOS;

What should I do if CentOS cannot ping the external network?

2. Then try to ping 192.168.0.23. It can ping successfully, but cannot ping the external network;

3. You can modify the network configuration file and add mac to the configuration file. Address;

Enter: cd /etc/sysconfig/network-scripts, enter the network-scripts folder, and view the available gateways

Recommended learning:CentOS usage tutorial

What should I do if CentOS cannot ping the external network?

4. Modify the configuration file, enter: vi ifcfg-enp0s3, add a line of HWADDR, and DNS can also be added.

What should I do if CentOS cannot ping the external network?

PHP Chinese website, a large number ofwebsite construction tutorials, welcome to learn online for free!

The above is the detailed content of What should I do if CentOS cannot ping the external network?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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