This article explains how users can map EVPN instances to choose different label-switched paths (LSPs) as the forwarding path with the help of an example.
Topology
In the above topology, R1, R2, R3, and R4 are the core routers. R5 and R6 are the customer end devices. Here, we have defined two Ethernet VPN (EVPN) instances on R1 and R4 as evpna and evpnb, respectively.
R1-R2=10.1.1.0/30
R2-R3=10.1.1.4/30
R3-R4=10.1.1.8/30
R4-R1=10.1.1.12/30
Two Resource Reservation Protocol (RSVP) LSPs are created on the core routers as below:
Path_Direct_R4 = Strict hop to R4
Path_Indirect_R4 = Strict hop to R4 via R2 and R3
set routing-options route-distinguisher-id 172.16.1.1 set routing-instances evpna description "to Path_Direct_R4" set routing-instances evpna instance-type evpn set routing-instances evpna vlan-id 3057 set routing-instances evpna interface ge-0/0/3.3057 set routing-instances evpna vrf-target target:1:1 set routing-instances evpna protocols evpn interface ge-0/0/3.3057 set routing-instances evpnb description "Path_Indirect_R4" set routing-instances evpnb instance-type evpn set routing-instances evpnb vlan-id 707 set routing-instances evpnb interface ge-0/0/4.707 set routing-instances evpnb vrf-target target:1:2 set routing-instances evpnb protocols evpn interface ge-0/0/4.707
Using a similar configuration as above, evpn is configured on the R4 router as well for instances evpna and evpnb.
However, when we check the forwarding table for each evpn instance, it shows two LSP paths as next-hop, because the default behavior is to show multiple next-hops.
lab@R1_re# run show route forwarding-table vpn evpna.0 Routing table: evpna.evpn EVPN: Enabled protocols: Single VLAN, ACKed by all peers, EVPN, ARP/NDP suppression, Destination Type RtRef Next hop Type Index NhRef Netif default perm 0 dscd 608 1 56:68:a5:d1:11:ca/48 user 0 chain 15695870 2 56:68:a5:d1:11:d2/48 user 0 ucst 613 4 ge-0/0/3.3057 0x30005/51 user 0 comp 659 2 ge-0/0/3.3057 intf 0 ucst 613 4 ge-0/0/3.3057 0x30004/51 user 0 comp 635 2 0x30002/51 user 0 comp 632 2 intf 0 indr 1048577 3 ulst 1048576 2 10.1.1.13 Push 299808 639 2 ge-0/0/2.181 10.1.1.2 Push 299808, Push 300080(top) 640 2 ae3.0
lab@R1_re# run show route forwarding-table vpn evpnb.0 Routing table: evpnb.evpn EVPN: Enabled protocols: Single VLAN, ACKed by all peers, EVPN, ARP/NDP suppression, Destination Type RtRef Next hop Type Index NhRef Netif default perm 0 dscd 604 1 56:68:a5:d1:11:cb/48 user 0 chain 15695871 2 56:68:a5:d1:20:54/48 user 0 ucst 612 4 ge-0/0/4.707 0x30006/51 user 0 comp 662 2 ge-0/0/4.707 intf 0 ucst 612 4 ge-0/0/4.707 0x30003/51 user 0 comp 626 2 0x30001/51 user 0 comp 623 2 intf 0 indr 1048579 3 ulst 1048578 2 10.1.1.13 Push 299776 643 2 ge-0/0/2.181 10.1.1.2 Push 299776, Push 300080(top) 645 2 ae3.0
To configure an instance to choose a specific LSP as the next-hop, use the following example:
Configure the following policy to map the instance to a different LSP as the next-hop:
set policy-options policy-statement evpn_map_lsp term evpna from rib mpls.0 set policy-options policy-statement evpn_map_lsp term evpna from community evpna set policy-options policy-statement evpn_map_lsp term evpna then install-nexthop lsp Path_Direct_R4 set policy-options policy-statement evpn_map_lsp term evpna then accept set policy-options policy-statement evpn_map_lsp term evpnb from rib mpls.0 set policy-options policy-statement evpn_map_lsp term evpnb from community evpnb set policy-options policy-statement evpn_map_lsp term evpnb then install-nexthop lsp Path_Indirect_R4 set policy-options policy-statement evpn_map_lsp term evpnb then accept
Define the community:
set policy-options community evpna members target:1:1 set policy-options community evpnb members target:1:2
Apply the policy:
set routing-options forwarding-table export evpn_map_lsp -- lab@R1_re# run show route forwarding-table vpn evpna Routing table: evpna.evpn EVPN: Enabled protocols: Single VLAN, ACKed by all peers, EVPN, ARP/NDP suppression, Destination Type RtRef Next hop Type Index NhRef Netif default perm 0 dscd 608 1 56:68:a5:d1:11:ca/48 user 0 chain 15695870 2 56:68:a5:d1:11:d2/48 user 0 ucst 613 4 ge-0/0/3.3057 0x30005/51 user 0 comp 659 2 ge-0/0/3.3057 intf 0 ucst 613 4 ge-0/0/3.3057 0x30004/51 user 0 comp 635 2 0x30002/51 user 0 comp 632 2 intf 0 indr 1048580 3 10.1.1.13 Push 299808 643 2 ge-0/0/2.181 [edit] lab@R1_re# run show route forwarding-table vpn evpnb Routing table: evpnb.evpn EVPN: Enabled protocols: Single VLAN, ACKed by all peers, EVPN, ARP/NDP suppression, Destination Type RtRef Next hop Type Index NhRef Netif default perm 0 dscd 604 1 56:68:a5:d1:11:cb/48 user 0 chain 15695871 2 56:68:a5:d1:20:54/48 user 0 ucst 612 4 ge-0/0/4.707 0x30006/51 user 0 comp 662 2 ge-0/0/4.707 intf 0 ucst 612 4 ge-0/0/4.707 0x30003/51 user 0 comp 626 2 0x30001/51 user 0 comp 623 2 intf 0 indr 1048581 3 10.1.1.2 Push 299776, Push 300080(top) 640 2 ae3.0
Verification
Initiate a ping from instance evpna CPE IP to CPE IP at the other end.
lab@R5_re# run ping 192.168.10.2 source 192.168.10.1 rapid count 100 PING 192.168.10.2 (192.168.10.2): 56 data bytes !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --- 192.168.10.2 ping statistics --- 100 packets transmitted, 100 packets received, 0% packet loss round-trip min/avg/max/stddev = 3.916/13.068/149.216/20.133 ms lab@R1_re# run show mpls lsp statistics ingress name Path_* | refresh 2 ---(refreshed at 2020-02-15 09:22:56 PST)--- Ingress LSP: 2 sessions To From State Packets Bytes LSPname 172.16.4.4 172.16.1.1 Up 0 0 Path_Direct_R4 172.16.4.4 172.16.1.1 Up 0 0 Path_Indirect_R4 Total 2 displayed, Up 2, Down 0 ---(refreshed at 2020-02-15 09:22:58 PST)--- Ingress LSP: 2 sessions To From State Packets Bytes LSPname 172.16.4.4 172.16.1.1 Up 100 10200 Path_Direct_R4 >>>> Forwarding path is chosen as LSP Path_Direct_R4 and packets are incrementing. 172.16.4.4 172.16.1.1 Up 0 0 Path_Indirect_R4 Total 2 displayed, Up 2, Down 0
Similarly, initiate a ping from instance evpnb CPE IP to CPE IP at the other end:
lab@R5_re# run ping 192.168.20.2 source 192.168.20.1 rapid count 100 PING 192.168.20.2 (192.168.20.2): 56 data bytes !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --- 192.168.20.2 ping statistics --- 100 packets transmitted, 100 packets received, 0% packet loss round-trip min/avg/max/stddev = 5.003/31.223/181.715/40.707 ms lab@R1_re# run show mpls lsp statistics ingress name Path_* | refresh 2 ---(refreshed at 2020-02-15 09:24:38 PST)--- Ingress LSP: 2 sessions To From State Packets Bytes LSPname 172.16.4.4 172.16.1.1 Up 100 10200 Path_Direct_R4 172.16.4.4 172.16.1.1 Up 0 0 Path_Indirect_R4 Total 2 displayed, Up 2, Down 0 ---(refreshed at 2020-02-15 09:24:40 PST)--- Ingress LSP: 2 sessions To From State Packets Bytes LSPname 172.16.4.4 172.16.1.1 Up 100 10200 Path_Direct_R4 172.16.4.4 172.16.1.1 Up 84 8568 Path_Indirect_R4 Total 2 displayed, Up 2, Down 0 ---(refreshed at 2020-02-15 09:24:42 PST)--- Ingress LSP: 2 sessions To From State Packets Bytes LSPname 172.16.4.4 172.16.1.1 Up 100 10200 Path_Direct_R4 172.16.4.4 172.16.1.1 Up 100 10200 Path_Indirect_R4 >>>> Forwarding path is chosen as LSP Path_Indirect_R4 and packets are incrementing. Total 2 displayed, Up 2, Down 0
2022-06-29: Updated IP address to be compliant with RFC 1918.