通过 vlan 调试 arp 请求

网络工程 ARP 界面 tcpdump
2022-02-13 09:52:50

我们为 vlan 13 配置了一系列交换机,我们称它们为 switch1、switch2 和 switch3 不,在这条链上的某个地方,arp 请求会丢失。我可以在这些交换机上运行 tcpdump。运行只sudo tcpdump -n host 192.168.42.1显示 switch1 和 switch2 得到了 arp 请求,但 switch3 没有。

我想进一步隔离问题,看看问题是switch2还是switch3。我可以告诉 tcpdump 只监听一个特定接口上的传出 arp 请求吗?我试过了,sudo tcpdump -e -i et6但我没有看到 arp 请求。

更新

这是三个交换机的端口配置。布局(语法incoming_port#switch#outgoing_port):

fw1 - 6#switch1#45 - 45#switch2#51 - fiber - 41#switch3 - fw2

! switch 1: incoming

interface Ethernet6
   switchport access vlan 13
   spanning-tree portfast

! switch 1: outgoing

interface Ethernet45
   channel-group 60 mode active

interface Port-Channel60
   switchport trunk allowed vlan 1-3,5-4094
   switchport mode trunk
   mlag 16

! switch 2: incoming

interface Ethernet45
   switchport mode trunk
   channel-group 60 mode active
!

interface Port-Channel60
   switchport trunk allowed vlan 1-3,5-4094
   switchport mode trunk
!

! switch 2: outgoing

interface Ethernet51
   mtu 9000
   switchport access vlan 8
   switchport trunk allowed vlan 2-3,5-14,101-110,112-120
   switchport mode trunk
!

! switch 3: incoming

interface Ethernet51
   mtu 9000
   switchport access vlan 8
   switchport trunk allowed vlan 2-3,5-14,101-110,112-120
   switchport mode trunk
!
1个回答

我能够解决这个问题。正如上面评论中所建议的那样,问题确实出在传出端口上。在解决这个问题的过程中,无论有什么值得发现的东西:

  1. 首先了解网络拓扑。在您自己进行锻炼之前,没有人可以帮助您。如果您不了解大局,就不能要求准时帮助
  2. 不,似乎没有办法查看是否将 arp 数据包发送到特定接口
  3. 在某些交换机上,tcpdump 没有显示 arp 包。该线程解释说,只有通过交换机 cpu 的数据包才会出现。如果数据包来自交换机或发往交换机或打开了高级跟踪(这可能是我的情况,因为它确实显示的交换机运行在 Aristas EOS 的 4.15.x 版本和没有显示 arp 包的那些正在运行 4.12.x)
  4. 对于调试 vlan,在此过程中设置 vlan 接口很有帮助。在我的例子中,Arista 交换机支持使用这样的 ip 地址设置端点:

    interface Vlan13
      ip address 192.168.42.17/24
    

这样做可以让您执行例如arping 192.168.42.2 -I vlan13或简单ping 192.168.42.2的操作(交换机知道此 IP 地址已在 vlan 13 上配置并通过此 vlan 发送 ping)