同一内网不能网段ping 不通

 

[root@NB sysconfig]# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.122.0   *               255.255.255.0   U     0      0        0 virbr0
link-local      *               255.255.0.0     U     1004   0        0 br0
10.0.0.0        *               255.0.0.0       U     0      0        0 br0
default         10.100.2.1      0.0.0.0         UG    0      0        0 br0

本机的IP是10.100.2.15 目标机的IP是10.100.0.98

增加一条路由:(这里我做了网桥如果不做网桥的话,可以直接在eth0上面)

sh-4.1# route add -net 10.100.2.0/24 br0
sh-4.1# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.122.0   *               255.255.255.0   U     0      0        0 virbr0
10.100.2.0      *               255.255.255.0   U     0      0        0 br0
link-local      *               255.255.0.0     U     1004   0        0 br0
10.0.0.0        *               255.0.0.0       U     0      0        0 br0
default         10.100.2.1      0.0.0.0         UG    0      0        0 br0

还是不行,但删除下面这条路由后,成功了,但还不知是为什么

[root@NB ~]# route del del -net 10.0.0.0/8 br0
[root@NB ~]# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.122.0   *               255.255.255.0   U     0      0        0 virbr0
10.100.2.0      *               255.255.255.0   U     0      0        0 br0
link-local      *               255.255.0.0     U     1004   0        0 br0
default         10.100.2.1      0.0.0.0         UG    0      0        0 br0

 

posted @ 2016-11-14 13:39  bass  阅读(1715)  评论(0编辑  收藏  举报