Difference between revisions of "MPLS Lab Setup"

From MikroTik Wiki
Jump to: navigation, search
m
Line 8: Line 8:
 
First lets look at a network diagram of the basic setup
 
First lets look at a network diagram of the basic setup
 
[[Image:MPLS_Lab_Setup.png]]
 
[[Image:MPLS_Lab_Setup.png]]
 +
 
The setup was created using 6 RB532's, but anything with 3 network interfaces and 32MB memory should be able to do the job. P1 - P3 are the Provider (MPLS Backbone) routers. PE1 - PE3 are the Provider Edge routers which do the Label Popping
 
The setup was created using 6 RB532's, but anything with 3 network interfaces and 32MB memory should be able to do the job. P1 - P3 are the Provider (MPLS Backbone) routers. PE1 - PE3 are the Provider Edge routers which do the Label Popping
 
=== Router Setup ===
 
=== Router Setup ===
 +
==== Loopback Interface ====
 
Each router is setup with a loopback adapter lobridge which holds the loopback address. From http://wiki.mikrotik.com/wiki/MPLSVPLS we can see this serves 2 purposes:
 
Each router is setup with a loopback adapter lobridge which holds the loopback address. From http://wiki.mikrotik.com/wiki/MPLSVPLS we can see this serves 2 purposes:
 
* as there is only one LDP session between any 2 routers, no matter how many links connect them, loopback IP address ensures that the LDP session is not affected by interface state or address changes
 
* as there is only one LDP session between any 2 routers, no matter how many links connect them, loopback IP address ensures that the LDP session is not affected by interface state or address changes
Line 47: Line 49:
 
/ip address add address=10.255.255.6/32 interface=lobridge
 
/ip address add address=10.255.255.6/32 interface=lobridge
 
</pre>
 
</pre>
 +
==== IP Addressing ====
 
We then setup the links between the core routers and the core-edge routers as per the diagram:
 
We then setup the links between the core routers and the core-edge routers as per the diagram:
  
P1
+
'''P1'''
 
<pre>
 
<pre>
 
/ip address  
 
/ip address  
Line 56: Line 59:
 
add address=10.1.0.254/24 interface=ether3
 
add address=10.1.0.254/24 interface=ether3
 
</pre>
 
</pre>
P2
+
'''P2'''
 
<pre>
 
<pre>
 
/ip address  
 
/ip address  
Line 63: Line 66:
 
add address=10.2.0.254/24 interface=ether3
 
add address=10.2.0.254/24 interface=ether3
 
</pre>
 
</pre>
P3
+
'''P3'''
 
<pre>
 
<pre>
 
/ip address  
 
/ip address  
Line 71: Line 74:
 
</pre>
 
</pre>
 
   
 
   
PE1
+
'''PE1'''
 
<pre>
 
<pre>
 
/ip address  
 
/ip address  
Line 77: Line 80:
 
</pre>
 
</pre>
 
   
 
   
PE1
+
'''PE2'''
 
<pre>
 
<pre>
 
/ip address  
 
/ip address  
Line 83: Line 86:
 
</pre>
 
</pre>
 
   
 
   
PE2
+
'''PE3'''
 
<pre>
 
<pre>
 
/ip address  
 
/ip address  
Line 89: Line 92:
 
</pre>
 
</pre>
 
    
 
    
=== Dynamic Routing Setup ===
+
==== Dynamic Routing Setup ====
 
Next we can setup OSPF on each router to dynamically distribute routes
 
Next we can setup OSPF on each router to dynamically distribute routes
P1
+
 
 +
'''P1'''
 
<pre>
 
<pre>
 
/routing ospf  
 
/routing ospf  
Line 100: Line 104:
 
add area=backbone network=10.1.0.0/24  
 
add area=backbone network=10.1.0.0/24  
 
</pre>
 
</pre>
P2
+
'''P2'''
 
<pre>
 
<pre>
 
/routing ospf  
 
/routing ospf  
Line 109: Line 113:
 
add area=backbone network=10.2.0.0/24  
 
add area=backbone network=10.2.0.0/24  
 
</pre>
 
</pre>
P3
+
'''P3'''
 
<pre>
 
<pre>
 
/routing ospf  
 
/routing ospf  
Line 118: Line 122:
 
add area=backbone network=10.1.0.0/24  
 
add area=backbone network=10.1.0.0/24  
 
</pre>
 
</pre>
PE1
+
'''PE1'''
 
<pre>
 
<pre>
 
/routing ospf  
 
/routing ospf  
Line 125: Line 129:
 
add area=backbone network=10.1.0.0/24  
 
add area=backbone network=10.1.0.0/24  
 
</pre>
 
</pre>
PE2
+
'''PE2'''
 
<pre>
 
<pre>
 
/routing ospf  
 
/routing ospf  
Line 132: Line 136:
 
add area=backbone network=10.2.0.0/24  
 
add area=backbone network=10.2.0.0/24  
 
</pre>
 
</pre>
PE1
+
'''PE3'''
 
<pre>
 
<pre>
 
/routing ospf  
 
/routing ospf  

Revision as of 12:53, 21 April 2008

Introduction

This page is an attempt to put together a lab setup for the testing of MPLS / VPLS as well as Traffic Engineering. This is not an attempt to explain how MPLS works, rather it is to promote discussion around the operation of MPLS. Before working through this lab you should first familiarize yourself with the concepts in this WIKI article http://wiki.mikrotik.com/wiki/MPLSVPLS as most of the setup has been based around those concepts. As my understanding of MPLS is also rather limited please feel free to edit and correct where required. If you want the original network diagram (in Visio format) please email me on david [at] mikrotiksa dot com. I can also export to some other formats. There is also a discussion on the forum about this wiki. Please check for updates. --savagedavid 11:59, 21 April 2008 (EEST)

Lab Setup

Network Diagram

First lets look at a network diagram of the basic setup MPLS Lab Setup.png

The setup was created using 6 RB532's, but anything with 3 network interfaces and 32MB memory should be able to do the job. P1 - P3 are the Provider (MPLS Backbone) routers. PE1 - PE3 are the Provider Edge routers which do the Label Popping

Router Setup

Loopback Interface

Each router is setup with a loopback adapter lobridge which holds the loopback address. From http://wiki.mikrotik.com/wiki/MPLSVPLS we can see this serves 2 purposes:

  • as there is only one LDP session between any 2 routers, no matter how many links connect them, loopback IP address ensures that the LDP session is not affected by interface state or address changes
  • use of loopback address as LDP transport address ensures proper penultimate hop popping behavior when multiple labels are attached to packet as in case of VPLS

Here is a typical router setup (this is from P1)

P1

/interface bridge add name=lobridge
/ip address add address=10.255.255.1/32 interface=lobridge

The other routers are setup with 10.255.255.2-6 as per the diagram above

P2

/interface bridge add name=lobridge
/ip address add address=10.255.255.2/32 interface=lobridge

P3

/interface bridge add name=lobridge
/ip address add address=10.255.255.3/32 interface=lobridge

PE1

/interface bridge add name=lobridge
/ip address add address=10.255.255.4/32 interface=lobridge

PE2

/interface bridge add name=lobridge
/ip address add address=10.255.255.5/32 interface=lobridge

PE3

/interface bridge add name=lobridge
/ip address add address=10.255.255.6/32 interface=lobridge

IP Addressing

We then setup the links between the core routers and the core-edge routers as per the diagram:

P1

/ip address 
add address=10.0.255.1/30 interface=ether1 
add address=10.0.255.5/30 interface=ether2
add address=10.1.0.254/24 interface=ether3

P2

/ip address 
add address=10.0.255.6/30 interface=ether1 
add address=10.0.255.9/30 interface=ether2
add address=10.2.0.254/24 interface=ether3

P3

/ip address 
add address=10.0.255.2/30 interface=ether1 
add address=10.0.255.10/30 interface=ether2
add address=10.3.0.254/24 interface=ether3

PE1

/ip address 
add address=10.1.0.1/24 interface=ether1

PE2

/ip address 
add address=10.1.0.2/24 interface=ether1

PE3

/ip address 
add address=10.1.0.3/24 interface=ether1

Dynamic Routing Setup

Next we can setup OSPF on each router to dynamically distribute routes

P1

/routing ospf 
set distribute-default=never redistribute-connected=as-type-1 router-id=10.255.255.1 
/routing ospf network 
add area=backbone network=10.0.255.0/30 
add area=backbone network=10.0.255.4/30 
add area=backbone network=10.1.0.0/24 

P2

/routing ospf 
set distribute-default=never redistribute-connected=as-type-1 router-id=10.255.255.2
/routing ospf network 
add area=backbone network=10.0.255.8/30 
add area=backbone network=10.0.255.4/30 
add area=backbone network=10.2.0.0/24 

P3

/routing ospf 
set distribute-default=never redistribute-connected=as-type-1 router-id=10.255.255.3 
/routing ospf network 
add area=backbone network=10.0.255.0/30 
add area=backbone network=10.0.255.8/30 
add area=backbone network=10.1.0.0/24 

PE1

/routing ospf 
set distribute-default=never redistribute-connected=as-type-1 router-id=10.255.255.4
/routing ospf network 
add area=backbone network=10.1.0.0/24 

PE2

/routing ospf 
set distribute-default=never redistribute-connected=as-type-1 router-id=10.255.255.5
/routing ospf network 
add area=backbone network=10.2.0.0/24 

PE3

/routing ospf 
set distribute-default=never redistribute-connected=as-type-1 router-id=10.255.255.6
/routing ospf network 
add area=backbone network=10.3.0.0/24