大佬不外传的交换机排障抓包黑科技

原创 Linux二进制 2024-10-22 08:20

一、问题背景

两台Linux服务器compute2computer6的指定网卡ens4np0enp101s0np1通过Dell交换机二层互联,并且配置同网段的IP地址,在两个服务器上分别指定网口ens4np0enp101s0np1ping,结果在两台服务器上都始终无法ping通,接下来将通过抓包来进行问题分析定位。

二、组网架构

两台服务器的ens4np0enp101s0np1网卡采取简单二层连接,组网拓扑图如下所示:

三、网络配置

1、compute2网络配置信息

[root@compute2 ~]# ip a
1: lo:  mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eno3:  mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether b0:26:28:ff:c7:5a brd ff:ff:ff:ff:ff:ff
    altname enp1s0f0
    inet 10.8.8.2/24 brd 10.8.13.255 scope global dynamic eno3
       valid_lft 6131sec preferred_lft 6131sec
    inet6 fe80::b226:28ff:feff:c75a/64 scope link
       valid_lft forever preferred_lft forever
3: eno4:  mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether b0:26:28:ff:c7:5b brd ff:ff:ff:ff:ff:ff
    altname enp1s0f1
4: eno1np0:  mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether b0:26:28:ff:c7:5c brd ff:ff:ff:ff:ff:ff
    altname enp25s0f0np0
5: eno2np1:  mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether b0:26:28:ff:c7:5d brd ff:ff:ff:ff:ff:ff
    altname enp25s0f1np1
14: bond2:  mtu 1600 qdisc noqueue state DOWN group default qlen 1000
    link/ether 82:94:2d:68:e1:26 brd ff:ff:ff:ff:ff:ff
25: docker0:  mtu 1500 qdisc noqueue state DOWN group default
    link/ether 02:42:ee:5f:4f:68 brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
       valid_lft forever preferred_lft forever
26: ovs-system:  mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether e2:ba:b8:a9:7b:23 brd ff:ff:ff:ff:ff:ff
27: mirror0:  mtu 1400 qdisc noqueue state UNKNOWN group default qlen 1000
    link/ether fe:a4:0a:5b:9f:bd brd ff:ff:ff:ff:ff:ff
    inet6 fe80::fca4:aff:fe5b:9fbd/64 scope link
       valid_lft forever preferred_lft forever
28: ovn0:  mtu 1400 qdisc noqueue state UNKNOWN group default qlen 1000
    link/ether 00:00:00:84:fd:41 brd ff:ff:ff:ff:ff:ff
    inet 100.64.0.2/16 brd 100.64.255.255 scope global ovn0
       valid_lft forever preferred_lft forever
    inet6 fe80::200:ff:fe84:fd41/64 scope link
       valid_lft forever preferred_lft forever
29: genev_sys_6081:  mtu 65000 qdisc noqueue master ovs-system state UNKNOWN group default qlen 1000
    link/ether 92:de:04:77:6a:b5 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::90de:4ff:fe77:6ab5/64 scope link
       valid_lft forever preferred_lft forever
30: br-int:  mtu 1400 qdisc noop state DOWN group default qlen 1000
    link/ether 86:b4:b3:6f:b5:3a brd ff:ff:ff:ff:ff:ff
39: ens1:  mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 32:14:eb:bd:2a:15 brd ff:ff:ff:ff:ff:ff
    altname enp59s0
40: ens1np0:  mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether 00:15:4d:16:66:d5 brd ff:ff:ff:ff:ff:ff
    altname enp59s0np0
41: ens1np1:  mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:15:4d:16:66:d6 brd ff:ff:ff:ff:ff:ff
    altname enp59s0np1
42: eth3:  mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 92:cd:7a:0b:c7:a0 brd ff:ff:ff:ff:ff:ff
43: ens4:  mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 06:fc:64:f0:c6:77 brd ff:ff:ff:ff:ff:ff
    altname enp175s0
    inet6 fe80::4fc:64ff:fef0:c677/64 scope link
       valid_lft forever preferred_lft forever
44: ens4np0:  mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 00:15:4d:16:20:6a brd ff:ff:ff:ff:ff:ff
    altname enp175s0np0
    inet 10.18.0.2/24 brd 10.18.0.255 scope global ens4np0
       valid_lft forever preferred_lft forever
    inet6 fe80::215:4dff:fe16:206a/64 scope link
       valid_lft forever preferred_lft forever
45: ens4np1:  mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:15:4d:16:20:6b brd ff:ff:ff:ff:ff:ff
    altname enp175s0np1
46: eth4:  mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 32:a3:d8:8e:61:a8 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::30a3:d8ff:fe8e:61a8/64 scope link
       valid_lft forever preferred_lft forever
48: e12921368e14_h@if47:  mtu 1400 qdisc noqueue master ovs-system state UP group default qlen 1000
    link/ether 86:0b:13:97:a8:34 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet6 fe80::840b:13ff:fe97:a834/64 scope link
       valid_lft forever preferred_lft forever
50: 8f49fd46cbd7_h@if49:  mtu 1400 qdisc noqueue master ovs-system state UP group default qlen 1000
    link/ether 26:17:92:7f:c3:62 brd ff:ff:ff:ff:ff:ff link-netnsid 1
    inet6 fe80::2417:92ff:fe7f:c362/64 scope link
       valid_lft forever preferred_lft forever
51: ens4v0:  mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether ca:7b:a7:9b:4d:c7 brd ff:ff:ff:ff:ff:ff
    altname enp175s0v0
    inet6 fe80::c87b:a7ff:fe9b:4dc7/64 scope link
       valid_lft forever preferred_lft forever
52: ens4v1:  mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether ea:d9:39:76:3c:72 brd ff:ff:ff:ff:ff:ff
    altname enp175s0v1
    inet6 fe80::e8d9:39ff:fe76:3c72/64 scope link
       valid_lft forever preferred_lft forever
53: ens4v2:  mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether d6:4a:e2:d0:39:c6 brd ff:ff:ff:ff:ff:ff
    altname enp175s0v2
    inet6 fe80::d44a:e2ff:fed0:39c6/64 scope link
       valid_lft forever preferred_lft forever
54: ens4v3:  mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether f6:50:c1:82:86:3e brd ff:ff:ff:ff:ff:ff
    altname enp175s0v3
    inet6 fe80::f450:c1ff:fe82:863e/64 scope link
       valid_lft forever preferred_lft forever
55: nfp_v0.0:  mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether ae:ac:45:bf:8f:d7 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::acac:45ff:febf:8fd7/64 scope link
       valid_lft forever preferred_lft forever
56: nfp_v0.1:  mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 7a:07:8e:22:2c:04 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::7807:8eff:fe22:2c04/64 scope link
       valid_lft forever preferred_lft forever
57: nfp_v0.2:  mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 32:42:eb:73:bb:6f brd ff:ff:ff:ff:ff:ff
    inet6 fe80::3042:ebff:fe73:bb6f/64 scope link
       valid_lft forever preferred_lft forever
58: nfp_v0.3:  mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 8e:b0:54:a3:7a:86 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::8cb0:54ff:fea3:7a86/64 scope link
       valid_lft forever preferred_lft forever

ip a的结果可知,compute2服务器上ens4np0网口的状态和ip地址信息均正常。

2、computer6服务器网络配置信息:

[root@computer6 ~]# ip a
1: lo:  mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: em1:  mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 20:04:0f:f2:4a:e8 brd ff:ff:ff:ff:ff:ff
    inet 10.8.8.6/24 brd 10.8.8.255 scope global dynamic noprefixroute em1
       valid_lft 7000sec preferred_lft 7000sec
    inet6 fe80::5395:4226:33be:a549/64 scope link noprefixroute
       valid_lft forever preferred_lft forever
3: em2:  mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether 20:04:0f:f2:4a:e9 brd ff:ff:ff:ff:ff:ff
4: em3:  mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether 20:04:0f:f2:4a:ea brd ff:ff:ff:ff:ff:ff
5: em4:  mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether 20:04:0f:f2:4a:eb brd ff:ff:ff:ff:ff:ff
6: enp101s0:  mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 62:a5:06:71:9a:f1 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::60a5:6ff:fe71:9af1/64 scope link
       valid_lft forever preferred_lft forever
7: enp101s0np0:  mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:15:4d:16:66:33 brd ff:ff:ff:ff:ff:ff
8: enp101s0np1:  mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 00:15:4d:16:66:34 brd ff:ff:ff:ff:ff:ff
    inet 10.18.0.6/24 brd 10.18.0.255 scope global enp101s0np1
       valid_lft forever preferred_lft forever
    inet6 fe80::215:4dff:fe16:6634/64 scope link
       valid_lft forever preferred_lft forever
9: eth3:  mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 5e:79:ac:37:ba:9c brd ff:ff:ff:ff:ff:ff
    inet6 fe80::5c79:acff:fe37:ba9c/64 scope link
       valid_lft forever preferred_lft forever
10: p1p1_0:  mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 7e:4a:20:8a:7f:6c brd ff:ff:ff:ff:ff:ff
11: p1p1_1:  mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether fe:6c:db:ae:d4:58 brd ff:ff:ff:ff:ff:ff
12: p1p1_2:  mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 5a:0a:6a:3e:57:b2 brd ff:ff:ff:ff:ff:ff
13: p1p1_3:  mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 7e:18:0a:65:82:85 brd ff:ff:ff:ff:ff:ff
14: eth5:  mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 7e:1c:cf:42:16:cb brd ff:ff:ff:ff:ff:ff
15: eth6:  mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 92:f2:db:e7:a8:e1 brd ff:ff:ff:ff:ff:ff
16: eth7:  mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether de:be:1c:ea:e6:b1 brd ff:ff:ff:ff:ff:ff
17: eth8:  mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether ce:86:a0:0e:dd:99 brd ff:ff:ff:ff:ff:ff
18: docker0:  mtu 1500 qdisc noqueue state DOWN group default
    link/ether 02:42:39:be:34:40 brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 scope global docker0
       valid_lft forever preferred_lft forever
19: virbr0:  mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 52:54:00:20:20:25 brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
       valid_lft forever preferred_lft forever
20: virbr0-nic:  mtu 1500 qdisc fq_codel master virbr0 state DOWN group default qlen 1000
    link/ether 52:54:00:20:20:25 brd ff:ff:ff:ff:ff:ff
21: vnet0:  mtu 1500 qdisc fq_codel master virbr0 state UNKNOWN group default qlen 1000
    link/ether fe:54:00:fa:dc:00 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::fc54:ff:fefa:dc00/64 scope link
       valid_lft forever preferred_lft forever
22: ovs-system:  mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 82:06:fa:8d:b1:2a brd ff:ff:ff:ff:ff:ff
23: mirror0:  mtu 1400 qdisc noqueue state UNKNOWN group default qlen 1000
    link/ether c2:f5:3b:c9:9f:27 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::c0f5:3bff:fec9:9f27/64 scope link
       valid_lft forever preferred_lft forever
24: ovn0:  mtu 1400 qdisc noqueue state UNKNOWN group default qlen 1000
    link/ether 00:00:00:c8:76:7b brd ff:ff:ff:ff:ff:ff
    inet 100.64.0.3/16 brd 100.64.255.255 scope global ovn0
       valid_lft forever preferred_lft forever
    inet6 fe80::200:ff:fec8:767b/64 scope link
       valid_lft forever preferred_lft forever
25: genev_sys_6081:  mtu 65000 qdisc noqueue master ovs-system state UNKNOWN group default qlen 1000
    link/ether 8a:44:7d:eb:aa:c0 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::8844:7dff:feeb:aac0/64 scope link
       valid_lft forever preferred_lft forever
26: br-int:  mtu 1400 qdisc noop state DOWN group default qlen 1000
    link/ether c6:4a:8e:92:8d:42 brd ff:ff:ff:ff:ff:ff
36: cf62c26a92f3_h@if35:  mtu 1400 qdisc noqueue master ovs-system state UP group default qlen 1000
    link/ether a6:5e:d5:bf:22:65 brd ff:ff:ff:ff:ff:ff link-netnsid 1
    inet6 fe80::a45e:d5ff:febf:2265/64 scope link
       valid_lft forever preferred_lft forever

ip a的结果可知,computer6服务器上enp101s0np1网口的状态和ip地址信息均正常。

四、问题分析

1、故障现象

computer6服务器

computer6服务器上通过enp101s0np1网口ping相连的对端网口的地址,情况如下:

[root@computer6 ~]# ping -I enp101s0np1 10.18.0.2
PING 10.18.0.2 (10.18.0.2) from 10.18.0.6 enp101s0np1: 56(84) bytes of data.
^C
--- 10.18.0.2 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2076ms

compute2服务器

compute2服务器上通过ens4np0网口ping相连的对端网口的地址,情况如下:

[root@compute2 ~]# ping -I ens4np0 10.18.0.6
PING 10.18.0.6 (10.18.0.6) from 10.18.0.2 ens4np0: 56(84) bytes of data.
^C
--- 10.18.0.6 ping statistics ---
161 packets transmitted, 0 received, 100% packet loss, time 163856ms
pipe 4

根据上述结果可知,在两台服务器上的指定网卡ping都无法ping通对端;接下来以compute2服务器上的现象来进行分析,首先在compute2服务器上进行抓包查看包是否已发送出去,如下:

[root@compute2 ~]# tcpdump -i ens4np0 -nevvv
dropped privs to tcpdump
tcpdump: listening on ens4np0, link-type EN10MB (Ethernet), capture size 262144 bytes
16:29:05.644390 00:15:4d:16:20:6a > Broadcast, ethertype ARP (0x0806), length 42: Ethernet (len 6), IPv4 (len 4), Request who-has 10.18.0.6 tell 10.18.0.2, length 28
16:29:06.704807 00:15:4d:16:20:6a > Broadcast, ethertype ARP (0x0806), length 42: Ethernet (len 6), IPv4 (len 4), Request who-has 10.18.0.6 tell 10.18.0.2, length 28
16:29:07.728773 00:15:4d:16:20:6a > Broadcast, ethertype ARP (0x0806), length 42: Ethernet (len 6), IPv4 (len 4), Request who-has 10.18.0.6 tell 10.18.0.2, length 28
16:29:09.729959 00:15:4d:16:20:6a > Broadcast, ethertype ARP (0x0806), length 42: Ethernet (len 6), IPv4 (len 4), Request who-has 10.18.0.6 tell 10.18.0.2, length 28
^C

根据抓包报文可知,compute2服务器的网络协议栈已经将arp请求报文发出,接下来查看对端服务器是否收到arp请求报文,如下:

[root@computer6 ~]# tcpdump -i enp101s0np1 -e -n
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on enp101s0np1, link-type EN10MB (Ethernet), capture size 262144 bytes
15:30:00.449732 0c:29:ef:bf:b1:a3 > 01:80:c2:00:00:0e, ethertype LLDP (0x88cc), length 414: LLDP, length 400: dell-switch
15:30:30.451960 0c:29:ef:bf:b1:a3 > 01:80:c2:00:00:0e, ethertype LLDP (0x88cc), length 396: LLDP, length 382: dell-switch
15:31:00.454307 0c:29:ef:bf:b1:a3 > 01:80:c2:00:00:0e, ethertype LLDP (0x88cc), length 414: LLDP, length 400: dell-switch
^C

根据上述抓包结果可知,computer6服务器上未收到对端服务器的arp请求报文。因此推测可能是交换机出现了问题,因此,接下来需要查看交换机上端口是否正常,是否能正常转发arp报文。

dell-switch# show interface status

--------------------------------------------------------------------------------------------------
Port            Description     Status   Speed    Duplex   Mode Vlan Tagged-Vlans
--------------------------------------------------------------------------------------------------
Eth 1/1/1                       down     0        full     T    93   103,105
Eth 1/1/2                       down     0        full     T    93   103,105
Eth 1/1/3                       up       25G      full     A    66   -
Eth 1/1/4                       down     0        full     A    66   -
Eth 1/1/5:1                     down     0        full     A    5    -
Eth 1/1/6:1                     down     0        full     A    5    -
Eth 1/1/7:1                     down     0        full     A    5    -
Eth 1/1/8:1                     down     0        full     A    5    -
Eth 1/1/9:1                     down     0        full     A    100  -
Eth 1/1/10:1                    up       10G      full     A    66   -
Eth 1/1/11:1                    down     0        full     A    100  -
Eth 1/1/12:1                    down     0        full     A    66   -
Eth 1/1/13                      down     0        full     A    5    -
Eth 1/1/14                      down     0        full     A    5    -
Eth 1/1/15                      down     0        full     A    5    -
--------------------------------------------------------------------------------------------------

由上可知,交换机连接的服务器的两个接口状态均是up的,并且同处于一个vlan 66中.接下来再查看一下mac地址转发表是否正常,如下:

dell-switch# show mac address-table
VlanId  Mac Address             Type            Interface
66      22:15:4d:16:66:34       dynamic         ethernet1/1/3
dell-switch#

2、故障分析

通过mac地址转发表可知,交换机只学习到了和ethernet1/1接口连接的网卡的mac地址,而未学习到与ethernet1/1/10:1接口连接的网卡的mac地址。至于原因,不得而知,此时就需要搞明白为什么交换机没有学习到与ethernet1/1/10:1接口连接的网卡的mac地址。因此决定在交换机上进行抓包,从而确定交换机是否收到网络报文。

通常来讲,交换机上抓包,网络上的博文一般都会告诉你通过镜像抓包的方式,但是简单看了一下镜像抓包的博文,看起来就很麻烦,而且我所使用的Dell交换机在网络上资料极少,基本搜不到详细的镜像抓包的指导方法。此时,便抱着试试的心态,求助其他大佬,大佬很谦虚,告诉我他已经很久没有搞过交换机了,但是依然很热心的帮我看了一下,一手操作,简直秀翻我,接下来一起欣赏他的骚操作。

dell-switch# show interface ethernet 1/1/10:1
Ethernet 1/1/10:1 is up, line protocol is up
Hardware is Eth, address is 0c:29:ef:bf:b1:aa
    Current address is 0c:29:ef:bf:b1:aa
Pluggable media present, SFP28 type is SFP28 25GBASE-SR
    Wavelength is 850
    Receive power reading is -1.988708 dBm
Interface index is 23
Internet address is not set
Mode of IPv4 Address Assignment: not set
Interface IPv6 oper status: Disabled
MTU 1532 bytes, IP MTU 1500 bytes
LineSpeed 10G, Auto-Negotiation off
Flowcontrol rx off tx off
ARP type: ARPA, ARP Timeout: 60
Last clearing of "show interface" counters: 7 weeks 2 days 08:41:05
Queuing strategy: fifo
Input statistics:
     178525367 packets, 11432189964 octets
     178454818 64-byte pkts, 14780 over 64-byte pkts, 51913 over 127-byte pkts
     3855 over 255-byte pkts, 0 over 511-byte pkts, 1 over 1023-byte pkts
     66 Multicasts, 11799 Broadcasts, 70959 Unicasts
     0 runts, 4 giants, 178442543 throttles
     0 CRC, 0 overrun, 4 discarded
Output statistics:
     202637 packets, 102558633 octets
     75004 64-byte pkts, 16167 over 64-byte pkts, 29153 over 127-byte pkts
     22923 over 255-byte pkts, 7004 over 511-byte pkts, 52386 over 1023-byte pkts
     17650 Multicasts, 57789 Broadcasts, 127198 Unicasts
     0 throttles, 0 discarded, 0 Collisions,  wred drops
Rate Info(interval  seconds):
     Input 0 Mbits/sec, 454 packets/sec, 0% of line rate
     Output 0 Mbits/sec, 1 packets/sec, 0% of line rate
Time since last interface status change: 00:22:59 

dell-switch#
 show interface ethernet 1/1/10:1
Ethernet 1/1/10:1 is up, line protocol is up
Hardware is Eth, address is 0c:29:ef:bf:b1:aa
    Current address is 0c:29:ef:bf:b1:aa
Pluggable media present, SFP28 type is SFP28 25GBASE-SR
    Wavelength is 850
    Receive power reading is -1.991455 dBm
Interface index is 23
Internet address is not set
Mode of IPv4 Address Assignment: not set
Interface IPv6 oper status: Disabled
MTU 1532 bytes, IP MTU 1500 bytes
LineSpeed 10G, Auto-Negotiation off
Flowcontrol rx off tx off
ARP type: ARPA, ARP Timeout: 60
Last clearing of "show interface" counters: 7 weeks 2 days 08:41:54
Queuing strategy: fifo
Input statistics:
     178548095 packets, 11433644556 octets
     178477546 64-byte pkts, 14780 over 64-byte pkts, 51913 over 127-byte pkts
     3855 over 255-byte pkts, 0 over 511-byte pkts, 1 over 1023-byte pkts
     66 Multicasts, 11799 Broadcasts, 70959 Unicasts
     0 runts, 4 giants, 178465271 throttles
     0 CRC, 0 overrun, 4 discarded
Output statistics:
     202688 packets, 102562941 octets
     75052 64-byte pkts, 16167 over 64-byte pkts, 29153 over 127-byte pkts
     22926 over 255-byte pkts, 7004 over 511-byte pkts, 52386 over 1023-byte pkts
     17653 Multicasts, 57837 Broadcasts, 127198 Unicasts
     0 throttles, 0 discarded, 0 Collisions,  wred drops
Rate Info(interval  seconds):
     Input 0 Mbits/sec, 378 packets/sec, 0% of line rate
     Output 0 Mbits/sec, 0 packets/sec, 0% of line rate
Time since last interface status change: 00:23:48 

dell-switch#
 show interface ethernet 1/1/10:1
Ethernet 1/1/10:1 is up, line protocol is up
Hardware is Eth, address is 0c:29:ef:bf:b1:aa
    Current address is 0c:29:ef:bf:b1:aa
Pluggable media present, SFP28 type is SFP28 25GBASE-SR
    Wavelength is 850
    Receive power reading is -1.991455 dBm
Interface index is 23
Internet address is not set
Mode of IPv4 Address Assignment: not set
Interface IPv6 oper status: Disabled
MTU 1532 bytes, IP MTU 1500 bytes
LineSpeed 10G, Auto-Negotiation off
Flowcontrol rx off tx off
ARP type: ARPA, ARP Timeout: 60
Last clearing of "show interface" counters: 7 weeks 2 days 08:43:17
Queuing strategy: fifo
Input statistics:
     178584469 packets, 11435972492 octets
     178513920 64-byte pkts, 14780 over 64-byte pkts, 51913 over 127-byte pkts
     3855 over 255-byte pkts, 0 over 511-byte pkts, 1 over 1023-byte pkts
     66 Multicasts, 11799 Broadcasts, 70959 Unicasts
     0 runts, 4 giants, 178501645 throttles
     0 CRC, 0 overrun, 4 discarded
Output statistics:
     202770 packets, 102569233 octets
     75131 64-byte pkts, 16167 over 64-byte pkts, 29153 over 127-byte pkts
     22929 over 255-byte pkts, 7004 over 511-byte pkts, 52386 over 1023-byte pkts
     17656 Multicasts, 57916 Broadcasts, 127198 Unicasts
     0 throttles, 0 discarded, 0 Collisions,  wred drops
Rate Info(interval  seconds):
     Input 0 Mbits/sec, 454 packets/sec, 0% of line rate
     Output 0 Mbits/sec, 1 packets/sec, 0% of line rate
Time since last interface status change: 00:25:11

因为ethernet1/1/10:1接口未学习到mac地址,因此多次查看该接口的状态,发现入向throttles统计的值一直在不停的增加,该统计值的意思是“节流或抑制”;交换机流量过载会触发该节流操作,其数值表示端口上的接收器被禁用的次数,持续的查找设备的MAC地址的过载流量导致其发生,短时间内无法接收任何新的数据包,因此决定抓包确认一下。

大佬告诉我交换机有一种Linux模式,可以切换到该模式下,直接使用tcpdump进行端口抓包。听到这我顿时眼前一亮,竟然还有这样的骚(黑)操(科)作(技)!只见他直接就在交换机上切换到Linux模式,开始一系列操作:

#在交换机上使用ifconfig命令查看两个接口所属vlan66所对应的网桥,原来交换机上是通过网桥的方式实现的vlan
dell-switch# system "ifconfig"
bo1: flags=5123  mtu 1568
        inet6 fe80::e29:efff:febf:b1ba  prefixlen 64  scopeid 0x20
        ether 0c:29:ef:bf:b1:ba  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 5 overruns 0  carrier 0  collisions 0

bo2: flags=5123  mtu 1500
        inet 6.6.6.10  netmask 255.255.255.0  broadcast 6.6.6.255
        inet6 fe80::e29:efff:febf:b1bb  prefixlen 64  scopeid 0x20
        ether 0c:29:ef:bf:b1:bb  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 3 overruns 0  carrier 0  collisions 0

bo3: flags=5123  mtu 1568
        inet6 fe80::e29:efff:febf:b1bc  prefixlen 64  scopeid 0x20
        ether 0c:29:ef:bf:b1:bc  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 4 overruns 0  carrier 0  collisions 0

bo4: flags=5123  mtu 1500
        inet6 fe80::e29:efff:febf:b1bd  prefixlen 64  scopeid 0x20
        ether 0c:29:ef:bf:b1:bd  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 2 overruns 0  carrier 0  collisions 0

bo5: flags=5123  mtu 1500
        inet 5.5.5.10  netmask 255.255.255.0  broadcast 5.5.5.255
        inet6 fe80::e29:efff:febf:b1be  prefixlen 64  scopeid 0x20
        ether 0c:29:ef:bf:b1:be  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 2 overruns 0  carrier 0  collisions 0

bo1.555: flags=4099  mtu 1500
        ether 0c:29:ef:bf:b1:ba  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

bo3.888: flags=4099  mtu 1500
        ether 0c:29:ef:bf:b1:bc  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br1: flags=4355  mtu 1500
        inet6 fe80::e29:efff:febf:b1d1  prefixlen 64  scopeid 0x20
        ether 0c:29:ef:bf:b1:d1  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br2: flags=4355  mtu 1500
        inet6 fe80::e29:efff:febf:b1d1  prefixlen 64  scopeid 0x20
        ether 0c:29:ef:bf:b1:d1  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br3: flags=4355  mtu 1500
        inet6 fe80::e29:efff:febf:b1d1  prefixlen 64  scopeid 0x20
        ether 0c:29:ef:bf:b1:d1  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br4: flags=4355  mtu 1500
        inet6 fe80::e29:efff:febf:b1d1  prefixlen 64  scopeid 0x20
        ether 0c:29:ef:bf:b1:d1  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br5: flags=4355  mtu 1500
        inet6 fe80::e29:efff:febf:b1d1  prefixlen 64  scopeid 0x20
        ether 0c:29:ef:bf:b1:d1  txqueuelen 1000  (Ethernet)
        RX packets 590  bytes 38612 (37.7 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1205  bytes 110594 (108.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br66: flags=4419  mtu 1500
        inet6 fe80::e29:efff:febf:b1d1  prefixlen 64  scopeid 0x20
        ether 0c:29:ef:bf:b1:d1  txqueuelen 1000  (Ethernet)
        RX packets 154750  bytes 7761460 (7.4 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 5146  bytes 459568 (448.7 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br93: flags=4355  mtu 1500
        inet6 fe80::e29:efff:febf:b1d1  prefixlen 64  scopeid 0x20
        ether 0c:29:ef:bf:b1:d1  txqueuelen 1000  (Ethernet)
        RX packets 7  bytes 452 (452.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 24  bytes 2728 (2.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br100: flags=4355  mtu 1500
        inet6 fe80::e29:efff:febf:b1d1  prefixlen 64  scopeid 0x20
        ether 0c:29:ef:bf:b1:d1  txqueuelen 1000  (Ethernet)
        RX packets 113  bytes 7136 (6.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 78  bytes 7116 (6.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br103: flags=4355  mtu 9184
        inet 12.8.8.200  netmask 255.255.255.0  broadcast 12.8.8.255
        inet6 fe80::e29:efff:febf:b1d1  prefixlen 64  scopeid 0x20
        ether 0c:29:ef:bf:b1:d1  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 18  bytes 2148 (2.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br105: flags=4355  mtu 1500
        inet6 fe80::e29:efff:febf:b1d1  prefixlen 64  scopeid 0x20
        ether 0c:29:ef:bf:b1:d1  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 19  bytes 2278 (2.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br111: flags=4355  mtu 1500
        inet6 fe80::e29:efff:febf:b1d1  prefixlen 64  scopeid 0x20
        ether 0c:29:ef:bf:b1:d1  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br112: flags=4355  mtu 1500
        inet 12.12.12.10  netmask 255.255.255.0  broadcast 12.12.12.255
        inet6 fe80::e29:efff:febf:b1d1  prefixlen 64  scopeid 0x20
        ether 0c:29:ef:bf:b1:d1  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br123: flags=4355  mtu 1500
        inet6 fe80::e29:efff:febf:b1d1  prefixlen 64  scopeid 0x20
        ether 0c:29:ef:bf:b1:d1  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br135: flags=4355  mtu 1500
        inet6 fe80::e29:efff:febf:b1d1  prefixlen 64  scopeid 0x20
        ether 0c:29:ef:bf:b1:d1  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br222: flags=4355  mtu 1500
        inet6 fe80::e29:efff:febf:b1d1  prefixlen 64  scopeid 0x20
        ether 0c:29:ef:bf:b1:d1  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br246: flags=4355  mtu 1500
        inet6 fe80::e29:efff:febf:b1d1  prefixlen 64  scopeid 0x20
        inet6 fe80::e29:efff:febf:b1d1  prefixlen 64  scopeid 0x20
        ether 0c:29:ef:bf:b1:d1  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br555: flags=4355  mtu 1500
        inet6 fe80::e29:efff:febf:b1d1  prefixlen 64  scopeid 0x20
        ether 0c:29:ef:bf:b1:d1  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br888: flags=4355  mtu 1500
        inet6 fe80::e29:efff:febf:b1d1  prefixlen 64  scopeid 0x20
        ether 0c:29:ef:bf:b1:d1  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br3055: flags=4355  mtu 1500
        inet6 fe80::e29:efff:febf:b1d1  prefixlen 64  scopeid 0x20
        ether 0c:29:ef:bf:b1:d1  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

e101-001-0: flags=4099  mtu 9184
        inet6 fe80::e29:efff:febf:b1a1  prefixlen 64  scopeid 0x20
        ether 0c:29:ef:bf:b1:a1  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

e101-001-0.103: flags=4099  mtu 9184
        ether 0c:29:ef:bf:b1:a1  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

e101-001-0.105: flags=4099  mtu 1500
        ether 0c:29:ef:bf:b1:a1  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

e101-002-0: flags=4099  mtu 9184
        inet6 fe80::e29:efff:febf:b1a2  prefixlen 64  scopeid 0x20
        ether 0c:29:ef:bf:b1:a2  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

e101-002-0.103: flags=4099  mtu 9184
        ether 0c:29:ef:bf:b1:a2  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

e101-002-0.105: flags=4099  mtu 1500
        ether 0c:29:ef:bf:b1:a2  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

e101-003-0: flags=4163  mtu 1500
        inet6 fe80::e29:efff:febf:b1a3  prefixlen 64  scopeid 0x20
        ether 0c:29:ef:bf:b1:a3  txqueuelen 1000  (Ethernet)
        RX packets 100517  bytes 6448390 (6.1 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 41414  bytes 16157928 (15.4 MiB)
        TX errors 0  dropped 82 overruns 0  carrier 0  collisions 0

e101-004-0: flags=4099  mtu 1500
        inet6 fe80::e29:efff:febf:b1a4  prefixlen 64  scopeid 0x20
        ether 0c:29:ef:bf:b1:a4  txqueuelen 1000  (Ethernet)
        RX packets 51163  bytes 4662460 (4.4 MiB)
        RX errors 0  dropped 8756  overruns 0  frame 0
        TX packets 19779  bytes 7863844 (7.4 MiB)
        TX errors 0  dropped 2 overruns 0  carrier 0  collisions 0

e101-005-1: flags=4099  mtu 1500
        inet6 fe80::c0e3:b6ff:fe13:ef15  prefixlen 64  scopeid 0x20
        inet6 fe80::e29:efff:febf:b1a5  prefixlen 64  scopeid 0x20
        ether 0c:29:ef:bf:b1:a5  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

e101-006-1: flags=4099  mtu 1500
        inet6 fe80::48b1:c4ff:fe53:f38b  prefixlen 64  scopeid 0x20
        inet6 fe80::e29:efff:febf:b1a6  prefixlen 64  scopeid 0x20
        ether 0c:29:ef:bf:b1:a6  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

e101-007-1: flags=4099  mtu 1500
        inet6 fe80::e29:efff:febf:b1a7  prefixlen 64  scopeid 0x20
        ether 0c:29:ef:bf:b1:a7  txqueuelen 1000  (Ethernet)
        RX packets 783  bytes 112048 (109.4 KiB)
        RX errors 0  dropped 686  overruns 0  frame 0
        TX packets 568  bytes 204976 (200.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

e101-008-1: flags=4099  mtu 1500
        inet6 fe80::e29:efff:febf:b1a8  prefixlen 64  scopeid 0x20
        inet6 fe80::d8af:76ff:feaf:18aa  prefixlen 64  scopeid 0x20
        ether 0c:29:ef:bf:b1:a8  txqueuelen 1000  (Ethernet)
        RX packets 21218  bytes 3182748 (3.0 MiB)
        RX errors 0  dropped 20757  overruns 0  frame 0
        TX packets 11030  bytes 4292132 (4.0 MiB)
        TX errors 0  dropped 1 overruns 0  carrier 0  collisions 0

e101-009-1: flags=4099  mtu 1500
        inet6 fe80::e29:efff:febf:b1a9  prefixlen 64  scopeid 0x20
        ether 0c:29:ef:bf:b1:a9  txqueuelen 1000  (Ethernet)
        RX packets 319  bytes 44574 (43.5 KiB)
        RX errors 0  dropped 274  overruns 0  frame 0
        TX packets 223  bytes 71226 (69.5 KiB)
        TX errors 0  dropped 10 overruns 0  carrier 0  collisions 0

e101-010-1: flags=4163  mtu 1500
        inet6 fe80::e29:efff:febf:b1aa  prefixlen 64  scopeid 0x20
        ether 0c:29:ef:bf:b1:aa  txqueuelen 1000  (Ethernet)
        RX packets 12276  bytes 785716 (767.3 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 16846  bytes 6830524 (6.5 MiB)
        TX errors 0  dropped 18 overruns 0  carrier 0  collisions 0

e101-011-1: flags=4099  mtu 1500
        inet6 fe80::e29:efff:febf:b1ab  prefixlen 64  scopeid 0x20
        ether 0c:29:ef:bf:b1:ab  txqueuelen 1000  (Ethernet)
        RX packets 5616  bytes 827516 (808.1 KiB)
        RX errors 0  dropped 5330  overruns 0  frame 0
        TX packets 2896  bytes 1128536 (1.0 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

e101-012-1: flags=4099  mtu 1500
        inet6 fe80::e29:efff:febf:b1ac  prefixlen 64  scopeid 0x20
        ether 0c:29:ef:bf:b1:ac  txqueuelen 1000  (Ethernet)
        RX packets 2973  bytes 196128 (191.5 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 13306  bytes 5271746 (5.0 MiB)
        TX errors 0  dropped 1 overruns 0  carrier 0  collisions 0

e101-013-0: flags=4099  mtu 1500
        inet6 fe80::e29:efff:febf:b1ad  prefixlen 64  scopeid 0x20
        ether 0c:29:ef:bf:b1:ad  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

e101-014-0: flags=4099  mtu 1500
        inet6 fe80::e29:efff:febf:b1ae  prefixlen 64  scopeid 0x20
        ether 0c:29:ef:bf:b1:ae  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

e101-015-0: flags=4099  mtu 1500
        inet6 fe80::e29:efff:febf:b1af  prefixlen 64  scopeid 0x20
        ether 0c:29:ef:bf:b1:af  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth0: flags=4163  mtu 1468
        inet 10.8.8.49  netmask 255.255.255.0  broadcast 10.8.8.255
        inet6 fe80::e29:efff:febf:b1a0  prefixlen 64  scopeid 0x20
        ether 0c:29:ef:bf:b1:a0  txqueuelen 1000  (Ethernet)
        RX packets 2131062  bytes 191899479 (183.0 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1980745  bytes 171880577 (163.9 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device memory 0xdfe00000-dfe7ffff

lo: flags=73  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10
        inet6 fe80::200:ff:fe00:0  prefixlen 64  scopeid 0x20
        loop  txqueuelen 1  (Local Loopback)
        RX packets 1108153681  bytes 103323200462 (96.2 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1108153681  bytes 103323200462 (96.2 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

vn123: flags=4355  mtu 1500
        inet6 fe80::e29:efff:febf:b1d3  prefixlen 64  scopeid 0x20
        ether 0c:29:ef:bf:b1:d3  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0  

#
直接使用brctl网桥指令查看网桥上的接口
dell-switch# system "brctl show  br66"
bridge name     bridge id               STP enabled     interfaces
br66            8000.0c29efbfb1d1       no              e101-003-0
                                                        e101-004-0
                                                        e101-010-1
                                                        e101-012-1 
#使用brctl help指令查看brctl的其他指令如何使用
dell-switch# system "brctl help"
never heard of command [help]
Usage: brctl [commands]
commands:
        addbr                           add bridge
        delbr                           delete bridge
        addif                   add interface to bridge
        delif                   delete interface from bridge
        hairpin           {on|off}        turn hairpin on/off
        setageing        

STP(Spanning Tree Protocol)是一个用于局域网中消除环路的协议,它的标准是IEEE 802.1DSTP通过将部分冗余链路强制为阻塞状态,其他链路处于转发状态,将环形网络结构修剪成无环路的树形网络结构,可实现消除环路。当处于转发状态的链路不可用时,STP重新配置网络,并激活合适的备用链路状态,恢复恢复网络连通性。

在一个复杂的网络环境中,由于冗余备份的需要,网络设计者都倾向于在设备之间部署多条物理链路,其中一条作主用链路,其他链路作备份,偶然或必然中都会导致环路产生。环路会产生广播风暴,最终导致整个网络资源被耗尽,网络瘫痪不可用。环路还会引起MAC地址表震荡导致MAC地址表项被破坏。

STP技术可以有效的解决环路问题,将彼此交互信息发现网络中的环路,将部分冗余链路强制为阻塞状态,其他链路处于转发状态。最终将环形网络结构修剪成无环路的树形网络结构,从而防止报文在环形网络中不断增生和无限循环,避免设备由于重复接收相同的报文造成处理能力下降。

show interface status指令结果可知,Eth1/1/3接口连接computer6服务器上enp101s0np1网口,由brctl show br66指令可知,br66桥上的e101-003-0接口即对应交换机的Eth1/1/3接口,因此在e101-003-0接口抓包,即就是在Eth1/1/3接口抓包。如下:

dell-switch# system "sudo tcpdump -i e101-003-0"
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on e101-003-0, link-type EN10MB (Ethernet), capture size 262144 bytes
16:28:47.900070 ARP, Request who-has 10.18.0.2 tell 10.18.0.6, length 50
16:28:48.948548 ARP, Request who-has 10.18.0.2 tell 10.18.0.6, length 50
16:28:49.972517 ARP, Request who-has 10.18.0.2 tell 10.18.0.6, length 50
16:28:50.996668 ARP, Request who-has 10.18.0.2 tell 10.18.0.6, length 50
16:28:52.020531 ARP, Request who-has 10.18.0.2 tell 10.18.0.6, length 50
16:28:53.044518 ARP, Request who-has 10.18.0.2 tell 10.18.0.6, length 50
^C

由上述结果,可知,交换机上能够收到computer6服务器上enp101s0np1网口发来的arp请求包,所以交换机上的mac转发表有enp101s0np1网口的mac地址;让我们再在e101-010-1 接口抓包,也就是在Eth1/1/10:1 接口抓包,如下:

dell-switch# system "sudo tcpdump -i e101-010-1"
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on e101-010-1, link-type EN10MB (Ethernet), capture size 262144 bytes
^C
0 packets captured
0 packets received by filter
0 packets dropped by kernel
%Error: while executing(system).Ret val[0].
dell-switch#

由上述结果可知,交换机该接口没有网络报文,结合前面throttles的数值的不断增加,可知该接口因持续的收到查找设备MAC地址的报文,导致该接口输入队列持续过载,从而触发节流操作,无法再接收新的报文。因此在交换机该接口无法再抓到任何报文,compute2服务器上ens4np0网口无法抓到对端发来的arp请求报文也印证了这一点。

为什么会导致该接口输入队列持续过载?因为持续的收到查找设备MAC地址的报文。为什么会持续的收到找设备MAC地址的报文?因此推测可能是连接该交换机端口的设备异常,导致无法响应查找MAC地址的报文。因此,开始检查和该交换机端口连接的网络设备是否异常,如下:

[root@compute2 ~]# ethtool -S ens4np0
NIC statistics:
     mac.rx_octets: 2441345
     mac.rx_frame_too_long_errors: 0
     mac.rx_range_length_errors: 0
     mac.rx_vlan_received_ok: 0
     mac.rx_errors: 0
     mac.rx_broadcast_pkts: 16200
     mac.rx_drop_events: 0
     mac.rx_alignment_errors: 0
     mac.rx_pause_mac_ctrl_frames: 0
     mac.rx_frames_received_ok: 19943
     mac.rx_frame_check_sequence_err: 0
     mac.rx_unicast_pkts: 55
     mac.rx_multicast_pkts: 3688
     mac.rx_pkts: 19943
     mac.rx_undersize_pkts: 0
     mac.rx_pkts_64_octets: 16216
     mac.rx_pkts_65_to_127_octets: 427
     mac.rx_pkts_128_to_255_octets: 29
     mac.rx_pkts_256_to_511_octets: 3270
     mac.rx_pkts_512_to_1023_octets: 0
     mac.rx_pkts_1024_to_1518_octets: 1
     mac.rx_pkts_1519_to_max_octets: 0
     mac.rx_jabbers: 0
     mac.rx_fragments: 0
     mac.rx_oversize_pkts: 0
     mac.rx_pause_frames_class0: 0
     mac.rx_pause_frames_class1: 0
     mac.rx_pause_frames_class2: 0
     mac.rx_pause_frames_class3: 0
     mac.rx_pause_frames_class4: 0
     mac.rx_pause_frames_class5: 0
     mac.rx_pause_frames_class6: 0
     mac.rx_pause_frames_class7: 0
     mac.rx_mac_ctrl_frames_received: 0
     mac.rx_mac_head_drop: 19252
     mac.tx_queue_drop: 0
     mac.tx_octets: 2188771300
     mac.tx_vlan_transmitted_ok: 0
     mac.tx_errors: 1
     mac.tx_broadcast_pkts: 7
     mac.tx_pause_mac_ctrl_frames: 34199164
     mac.tx_frames_transmitted_ok: 34199209
     mac.tx_unicast_pkts: 37
     mac.tx_multicast_pkts: 1
     mac.tx_pkts_64_octets: 34199172
     mac.tx_pkts_65_to_127_octets: 2
     mac.tx_pkts_128_to_255_octets: 23
     mac.tx_pkts_256_to_511_octets: 12
     mac.tx_pkts_512_to_1023_octets: 0
     mac.tx_pkts_1024_to_1518_octets: 0
     mac.tx_pkts_1519_to_max_octets: 1
     mac.tx_pause_frames_class0: 0
     mac.tx_pause_frames_class1: 0
     mac.tx_pause_frames_class2: 0
     mac.tx_pause_frames_class3: 0
     mac.tx_pause_frames_class4: 0
     mac.tx_pause_frames_class5: 0
     mac.tx_pause_frames_class6: 0
     mac.tx_pause_frames_class7: 0

通过ethtool工具查看该网络设备的统计信息,rx_mac_head_drop统计值明显异常,可知网卡无法处理mac报文头从而丢掉。再查看dmesg信息,如下:

[root@compute2 ~]# dmesg | tail 
[44688.426342] nfp 0000:af:00.0: nfp: Reading media link modes not supported. Please update flash
[44688.630940] nfp 0000:af:00.0 ens4: TX watchdog timeout on ring: 4
[44694.774418] nfp 0000:af:00.0 ens4: TX watchdog timeout on ring: 4
[44700.405916] nfp 0000:af:00.0 ens4: TX watchdog timeout on ring: 4
[44705.525421] nfp 0000:af:00.0 ens4: TX watchdog timeout on ring: 4
[44710.644983] nfp 0000:af:00.0 ens4: TX watchdog timeout on ring: 4
[44716.789408] nfp 0000:af:00.0 ens4: TX watchdog timeout on ring: 4
[44722.419914] nfp 0000:af:00.0 ens4: TX watchdog timeout on ring: 4
[44727.539463] nfp 0000:af:00.0 ens4: TX watchdog timeout on ring: 4
[44732.659012] nfp 0000:af:00.0 ens4: TX watchdog timeout on ring: 4

到此,终于知道问题所在了,原来是网卡的固件和BSP异常,使用23.04版本更新固件和BSP版本;加载成功之后,重启主机,再次配置网络信息后,网络终于通了,如下:

[root@compute2 ~]# ping -I ens4np0 10.18.0.6
PING 10.18.0.6 (10.18.0.16) from 10.18.0.2 ens4np0: 56(84) bytes of data.
64 bytes from 10.18.0.6: icmp_seq=1 ttl=64 time=0.293 ms
64 bytes from 10.18.0.6: icmp_seq=2 ttl=64 time=0.312 ms
^C

问题终于解决了,简直太不容易了,这个问题困扰了小编好久,没想到被大佬三下五除二就解决了,大佬不愧是大佬,就是强。

查看交换机上的MAC转发表,如下:

dell-switch# show mac address-table
VlanId  Mac Address             Type            Interface
66      00:15:4d:16:20:6a       dynamic         ethernet1/1/10:1
66      00:15:4d:16:66:34       dynamic         ethernet1/1/3

交换机也能正常学习到mac了。

五、总结

本文通过一个简单的二层流量不通的小例子,讲解流量不通的排障方法,包括服务器网卡抓包、交换机接口抓包等操作。其中,交换机通过tcpdump工具抓包不得不说是一个黑科技,第一次知道交换机还可以这样玩,小编一直以为交换机抓包只能通过端口镜像操作,有点刷新了小编对交换机的认知。我相信其他厂家的交换机应该也有这种神操作,方法未必完全一样,但是通过tcpdump抓包的神迹应该都具备,大家感兴趣的可以去试一下。


 




Linux二进制 Linux编程、内核模块、网络原创文章分享,欢迎关注"Linux二进制"微信公众号
评论
  •   智慧华盛恒辉国有单位科研项目审计管理系统介绍   1、建设国有单位科研项目审计管理系统的重大意义   其深远意义体现在科研项目管理的核心环节,不仅关乎管理效能与成果质量的飞跃,还深刻影响着科研资金的优化配置、科研行为的规范性以及国家科技发展战略的顺利推进。   应用案例   目前,已有多个科研项目审计管理系统在实际应用中取得了显著成效。例如,北京华盛恒辉和北京五木恒润科研项目审计管理系统。这些成功案例为科研项目审计管理系统的推广和应用提供了有力支持。   (1)强化科研项目管理的效
    华盛恒辉l58ll334744 2025-04-20 22:54 38浏览
  •   战略仿真推演平台是一种基于计算机技术和仿真模型构建的决策支持系统,旨在通过模拟复杂战略环境,帮助决策者评估不同战略方案的效果、预测潜在风险并优化决策过程。此类平台广泛应用于军事、经济、能源、城市规划等领域,为高层决策提供科学依据。   应用案例   目前,已有多个战略仿真推演平台在实际应用中取得了显著成效。例如,北京华盛恒辉和北京五木恒润战略仿真推演平台。这些成功案例为战略仿真推演平台的推广和应用提供了有力支持。   一、核心功能   多维度战略建模   动态推演与情景分析   
    华盛恒辉l58ll334744 2025-04-20 16:16 49浏览
  • 在智能家居与物联网(IoT)技术快速发展的背景下,语音播报功能已成为烟雾报警器等安防设备提升用户体验的核心技术之一。厂家凭借其WTV、WTN、WT588F及WT2605C系列语音芯片,推出了三大烟雾报警器语音方案,覆盖传统、高集成度与智能化需求,为不同场景提供灵活选择。以下从技术特性、应用场景及行业价值三方面展开分析。一、方案对比与技术特性 方案类型核心芯片型号技术优势局限性适用场景传统分立方案WTN6/WT588F/WTV系列音质纯净,模块化设计便于维护;兼容性强,支持外接功放优化音
    广州唯创电子 2025-04-21 08:53 60浏览
  • 一、市场背景与竞争优势随着智能家居市场的爆发式增长,消费者对小家电的智能化、交互性需求显著提升。WTVxxx系列语音芯片凭借高性价比、卓越音质与功能集成度,已成为智能小家电领域的核心驱动方案。该系列芯片通过以下优势重塑行业格局:成本优化:集成MCU、语音播报、驱动控制等多功能模块,显著降低硬件成本与开发复杂度;智能化升级:支持语音交互、状态显示与智能控制,契合现代用户对高端体验的追求;快速迭代:兼容主流芯片架构,支持远程更新与硬件扩展,助力产品持续迭代。目前,WTVxxx芯片已广泛应用于扫地机器
    广州唯创电子 2025-04-21 08:32 60浏览
  •   北京华盛恒辉作战仿真系统软件平台是现代军事领域中用于模拟作战环境、评估作战方案、训练军事人员的重要工具。这些平台通过计算机技术构建虚拟战场,支持多兵种、多武器系统的协同作战仿真,为军事决策、战术训练和装备研发提供科学依据。以下从平台类型、核心技术、应用场景及发展趋势等方面进行详细介绍。   应用案例   目前,已有多个作战仿真系统在实际应用中取得了显著成效。例如,北京华盛恒辉和北京五木恒润作战仿真系统。这些成功案例为作战仿真系统的推广和应用提供了有力支持。   一、作战仿真系统软件平台
    华盛恒辉l58ll334744 2025-04-20 15:37 35浏览
  •     CTI是Comparative Tracking Indices的缩写,在GB 4207中被译作“比较追踪指数”,我认为还是“漏电起痕指数”更容易理解。    CTI表述了材料的绝缘特性——阻止不希望出现的电流。CTI的单位是V,在绝缘物表面添加一定量的电解液并施加电场,观察在绝缘物表面既不会持续产生火焰,也不会因为热、介质击穿、湿气或者污染物产生电弧放电留下痕迹(起痕)的最高电压。CTI的测量方法见IEC 60112 (GB 4207)。&nbs
    电子知识打边炉 2025-04-19 21:20 64浏览
  •   战略仿真推演系统设计方案   一、系统概述   1.1 系统定位   北京华盛恒辉战略仿真推演系统是面向政府、企业及军事机构的决策支持工具。它通过搭建虚拟环境,模拟真实战略场景,助力用户评估不同策略的潜在影响,优化决策流程,提升战略规划的科学性与前瞻性。   应用案例   目前,已有多个战略仿真推演系统在实际应用中取得了显著成效。例如,北京华盛恒辉和北京五木恒润战略仿真推演系统。这些成功案例为战略仿真推演系统的推广和应用提供了有力支持。   二、系统架构设计   2.1 总体架
    华盛恒辉l58ll334744 2025-04-20 16:27 45浏览
  •   电磁环境模拟软件系统深度解读   北京华盛恒辉电磁环境模拟软件系统是专业的技术工具,可生成、捕捉与分析电磁信号,为电气和电子设备搭建仿真测试环境。以下从功能、技术特性、应用场景、主流软件及发展趋势展开介绍。   应用案例   目前,已有多个电磁环境模拟软件系统在实际应用中取得了显著成效。例如,北京华盛恒辉和北京五木恒润电磁环境模拟软件系统。这些成功案例为电磁环境模拟软件系统的推广和应用提供了有力支持。   一、核心功能   电磁环境模拟   信号生成与处理   场景构建与仿真
    华盛恒辉l58ll334744 2025-04-21 10:21 10浏览
  •   国有单位科研项目审计管理系统解析   一、系统建设意义   北京华盛恒辉国有单位科研项目审计管理系统对科研项目管理至关重要,其意义贯穿管理效能提升、资金优化配置、科研合规推进等核心环节,深刻影响国家科技战略实施。   应用案例   目前,已有多个国有单位科研项目审计管理系统在实际应用中取得了显著成效。例如,北京华盛恒辉和北京五木恒润国有单位科研项目审计管理系统。这些成功案例为国有单位科研项目审计管理系统的推广和应用提供了有力支持。   提升科研项目管理质效:作为数字化、智能化管理工
    华盛恒辉l58ll334744 2025-04-20 23:21 50浏览
  • 曾几何时,电视作为家庭娱乐的核心,是每个家庭客厅里不可或缺的存在。一家人围坐在电视机前,共享欢乐时光,这样的场景承载了无数人的回忆。然而,时过境迁,如今的彩电市场早已今非昔比。据奥维云网(AVC)推总数据显示,2024年中国彩电市场零售量为3086万台,同比微降1.8%。虽然零售额同比大幅增长15.7%,达到1271亿元,但这主要得益于产品结构升级、大屏化以及高端化趋势,并不意味着行业的全面复苏。从2024年618期间的数据来看,中国彩电线上市场销量规模为247.9万台,同比下降18.1%,销额
    用户1742991715177 2025-04-19 22:14 23浏览
  •   智慧华盛恒辉国有单位招标标书查重系统介绍   1、建设国有单位招标标书查重系统的重大意义   (1)保障招标过程的公正性与透明度   在国有单位复杂的招标环境中,标书查重系统犹如一把利剑,精准切割出公平竞争的道路。该系统利用自动化比对与检测技术,快速揭露投标文件中潜藏的相似或重复内容,有效遏制了围标、串标及抄袭等恶劣行为,为招标过程披上了一层公正与透明的外衣。这不仅减少了人为干预的空间,更保障了合法投标人的权益,维护了市场的健康秩序,让每一次招标都成为真正的实力较量。   应用案例
    华盛恒辉l58ll334744 2025-04-20 23:07 52浏览
  •   北京华盛恒辉作战仿真系统软件是现代军事领域不可或缺的重要工具,用于模拟作战环境、训练人员和评估作战方案。它借助计算机技术搭建虚拟战场,支撑复杂作战场景推演分析,为军事决策提供科学依据。以下从核心功能、技术架构、应用场景和发展趋势四个方面展开解析:   应用案例   目前,已有多个作战仿真系统在实际应用中取得了显著成效。例如,北京华盛恒辉和北京五木恒润作战仿真系统。这些成功案例为作战仿真系统的推广和应用提供了有力支持。   核心功能   战场环境建模:构建逼真的虚拟战场环境,涵盖地形、
    华盛恒辉l58ll334744 2025-04-20 11:06 26浏览
  •   电磁环境模拟平台系统全解析   北京华盛恒辉电磁环境模拟平台系统是通过技术手段生成、调控和再现复杂电磁环境的专用设备,广泛应用于通信、电子、航空航天、国防等领域。其核心作用是为设备研发、测试和评估提供可控的电磁环境,验证系统在复杂电磁干扰下的性能与可靠性。   应用案例   目前,已有多个电磁环境模拟平台系统在实际应用中取得了显著成效。例如,北京华盛恒辉和北京五木恒润电磁环境模拟平台系统。这些成功案例为电磁环境模拟平台系统的推广和应用提供了有力支持。   一、系统构成   信号发生
    华盛恒辉l58ll334744 2025-04-21 09:40 43浏览
  •     爬电距离指的是两个带电体之间、带电体和大地之间,沿着绝缘材料表面的最短距离。与爬电距离有关的标准有IEC 61010-1。PCB设计方面,可以参照IPC-2221B。        (图源TI)    任何情况下,爬电距离不允许小于电气间隙。当绝缘材料是空气时,爬电距离可以和电气间隙相等。电气间隙的简介见协议标准第011篇。        一般情况下
    电子知识打边炉 2025-04-19 20:54 63浏览
  •   数字化战场:军事态势视景仿真推演系统软件解析   北京华盛恒辉军事态势视景仿真推演系统软件是现代军事领域模拟战场态势、辅助指挥决策的关键工具。伴随信息技术发展,其在提升军事训练质量、优化作战指挥决策等方面的作用愈发显著。   一、系统概述   该系统借助数字化技术,构建高精度三维战场环境,模拟各类作战场景与武器装备运行状态,为军事指挥员及作战人员打造沉浸式战场体验。系统融合地理信息系统(GIS)、计算机图形学、人工智能等多学科技术,实现战场态势实时感知、动态推演与可视化呈现。   应
    华盛恒辉l58ll334744 2025-04-20 11:24 31浏览
我要评论
0
点击右上角,分享到朋友圈 我知道啦
请使用浏览器分享功能 我知道啦