Manual:Simple TE: Difference between revisions

From MikroTik Wiki
Jump to navigation Jump to search
Line 180: Line 180:
add bandwidth=5Mbps name=TE-to-R1 to-address=10.255.0.1 primary-path=tun-second-link \
add bandwidth=5Mbps name=TE-to-R1 to-address=10.255.0.1 primary-path=tun-second-link \
   secondary-paths=dyn record-route=yes
   secondary-paths=dyn record-route=yes
</pre>
'''Verify that TE tunnels are working'''
<pre>
[admin@R1] /interface traffic-eng> monitor 0
            tunnel-id: 14
    primary-path-state: established
          primary-path: tun-first-link
  secondary-path-state: not-necessary
          active-path: tun-first-link
          active-lspid: 1
          active-label: 39
        explicit-route: S:192.168.33.2/32,S:192.168.33.5/32,S:192.168.33.6/32
    reserved-bandwidth: 5.0Mbps
</pre>
Notice that running router will show assigned MPLS lables, whole tunnel path and reserved bandwidth.
Reserved resources also can be monitored on each router:
<pre>
</pre>
</pre>

Revision as of 09:02, 30 September 2011

Summary

This article shows how to simply create traffic engineering tunnels using both dynamic and static tunnel paths.It also shows how to steer traffic over the tunnel.


Network Layout

We will create a network consisting of four routers connected in diamond shape as illustrated in diagram below.

Each router is connected to neighboring router using /30 network and each of them have unique loopback address form 10.255.0.x network. Loopback addresses will be used as tunnel source and destination.

The goal is to interconnect two LAN segments (Lan1, Lan2) using TE tunnels in the way that:

  • traffic in direction from LAN1 to LAN2 goes over path through R2
  • traffic in direction from LAN2 to LAN1 goes over path through R4

Router Configurations

Connectivity between routers and Loopback addresses

R1

/system identity set name=R1

/interface bridge add name=Loopback

/ip address
add address=192.168.33.1/30 interface=ether1
add address=192.168.33.14/30 interface=ether2
add address=192.168.10.1/24 interface=ether3
add address=10.255.0.1/32 interface=Loopback

R2

/system identity set name=R2

/interface bridge add name=Loopback

/ip address
add address=192.168.33.2/30 interface=ether1
add address=192.168.33.5/30 interface=ether2
add address=10.255.0.2/32 interface=Loopback


R3

/system identity set name=R3

/interface bridge add name=Loopback

/ip address
add address=192.168.33.6/30 interface=ether1
add address=192.168.33.9/30 interface=ether2
add address=192.168.20.1/24 interface=ether3
add address=10.255.0.3/32 interface=Loopback

R4

/system identity set name=R4

/interface bridge add name=Loopback

/ip address
add address=192.168.33.10/30 interface=ether1
add address=192.168.33.13/30 interface=ether2
add address=10.255.0.4/32 interface=Loopback


Loopback address reachability and CSPF setup

In this setup we will use OSPF dynamic routing protocol to distribute routing information between routers. To successfully complete the setup we need loopback reachability information on every router.

CSPF will also be configured (extension of OSPF) to carry TE reservation information.

R1

/routing ospf instance
set default router-id=10.255.0.1 mpls-te-area=backbone mpls-te-router-id=Loopback

/routing ospf network
add network=192.168.33.0/24 area=backbone
add network=10.255.0.1/32 area=backbone

R2

/routing ospf instance
set default router-id=10.255.0.2 mpls-te-area=backbone mpls-te-router-id=Loopback

/routing ospf network
add network=192.168.33.0/24 area=backbone
add network=10.255.0.2/32 area=backbone

R3

/routing ospf instance
set default router-id=10.255.0.3 mpls-te-area=backbone mpls-te-router-id=Loopback

/routing ospf network
add network=192.168.33.0/24 area=backbone
add network=10.255.0.3/32 area=backbone

R4

/routing ospf instance
set default router-id=10.255.0.4 mpls-te-area=backbone mpls-te-router-id=Loopback

/routing ospf network
add network=192.168.33.0/24 area=backbone
add network=10.255.0.4/32 area=backbone


After OSPF is set up verify that we have correct routing information in routing table of each router:

[admin@R1] /ip route> print 
Flags: X - disabled, A - active, D - dynamic, 
C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme, 
B - blackhole, U - unreachable, P - prohibit 
 #      DST-ADDRESS        PREF-SRC        GATEWAY            DISTANCE
 0 ADS  0.0.0.0/0                          10.5.101.1                1
 1 ADC  10.255.0.1/32      10.255.0.1      lo                        0
 2 ADo  10.255.0.2/32                      192.168.33.2            110
 3 ADo  10.255.0.3/32                      192.168.33.2            110
                                           192.168.33.13     
 4 ADo  10.255.0.4/32                      192.168.33.13           110
 5 ADC  192.168.10.0/30    192.168.10.1    ether3                    0
 6 ADC  192.168.33.0/30    192.168.33.1    ether1                    0
 7 ADo  192.168.33.4/30                    192.168.33.2            110
 8 ADo  192.168.33.8/30                    192.168.33.13           110
 9 ADC  192.168.33.12/30   192.168.33.14   ether2                    0

Setting Resource Reservation

Next step is to set up TE resource for every interface on which we might want to run TE tunnel.

Configuration on all the routers are the same:

/mpls traffic-eng interface
add interface=ether1 bandwidth=10Mbps
add interface=ether2 bandwidth=10Mbps

Since we are not using real bandwidth limitation on the tunnels in this example, bandwidth parameter is only used for administrative purposes and can be any value (it does not represent how much bandwidth will actually flow through the interface).

TE tunnel setup

Since our primary goal is to strictly forward traffic over specific path we will use static path configuration as primary, and dynamic (CSPF) as secondary path if primary fails.

R1

/mpls traffic-eng tunnel-path
add name=dyn use-cspf=yes
add name=tun-first-link use-cspf=no \
   hops=192.168.33.2:strict,192.168.33.5:strict,192.168.33.6:strict

/interface traffic-eng
add bandwidth=5Mbps name=TE-to-R3 to-address=10.255.0.3 primary-path=tun-first-link \
   secondary-paths=dyn record-route=yes


R3

/mpls traffic-eng tunnel-path
add name=dyn use-cspf=yes
add name=tun-second-link use-cspf=no \
   hops=192.168.33.10:strict,192.168.33.13:strict,192.168.33.14:strict

/interface traffic-eng
add bandwidth=5Mbps name=TE-to-R1 to-address=10.255.0.1 primary-path=tun-second-link \
   secondary-paths=dyn record-route=yes


Verify that TE tunnels are working


[admin@R1] /interface traffic-eng> monitor 0
             tunnel-id: 14
    primary-path-state: established
          primary-path: tun-first-link
  secondary-path-state: not-necessary
           active-path: tun-first-link
          active-lspid: 1
          active-label: 39
        explicit-route: S:192.168.33.2/32,S:192.168.33.5/32,S:192.168.33.6/32
    reserved-bandwidth: 5.0Mbps

Notice that running router will show assigned MPLS lables, whole tunnel path and reserved bandwidth. Reserved resources also can be monitored on each router: