Has appeared many times before the question, Hey, white, noway.
The premise that ping Tong host.
Libxml2 library and encounter is to use yum upgrade CentOS host could not be resolved. Are generally gateway and CentOS,DNS is not set up.
Solution:
2. check network settings for Windows
ifconfig/all
Get parameter in CentOS corresponding settings
3. view the CentOS gateway is set correctly
[root@localhost ethan]# grep GATEWAY /etc/sysconfig/network-scripts/ifcfg*
/etc/sysconfig/network-scripts/ifcfg-eth0:GATEWAY=192.168.199.1
Incorrect settings:
[Root@localhost Ethan]#/resolv.conf as follows:
nameserver 192.168.199.1
search localdomain
See if using DNS resolution file, general use
[Root@localhost Ethan]#. conf is as follows:
#hosts: db files nisplus nis dns
hosts: files dns
Set the gateway:
[Root@localhost Ethan]#/sysconfig/network as follows:
NETWORKING=yes
HOSTNAME=localhost.localdomain
GATEWAY=192.168.199.1
[Root@localhost Ethan]#/sysconfig/network-scripts/ifcfg-eth0 is as follows:
TYPE=Ethernet
BOOTPROTO=static
DEVICE=eth0
IPADDR=192.168.199.213
NETMASK=255.255.255.0
ONBOOT=yes
GATEWAY=192.168.199.1
4. restart the network service
service network restart
General finish can ping ….
Baidu is not enough on its own …