Hoi, And in the interest of completeness, here's a trace of an L2XC between Gi10/0/3.100 (pop1) and Gi10/0/2
vpp# show int span Source Destination Device L2 GigabitEthernet10/0/2 tap0 ( none) ( both) GigabitEthernet10/0/3.100 tap0 ( none) ( both) On the way in, span-l2-input is not seen (but I expect it to) while span-l2-output is seen (but no packets arrive at tap0): 01:17:49:677347: dpdk-input GigabitEthernet10/0/3 rx queue 0 buffer 0x4a909e: current data 0, length 102, buffer-pool 0, ref-count 1, trace handle 0x1 ext-hdr-valid PKT MBUF: port 3, nb_segs 1, pkt_len 102 buf_len 2176, data_len 102, ol_flags 0x0, data_off 128, phys_addr 0x2f842800 packet_type 0x0 l2_len 0 l3_len 0 outer_l2_len 0 outer_l3_len 0 rss 0x0 fdir.hi 0x0 fdir.lo 0x0 IP4: fe:54:00:10:10:03 -> fe:54:00:10:10:02 802.1q vlan 100 ICMP: 192.0.2.1 -> 192.0.2.2 tos 0x00, ttl 64, length 84, checksum 0xc4b0 dscp CS0 ecn NON_ECN fragment id 0xf1f4, flags DONT_FRAGMENT ICMP echo_request checksum 0xa46c id 52958 01:17:49:677362: ethernet-input frame: flags 0x1, hw-if-index 4, sw-if-index 4 IP4: fe:54:00:10:10:03 -> fe:54:00:10:10:02 802.1q vlan 100 01:17:49:677371: l2-input l2-input: sw_if_index 12 dst fe:54:00:10:10:02 src fe:54:00:10:10:03 [l2-input-vtr l2-output ] 01:17:49:677373: l2-input-vtr l2-input-vtr: sw_if_index 12 dst fe:54:00:10:10:02 src fe:54:00:10:10:03 data 08 00 45 00 00 54 f1 f4 40 00 40 01 01:17:49:677375: l2-output l2-output: sw_if_index 3 dst fe:54:00:10:10:02 src fe:54:00:10:10:03 data 08 00 45 00 00 54 f1 f4 40 00 40 01 *01:17:49:677377: span-l2-output* * SPAN: mirrored GigabitEthernet10/0/2 -> tap0* 01:17:49:677397: GigabitEthernet10/0/2-output GigabitEthernet10/0/2 IP4: fe:54:00:10:10:03 -> fe:54:00:10:10:02 ICMP: 192.0.2.1 -> 192.0.2.2 tos 0x00, ttl 64, length 84, checksum 0xc4b0 dscp CS0 ecn NON_ECN fragment id 0xf1f4, flags DONT_FRAGMENT ICMP echo_request checksum 0xa46c id 52958 01:17:49:677401: GigabitEthernet10/0/2-tx GigabitEthernet10/0/2 tx queue 0 buffer 0x4a909e: current data 4, length 98, buffer-pool 0, ref-count 1, trace handle 0x1 ext-hdr-valid l2-hdr-offset 4 l3-hdr-offset 18 PKT MBUF: port 3, nb_segs 1, pkt_len 98 buf_len 2176, data_len 98, ol_flags 0x0, data_off 132, phys_addr 0x2f842800 packet_type 0x0 l2_len 0 l3_len 0 outer_l2_len 0 outer_l3_len 0 rss 0x0 fdir.hi 0x0 fdir.lo 0x0 IP4: fe:54:00:10:10:03 -> fe:54:00:10:10:02 ICMP: 192.0.2.1 -> 192.0.2.2 tos 0x00, ttl 64, length 84, checksum 0xc4b0 dscp CS0 ecn NON_ECN fragment id 0xf1f4, flags DONT_FRAGMENT ICMP echo_request checksum 0xa46c id 52958 On the way back span-l2-input is seen (but no packets emit): 01:17:49:672900: dpdk-input GigabitEthernet10/0/2 rx queue 0 buffer 0x4a6f60: current data 0, length 98, buffer-pool 0, ref-count 1, trace handle 0x2 ext-hdr-valid PKT MBUF: port 2, nb_segs 1, pkt_len 98 buf_len 2176, data_len 98, ol_flags 0x0, data_off 128, phys_addr 0x2fbbd880 packet_type 0x0 l2_len 0 l3_len 0 outer_l2_len 0 outer_l3_len 0 rss 0x0 fdir.hi 0x0 fdir.lo 0x0 IP4: fe:54:00:10:10:02 -> fe:54:00:10:10:03 ICMP: 192.0.2.2 -> 192.0.2.1 tos 0x00, ttl 64, length 84, checksum 0x7618 dscp CS0 ecn NON_ECN fragment id 0x808d ICMP echo_reply checksum 0xac6c id 52958 01:17:49:672910: ethernet-input frame: flags 0x1, hw-if-index 3, sw-if-index 3 IP4: fe:54:00:10:10:02 -> fe:54:00:10:10:03 01:17:49:672917: l2-input l2-input: sw_if_index 3 dst fe:54:00:10:10:03 src fe:54:00:10:10:02 [span-l2-input l2-output ] *01:17:49:672918: span-l2-input* * SPAN: mirrored GigabitEthernet10/0/2 -> tap0* 01:17:49:672935: l2-output l2-output: sw_if_index 12 dst fe:54:00:10:10:03 src fe:54:00:10:10:02 data 81 00 00 64 08 00 45 00 00 54 80 8d 01:17:49:672937: GigabitEthernet10/0/3-output GigabitEthernet10/0/3.100 IP4: fe:54:00:10:10:02 -> fe:54:00:10:10:03 802.1q vlan 100 ICMP: 192.0.2.2 -> 192.0.2.1 tos 0x00, ttl 64, length 84, checksum 0x7618 dscp CS0 ecn NON_ECN fragment id 0x808d ICMP echo_reply checksum 0xac6c id 52958 01:17:49:672940: GigabitEthernet10/0/3-tx GigabitEthernet10/0/3 tx queue 0 buffer 0x4a6f60: current data -4, length 102, buffer-pool 0, ref-count 1, trace handle 0x2 ext-hdr-valid vlan-1-deep l2-hdr-offset -4 l3-hdr-offset 14 PKT MBUF: port 2, nb_segs 1, pkt_len 102 buf_len 2176, data_len 102, ol_flags 0x0, data_off 124, phys_addr 0x2fbbd880 packet_type 0x0 l2_len 0 l3_len 0 outer_l2_len 0 outer_l3_len 0 rss 0x0 fdir.hi 0x0 fdir.lo 0x0 IP4: fe:54:00:10:10:02 -> fe:54:00:10:10:03 802.1q vlan 100 ICMP: 192.0.2.2 -> 192.0.2.1 tos 0x00, ttl 64, length 84, checksum 0x7618 dscp CS0 ecn NON_ECN fragment id 0x808d ICMP echo_reply checksum 0xac6c id 52958 If I place the span on 'device' I see the packet in both directions, and if I place it on both devices, I correctly see the packets twice (once with VLAN 100 on Gi10/0/3, and once without a tag on Gi10/0/2). a) I suspect that l2-span is broken. b) it would be nice to be able to add the SPAN to ethernet-input as that might capture sub-interfaces groet, Pim On Sat, Jan 14, 2023 at 10:17 PM Pim van Pelt <p...@ipng.nl> wrote: > Hoi, > > As a followup, here's a trace of the l2 enabled sub-int when SPAN is > enabled in L2. The packet is indeed seen and copied (in bold, below), but > not emitted on tap0: > > 01:04:06:883962: dpdk-input > > GigabitEthernet10/0/3 rx queue 0 > > buffer 0x4be6d8: current data 0, length 46, buffer-pool 0, ref-count 1, > trace handle 0x2 > > ext-hdr-valid > > PKT MBUF: port 3, nb_segs 1, pkt_len 46 > > buf_len 2176, data_len 46, ol_flags 0x0, data_off 128, phys_addr > 0x2f59b680 > > packet_type 0x0 l2_len 0 l3_len 0 outer_l2_len 0 outer_l3_len 0 > > rss 0x0 fdir.hi 0x0 fdir.lo 0x0 > > ARP: fe:54:00:10:10:03 -> ff:ff:ff:ff:ff:ff 802.1q vlan 100 > > request, type ethernet/IP4, address size 6/4 > > fe:54:00:10:10:03/192.0.2.1 -> 00:00:00:00:00:00/192.0.2.2 > > 01:04:06:883974: ethernet-input > > frame: flags 0x1, hw-if-index 4, sw-if-index 4 > > ARP: fe:54:00:10:10:03 -> ff:ff:ff:ff:ff:ff 802.1q vlan 100 > > 01:04:06:883981: l2-input > > l2-input: sw_if_index 12 dst ff:ff:ff:ff:ff:ff src fe:54:00:10:10:03 > [span-l2-input l2-input-vtr l2-output ] > > *01:04:06:883984: span-l2-input* > > * SPAN: mirrored GigabitEthernet10/0/3.100 -> tap0* > > 01:04:06:884002: l2-input-vtr > > l2-input-vtr: sw_if_index 12 dst ff:ff:ff:ff:ff:ff src > fe:54:00:10:10:03 data 08 06 00 01 08 00 06 04 00 01 fe 54 > > 01:04:06:884005: l2-output > > l2-output: sw_if_index 13 dst ff:ff:ff:ff:ff:ff src fe:54:00:10:10:03 > data 08 06 00 01 08 00 06 04 00 01 fe 54 > > 01:04:06:884007: vxlan4-encap > > VXLAN encap to vxlan_tunnel0 vni 100 > > 01:04:06:884010: ip4-rewrite > > tx_sw_if_index 2 dpo-idx 15 : ipv4 via 192.168.11.7 > GigabitEthernet10/0/1: mtu:9000 next:7 flags:[] > 5254001110005254001010010800 flow hash: 0xd00ea053 > > 00000000: > 52540011100052540010100108004500004e00000000fd11264bc0a80b00c0a8 > > 00000020: 0b0353a012b5003a00000800000000006400fffffffffffffe540010 > > 01:04:06:884019: GigabitEthernet10/0/1-output > > GigabitEthernet10/0/1 > > IP4: 52:54:00:10:10:01 -> 52:54:00:11:10:00 > > UDP: 192.168.11.0 -> 192.168.11.3 > > tos 0x00, ttl 253, length 78, checksum 0x264b dscp CS0 ecn NON_ECN > > fragment id 0x0000 > > UDP: 21408 -> 4789 > > length 58, checksum 0x0000 > > 01:04:06:884023: GigabitEthernet10/0/1-tx > > GigabitEthernet10/0/1 tx queue 0 > > buffer 0x4be6d8: current data -46, length 92, buffer-pool 0, ref-count > 1, trace handle 0x2 > > ext-hdr-valid > > l2-hdr-offset 4 l3-hdr-offset 18 > > PKT MBUF: port 3, nb_segs 1, pkt_len 92 > > buf_len 2176, data_len 92, ol_flags 0x0, data_off 82, phys_addr > 0x2f59b680 > > packet_type 0x0 l2_len 0 l3_len 0 outer_l2_len 0 outer_l3_len 0 > > rss 0x0 fdir.hi 0x0 fdir.lo 0x0 > > IP4: 52:54:00:10:10:01 -> 52:54:00:11:10:00 > > UDP: 192.168.11.0 -> 192.168.11.3 > > tos 0x00, ttl 253, length 78, checksum 0x264b dscp CS0 ecn NON_ECN > > fragment id 0x0000 > > UDP: 21408 -> 4789 > > length 58, checksum 0x0000 > > On Sat, Jan 14, 2023 at 8:58 PM Pim van Pelt via lists.fd.io <pim= > ipng...@lists.fd.io> wrote: > >> Hoi folks, >> >> I was diagnosing an issue today and needed to see some traffic that was >> traversing an l2xc between a sub-int and a vxlan_tunnel. >> >> Take the following simple config: >> >> create vxlan tunnel src 194.1.163.5 dst 194.1.163.1 instance 11 vni 10502 >> decap-next l2 >> >> create sub GigabitEthernet4/0/0 519 dot1q 519 exact-match >> >> set interface l2 xconnect GigabitEthernet4/0/0.519 vxlan_tunnel11 >> >> set interface l2 tag-rewrite GigabitEthernet4/0/0.519 pop 1 >> >> set interface l2 xconnect vxlan_tunnel11 GigabitEthernet4/0/0.519 >> >> >> Note - this l2xc works just fine. My initial idea was to SPAN on >> vxlan_tunnel11 (l2) >> create tap host-if vppspan host-mtu-size 9216 >> set int state tap0 up >> set int span vxlan_tunnel11 l2 destination tap0 >> (no traffic) >> >> Then I thought I'd take a look at GigabitEthernet4/0/0.519 >> set int span GigabitEthernet4/0/0.519 destination tap0 >> (no traffic) >> >> Or in L2 mode: >> set int span GigabitEthernet4/0/0.519 l2 destination tap0 >> (no traffic) >> >> Finally, I applied the SPAN on the underlying GigabitEthernet4/0/0 port: >> set int span GigabitEthernet4/0/0 destination tap0 >> Traffic! >> >> So I'm wondering - is my understanding of l2-input/l2-output SPAN >> correct, or does it work in a different way? And, is it feasible for me to >> SPAN a sub-int or other sw_index (like the vxlan tunnel, both currently not >> working)? >> >> -- >> Pim van Pelt <p...@ipng.nl> >> PBVP1-RIPE - http://www.ipng.nl/ >> >> >> >> > > -- > Pim van Pelt <p...@ipng.nl> > PBVP1-RIPE - http://www.ipng.nl/ > -- Pim van Pelt <p...@ipng.nl> PBVP1-RIPE - http://www.ipng.nl/
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#22468): https://lists.fd.io/g/vpp-dev/message/22468 Mute This Topic: https://lists.fd.io/mt/96273897/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/1480452/21656/631435203/xyzzy [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-