-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bgpd: vrf label is configured only when first VPN entry selected
This commit addresses an optimisation issue that consists in delaying the creation of the MPLS entry for return traffic, only when the first BGP update using that label is sent. Today, MPLS entries from L3VPN instances are always created, even if there are no programmed BGP updates to export. Creating such entry uses an MPLS route entry for nothing. This commit addresses the issue by creating the MPLS entry only when needed. Let us take an example with the below L3VPN configuration. Once the label value is chosen (auto or hardset per-vrf value), the creation of the MPLS entry is triggered to handle return traffic. > router bgp 65500 vrf vrf2 > bgp router-id 1.1.1.1 > address-family ipv4 unicast > label vpn export 222 > rd vpn export 444:444 > rt vpn both 53:100 > export vpn > import vpn > exit-address-family The below show command illustrates the MPLS entry output, after having applied the above config. > r1# show bgp vrf vrf2 ipv4 > No BGP prefixes displayed, 0 exist > r1# show mpls table > Inbound Label Type Nexthop Outbound Label > ----------------------------------------------------- > [..] > 222 BGP vrf2 - With the above configuration only, the MPLS entry presence is useless. Actually, no BGP VPNvx updates have been sent (either via redistribute or network commands), so no BGP peers are supposed to know how to use the 222 label value. As consequence, there is no incoming traffic to expect with such label value. The commit proposes to create the MPLS entry, only when the first BGP update that uses that label value is selected in the bgp best selection algorithm. The commit does not change the time when the MPLS entry is removed. Signed-off-by: Philippe Guibert <[email protected]>
- Loading branch information
1 parent
2fef201
commit 6f588a1
Showing
5 changed files
with
21 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters