sonic-net / SONiC

Landing page for Software for Open Networking in the Cloud (SONiC) - https://sonic-net.github.io/SONiC/
2.24k stars 1.13k forks source link

Tcpdump can't captuer any packets on Ethernet Port of Barefoot/Edgecore Wedge100bf_65x #508

Open robert1030 opened 4 years ago

robert1030 commented 4 years ago

Description

  1. Try to using tcpdump tools to check packet be forward via Ethernet Port of BFN Wedge100bf_65x
  2. tcpdump -i Ethernet0 or tcpdump arp -vnXi Ethernet0 on BFN Wedge100bf_65x
  3. To observed "tcpdump" can't capture any packets.
  4. Wedge100bf_65x is fanoutLeaf switch of sonic-mgmt testbed.

Steps to reproduce the issue:

  1. create vlan.json files to /etc/sonic/

  2. Disable copp protection on FanOutLeaf Switch (Wedge100bf_65x)

  3. To check copp protection is disable, docker exec -it swss more /etc/swss/config.d/00-copp.config.json []

  4. sonic-cfggen -H -k mavericks -j /etc/sonic/init_cfg.json -j /etc/sonic/vlan.json --print-data > /etc/sonic/config_db.json

  5. config reload -y

  6. Waiting about 3 mins

  7. Stop and Disalbe some service systemctl stop lldp.service systemctl disable lldp.service systemctl stop dhcp_relay.service systemctl disable dhcp_relay.service systemctl stop bgp.service systemctl disable bgp.service systemctl stop teamd.service systemctl disable teamd.service

  8. To check L2 Vlan be deploy to DUT (show vlan brief or show vlan config)

  9. tcpdump arp/host ip -vvvnXi Ethernet0 or tcpdump -vvvnXi Ethernet0 on Wedge100bf

  10. Packet generator send arp/icmp untagged packet to Ethernet0

  11. tcpdump arp/host ip -vvvnXi Ethernet16... or tcpdump -vvvnXi Ethernet16 on Wedge100bf

  12. Packet generator send arp/icmp untagged packet to Ethernet16

  13. Doing step8 & step10 again, and then tcpdump -vvvnXi Ethernet256 (Tagged Port).

Describe the results you received:

  1. tcpdump can't capture any packets on any Ethernet Port.

Describe the results you expected:

  1. tcpdump should capture packets on Vlan untagged Ethernet Port.
  2. Try the test on other vendor SONiC Switch, tcpdump can capture packets on Vlan untagged Ethernet Port.
  3. Can i use tcpdump to capture packets on Vlan Tagged Ethernet Port?

Output of show version:

l2-32vlan configuration file - vlan.json: https://drive.google.com/open?id=1vkX_vJJPZlutmlb7BmmK-59prjegAnAQ

akokhan commented 4 years ago

Please make sure you run tcpdump with -n option (Don't convert addresses (i.e., host addresses, port numbers, etc.) to names). Also, please check that tx/rx counters are increasing on Ethernet0.

robert1030 commented 4 years ago

Hi akokhan:

root@wedge100bf:/home/admin# sonic-clear counters
Cleared counters

root@wedge100bf:/home/admin# tcpdump -vvvnXi Ethernet112 tcpdump: listening on Ethernet112, link-type EN10MB (Ethernet), capture size 262144 bytes ^C 0 packets captured 0 packets received by filter 0 packets dropped by kernel

root@wedge100bf:/home/admin# show interfaces counters -a Last cached time was 2019-11-08 01:17:45.411616 IFACE STATE RX_OK RX_BPS RX_PPS RX_UTIL RX_ERR RX_DRP RX_OVR TX_OK TX_BPS Tx_PPS TX_UTIL TX_ERR TX_DRP TX_OVR


Ethernet112 U 12 61.19 B/s 0.51/s 0.00% 0 0 0 12 56.62 B/s 0.51/s 0.00% 0 0 0 Ethernet116 U 2 15.86 B/s 0.09/s 0.00% 0 0 0 2 13.00 B/s 0.09/s 0.00% 0 0 0

Client Information (Using ping to send 10 icmp request packets, test Interface connect to Ethernet112 of wedge100bf): /home/admin# ping 10.0.0.57 -c 10 PING 10.0.0.57 (10.0.0.57) 56(84) bytes of data. 64 bytes from 10.0.0.57: icmp_seq=1 ttl=64 time=5.05 ms 64 bytes from 10.0.0.57: icmp_seq=2 ttl=64 time=4.38 ms 64 bytes from 10.0.0.57: icmp_seq=3 ttl=64 time=4.63 ms 64 bytes from 10.0.0.57: icmp_seq=4 ttl=64 time=4.48 ms 64 bytes from 10.0.0.57: icmp_seq=5 ttl=64 time=4.43 ms 64 bytes from 10.0.0.57: icmp_seq=6 ttl=64 time=4.32 ms 64 bytes from 10.0.0.57: icmp_seq=7 ttl=64 time=4.63 ms 64 bytes from 10.0.0.57: icmp_seq=8 ttl=64 time=4.87 ms 64 bytes from 10.0.0.57: icmp_seq=9 ttl=64 time=5.03 ms 64 bytes from 10.0.0.57: icmp_seq=10 ttl=64 time=4.76 ms

To observe Ethernet112 of Wedge100bf_65, it receive total 12 packets, but Tcpdump can't capture any packets.

robert1030 commented 4 years ago

Hi akokhan:

After change profile to msdc_ipv4_profile, the issue still be reproduced.

New syslog

Profile link check is below: drwxr-xr-x 1 root root 4096 Nov 13 02:38 . drwxr-xr-x 1 root root 4096 Nov 10 05:34 .. lrwxrwxrwx 1 root root 25 Nov 13 02:38 install -> install_msdc_ipv4_profile

section 6.1 of SONiC-User-Manual, it tell us Basic Troubleshooting Commands that include tcpdump SONiC-User-Manual.md