无法在同一子网上执行两个设备的回声请求
需要帮助路由。 我不明白如何使它工作
我已配置 2 设备。 其中一个设备 (
somebox1
) 定制S. 2 接口,路由表看起来如下所示。
因此,在此字段中为两个接口添加了路由规则 192.168.4.x 和 192.168.6.x. 他们都是部分 CIDR / 23
默认 - 192.168.4.1.
我有另一个设备 (
somebox2
) 配置在子网中的一个接口 192.168.6.x. 它的路由表如下
现在。 我有问题 somebox2 我无法检查与IP地址的连接 eth0 somebox1.
但我可以传播默认网关 somebox1
与 somebox1 我可以ping一个IP地址 eth0 为了 somebox2, 使用界面 eth1
如果我删除了路由表中的录制 192.168.6.0 在 somebox1 或者我完全删除了界面 eth1 (192.168.6.x), 然后我可以轻松地执行回声请求 somebox2 在 somebox1.
另外,我可以看到它是否已配置 somebox2 有界面 192.168.4.x, 192.168.2.x 或者 192.168.12.x, 我可以轻松检查IP地址 eth0 为了 somebox1. 事实只是什么时候 192.168.6.x 调整为 somebox2, 我不能ping IP地址 eth0 为了 somebox1, 但我可以轻松检查IP地址 eth1 为了 somebox1, 哪个是在线 192.168.6.x
问题:
我已配置 2 设备。 其中一个设备 (
somebox1
) 定制S. 2 接口,路由表看起来如下所示。
[2018-08-24 00:29:14 root@somebox1: /home/admin ]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.4.1 0.0.0.0 UG 0 0 0 eth0
192.168.4.0 0.0.0.0 255.255.254.0 U 0 0 0 eth0
192.168.6.0 0.0.0.0 255.255.254.0 U 0 0 0 eth1
因此,在此字段中为两个接口添加了路由规则 192.168.4.x 和 192.168.6.x. 他们都是部分 CIDR / 23
默认 - 192.168.4.1.
我有另一个设备 (
somebox2
) 配置在子网中的一个接口 192.168.6.x. 它的路由表如下
[2018-08-24 04:54:31 admin@somebox2: ~ ]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.6.1 0.0.0.0 UG 0 0 0 eth0
192.168.6.0 0.0.0.0 255.255.254.0 U 0 0 0 eth0
现在。 我有问题 somebox2 我无法检查与IP地址的连接 eth0 somebox1.
[2018-08-25 04:55:47 root@somebox1: /home/admin ]# ping -I eth0 192.168.4.120
PING 172.29.4.120 (172.29.4.120) from 192.168.6.21 eth0: 56(84) bytes of data.
^C
--- 172.29.4.120 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 1999ms
但我可以传播默认网关 somebox1
[2018-08-25 04:55:32 root@somebox1: /home/admin ]# ping -I eth0 192.168.4.1
PING 172.29.4.1 (172.29.4.1) from 192.168.6.21 eth0: 56(84) bytes of data.
64 bytes from 192.168.4.1: icmp_seq=1 ttl=255 time=0.498 ms
64 bytes from 192.168.4.1: icmp_seq=2 ttl=255 time=0.701 ms
^C
--- 172.29.4.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1
与 somebox1 我可以ping一个IP地址 eth0 为了 somebox2, 使用界面 eth1
bash-4.2$ ping -I eth0 192.168.6.21
PING 192.168.6.21 (192.168.6.21) from 192.168.4.120 eth0: 56(84) bytes of data.
^C
--- 192.168.6.21 ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 2999ms
bash-4.2$ ping -I eth1 192.168.6.21
PING 192.168.6.21 (192.168.6.21) from 192.168.6.44 eth1: 56(84) bytes of data.
64 bytes from 192.168.6.21: icmp_seq=1 ttl=64 time=1.64 ms
64 bytes from 192.168.6.21: icmp_seq=2 ttl=64 time=0.789 ms
64 bytes from 192.168.6.21: icmp_seq=3 ttl=64 time=0.635 ms
^C
--- 192.168.6.21 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 0.635/1.022/1.643/0.444 ms
如果我删除了路由表中的录制 192.168.6.0 在 somebox1 或者我完全删除了界面 eth1 (192.168.6.x), 然后我可以轻松地执行回声请求 somebox2 在 somebox1.
另外,我可以看到它是否已配置 somebox2 有界面 192.168.4.x, 192.168.2.x 或者 192.168.12.x, 我可以轻松检查IP地址 eth0 为了 somebox1. 事实只是什么时候 192.168.6.x 调整为 somebox2, 我不能ping IP地址 eth0 为了 somebox1, 但我可以轻松检查IP地址 eth1 为了 somebox1, 哪个是在线 192.168.6.x
问题:
1. Is removing the Interface or Routing table for eth1 from somebox1 the only way i can ping from somebox2 to somebox1
2. Why is that with the same interface i am facing this hurdle of not able to ping. Is it to do with the Routing table configuration on somebox1
没有找到相关结果
已邀请:
0 个回复