问题描述
网卡信息中GATEWAY配置错误,导致该机器可以连接内网,但是连接不上外网。ping DNS时会出现多次请求失败。
[root@xxx ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
NAME=eth0
DEVICE=eth0
TYPE=Ethernet
BOOTPROTO=static
ONBOOT=yes
IPADDR=192.168.139.203
NETMASK=255.255.240.0
GATEWAY=192.168.128.100
[root@xxx ~]# ping 114.114.114.114
PING 114.114.114.114 (114.114.114.114) 56(84) bytes of data.
From 192.168.139.203 icmp_seq=1 Destination Host Unreachable
From 192.168.139.203 icmp_seq=2 Destination Host Unreachable
From 192.168.139.203 icmp_seq=3 Destination Host Unreachable
From 192.168.139.203 icmp_seq=4 Destination Host Unreachable
From 192.168.139.203 icmp_seq=5 Destination Host Unreachable
From 192.168.139.203 icmp_seq=6 Destination Host Unreachable
From 192.168.139.203 icmp_seq=7 Destination Host Unreachable
From 192.168.139.203 icmp_seq=8 Destination Host Unreachable
^C
--- 114.114.114.114 ping statistics ---
8 packets transmitted, 0 received, +8 errors, 100% packet loss, time 7000ms
pipe 4
使用apache-tomcat-7.0.69发布war格式打包的springboot项目,执行bin/startup.sh。
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.5.3.RELEASE)
Aug 24, 2017 12:23:21 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deployment of web application archive /apache-tomcat-7.0.69/webapps/xxx.war has finished in 76,815 ms
Aug 24, 2017 12:23:21 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-9080"]
Aug 24, 2017 12:23:21 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-9009"]
Aug 24, 2017 12:23:21 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 76930 ms
网络配置正常的场景下,