-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
VRF-aware RIPv2/RIPng (implemented on FRR)
- Loading branch information
Showing
15 changed files
with
250 additions
and
44 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,5 @@ | ||
{% import "templates/routing/_redistribute.frr.j2" as redistribute with context %} | ||
{% import "frr.macro.j2" as rip with context %} | ||
! | ||
{% if ripv2.af.ipv4|default(False) %} | ||
router rip | ||
version 2 | ||
{{ redistribute.config(ripv2,af='ipv4') }} | ||
{% for intf in netlab_interfaces if 'ripv2' in intf and 'ipv4' in intf %} | ||
network {{ intf.ifname }} | ||
{% if intf.ripv2.passive|default(False) %} | ||
passive-interface {{ intf.ifname }} | ||
{% endif %} | ||
{% endfor %} | ||
{% endif %} | ||
! | ||
{% if ripv2.af.ipv6|default(False) %} | ||
router ripng | ||
{{ redistribute.config(ripv2,af='ipv6') }} | ||
{% for intf in netlab_interfaces if 'ripv2' in intf and 'ipv6' in intf %} | ||
network {{ intf.ifname }} | ||
{% if intf.ripv2.passive|default(False) %} | ||
passive-interface {{ intf.ifname }} | ||
{% endif %} | ||
{% endfor %} | ||
{% endif %} | ||
{{ rip.config(ripv2) }} | ||
! | ||
do write |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{% import "templates/routing/_redistribute.frr.j2" as redistribute with context %} | ||
! | ||
{% macro config(ripv2,vrf='') -%} | ||
{% if ripv2.af.ipv4|default(False) %} | ||
router rip{% if vrf %} vrf {{ vrf }}{% endif +%} | ||
version 2 | ||
{{ redistribute.config(ripv2,af='ipv4') }} | ||
{% for intf in ripv2.interfaces|default(netlab_interfaces) if 'ripv2' in intf and 'ipv4' in intf %} | ||
network {{ intf.ifname }} | ||
{% if intf.ripv2.passive|default(False) %} | ||
passive-interface {{ intf.ifname }} | ||
{% endif %} | ||
{% endfor %} | ||
{% endif %} | ||
! | ||
{% if ripv2.af.ipv6|default(False) %} | ||
router ripng{% if vrf %} vrf {{ vrf }}{% endif +%} | ||
{{ redistribute.config(ripv2,af='ipv6') }} | ||
{% for intf in ripv2.interfaces|default(netlab_interfaces) if 'ripv2' in intf and 'ipv6' in intf %} | ||
network {{ intf.ifname }} | ||
{% if intf.ripv2.passive|default(False) %} | ||
passive-interface {{ intf.ifname }} | ||
{% endif %} | ||
{% endfor %} | ||
{% endif %} | ||
{%- endmacro %} |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
--- | ||
message: | | ||
The device under test has two VRFs with two interfaces in each VRF. | ||
Routers are attached to those interfaces and run RIP and BGP with | ||
device under test. | ||
This scenario tests RIPv2 in VRF, redistribution of connected subnets | ||
into RIPv2 and two-way RIPv2-to-BGP redistribution. | ||
* r1 and r2 should be able to ping each other | ||
* r3 and r4 should be able to ping each other | ||
* r1 should not be able to reach r3 | ||
groups: | ||
ce_rip: | ||
members: [ r1, r3 ] | ||
module: [ ripv2 ] | ||
device: frr | ||
provider: clab | ||
ce_bgp: | ||
members: [ r2, r4 ] | ||
module: [ bgp ] | ||
device: frr | ||
provider: clab | ||
pe: | ||
members: [ dut ] | ||
module: [ vrf, ripv2, bgp ] | ||
|
||
vrfs: | ||
red: | ||
links: [ dut-r1, dut-r2 ] | ||
blue: | ||
links: [ dut-r3, dut-r4 ] | ||
|
||
nodes: | ||
dut: | ||
bgp.as: 65000 | ||
id: 1 | ||
r1: | ||
r2: | ||
bgp.as: 65100 | ||
r3: | ||
r4: | ||
bgp.as: 65101 | ||
|
||
validate: | ||
ebgp: | ||
description: Check EBGP adjacencies with DUT | ||
wait_msg: Waiting for EBGP sessions to start | ||
nodes: [ r2, r4 ] | ||
plugin: bgp_neighbor(node.bgp.neighbors,'dut') | ||
wait: 10 | ||
stop_on_error: true | ||
red_c_rip: | ||
description: Check connected subnet as RIPv2 prefix on R1 | ||
wait: 15 | ||
wait_msg: Waiting for RIPv2 convergence | ||
fail: DUT is not redistributing connected subnets into RIPv2 | ||
nodes: [ r1 ] | ||
plugin: rt_prefix(nodes.r2.interfaces[0].ipv4,af='ipv4',proto='rip') | ||
red_bgp_rip: | ||
description: Check for BGP prefix in RIPv2 | ||
wait_msg: Waiting for BGP and RIPv2 convergence | ||
fail: BGP is not redistributed into RIPv2 | ||
wait: 10 | ||
nodes: [ r1 ] | ||
plugin: rt_prefix(nodes.r2.loopback.ipv4,af='ipv4',proto='rip') | ||
red_rip_bgp: | ||
description: Check for RIPv2 prefix in BGP | ||
wait_msg: Waiting for RIPv2 and BGP convergence | ||
fail: RIPv2 is not redistributed into BGP | ||
wait: 3 | ||
nodes: [ r2 ] | ||
plugin: bgp_prefix(nodes.r1.loopback.ipv4) | ||
red_lb_ping: | ||
description: Loopback-to-loopback reachability test in VRF red | ||
nodes: [ r1 ] | ||
plugin: ping('r2',src=nodes.r1.loopback.ipv4) | ||
red_p_rip: | ||
description: Check for reachability of connected routes in RIPv2 | ||
nodes: [ r2 ] | ||
plugin: ping('r1') | ||
blue_lb_ping: | ||
description: Loopback-to-loopback reachability test in VRF blue | ||
wait: 10 | ||
nodes: [ r3 ] | ||
plugin: ping('r4',src=nodes.r3.loopback.ipv4) | ||
inter_vrf: | ||
description: Ping-based isolation test between blue and red VRF | ||
nodes: [ r1 ] | ||
plugin: ping('r4',expect='fail') |
Oops, something went wrong.