Linux网络ping不通,出现ping: unknown host www.baidu.com、connect: Network is unreachable错误的排查条件

/etc/sysconfig/network-scripts/ifcfg-eth0:

TYPE="Ethernet"
BOOTPROTO="static"
IPADDR=10.0.0.10
NETMASK=255.255.255.0
NM_CONTROLLED=no
DEFROUTE="yes"
PEERDNS="yes"
PEERROUTES="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_PEERDNS="yes"
IPV6_PEERROUTES="yes"
IPV6_FAILURE_FATAL="no"
NAME="enp0s3"
UUID="XXXXXXXXXXXXXXXXXXXXXXXXXX"
DEVICE="eth0"
ONBOOT="yes"

/etc/sysconfig/network:

NETWORKING=yes
HOSTNAME=centos
GATEWAY=10.0.0.1

/etc/resolv.conf:

nameserver 8.8.8.8
nameserver 8.8.4.4

 route查看路由列表

检查防火墙是否没有放行端口

你可能感兴趣的:(Linux网络ping不通,出现ping: unknown host www.baidu.com、connect: Network is unreachable错误的排查条件)