2

设置图像
我有 2 对设置。
1. OpenSuse(A) 和 Opensuse(B)
2. OpenSuse(C) 和 Centos(D)

我在两种设置中都有 3 个接口,它们之间都是内部连接的。即,第一对有eth0,eth1,eth2,第二对有eth0,eth1,eth2。分配给接口的 IP 地址如下:

第一对

  • 打开使用 eth0-172.28.215.10/24、eth1-20.1.121.2/24、eth2-30.1.121.2/24
  • 打开使用 eth0-172.28.215.11/24、eth1-20.1.121.3/24、eth2-30.1.121.3/24

第二对

  • 打开使用 eth0-172.28.215.20、eth1-21.1.121.2、eth2-31.1.121.2
  • Centos eth0-172.28.215.21、eth1-21.1.121.3、eth2-31.1.121.3

172.28.215.1是 eth0 的网关。eth1 和 eth2 没有网关。AB和CD之间没有连接eth1和eth2的电缆,只有eth0。即 eth1 和 eth2 在 A&B 之间连接,但在 A&C 或 A&D 之间没有连接问题是

在第一对(A&B)中:

20.1.121.2 --> 20.1.121.3 -- works fine
20.1.121.2 --> 30.1.121.3 -- works fine
30.1.121.2 --> 20.1.121.3 -- works fine
30.1.121.2 --> 30.1.121.3 -- works fine

而另一种方式也可以正常工作此外,我可以在不同子网之间发送 ARP 数据包。我不知道这是怎么发生的。可能是这样配置的arptables,我是arptables概念的新手。

在第二对(C&D)中

21.1.121.2 --> 21.1.121.3 -- works fine
21.1.121.2 --> 31.1.121.3 -- doesn't work
31.1.121.2 --> 21.1.121.3 -- doesn't work
31.1.121.2 --> 31.1.121.3 -- works fine

不发送数据包的场景是在不同的子网之间。这里发生的事情是(关于 arp 和路由):

21.1.121.2 -> 21.1.121.3 ==> arp request was sent from C and arp response came from D and the packet was sent perfectly on eth1.
21.1.121.2 -> 31.1.121.3 ==> arp request was sent from C and arp response never came from D so, the packet was not sent.

现在更有趣的是从 D 到 C 的数据包传输:

21.1.121.3 -> 21.1.121.2 ==> arp request was sent from D and arp response came from C and the packet was sent perfectly on eth1.
31.1.121.3 -> 21.1.121.2 ==> arp request was never sent from D. Instead the packet was sent on eth0.

tshark/tethereal仅供参考:我可以在数据包捕获中看到所有这些。我在执行此操作之前清除了 arp 缓存。我根据mac地址决定发送和接收的数据包。我们发送的数据包是 SIP 数据包。
如果您需要更多信息,请告诉我。

现在的问题是,为什么会有这种差异?我应该怎么做才能让第二对(主要在机器 D 上)作为第一对工作?

4

0 回答 0