Manual:MPLS over PPPoE: Difference between revisions

From MikroTik Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 164: Line 164:
<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>
</p>
</p>



Revision as of 11:52, 1 December 2009

Applies to RouterOS: v3, v4

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)
+ 14 (ethernet header)
= 1526bytes

From RouterBoard MTU table you can see that not all routerboards support 1526 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.

Before configuration we must calculate max supported MPLS MTU and what will be max L3 MTU on PPPoE interface.

1522
- 14 (ethernet header)
- 8 (PPPoE header)
= 1500bytes
So 1500 will be max MPLS MTU and that leaves 1496 (1500-4(one mpls label)) L3 MTU for PPPoE interface.

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=1500
/mpls ldp
set enabled=yes lsr-id=10.255.255.1 transport-address=10.255.255.1
/mpls ldp interface
add interface=ether1

R2

/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=1496 max-mtu=1496

/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=1500
/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=1496 max-mru=1496 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=1500
/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=1496 max-mru=1496 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=1500
/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