-
Notifications
You must be signed in to change notification settings - Fork 706
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Import IPv4/6 routes from VRF tables to the Global RIB as EVPN IP Prefix #2856
Open
lucasolim
wants to merge
5
commits into
osrg:master
Choose a base branch
from
lucasolim:lucaslima/vrf_to_evpn
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
…al table as EVPN Type 5 The current behavior is: For neighbors attached to VRFs, IPv4/6 routes are imported as VPNv4/6 to the Global RIB. For example: ``` root@9652c769b373:/go# gobgp vrf blue neighbor Peer AS Up/Down State |#Received Accepted 172.17.0.5 65001 00:00:48 Establ | 1 1 172.17.0.6 65001 00:00:48 Establ | 1 1 root@9652c769b373:/go# gobgp vrf blue neighbor Peer AS Up/Down State |#Received Accepted 172.17.0.5 65001 00:00:48 Establ | 1 1 172.17.0.6 65001 00:00:48 Establ | 1 1 root@9652c769b373:/go# gobgp vrf blue rib Network Next Hop AS_PATH Age Attrs * 10.0.0.0/24 172.17.0.5 00:01:50 [{Origin: ?} {LocalPref: 100}] root@9652c769b373:/go# gobgp vrf red rib Network Next Hop AS_PATH Age Attrs * 10.0.0.0/24 172.17.0.2 00:01:50 [{Origin: ?} {LocalPref: 100}] root@9652c769b373:/go# gobgp global rib -a vpnv4 Network Labels Next Hop AS_PATH Age Attrs *> 10:10:10.0.0.0/24 [0] 172.17.0.2 00:02:43 [{Origin: ?} {LocalPref: 100} {Extcomms: [10:10]}] *> 20:20:10.0.0.0/24 [0] 172.17.0.5 00:02:43 [{Origin: ?} {LocalPref: 100} {Extcomms: [20:20]}] ``` After this change, we can configure the VRF to convert to EVPN Type 5 (IP Prefix) instead of VPNv4/v6: ``` config file: ... ... [[vrfs]] [vrfs.config] name = "blue" rd = "20:20" both-rt-list = ["65000:200"] import-as-evpn-ipprefix = true routers-mac = "ca:fe:00:00:be:ef" ethernet-tag = 100 root@dc00a25785dd:/go# gobgp vrf Name RD Import RT Export RT Router's MAC ID Import as EVPN Ethernet Tag blue 20:20 20:20 20:20 ca:fe:00:00:fe:ed 0 true 200 red 10:10 10:10 10:10 ca:fe:00:00:be:ef 0 true 100 root@dc00a25785dd:/go# gobgp global rib -a evpn *> [type:Prefix][rd:20:20][etag:200][prefix:10.0.0.0/24] [0] 172.17.0.5 00:00:41 [{Origin: ?} {LocalPref: 100} {Extcomms: [20:20], [router's mac: ca:fe:00:00:fe:ed]} [ESI: single-homed] [GW: 0.0.0.0]] *> [type:Prefix][rd:10:10][etag:100][prefix:10.0.0.0/24] [0] 172.17.0.2 00:00:28 [{Origin: ?} {LocalPref: 100} {Extcomms: [10:10], [router's mac: ca:fe:00:00:be:ef]} [ESI: single-homed] [GW: 0.0.0.0]] ```
Tests fixed |
What use cases is this feature intended for? |
The scenario where this feature would be useful is the following:
|
Any other BGP implementation to support such feature? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adding the option to import IPv4/6 routes from VRF tables to the Global table as EVPN Type 5
The current behavior is:
For neighbors attached to VRFs, IPv4/6 routes are imported as VPNv4/6 to the Global RIB. For example:
After this change, we can configure the VRF to convert to EVPN Type 5 (IP Prefix) instead of VPNv4/v6:
config file:
and