linux ip route cache,IP route 默认路由故障分析

[root@localhost ~]# ping 192.168.197.200 -c 4

PING 192.168.197.200 (192.168.197.200) 56(84) bytes of data.

64 bytes from 192.168.197.200: icmp_seq=0 ttl=255 time=0.496 ms

64 bytes from 192.168.197.200: icmp_seq=1 ttl=255 time=1.17 ms

64 bytes from 192.168.197.200: icmp_seq=2 ttl=255 time=0.483 ms

64 bytes from 192.168.197.200: icmp_seq=3 ttl=255 time=1.36 ms

— 192.168.197.200 ping statistics —

4 packets transmitted, 4 received, 0% packet loss, time 3001ms

rtt min/avg/max/mdev = 0.483/0.879/1.368/0.397 ms, pipe 2

[root@localhost ~]#

[root@localhost ~]# ping 113.106.92.180 -c 4

connect: Network is unreachable

[root@localhost ~]#

[root@localhost ~]# ping www.qq.com

ping: unknown host www.qq.com

[root@localhost ~]#

[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0

# Please read /usr/share/doc/initscripts-*/sysconfig.txt

# for the documentation of these parameters.

ONBOOT=yes

USERCTL=no

IPV6INIT=no

PEERDNS=yes

GATEWAY=192.168.197.200

TYPE=Ethernet

DEVICE=eth0

HWADDR=00:1a:64:6f:4f:33

BOOTPROTO=none

NETMASK=255.255.255.0

IPADDR=192.168.197.5

[root@localhost ~]#

[root@localhost ~]# cat /etc/resolv.conf

nameserver 8.8.8.8

nameserver 8.8.4.4

[root@localhost ~]#

[root@localhost ~]# cat /etc/sysconfig/network

NETWORKING=yes

HOSTNAME=localhost.com.hk

[root@localhost ~]#

[root@localhost ~]# ip route

192.168.197.0/24 dev eth0 proto kernel scope link src 192.168.197.5

[root@localhost ~]#

[root@lb01 conf]# ip route

192.168.197.0/24 dev eth0 proto kernel scope link src 192.168.197.65

169.254.0.0/16 dev eth0 scope link metric 1002

default via 192.168.197.200 dev eth0

[root@lb01 conf]#

[root@localhost ~]# service network restart

Shutting down interface eth0: [ OK ]

Shutting down loopback interface: [ OK ]

Setting network parameters: [ OK ]

Bringing up loopback interface: [ OK ]

Bringing up interface eth0: [ OK ]

[root@localhost ~]#

[root@localhost ~]# ip route

192.168.197.0/24 dev eth0 proto kernel scope link src 192.168.197.5

169.254.0.0/16 dev eth0 scope link

default via 192.168.197.200 dev eth0

[root@localhost ~]#

[root@localhost ~]# ifconfig

eth0 Link encap:Ethernet HWaddr 00:1A:64:6F:4F:33

inet addr:192.168.197.5 Bcast:192.168.197.255 Mask:255.255.255.0

inet6 addr: fe80::21a:64ff:fe6f:4f33/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:670 errors:0 dropped:0 overruns:0 frame:0

TX packets:690 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:174196 (170.1 KiB) TX bytes:428433 (418.3 KiB)

Interrupt:169

lo Link encap:Local Loopback

inet addr:127.0.0.1 Mask:255.0.0.0

inet6 addr: ::1/128 Scope:Host

UP LOOPBACK RUNNING MTU:16436 Metric:1

RX packets:266497 errors:0 dropped:0 overruns:0 frame:0

TX packets:266497 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:39985115 (38.1 MiB) TX bytes:39985115 (38.1 MiB)

[root@localhost ~]#

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值