Manual:MPLS over PPPoE: Difference between revisions

From MikroTik Wiki
Jump to navigation Jump to search
No edit summary
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Versions|v3, v4}}
{{Versions|v3, v4, v5}}


<div class=manual>
<div class=manual>
<h2>MPLS over PPPoE</h2>


<h3>Overview</h3>
<h3>Overview</h3>
Line 7: Line 9:


<h3>Example network</h3>
<h3>Example network</h3>
[[Image:mpls-pppoe-f.png]]
<p>
<p>
As you ca see from illustration above, router R2 is pppoe server and routers R3 and R4 are pppoe clients. Our goal is to run MPLS on this network.
As you ca see from illustration above, router R2 is pppoe server and routers R3 and R4 are pppoe clients. Our goal is to run MPLS on this network.
Line 16: Line 19:
: + 8 (PPPoE header)  <br />
: + 8 (PPPoE header)  <br />
: + 4 (MPLS header)  <br />
: + 4 (MPLS header)  <br />
: + 14 (ethernet header)  <br />
: = 1512bytes
: = 1526bytes
</p>
</p>
<p>
<p>
From [[Maximum_Transmission_Unit_on_RouterBoards#MAC.2FLayer-2.2FL2_MTU | RouterBoard MTU table ]] you can see that not all routerboards support 1526 L2MTU.
From [[Maximum_Transmission_Unit_on_RouterBoards#MAC.2FLayer-2.2FL2_MTU | RouterBoard MTU table ]] you can check if RouterBoard supports 1512 L2MTU.
</p>
</p>
<p>
<p>
Line 26: Line 28:
</p>
</p>
<p>
<p>
Before configuration we must calculate max supported MPLS MTU and what will be max L3 MTU on PPPoE interface.
It means that router will be able to forward packets without fragmentations.
: 1522  <br />
</p>
: - 14 (ethernet header)  <br />
: - 8 (PPPoE header)  <br />
: = 1500bytes <br />


So 1500 will be max MPLS MTU and that leaves 1496 (1500-4(one mpls label)) L3 MTU for PPPoE interface.
{{Note | Since v5.0 is added proper support for MPLS over PPP.  Now by default MPLS is disabled, to enable it go to <br /><code>/ppp profile</code> menu and set <code><nowiki>use-mpls=</nowiki><b>yes</b></code>}}
</p>


<h3>Configuration</h3>
<h3>Configuration</h3>
Line 49: Line 47:
#set up ospf
#set up ospf
/routing ospf instance
/routing ospf instance
set default=redistribute-connected=as-type-1
set default redistribute-connected=as-type-1
/routing ospf network
/routing ospf network
add network=172.16.0.0/30 area=backbone
add network=172.16.0.0/30 area=backbone


# set up MPLS/LDP
# set up MPLS/LDP
/mpls interface set 0 mpls-mtu=1500
/mpls interface set 0 mpls-mtu=1512
/mpls ldp
/mpls ldp
set enabled=yes lsr-id=10.255.255.1 transport-address=10.255.255.1
set enabled=yes lsr-id=10.255.255.1 transport-address=10.255.255.1
Line 63: Line 61:


<h4>R2</h4>
<h4>R2</h4>
Note that we have to add static interface for each PPPoE clients, because later on these interfaces will be added to LDP configuration.
<pre>
<pre>
/system identity set name=R2
/system identity set name=R2
Line 75: Line 76:
# set up pppoe
# set up pppoe
/interface pppoe-server server  
/interface pppoe-server server  
add interface=ether2 service-name=mpls max-mru=1496 max-mtu=1496
add interface=ether2 service-name=mpls max-mru=1500 max-mtu=1500


/ppp secret  
/ppp secret  
Line 87: Line 88:
#set up ospf
#set up ospf
/routing ospf instance
/routing ospf instance
set default=redistribute-connected=as-type-1
set default redistribute-connected=as-type-1
/routing ospf network
/routing ospf network
add network=172.16.0.0/30 area=backbone
add network=172.16.0.0/30 area=backbone
Line 94: Line 95:


# set up MPLS/LDP
# set up MPLS/LDP
/mpls interface set 0 mpls-mtu=1500
/mpls interface set 0 mpls-mtu=1512
/mpls ldp
/mpls ldp
set enabled=yes lsr-id=10.255.255.2 transport-address=10.255.255.2
set enabled=yes lsr-id=10.255.255.2 transport-address=10.255.255.2
Line 116: Line 117:
# set up pppoe
# set up pppoe
/interface pppoe-client  
/interface pppoe-client  
add name="mplsR3" max-mtu=1496 max-mru=1496 interface=ether2 user="mplsR3" service-name=mpls
add name="mplsR3" max-mtu=1500max-mru=1500 interface=ether2 user="mplsR3" service-name=mpls


#set up ospf
#set up ospf
/routing ospf instance
/routing ospf instance
set default=redistribute-connected=as-type-1
set default redistribute-connected=as-type-1
/routing ospf network
/routing ospf network
add network=192.168.0.1/32 area=backbone
add network=192.168.0.1/32 area=backbone


# set up MPLS/LDP
# set up MPLS/LDP
/mpls interface set 0 mpls-mtu=1500
/mpls interface set 0 mpls-mtu=1512
/mpls ldp
/mpls ldp
set enabled=yes lsr-id=10.255.255.3 transport-address=10.255.255.3
set enabled=yes lsr-id=10.255.255.3 transport-address=10.255.255.3
Line 145: Line 146:
# set up pppoe
# set up pppoe
/interface pppoe-client  
/interface pppoe-client  
add name="mplsR4" max-mtu=1496 max-mru=1496 interface=ether2 user="mplsR4" service-name=mpls
add name="mplsR4" max-mtu=1500 max-mru=1500 interface=ether2 user="mplsR4" service-name=mpls


#set up ospf
#set up ospf
/routing ospf instance
/routing ospf instance
set default=redistribute-connected=as-type-1
set default redistribute-connected=as-type-1
/routing ospf network
/routing ospf network
add network=192.168.0.1/32 area=backbone
add network=192.168.0.1/32 area=backbone


# set up MPLS/LDP
# set up MPLS/LDP
/mpls interface set 0 mpls-mtu=1500
/mpls interface set 0 mpls-mtu=1512
/mpls ldp
/mpls ldp
set enabled=yes lsr-id=10.255.255.4 transport-address=10.255.255.4
set enabled=yes lsr-id=10.255.255.4 transport-address=10.255.255.4
Line 164: Line 165:
<h3>Testing</h3>
<h3>Testing</h3>
<p>
<p>
At first make sure pppoe clients are connected successfully
<pre>
[admin@R2] /ppp active> print
Flags: R - radius
#  NAME        SERVICE CALLER-ID        ADDRESS        UPTIME  ENCODING 
0  mplsR3      pppoe  00:0C:42:21:F1:EA 192.168.0.2    46m               
1  mplsR4      pppoe  00:0C:42:21:F1:ED 192.168.0.3    46m55s 
</pre>
Check if OSPF is running properly
<pre>
[admin@R2] /routing ospf neighbor> print
0 router-id=10.255.255.1 address=172.16.0.1 interface=wlan1 priority=1
  dr-address=172.16.0.2 backup-dr-address=172.16.0.1 state="Full"
  state-changes=5 ls-retransmits=0 ls-requests=0 db-summaries=0
  adjacency=5m19s
1 router-id=10.255.255.3 address=192.168.0.2 interface=mplsR3 priority=1
  dr-address=0.0.0.0 backup-dr-address=0.0.0.0 state="Full" state-changes=4
  ls-retransmits=0 ls-requests=0 db-summaries=0 adjacency=49m33s
2 router-id=10.255.255.4 address=192.168.0.3 interface=mplsR4 priority=1
  dr-address=0.0.0.0 backup-dr-address=0.0.0.0 state="Full" state-changes=4
  ls-retransmits=0 ls-requests=0 db-summaries=0 adjacency=50m31s
</pre>
Ensure LDP is running
<pre>
[admin@R2] /mpls ldp neighbor> print
Flags: X - disabled, D - dynamic, O - operational, T - sending-targeted-hello,
V - vpls
#      TRANSPORT      LOCAL-TRANSPORT PEER                      SEN
0 DO  10.255.255.3    10.255.255.2    10.255.255.3:0            no
1 DO  10.255.255.4    10.255.255.2    10.255.255.4:0            no
2 DO  10.255.255.1    10.255.255.2    10.255.255.1:0            no
</pre>
<pre>
[admin@R2] /mpls forwarding-table> print
Flags: L - ldp, V - vpls, T - traffic-eng
#  IN-LABEL      OUT-LABELS  DESTINATION                    I NEXTHOP       
0  expl-null   
1 L 20                        192.168.0.1/32                m 192.168.0.3   
2 L 21                        10.255.255.4/32                m 192.168.0.3   
3 L 22                        10.255.255.3/32                m 192.168.0.2   
4 L 23                        10.255.255.1/32                w 172.16.0.1   
5 L 24                        192.168.88.0/24                w 172.16.0.1 
</pre>
Now we can check if packet switching is working as expected
<pre>
[admin@R4] /mpls ldp neighbor> /tool traceroute 10.255.255.1 src-address=10.255.255.4
    ADDRESS                                    STATUS
  1    192.168.0.1 13ms 19ms 143ms
                      mpls-label=23
  2    10.255.255.1 38ms 15ms 14ms
</pre>
</p>
</p>


<h2>VPLS over PPPoE</h2>
<h3>Overview</h3>
<p>This example extends previous setup by connecting two local networks using VPLS tunnel </p>
<h3>Example network</h3>
[[Image:mpls-pppoe-vpls.png]]


</div>
</div>


[[Category:Manual]]
[[Category:Manual]]
[[Category:MPLS]]
[[Category:Internetworking]]
[[Category:Examples]]
[[Category:Unfinished]]
[[Category:Unfinished]]

Latest revision as of 10:07, 12 April 2010

Applies to RouterOS: v3, v4, v5

MPLS over PPPoE

Overview

This example shows how to set up MPLS network over PPPoE interfaces.

Example network

As you ca see from illustration above, router R2 is pppoe server and routers R3 and R4 are pppoe clients. Our goal is to run MPLS on this network.

When running MPLS over PPPoE or other tunnels you have to deal with MTU issues. Tunnels add more overhead (in our case PPPoE adds 8 more bytes). To be able to forward 1500 byte IP packet without fragmentation we will need interface that supports

1500 (IP frame)
+ 8 (PPPoE header)
+ 4 (MPLS header)
= 1512bytes

From RouterBoard MTU table you can check if RouterBoard supports 1512 L2MTU.

Lets say that R2 is RB433 and pppoe clients are connected to ether2. From the table you can see that max supported l2MTU for this interface is 1522.

It means that router will be able to forward packets without fragmentations.

Note: Since v5.0 is added proper support for MPLS over PPP. Now by default MPLS is disabled, to enable it go to
/ppp profile menu and set use-mpls=yes


Configuration

R1

/system identity set name=R1

# add loopback interface
/interface bridge 
add name=loopback
/ip address
add address=10.255.255.1/32 interface=loopback
add address=172.16.0.1/30 interface=ether1

#set up ospf
/routing ospf instance
set default redistribute-connected=as-type-1
/routing ospf network
add network=172.16.0.0/30 area=backbone

# set up MPLS/LDP
/mpls interface set 0 mpls-mtu=1512
/mpls ldp
set enabled=yes lsr-id=10.255.255.1 transport-address=10.255.255.1
/mpls ldp interface
add interface=ether1

R2

Note that we have to add static interface for each PPPoE clients, because later on these interfaces will be added to LDP configuration.

/system identity set name=R2

# add loopback interface
/interface bridge 
add name=loopback
/ip address
add address=10.255.255.2/32 interface=loopback
add address=172.16.0.2/30 interface=ether1

# set up pppoe
/interface pppoe-server server 
add interface=ether2 service-name=mpls max-mru=1500 max-mtu=1500

/ppp secret 
add name=mplsR3 service=pppoe remote-address=192.168.0.2 local-address=192.168.0.1
add name=mplsR4 service=pppoe remote-address=192.168.0.3 local-address=192.168.0.1

/interface pppoe-server
add name="mplsR3" user="mplsR3" service="mpls" 
add name="mplsR4" user="mplsR4" service="mpls"

#set up ospf
/routing ospf instance
set default redistribute-connected=as-type-1
/routing ospf network
add network=172.16.0.0/30 area=backbone
add network=192.168.0.2/32 area=backbone
add network=192.168.0.3/32 area=backbone

# set up MPLS/LDP
/mpls interface set 0 mpls-mtu=1512
/mpls ldp
set enabled=yes lsr-id=10.255.255.2 transport-address=10.255.255.2
/mpls ldp interface
add interface=ether1
add interface=mplsR3
add interface=mplsR4


R3

/system identity set name=R3

# add loopback interface
/interface bridge 
add name=loopback
/ip address
add address=10.255.255.3/32 interface=loopback

# set up pppoe
/interface pppoe-client 
add name="mplsR3" max-mtu=1500max-mru=1500 interface=ether2 user="mplsR3" service-name=mpls

#set up ospf
/routing ospf instance
set default redistribute-connected=as-type-1
/routing ospf network
add network=192.168.0.1/32 area=backbone

# set up MPLS/LDP
/mpls interface set 0 mpls-mtu=1512
/mpls ldp
set enabled=yes lsr-id=10.255.255.3 transport-address=10.255.255.3
/mpls ldp interface
add interface=mplsR3

R4

/system identity set name=R4

# add loopback interface
/interface bridge 
add name=loopback
/ip address
add address=10.255.255.4/32 interface=loopback

# set up pppoe
/interface pppoe-client 
add name="mplsR4" max-mtu=1500 max-mru=1500 interface=ether2 user="mplsR4" service-name=mpls

#set up ospf
/routing ospf instance
set default redistribute-connected=as-type-1
/routing ospf network
add network=192.168.0.1/32 area=backbone

# set up MPLS/LDP
/mpls interface set 0 mpls-mtu=1512
/mpls ldp
set enabled=yes lsr-id=10.255.255.4 transport-address=10.255.255.4
/mpls ldp interface
add interface=mplsR4

Testing

At first make sure pppoe clients are connected successfully

[admin@R2] /ppp active> print 
Flags: R - radius 
 #   NAME         SERVICE CALLER-ID         ADDRESS         UPTIME   ENCODING  
 0   mplsR3       pppoe   00:0C:42:21:F1:EA 192.168.0.2     46m                
 1   mplsR4       pppoe   00:0C:42:21:F1:ED 192.168.0.3     46m55s  

Check if OSPF is running properly

[admin@R2] /routing ospf neighbor> print 
 0 router-id=10.255.255.1 address=172.16.0.1 interface=wlan1 priority=1 
   dr-address=172.16.0.2 backup-dr-address=172.16.0.1 state="Full" 
   state-changes=5 ls-retransmits=0 ls-requests=0 db-summaries=0 
   adjacency=5m19s 

 1 router-id=10.255.255.3 address=192.168.0.2 interface=mplsR3 priority=1 
   dr-address=0.0.0.0 backup-dr-address=0.0.0.0 state="Full" state-changes=4 
   ls-retransmits=0 ls-requests=0 db-summaries=0 adjacency=49m33s 

 2 router-id=10.255.255.4 address=192.168.0.3 interface=mplsR4 priority=1 
   dr-address=0.0.0.0 backup-dr-address=0.0.0.0 state="Full" state-changes=4 
   ls-retransmits=0 ls-requests=0 db-summaries=0 adjacency=50m31s 

Ensure LDP is running

[admin@R2] /mpls ldp neighbor> print 
Flags: X - disabled, D - dynamic, O - operational, T - sending-targeted-hello, 
V - vpls 
 #      TRANSPORT       LOCAL-TRANSPORT PEER                       SEN
 0 DO   10.255.255.3    10.255.255.2    10.255.255.3:0             no 
 1 DO   10.255.255.4    10.255.255.2    10.255.255.4:0             no 
 2 DO   10.255.255.1    10.255.255.2    10.255.255.1:0             no 
[admin@R2] /mpls forwarding-table> print 
Flags: L - ldp, V - vpls, T - traffic-eng 
 #   IN-LABEL      OUT-LABELS  DESTINATION                    I NEXTHOP        
 0   expl-null    
 1 L 20                        192.168.0.1/32                 m 192.168.0.3    
 2 L 21                        10.255.255.4/32                m 192.168.0.3    
 3 L 22                        10.255.255.3/32                m 192.168.0.2    
 4 L 23                        10.255.255.1/32                w 172.16.0.1     
 5 L 24                        192.168.88.0/24                w 172.16.0.1  

Now we can check if packet switching is working as expected

[admin@R4] /mpls ldp neighbor> /tool traceroute 10.255.255.1 src-address=10.255.255.4
     ADDRESS                                    STATUS
   1     192.168.0.1 13ms 19ms 143ms
                      mpls-label=23
   2    10.255.255.1 38ms 15ms 14ms

VPLS over PPPoE

Overview

This example extends previous setup by connecting two local networks using VPLS tunnel

Example network