sometimes ping command error on the Linux server, today to summarize if a Linux server ping nowhere domain name, the following prompt: [root@localhost ~]# ping www.pythontab .comping: unknown host www.pythontab.com first determines that the router is connected, and the router can access the external network, which can be determined by accessing the gateway [root@localhost ~]# ping 192.168.1.1PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=2.96 ms64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=1.75 ms If it is determined that the network is ok, You can find the solution by the following steps: 1) Make sure the domain name server is set. If not, it is recommended to set Google's public DNS service. It should not be a problem [root@localhost ~]# cat /etc/resolv.confsearch localdomain because My DNS is not set up, which causes the ping external network to ping. Add dns to the file [root@localhost ~]# vi /etc/resolv.confsearch localdomainnameserver 202.98.96.68nameserver 61.139.2.69~2) Make sure the gateway is set #grep GATEWAY /etc/sysconfig/network-scripts/ifcfg* -------------------------------------------------- ----------------- /etc/sysconfig/network-scripts/ifcfg-eth0:GATEWAY=192.168.40.1 --------------- -------------------------------------------------- -- If not set, add the gateway as follows: # route add default gw 192.168.40.1 After manually writing the /etc/sysconfig/network-scripts/ifcfg* file, restart the network service: # service network restart 3) Make sure Dns parsing # grep hosts /etc/nsswitch.conf --------------------------------------- ---------------------------- hosts: files dns ------------------ ------------------------------------------------- in case Which of the above has a problem, after the correction, and then test, there should be no problem:
With the advantage of strong stability, embedded DVR is increasingly accepted by the security indust
Ext2Fsd is a good tool for reading and writing Linux partitions. This software is introduced in the
Preparation before erection: To set up a DNS server, you must install a software program that provi
The SELinux function is an implementation of mandatory access control, which can
Apache and Tomcat clusters under Liunx
Clean up memory and Cache method under Linux /proc/sys/vm/drop
Expired file causes VCS dual machine to fail to start
Design and Implementation of Linux-based Cluster Management System
Centos boot automatically starts the SSHD service command
How to clear all iptables rules in Linux
Linux file name garbled conversion basic tutorial
Configuring GAppProxy tutorial on Linux system
Remote login to Windows XP desktop
Linux file search technology Daquan
Identify whether it is fifteen ways of cloud computing
Win7 system hard disk partition adjustment method diagram
Windows 8 Media Player Music Management
Recovery of mail is too large to cause loss from the inbox
Windows operating system memory error solution
What should I do if the win10 system often opens the program without responding?
Windows8 Consumer Preview Sleep Method
How to check the Win7 activation code? Win7 view system activation key method
Nvidia Control Panel Unloading Method in Win10 System
Windows 7 system suspended animation reasons and treatment methods