Skip to content

Commit

Permalink
Add additional tests for BGP EVPN route dissector
Browse files Browse the repository at this point in the history
  • Loading branch information
sysvinit committed Oct 24, 2024
1 parent 1ef8aae commit 4ca14fd
Show file tree
Hide file tree
Showing 6 changed files with 216 additions and 4 deletions.
2 changes: 2 additions & 0 deletions tests/TESTLIST
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ bgp-4byte-asn bgp-4byte-asn.pcap bgp-4byte-asn.out -v
bgp-4byte-asdot bgp-4byte-asn.pcap bgp-4byte-asdot.out -vb
bgp-lu-multiple-labels bgp-lu-multiple-labels.pcap bgp-lu-multiple-labels.out -v
bgp-evpn bgp-evpn.pcap bgp-evpn.out -v
bgp-evpn-pkt-1 bgp-evpn-pkt-1.pcap bgp-evpn-pkt-1.out -v
bgp-evpn-pkt-2 bgp-evpn-pkt-2.pcap bgp-evpn-pkt-2.out -v
bgp-llgr bgp-evpn.pcap bgp-llgr.out -v
bgp-encap bgp-encap.pcap bgp-encap.out -v
bgp-rt-prefix bgp-rt-prefix.pcap bgp-rt-prefix.out -v
Expand Down
11 changes: 7 additions & 4 deletions tests/bgp-encap.out
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
encapsulation (0x030c), Flags [none]: Tunnel type: VXLAN
Multi-Protocol Reach NLRI (14), length: 44, Flags [OE]:
AFI: VPLS (25), SAFI: EVPN (70)
no AFI 25 / SAFI 70 decoder
0x0000: 0019 4604 0404 0404 0002 2100 0104 0404
0x0010: 0400 0400 0000 0000 0000 0000 0000 0000
0x0020: 0030 0206 0a0e faf3 0000 0065
nexthop: 4.4.4.4, nh-length: 4, no SNPA
EVPN Route-Type: 2
RD: 4.4.4.4:4
Ethernet Segment ID: 00:00:00:00:00:00:00:00:00:00
Ethernet Tag: 0x00000000
MAC Address: 02:06:0a:0e:fa:f3
MPLS Label 1: 101
151 changes: 151 additions & 0 deletions tests/bgp-evpn-pkt-1.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
1 2024-10-24 07:48:41.592009 IP6 (class 0xc0, flowlabel 0x79b0e, hlim 1, next-header TCP (6), payload length 1092) fe80::1eea:bff:fe6a:39de.179 > fe80::a236:9fff:fe27:c97c.44398: Flags [P.], cksum 0x3189 (correct), seq 1454955774:1454956846, ack 3913657330, win 246, length 1072: BGP
Update Message (2), length: 87
Multi-Protocol Reach NLRI (14), length: 42, Flags [OE]:
AFI: IPv4 (1), SAFI: Unicast (1)
nexthop: fe80::1eea:bff:fe6a:39de, fe80::1eea:bff:fe6a:39de, nh-length: 32, no SNPA
172.21.64.17/32
Origin (1), length: 1, Flags [T]: Incomplete
AS Path (2), length: 10, Flags [TE]: 4200005792 4200004867
Update Message (2), length: 210
Multi-Protocol Reach NLRI (14), length: 146, Flags [OE]:
AFI: VPLS (25), SAFI: EVPN (70)
nexthop: 172.21.64.17, nh-length: 4, no SNPA
EVPN Route-Type: 2
RD: 172.21.64.17:2
Ethernet Segment ID: 00:00:00:00:00:00:00:00:00:00
Ethernet Tag: 0x00000000
MAC Address: 02:00:00:02:13:03
IP Address: 2a02:238:f030:1c2::10df
MPLS Label 1: 2
EVPN Route-Type: 2
RD: 172.21.64.17:2
Ethernet Segment ID: 00:00:00:00:00:00:00:00:00:00
Ethernet Tag: 0x00000000
MAC Address: 02:00:00:02:13:03
IP Address: fe80::ff:fe02:1303
MPLS Label 1: 2
EVPN Route-Type: 2
RD: 172.21.64.17:2
Ethernet Segment ID: 00:00:00:00:00:00:00:00:00:00
Ethernet Tag: 0x00000000
MAC Address: 02:00:00:02:1b:94
MPLS Label 1: 2
Origin (1), length: 1, Flags [T]: IGP
AS Path (2), length: 10, Flags [TE]: 4200005792 4200004867
Extended Community (16), length: 16, Flags [OT]:
target (0x0002), Flags [none]: 64771:2 (= 0.0.0.2)
encapsulation (0x030c), Flags [none]: Tunnel type: VXLAN
Update Message (2), length: 104
Multi-Protocol Reach NLRI (14), length: 28, Flags [OE]:
AFI: VPLS (25), SAFI: EVPN (70)
nexthop: 172.21.64.17, nh-length: 4, no SNPA
EVPN Route-Type: 3
RD: 172.21.64.17:2
Ethernet Tag: 0x00000000
Originating Router: 172.21.64.17
Origin (1), length: 1, Flags [T]: IGP
AS Path (2), length: 10, Flags [TE]: 4200005792 4200004867
Extended Community (16), length: 16, Flags [OT]:
target (0x0002), Flags [none]: 64771:2 (= 0.0.0.2)
encapsulation (0x030c), Flags [none]: Tunnel type: VXLAN
PMSI Tunnel (22), length: 9, Flags [OT]:
Tunnel-type Ingress Replication (6), Flags [none], MPLS Label 0
Tunnel-Endpoint 172.21.64.17
Update Message (2), length: 249
Multi-Protocol Reach NLRI (14), length: 185, Flags [OE]:
AFI: VPLS (25), SAFI: EVPN (70)
nexthop: 172.21.64.17, nh-length: 4, no SNPA
EVPN Route-Type: 2
RD: 172.21.64.17:3
Ethernet Segment ID: 00:00:00:00:00:00:00:00:00:00
Ethernet Tag: 0x00000000
MAC Address: 02:00:00:03:13:03
IP Address: 172.20.3.162
MPLS Label 1: 3
EVPN Route-Type: 2
RD: 172.21.64.17:3
Ethernet Segment ID: 00:00:00:00:00:00:00:00:00:00
Ethernet Tag: 0x00000000
MAC Address: 02:00:00:03:13:03
IP Address: 2a02:238:f030:1c3::112d
MPLS Label 1: 3
EVPN Route-Type: 2
RD: 172.21.64.17:3
Ethernet Segment ID: 00:00:00:00:00:00:00:00:00:00
Ethernet Tag: 0x00000000
MAC Address: 02:00:00:03:13:03
IP Address: fe80::ff:fe03:1303
MPLS Label 1: 3
EVPN Route-Type: 2
RD: 172.21.64.17:3
Ethernet Segment ID: 00:00:00:00:00:00:00:00:00:00
Ethernet Tag: 0x00000000
MAC Address: 02:00:00:03:1b:94
MPLS Label 1: 3
Origin (1), length: 1, Flags [T]: IGP
AS Path (2), length: 10, Flags [TE]: 4200005792 4200004867
Extended Community (16), length: 16, Flags [OT]:
target (0x0002), Flags [none]: 64771:3 (= 0.0.0.3)
encapsulation (0x030c), Flags [none]: Tunnel type: VXLAN
Update Message (2), length: 104
Multi-Protocol Reach NLRI (14), length: 28, Flags [OE]:
AFI: VPLS (25), SAFI: EVPN (70)
nexthop: 172.21.64.17, nh-length: 4, no SNPA
EVPN Route-Type: 3
RD: 172.21.64.17:3
Ethernet Tag: 0x00000000
Originating Router: 172.21.64.17
Origin (1), length: 1, Flags [T]: IGP
AS Path (2), length: 10, Flags [TE]: 4200005792 4200004867
Extended Community (16), length: 16, Flags [OT]:
target (0x0002), Flags [none]: 64771:3 (= 0.0.0.3)
encapsulation (0x030c), Flags [none]: Tunnel type: VXLAN
PMSI Tunnel (22), length: 9, Flags [OT]:
Tunnel-type Ingress Replication (6), Flags [none], MPLS Label 0
Tunnel-Endpoint 172.21.64.17
Update Message (2), length: 214
Multi-Protocol Reach NLRI (14), length: 150, Flags [OE]:
AFI: VPLS (25), SAFI: EVPN (70)
nexthop: 172.21.64.17, nh-length: 4, no SNPA
EVPN Route-Type: 2
RD: 172.21.64.17:4
Ethernet Segment ID: 00:00:00:00:00:00:00:00:00:00
Ethernet Tag: 0x00000000
MAC Address: 02:00:00:04:13:03
IP Address: 172.20.4.110
MPLS Label 1: 4
EVPN Route-Type: 2
RD: 172.21.64.17:4
Ethernet Segment ID: 00:00:00:00:00:00:00:00:00:00
Ethernet Tag: 0x00000000
MAC Address: 02:00:00:04:13:03
IP Address: 2a02:238:f030:1c4::10ae
MPLS Label 1: 4
EVPN Route-Type: 2
RD: 172.21.64.17:4
Ethernet Segment ID: 00:00:00:00:00:00:00:00:00:00
Ethernet Tag: 0x00000000
MAC Address: 02:00:00:04:13:03
IP Address: fe80::ff:fe04:1303
MPLS Label 1: 4
Origin (1), length: 1, Flags [T]: IGP
AS Path (2), length: 10, Flags [TE]: 4200005792 4200004867
Extended Community (16), length: 16, Flags [OT]:
target (0x0002), Flags [none]: 64771:4 (= 0.0.0.4)
encapsulation (0x030c), Flags [none]: Tunnel type: VXLAN
Update Message (2), length: 104
Multi-Protocol Reach NLRI (14), length: 28, Flags [OE]:
AFI: VPLS (25), SAFI: EVPN (70)
nexthop: 172.21.64.17, nh-length: 4, no SNPA
EVPN Route-Type: 3
RD: 172.21.64.17:4
Ethernet Tag: 0x00000000
Originating Router: 172.21.64.17
Origin (1), length: 1, Flags [T]: IGP
AS Path (2), length: 10, Flags [TE]: 4200005792 4200004867
Extended Community (16), length: 16, Flags [OT]:
target (0x0002), Flags [none]: 64771:4 (= 0.0.0.4)
encapsulation (0x030c), Flags [none]: Tunnel type: VXLAN
PMSI Tunnel (22), length: 9, Flags [OT]:
Tunnel-type Ingress Replication (6), Flags [none], MPLS Label 0
Tunnel-Endpoint 172.21.64.17
Binary file added tests/bgp-evpn-pkt-1.pcap
Binary file not shown.
56 changes: 56 additions & 0 deletions tests/bgp-evpn-pkt-2.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
1 2024-10-24 07:49:32.616872 IP6 (class 0xc0, flowlabel 0x79b0e, hlim 1, next-header TCP (6), payload length 291) fe80::1eea:bff:fe6a:39de.179 > fe80::a236:9fff:fe27:c97c.44398: Flags [P.], cksum 0xe726 (correct), seq 1454957169:1454957440, ack 3913657653, win 246, length 271: BGP
Update Message (2), length: 116
Multi-Protocol Reach NLRI (14), length: 44, Flags [OE]:
AFI: VPLS (25), SAFI: EVPN (70)
nexthop: 172.21.64.20, nh-length: 4, no SNPA
EVPN Route-Type: 2
RD: 172.21.64.20:2
Ethernet Segment ID: 00:00:00:00:00:00:00:00:00:00
Ethernet Tag: 0x00000000
MAC Address: 02:00:00:02:1b:94
MPLS Label 1: 2
Origin (1), length: 1, Flags [T]: IGP
AS Path (2), length: 10, Flags [TE]: 4200005792 4200004995
Extended Community (16), length: 24, Flags [OT]:
target (0x0002), Flags [none]: 64899:2 (= 0.0.0.2)
encapsulation (0x030c), Flags [none]: Tunnel type: VXLAN
mac-mobility (0x0600), Flags [none]: Sequence number: 1
Update Message (2), length: 155
Multi-Protocol Reach NLRI (14), length: 83, Flags [OE]:
AFI: VPLS (25), SAFI: EVPN (70)
nexthop: 172.21.64.20, nh-length: 4, no SNPA
EVPN Route-Type: 2
RD: 172.21.64.20:3
Ethernet Segment ID: 00:00:00:00:00:00:00:00:00:00
Ethernet Tag: 0x00000000
MAC Address: 02:00:00:03:1b:94
MPLS Label 1: 3
EVPN Route-Type: 2
RD: 172.21.64.20:3
Ethernet Segment ID: 00:00:00:00:00:00:00:00:00:00
Ethernet Tag: 0x00000000
MAC Address: 02:00:00:03:1b:94
IP Address: 172.20.3.151
MPLS Label 1: 3
Origin (1), length: 1, Flags [T]: IGP
AS Path (2), length: 10, Flags [TE]: 4200005792 4200004995
Extended Community (16), length: 24, Flags [OT]:
target (0x0002), Flags [none]: 64899:3 (= 0.0.0.3)
encapsulation (0x030c), Flags [none]: Tunnel type: VXLAN
mac-mobility (0x0600), Flags [none]: Sequence number: 46
2 2024-10-24 07:49:32.717942 IP6 (class 0xc0, flowlabel 0x79b0e, hlim 1, next-header TCP (6), payload length 120) fe80::1eea:bff:fe6a:39de.179 > fe80::a236:9fff:fe27:c97c.44398: Flags [P.], cksum 0xe634 (correct), seq 271:371, ack 1, win 246, length 100: BGP
Update Message (2), length: 100
Multi-Protocol Unreach NLRI (15), length: 73, Flags [OE]:
AFI: VPLS (25), SAFI: EVPN (70)
EVPN Route-Type: 2
RD: 172.21.64.17:2
Ethernet Segment ID: 00:00:00:00:00:00:00:00:00:00
Ethernet Tag: 0x00000000
MAC Address: 02:00:00:02:1b:94
MPLS Label 1: 0
EVPN Route-Type: 2
RD: 172.21.64.17:3
Ethernet Segment ID: 00:00:00:00:00:00:00:00:00:00
Ethernet Tag: 0x00000000
MAC Address: 02:00:00:03:1b:94
MPLS Label 1: 0
Binary file added tests/bgp-evpn-pkt-2.pcap
Binary file not shown.

0 comments on commit 4ca14fd

Please sign in to comment.