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;
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
4. Modify the configuration file, enter: vi ifcfg-enp0s3, add a line of HWADDR, and DNS can also be added.
PHP Chinese website, a large number of website 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!