Skip to content

Commit

Permalink
MPLS labs
Browse files Browse the repository at this point in the history
  • Loading branch information
ipspace committed Mar 18, 2022
1 parent 602905b commit 42cb5b2
Show file tree
Hide file tree
Showing 6 changed files with 135 additions and 0 deletions.
17 changes: 17 additions & 0 deletions MPLS/ldp-bgp-lu/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# MPLS LDP + BGP-LU Lab

This lab combines LDP within AS 65000 with BGP LU across three autonomous systems (AS 65000, AS 65101 and AS 65102):

![BGP sessions](topology.bgp.png)

The central autonomous system has a route reflector and a P-router that is not running BGP:

![Physical lab topology](topology.link.png)

The lab topology uses a mix of Cisco IOSv and Arista vEOS devices with *libvirt* provider.

To test MPLS configuration module with other devices without changing the lab topology file, change the PE1 device type with `-s` argument of **netlab up** command:

```
netlab up -s nodes.pe1.device=<type>
```
52 changes: 52 additions & 0 deletions MPLS/ldp-bgp-lu/graph.dot
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
graph {
bgcolor="transparent"
node [shape=box, style="rounded,filled" fontname=Verdana]
edge [fontname=Verdana labelfontsize=10 labeldistance=1.5]
subgraph cluster_65000 {
bgcolor="#e8e8e8"
fontname=Verdana
margin=16
label="AS 65000"
pe1 [
label=<pe1 [iosv]<br /><sub>10.0.0.1/32</sub>>
fillcolor="#ff9f01"
]
pe2 [
label=<pe2 [eos]<br /><sub>10.0.0.2/32</sub>>
fillcolor="#ff9f01"
]
p [
label=<p [iosv]<br /><sub>10.0.0.3/32</sub>>
fillcolor="#ff9f01"
]
rr [
label=<rr [iosv]<br /><sub>10.0.0.4/32</sub>>
fillcolor="#ff9f01"
]
}
subgraph cluster_65101 {
bgcolor="#e8e8e8"
fontname=Verdana
margin=16
label="AS 65101"
ce1 [
label=<ce1 [iosv]<br /><sub>10.0.0.5/32</sub>>
fillcolor="#ff9f01"
]
}
subgraph cluster_65102 {
bgcolor="#e8e8e8"
fontname=Verdana
margin=16
label="AS 65102"
ce2 [
label=<ce2 [iosv]<br /><sub>10.0.0.6/32</sub>>
fillcolor="#ff9f01"
]
}
ce1 -- pe1 [ ]
ce2 -- pe2 [ ]
p -- pe1 [ ]
p -- pe2 [ ]
p -- rr [ ]
}
Binary file added MPLS/ldp-bgp-lu/topology.bgp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added MPLS/ldp-bgp-lu/topology.link.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions MPLS/ldp-bgp-lu/topology.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
defaults.device: iosv

module: [ ospf, mpls, bgp ]
bgp.as: 65000
mpls.ldp:
explicit_null: True
mpls.bgp:
ipv4: True
explicit_null: True

nodes:
pe1:
pe2:
device: eos
mpls.ldp.disable_unlabeled: False
p:
module: [ ospf, mpls ]
mpls.bgp: False
bgp.as: 65000
rr:
bgp.rr: True
ce1:
bgp.as: 65101
ce2:
bgp.as: 65102

links:
- pe1-ce1
- pe2-ce2
- pe1-p
- pe2-p
- rr-p
34 changes: 34 additions & 0 deletions MPLS/vpn-simple/topology.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
defaults.device: iosv

vrfs:
red:
blue:

bgp.as: 65000
mpls.ldp: True
mpls.vpn: True

nodes:
pe1:
module: [ vrf,ospf,bgp,mpls ]
pe2:
module: [ vrf,ospf,bgp,mpls ]
h1:
device: linux
h2:
device: linux
h3:
device: linux
h4:
device: linux

links:
- pe1: { vrf: red }
h1:
- pe2: { vrf: red }
h2:
- pe1: { vrf: blue }
h3:
- pe2: { vrf: blue }
h4:
- pe1-pe2

0 comments on commit 42cb5b2

Please sign in to comment.