sonic-net / sonic-mgmt

Configuration management examples for SONiC
Other
196 stars 723 forks source link

[Functional] [DHCPV6] | client received reply packet has UDP payload mismatch #7439

Closed slutati1536 closed 1 year ago

slutati1536 commented 1 year ago

Description

  1. Relay-Replay message from server to DHCP6 relay received by relay and correctly forwarded to DHCPv6 client
  2. DHCPv6 client is indeed receiving the reply packet via the correct interface but the UDP payload mismatch
  3. Issue reproducers on platform msn4600 - 100%

Steps to reproduce the issue: on canonical setup configure:

DUT: DUT mac address is: 1c:34:da:bd:fe:00 sudo config interface speed Ethernet128 10000 sudo config interface speed Ethernet124 10000 sudo config portchannel add PortChannel0001 sudo config portchannel member add PortChannel0001 Ethernet128 sudo config portchannel add PortChannel0002 sudo config portchannel member add PortChannel0002 Ethernet124 sudo config vlan add 69 sudo config vlan member add 69 PortChannel0002 sudo config vlan add 690 sudo config vlan member add 690 Ethernet252 sudo config interface ip add PortChannel0001 30.0.0.1/24 sudo config interface ip add PortChannel0001 3000::1/64 sudo config interface ip add Vlan69 69.0.0.1/24 sudo config interface ip add Vlan69 6900::1/64 sudo config interface ip add Vlan690 69.0.1.1/24 sudo config interface ip add Vlan690 6900:1::1/64 sudo config interface ip add Loopback0 10.1.0.32/32 sudo config vxlan add vtep101032 10.1.0.32 sudo config vxlan evpn_nvo add my-nvo vtep101032 sudo config vxlan map add vtep101032 69 76543 sudo config vxlan map add vtep101032 100 500100 sudo config vxlan map add vtep101032 101 500101 sudo config save -y sudo config vlan dhcp_relay add 690 69.0.0.2 sudo sonic-db-cli CONFIG_DB HGETALL "DHCP_RELAY|Vlan690" sudo sonic-db-cli CONFIG_DB HSET "DHCP_RELAY|Vlan690" "dhcpv6_servers@" "6900::2,6900::2" sudo config save -y sudo systemctl reset-failed dhcp_relay sudo systemctl restart dhcp_relay

Host A: sudo ip link add bond0 type bond sudo ip link set dev bond0 type bond mode 4 sudo ip link set enp130s0f0 down sudo ip link set enp130s0f0 master bond0 sudo ip link set enp130s0f0 up sudo ip link set bond0 up sudo ip link add link enp130s0f1 name enp130s0f1.690 type vlan id 690 sudo ip link set enp130s0f1.690 up sudo ip addr add 30.0.0.2/24 dev bond0 sudo ip addr add 3000::2/64 dev bond0 ip link add vtep_500100 type vxlan id 500100 dstport 4789 local 30.0.0.2 nolearning brctl addbr br_500100 brctl addif br_500100 vtep_500100 brctl stp br_500100 off sudo ip link set vtep_500100 up sudo ip link set br_500100 up sudo ip addr add 100.0.0.2/24 dev br_500100 sudo ip addr add 100::2/64 dev br_500100 ip link add vtep_500101 type vxlan id 500101 dstport 4789 local 30.0.0.2 nolearning brctl addbr br_500101 brctl addif br_500101 vtep_500101 brctl stp br_500101 off sudo ip link set vtep_500101 up sudo ip link set br_500101 up sudo ip addr add 101.0.0.2/24 dev br_500101 sudo ip addr add 101::2/64 dev br_500101 echo "timeout 10;" > dhclient.conf sudo ip -6 -j address

Host B: sudo ip link add bond0 type bond sudo ip link set dev bond0 type bond mode 4 sudo ip link set enp131s0f1 down sudo ip link set enp131s0f1 master bond0 sudo ip link set enp131s0f1 up sudo ip link set bond0 up sudo ip link add link bond0 name bond0.69 type vlan id 69 sudo ip link set bond0.69 up sudo ip addr add 69.0.0.2/24 dev bond0.69 sudo ip addr add 6900::2/64 dev bond0.69 sudo ip route add 69.0.1.0/24 via 69.0.0.1 sudo ip route add 6900:1::/64 via 6900::1 ip link add vtep_500100 type vxlan id 500100 dstport 4789 local 40.0.0.3 nolearning brctl addbr br_500100 brctl addif br_500100 vtep_500100 brctl stp br_500100 off sudo ip link set vtep_500100 up sudo ip link set br_500100 up sudo ip addr add 100.0.0.3/24 dev br_500100 sudo ip addr add 100::3/24 dev br_500100 sed -e "s/INTERFACESv4=\"\"/INTERFACESv4=\"bond0.69\"/g" -i /etc/default/isc-dhcp-server sed -e "s/INTERFACESv6=\"\"/INTERFACESv6=\"bond0.69\"/g" -i /etc/default/isc-dhcp-server /etc/init.d/isc-dhcp-server restart

send packet from host b to host A from interface bond0.69 to enp130s0f1.690

SRC MAC cat /sys/class/net/enp131s0f1/address 0c:42:a1:88:0a:0d

packet: 'Ether(src="0c:42:a1:88:0a:0d", dst="1c:34:da:bd:fe:00")/IPv6(src="6900::2", dst="6900:1::1")/UDP(sport=547, dport=547)/DHCP6_RelayReply(linkaddr="6900:1::1", peeraddr="fe80::e42:a1ff:fe75:197f")/DHCP6OptIAAddress()/DHCP6OptRelayMsg(message=[DHCP6_Advertise(trid=12345)/DHCP6OptDNSDomains(dnsdomains=["abc.com"])])'

expect to receive packet on client on interface enp130s0f1.690 with the following tcpdump_filter: udp dst port 546 and ip6[44:2] == 25 and ip6[48:1] == 0x02

Describe the results you received: the client is indeed receiving the reply packet, but the UDP payload mismatch (i.e. because an extra dhcpv6 option is seen on the client)

Describe the results you expected: Packet should pass the tcpdump filter defined, there should be no UDP payload mismatch

Additional information you deem important:

Output of show version:

SONiC Software Version: SONiC.202211_RC4.1-a073b6554_Internal
Distribution: Debian 11.6
Kernel: 5.10.0-18-2-amd64
Build commit: a073b6554
Build date: Mon Feb  6 12:22:18 UTC 2023
Built by: sw-r2d2-bot@r-build-sonic-ci03-243

Platform: x86_64-mlnx_msn4600-r0
HwSKU: ACS-MSN4600
ASIC: mellanox
ASIC Count: 1
Serial Number: MT2126X19873
Model Number: MSN4600-VS2FO_QP1
Hardware Revision: A1
Uptime: 14:14:53 up 34 min,  3 users,  load average: 0.39, 0.35, 0.40
Date: Thu 09 Feb 2023 14:14:53

Docker images:
REPOSITORY                                         TAG                               IMAGE ID       SIZE
docker-syncd-mlnx                                  202211_RC4.1-a073b6554_Internal   afb7892b15b6   916MB
docker-syncd-mlnx                                  latest                            afb7892b15b6   916MB
docker-orchagent                                   202211_RC4.1-a073b6554_Internal   a579f39c356c   529MB
docker-orchagent                                   latest                            a579f39c356c   529MB
docker-fpm-frr                                     202211_RC4.1-a073b6554_Internal   6e107ab059bd   540MB
docker-fpm-frr                                     latest                            6e107ab059bd   540MB
docker-teamd                                       202211_RC4.1-a073b6554_Internal   cd85e7fb0d5a   510MB
docker-teamd                                       latest                            cd85e7fb0d5a   510MB
docker-macsec                                      latest                            820e8d5fa373   512MB
docker-sonic-telemetry                             202211_RC4.1-a073b6554_Internal   5deb764e2549   791MB
docker-sonic-telemetry                             latest                            5deb764e2549   791MB
docker-platform-monitor                            202211_RC4.1-a073b6554_Internal   81727410e630   920MB
docker-platform-monitor                            latest                            81727410e630   920MB
docker-snmp                                        202211_RC4.1-a073b6554_Internal   72418bff1490   539MB
docker-snmp                                        latest                            72418bff1490   539MB
docker-dhcp-relay                                  latest                            9362ef77c572   502MB
docker-eventd                                      202211_RC4.1-a073b6554_Internal   326438dfb6fe   493MB
docker-eventd                                      latest                            326438dfb6fe   493MB
docker-lldp                                        202211_RC4.1-a073b6554_Internal   30e086e77134   535MB
docker-lldp                                        latest                            30e086e77134   535MB
docker-mux                                         202211_RC4.1-a073b6554_Internal   8f34ff38e6a1   541MB
docker-mux                                         latest                            8f34ff38e6a1   541MB
docker-sonic-p4rt                                  202211_RC4.1-a073b6554_Internal   c0808efe3ad0   575MB
docker-sonic-p4rt                                  latest                            c0808efe3ad0   575MB
docker-router-advertiser                           202211_RC4.1-a073b6554_Internal   7a03d5ac5d1c   493MB
docker-router-advertiser                           latest                            7a03d5ac5d1c   493MB
docker-database                                    202211_RC4.1-a073b6554_Internal   df28aac82383   493MB
docker-database                                    latest                            df28aac82383   493MB
docker-sonic-mgmt-framework                        202211_RC4.1-a073b6554_Internal   6fcac32351a8   611MB
docker-sonic-mgmt-framework                        latest                            6fcac32351a8   611MB
docker-nat                                         202211_RC4.1-a073b6554_Internal   6f5a251b1c76   480MB
docker-nat                                         latest                            6f5a251b1c76   480MB
docker-sflow                                       202211_RC4.1-a073b6554_Internal   ff6e122bd91e   478MB
docker-sflow                                       latest                            ff6e122bd91e   478MB
urm.nvidia.com/sw-nbu-sws-sonic-docker/sonic-wjh   1.0.0-master-internal-108         6f0490e775d3   327MB
urm.nvidia.com/sw-nbu-sws-sonic-docker/doroce      1.0.0-master-internal-11          9f27047097ac   200MB
harbor.mellanox.com/sonic/cpu-report               10.0.0                            5314b41a2a5e   413MB

Attach debug file sudo generate_dump:

sonic_dump_r-liger-02_20230209_143126.tar.gz

slutati1536 commented 1 year ago

opened on sonic-mgmt repo instead on sonic-buildimage