-
Notifications
You must be signed in to change notification settings - Fork 104
SRv6 next hops for global BGP routes on FRR #3369
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,6 +11,7 @@ router bgp {{ bgp.as }} | |
| {% macro bgp_neighbor(n,peer,af) %} | ||
| neighbor {{ peer }} activate | ||
| neighbor {{ peer }} send-community both | ||
| neighbor {{ peer }} encapsulation-srv6 | ||
| {% if n.next_hop_unchanged is defined %} | ||
| neighbor {{ peer }} attribute-unchanged next-hop | ||
| {% endif %} | ||
|
|
@@ -19,35 +20,39 @@ router bgp {{ bgp.as }} | |
| {% endif %} | ||
| {% endmacro -%} | ||
|
|
||
| {% if srv6.vpn is defined %} | ||
| {% for n in bgp.neighbors|default([]) if n.ipv6 is defined %} | ||
| {% if srv6.vpn|default(False) or srv6.bgp|default(False) %} | ||
| {% for n in bgp.neighbors|default([]) if n.ipv6 is defined and n.type == 'ibgp' %} | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If this is limited to IBGP neighbors, we should probably document that more explicitly
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will do. Thank you. |
||
| {% set peer = n.ipv6 %} | ||
| neighbor {{ peer }} remote-as {{ n.as }} | ||
| neighbor {{ peer }} description {{ n.name }} (SRv6) | ||
| {% if n.extended_nexthop is defined %} | ||
| neighbor {{ peer }} capability extended-nexthop | ||
| {% endif %} | ||
|
|
||
| {%- for af in ['ipv4','ipv6'] %} | ||
| {% if n.type in srv6.vpn.get(af,[]) %} | ||
| {% if srv6.bgp is defined and n.type in srv6.bgp.get(af,[]) %} | ||
| address-family {{ af }} unicast | ||
| ! | ||
| sid export auto | ||
| {{ bgp_neighbor(n,peer,af) -}} | ||
| {% endif %} | ||
| {% if n.type in srv6.vpn[af]|default('') %} | ||
| address-family {{ af }} vpn | ||
| ! | ||
| {{ bgp_neighbor(n,peer,af) -}} | ||
| {% endif %} | ||
| {% endfor %} | ||
| {% endfor %} | ||
| ! | ||
| {% if vrfs is defined %} | ||
| {% for vname,vdata in vrfs.items() %} | ||
| {% endif %} | ||
| {% if srv6.vpn|default(False) and vrfs is defined %} | ||
| {% for vname,vdata in vrfs.items() %} | ||
| router bgp {{ vdata.as|default(bgp.as) }} vrf {{ vname }} | ||
| sid vpn per-vrf export auto | ||
| no bgp network import-check | ||
|
|
||
| {% for af in ['ipv4','ipv6'] if 'ebgp' in srv6.vpn.get(af,[]) %} | ||
| {% for af in ['ipv4','ipv6'] if 'ebgp' in srv6.vpn.get(af,[]) %} | ||
| address-family {{ af }} unicast | ||
| nexthop vpn export {{ loopback.ipv6|ansible.utils.ipaddr('address') }} | ||
| {% endfor %} | ||
| ! | ||
| {% endfor %} | ||
| {% endif %} | ||
| ! | ||
| {% endfor %} | ||
| {% endif %} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,7 +4,7 @@ message: | | |
| two IPv4-only networks. The validation test checks end-to-end IPv4 connectivity across a SRv6 core. | ||
| See https://www.ietf.org/archive/id/draft-mishra-idr-v4-islands-v6-core-4pe-06.html | ||
|
|
||
| defaults.sources.extra: [ ../wait_times.yml ] | ||
| defaults.sources.extra: [ ../wait_times.yml, ../warnings.yml ] | ||
|
|
||
| addressing: | ||
| core: | ||
|
|
@@ -19,7 +19,7 @@ addressing: | |
| ipv4: 192.168.0.0/24 | ||
| prefix: 32 | ||
|
|
||
| srv6.allocate_loopback: True # Override the ipv6 loopback address and allocate one from the per-node locator range | ||
| srv6.allocate_loopback: False # Keep loopback interface outside of SRv6 SID | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We may want to remove this knob altogether, I initially thought this was a good idea but it does not solve the chicken-and-egg routing problem and mainly causes confusion |
||
|
|
||
| srv6.bgp: | ||
| ipv4: True # Enable IPv4 in the overlay (for IBGP) | ||
|
|
@@ -42,7 +42,6 @@ groups: | |
| core: | ||
| members: [ p ] | ||
| module: [ isis ] | ||
| srv6.bgp: False | ||
| ce: | ||
| members: [ ce1, ce2 ] | ||
| module: [ bgp ] | ||
|
|
@@ -72,15 +71,15 @@ links: | |
|
|
||
| validate: | ||
| isis_dut: | ||
| description: Check ISIS sessions with DUT (wait up to 30 seconds) | ||
| wait: 30 | ||
| description: Check ISIS sessions with DUT | ||
| wait: isis_adj_p2p | ||
| wait_msg: Waiting for ISIS adjacency | ||
| nodes: [ p ] | ||
| plugin: isis_neighbor('dut',level='L2',area='49.0001') | ||
| stop_on_error: true | ||
| isis_pe2: | ||
| description: Check ISIS sessions with PE2 (wait up to 30 seconds) | ||
| wait: 30 | ||
| description: Check ISIS sessions with PE2 | ||
| wait: isis_adj_p2p | ||
| wait_msg: Waiting for ISIS adjacency | ||
| nodes: [ p ] | ||
| plugin: isis_neighbor('pe2',level='L2',area='49.0001') | ||
|
|
@@ -99,26 +98,26 @@ validate: | |
| plugin: bgp_neighbor(node.bgp.neighbors,'pe2',af='ipv4') | ||
| ibgp: | ||
| description: Check IBGP session with activation of IPv4 over IPv6 | ||
| wait: 10 | ||
| wait: ibgp_session | ||
| wait_msg: Waiting for IBGP sessions to start | ||
| nodes: [ pe2 ] | ||
| plugin: bgp_neighbor(node.bgp.neighbors,'dut',af='ipv6',activate='ipv4') | ||
| stop_on_error: true | ||
| ping_hh: | ||
| description: Ping-based host-to-host reachability test | ||
| wait_msg: We might have to wait a bit longer | ||
| wait: 10 | ||
| wait: ping_long | ||
| nodes: [ h1 ] | ||
| plugin: ping('h2') | ||
| ping_h_ce: | ||
| description: Ping-based host-to-CE reachability test | ||
| wait_msg: We might have to wait a bit longer | ||
| wait: 10 | ||
| wait: ping | ||
| nodes: [ h1, h2 ] | ||
| plugin: ping('ce1') | ||
| ping_ce_ce: | ||
| description: Ping-based CE-to-CE reachability test | ||
| wait_msg: We might have to wait a bit longer | ||
| wait: 10 | ||
| wait: ping | ||
| nodes: [ ce1 ] | ||
| plugin: ping(nodes.ce2.loopback.ipv4,src=nodes.ce1.loopback.ipv4) | ||
Uh oh!
There was an error while loading. Please reload this page.