diff --git a/VRF/vrf-lite-hosts/README.md b/VRF/vrf-lite-hosts/README.md new file mode 100644 index 0000000..271132e --- /dev/null +++ b/VRF/vrf-lite-hosts/README.md @@ -0,0 +1,46 @@ +# VRF Lite with Hosts Test Cases + +This directory contains *netsim-tools* topology files describing several simple VRF Lite test cases containing a set of hosts attached to a single router. + +The test cases can be used with all network devices supporting VRF configuration module and all virtualization providers supported by *netsim-tools*: + +* To change the router device type, use `-s nodes.rtr.device=xxx` CLI argument +* To change the virtualization provider, use `-p` CLI argument. + +To start the lab with Cisco IOSv router, use: + +``` +netlab up -s nodes.rtr.device=iosv +``` + +To start the lab with Cisco IOS XE router, use: + +``` +netlab up -s nodes.rtr.device=csr +``` + +To start the lab with Arista cEOS (using *containerlab*) use: + +``` +netlab up -s nodes.rtr.device=eos -p clab +``` + +## Isolated VRFs + +The `multi-vrf.yml` topology contains two isolated VRFs: + +* VRF *red* containing Linux hosts h1 and h2 +* VRF *blue* containing Linux hosts h3 and h4 + +After starting the lab, h1 should be able to ping h2 but not h3 or h4, and h3 should be able to ping h4 but not h1 or h2. + +## Inter-VRF Route Leaking + +The `vrf-route-leaking.yml` topology contains two VRFs: + +* VRF *red* containing Linux hosts h1 and h2 +* VRF *blue* containing Linux hosts h3 and h4 + +Routes from *red* VRF are imported into *red* and *blue* VRF. Likewise, the routes from *blue* VRF are imported into both VRFs. + +After starting the lab, all hosts (h1..h4) should be able to ping all other hosts. diff --git a/VRF/vrf-lite-hosts/multi-vrf.yml b/VRF/vrf-lite-hosts/multi-vrf.yml new file mode 100644 index 0000000..71a5c9f --- /dev/null +++ b/VRF/vrf-lite-hosts/multi-vrf.yml @@ -0,0 +1,23 @@ +defaults.device: linux + +vrfs: + red: + blue: + +nodes: + rtr: + module: [ vrf ] + h1: + h2: + h3: + h4: + +links: +- rtr: { vrf: red } + h1: +- rtr: { vrf: red } + h2: +- rtr: { vrf: blue } + h3: +- rtr: { vrf: blue } + h4: diff --git a/VRF/vrf-lite-hosts/vrf-route-leaking.yml b/VRF/vrf-lite-hosts/vrf-route-leaking.yml new file mode 100644 index 0000000..0a32e32 --- /dev/null +++ b/VRF/vrf-lite-hosts/vrf-route-leaking.yml @@ -0,0 +1,26 @@ +defaults.device: linux + +vrfs: + red: + import: [ red, blue ] + blue: + import: [ red, blue ] + +nodes: + rtr: + module: [ vrf ] + bgp.as: 65000 + h1: + h2: + h3: + h4: + +links: +- rtr: { vrf: red } + h1: +- rtr: { vrf: red } + h2: +- rtr: { vrf: blue } + h3: +- rtr: { vrf: blue } + h4: diff --git a/VRF/vrf-lite-routers/README.md b/VRF/vrf-lite-routers/README.md new file mode 100644 index 0000000..77060ce --- /dev/null +++ b/VRF/vrf-lite-routers/README.md @@ -0,0 +1,41 @@ +# VRF Lite with CE Routers Test Cases + +This directory contains *netsim-tools* topology files describing several simple VRF Lite test cases containing a set of CE routers attached to a pair of PE routers running VRF Lite. + +The test cases can be used with all network devices supporting VRF configuration module and all virtualization providers supported by *netsim-tools*: + +* To change the router device type for **pe1**, use `-s nodes.pe1.device=xxx` CLI argument +* To change the router device type for **pe2**, use `-s nodes.pe2.device=xxx` CLI argument +* To change the virtualization provider, use `-p` CLI argument. + +For example, to start the lab with a Cisco IOSv router and an Arista vEOS router, use: + +``` +netlab up -s nodes.pe1.device=iosv -s nodes.pe2.device=eos +``` + +To start the lab with Arista cEOS (using *containerlab*) use: + +``` +netlab up -p clab -s nodes.pe1.device=eos -s nodes.pe2.device=eos +``` + +## Isolated VRFs + +The `multi-vrf.yml` topology contains two isolated VRFs: + +* VRF *red* containing CE-routers **cr1** and **cr2** running OSPF with PE-routers +* VRF *blue* containing CE-router **cb1** and **cb2** running BGP with PE-routers + +The link between PE-routers and **cr1** is multi-access link, the other PE-CE links are point-to-point links (Arista vEOS could not establish a VRF BGP session over a multi-access link). + +After starting the lab, **cr1** should be able to ping **cr2** but not **cb1** or **cb1**. + +## Inter-VRF Route Leaking + +The `vrf-route-leaking.yml` topology contains the same devices and links as the *Isolated VRFs* topology, the only difference is the route leaking between *red* and *blue* VRFs: + +* Routes from *red* VRF are imported into *red* and *blue* VRF. +* Likewise, the routes from *blue* VRF are imported into both VRFs. + +After starting the lab, all CE-routers should be able to ping each other. diff --git a/VRF/vrf-lite-routers/multi-vrf.yml b/VRF/vrf-lite-routers/multi-vrf.yml new file mode 100644 index 0000000..b86670d --- /dev/null +++ b/VRF/vrf-lite-routers/multi-vrf.yml @@ -0,0 +1,42 @@ +defaults.device: cumulus + +vrfs: + red: + blue: + +module: [ vrf,ospf,bgp ] +bgp.as: 65000 + +nodes: + pe1: + pe2: + cr1: + module: [ ospf ] + cr2: + module: [ ospf ] + cb1: + module: [ bgp ] + bgp.as: 65101 + cb2: + module: [ bgp ] + bgp.as: 65102 + +links: +- pe1: { vrf: red } + pe2: { vrf: red } + cr1: + ospf.cost: 10 +- pe1: { vrf: red } + cr2: + ospf.cost: 10 +- pe2: { vrf: red } + cr2: + ospf.cost: 10 +- pe1: { vrf: blue } + cb1: +- pe2: { vrf: blue } + cb1: +- pe1: { vrf: blue } + cb2: +- pe2: { vrf: blue } + cb2: diff --git a/VRF/vrf-lite-routers/vrf-route-leaking.yml b/VRF/vrf-lite-routers/vrf-route-leaking.yml new file mode 100644 index 0000000..8b8dbca --- /dev/null +++ b/VRF/vrf-lite-routers/vrf-route-leaking.yml @@ -0,0 +1,44 @@ +defaults.device: cumulus + +vrfs: + red: + import: [ red, blue ] + blue: + import: [ red, blue ] + +module: [ vrf,ospf,bgp ] +bgp.as: 65000 + +nodes: + pe1: + pe2: + cr1: + module: [ ospf ] + cr2: + module: [ ospf ] + cb1: + module: [ bgp ] + bgp.as: 65101 + cb2: + module: [ bgp ] + bgp.as: 65102 + +links: +- pe1: { vrf: red } + pe2: { vrf: red } + cr1: + ospf.cost: 10 +- pe1: { vrf: red } + cr2: + ospf.cost: 10 +- pe2: { vrf: red } + cr2: + ospf.cost: 10 +- pe1: { vrf: blue } + cb1: +- pe2: { vrf: blue } + cb1: +- pe1: { vrf: blue } + cb2: +- pe2: { vrf: blue } + cb2: