MPLS – Traffic Engineering (MPLS-TE) Lab

 

What is MPLS Traffic Engineering (MPLS-TE)?


MPLS Traffic Engineering (MPLS-TE) is a technology that enhances the capabilities of MPLS (Multiprotocol Label Switching) to enable more granular control over traffic flow within a network.

Traffic engineering refers to the practice of optimizing the flow of network traffic in a way that ensures efficient use of network resources, avoids congestion, and achieves better overall performance. In traditional IP networks, traffic generally follows the shortest path, which can lead to suboptimal usage of network capacity and congestion. MPLS-TE allows operators to move beyond shortest-path routing by explicitly setting up paths through the network that distribute traffic in a desired way.

In this lab I am going to configure a tunnel to overrule the IGP shortest path and chose a different path.

MPLS Lab Setup


 

Labs download

Two CML Labs are available for download here.

1 – Lab Pre MPLS-TE config (OSPF, MPLS, LDP).
2 – Lab Post MPLS-TE config (OSPF (With TE), MPLS-TE, LDP, RSVP, Tunnel).

Using Cisco’s Modeling Labs (CML) I build the following MPLS lab using OSPF and LDP neighbor relationships using virtual routers running IOSv.

  • 3 x P routers (Router1, Router2, Router3)
  • 2 x PE router (Router4, Router5)
  • 2 x CE router (Router6, Router7)

Default Behaviour
The default traffic flow behaviour from PE Router4 towards PE Router5 will follow the IGP shortest path via P Router3. This path is one hop instead of traversing via Router1+Router2 being two hops away and double the cost.

MPLS-TE
With MPLS-TE we can define a different path via Router1+Router2. 
There can be many reasons why we would want to do this and many ways how we can achieve this. In this Lab I am going to enable MPLS-TE and simply exclude Router3 from our path. 

DeviceFunctionLoopback addressSubnetsLabel Ranges
Router1P Router1.1.1.1/32Gi0/0 10.1.2.1/24
Gi0/1 10.1.3.1/24
Gi0/3 10.1.4.1/24
100-199
Router2P Router2.2.2.2/32Gi0/0 10.1.2.2/24
Gi0/1 10.2.3.2/24
Gi0/3 10.2.4.2/24
200-299
Router3P Router3.3.3.3/32Gi0/0 10.3.4.3/24
Gi0/1 10.1.3.3/24
Gi0/2 10.2.3.3/24
Gi0/3 10.3.5.3/24
300-399
Router4PE Router4.4.4.4/32Gi0/0 10.3.4.4/24
Gi0/1 10.4.6.4/24
Gi0/3 10.1.4.4/24
400-499
Router5PE Router5.5.5.5/32Gi0/1 10.1.5.5/24
Gi0/2 10.5.7.5/24
Gi0/3 10.4.5.5/24
500-599
Router6CE Router6.6.6.6/32Gi0/1 10.4.6.6/24
Gi0/0 192.168.1.1/24
Router7CE Router7.7.7.7/32Gi0/2 10.4.6.6/24
Gi0/0 192.168.2.1/24

IP Addressing:
The point-to-point links are configured with the following IP addressing scheme:

  • 10.<Lowest Router Id>.<Highest Router Id>.<Router Id>./24.”

For example the link between Router1 and Router2 gives on Router1: 10.1.2.1/24 and on Router2: 10.1.2.2/24

Verification on Router3 (P):

Router3#sh ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
4.4.4.4           0   FULL/  -        00:00:35    10.3.4.4        GigabitEthernet0/0
1.1.1.1           0   FULL/  -        00:00:38    10.1.3.1        GigabitEthernet0/1
2.2.2.2           0   FULL/  -        00:00:35    10.2.3.2        GigabitEthernet0/2
5.5.5.5           0   FULL/  -        00:00:33    10.3.5.5        GigabitEthernet0/3

Router3#sh mpls interfaces
Interface              IP            Tunnel   BGP Static Operational
GigabitEthernet0/0     Yes (ldp)     No       No  No     Yes
GigabitEthernet0/1     Yes (ldp)     No       No  No     Yes
GigabitEthernet0/2     Yes (ldp)     No       No  No     Yes
GigabitEthernet0/3     Yes (ldp)     No       No  No     Yes

Router3#sh mpls ldp neighbor
    Peer LDP Ident: 5.5.5.5:0; Local LDP Ident 3.3.3.3:0
        TCP connection: 5.5.5.5.57381 - 3.3.3.3.646
        State: Oper; Msgs sent/rcvd: 46/45; Downstream
        Up time: 00:26:54
        LDP discovery sources:
          GigabitEthernet0/3, Src IP addr: 10.3.5.5
        Addresses bound to peer LDP Ident:
          10.2.5.5        5.5.5.5         10.3.5.5
    Peer LDP Ident: 4.4.4.4:0; Local LDP Ident 3.3.3.3:0
        TCP connection: 4.4.4.4.42087 - 3.3.3.3.646
        State: Oper; Msgs sent/rcvd: 44/46; Downstream
        Up time: 00:26:54
        LDP discovery sources:
          GigabitEthernet0/0, Src IP addr: 10.3.4.4
        Addresses bound to peer LDP Ident:
          10.3.4.4        4.4.4.4         10.1.4.4
    Peer LDP Ident: 2.2.2.2:0; Local LDP Ident 3.3.3.3:0
        TCP connection: 2.2.2.2.646 - 3.3.3.3.23943
        State: Oper; Msgs sent/rcvd: 45/45; Downstream
        Up time: 00:26:51
        LDP discovery sources:
          GigabitEthernet0/2, Src IP addr: 10.2.3.2
        Addresses bound to peer LDP Ident:
          10.1.2.2        10.2.5.2        10.2.3.2        2.2.2.2
    Peer LDP Ident: 1.1.1.1:0; Local LDP Ident 3.3.3.3:0
        TCP connection: 1.1.1.1.646 - 3.3.3.3.22044
        State: Oper; Msgs sent/rcvd: 45/45; Downstream
        Up time: 00:26:51
        LDP discovery sources:
          GigabitEthernet0/1, Src IP addr: 10.1.3.1
        Addresses bound to peer LDP Ident:
          10.1.2.1        10.1.3.1        10.1.4.1        1.1.1.1

Router Configurations


P Routers: (Router1, Router2, Router3)

The P routers are configured with the standard subnetting scheme from the table above in combination with OSPF area 0 and LDP as the labelling protocol. The Label range is based on the Router number.

Router1, Router2, Router2#

#---- MPLS ranges and LDP
#---- Modify label range per router
mpls label range 100 199
mpls label protocol ldp
mpls ldp router-id Loopback0 force


#---- Interface configuration with MPLS & OSPF
interface Loopback0
 ip address 1.1.1.1 255.255.255.255
 ip ospf 1 area 0
!
interface GigabitEthernet0/0
 ip address 10.1.2.1 255.255.255.0
 ip ospf network point-to-point
 ip ospf 1 area 0
 mpls ip
!
interface GigabitEthernet0/1
 ip address 10.1.3.1 255.255.255.0
 ip ospf network point-to-point
 ip ospf 1 area 0
 mpls ip
!
interface GigabitEthernet0/3
 ip address 10.1.4.1 255.255.255.0
 ip ospf network point-to-point
 ip ospf 1 area 0
 mpls ip
!

PE Routers: (Router4, Router5)

The PE routers are configured with the standard subnetting scheme from the table above in combination with OSPF area 0 and LDP as the labelling protocol.
Each PE routers has an IBGP session to the other PE router (Router4 <-> Router5) for CE traffic.

Router4 (PE)


# ============= MPLS
mpls label range 400 499
mpls label protocol ldp
mpls ldp router-id Loopback0 force

# ===== Interfaces 

interface Loopback0
 ip address 4.4.4.4 255.255.255.255
 ip ospf 1 area 0
!
interface GigabitEthernet0/0
 ip address 10.3.4.4 255.255.255.0
 ip ospf network point-to-point
 ip ospf 1 area 0
 mpls ip
!
interface GigabitEthernet0/1
 ip vrf forwarding CUST
 ip address 10.4.6.4 255.255.255.0
!
interface GigabitEthernet0/3
 ip address 10.1.4.4 255.255.255.0
 ip ospf network point-to-point
 ip ospf 1 area 0
 mpls ip

# ============= OSPF
router ospf 1
 router-id 4.4.4.4
!

# =========== BGP
router bgp 65000
 template peer-session IBGP
  remote-as 65000
  transport connection-mode active
  update-source Loopback0
 exit-peer-session
 !
 bgp router-id 4.4.4.4
 bgp log-neighbor-changes
 no bgp default ipv4-unicast
 neighbor 5.5.5.5 inherit peer-session IBGP
 neighbor 5.5.5.5 transport connection-mode passive
 !
 address-family ipv4
 exit-address-family
 !
 address-family vpnv4
  neighbor 5.5.5.5 activate
  neighbor 5.5.5.5 send-community extended
  neighbor 5.5.5.5 next-hop-self
 exit-address-family
 !
 address-family ipv4 vrf CUST
  neighbor 10.4.6.6 remote-as 65006
  neighbor 10.4.6.6 activate
  neighbor 10.4.6.6 as-override
 exit-address-family
Router5 (PE)


# ============= MPLS
mpls label range 500 599
mpls label protocol ldp
mpls ldp router-id Loopback0 force

# ===== Interfaces 

interface Loopback0
 ip address 5.5.5.5 255.255.255.255
 ip ospf 1 area 0
!
interface GigabitEthernet0/1
 ip address 10.2.5.5 255.255.255.0
 ip ospf network point-to-point
 ip ospf 1 area 0
 mpls ip
!
interface GigabitEthernet0/2
 ip vrf forwarding CUST
 ip address 10.5.7.5 255.255.255.0
!
interface GigabitEthernet0/3
 ip address 10.3.5.5 255.255.255.0
 ip ospf network point-to-point
 ip ospf 1 area 0
 mpls ip

# ============= OSPF
router ospf 1
 router-id 5.5.5.5
!

# =========== BGP
router bgp 65000
 template peer-session IBGP
  remote-as 65000
  transport connection-mode active
  update-source Loopback0
 exit-peer-session
 !
 bgp router-id 5.5.5.5
 bgp log-neighbor-changes
 no bgp default ipv4-unicast
 neighbor 4.4.4.4 inherit peer-session IBGP

 !
 address-family ipv4
 exit-address-family
 !
 address-family vpnv4
  neighbor 4.4.4.4 activate
  neighbor 4.4.4.4 send-community extended
  neighbor 4.4.4.4 next-hop-self
 exit-address-family
 !
 address-family ipv4 vrf CUST
  neighbor 10.5.7.7 remote-as 65006
  neighbor 10.5.7.7 activate
  neighbor 10.5.7.7 as-override
 exit-address-family

Traceroute between CE routers before TE (R6->R7)

When performing a traceroute between CE routers we see the default IGP shortest path behaviour.
R6 -> R4 -> R3 -> R5 -> R7.
After MPLS-TE we will have created the following path:
R6 -> R4 -> R1 -> R2 -> R5 -> R7.

Router6#traceroute 7.7.7.7 source 6.6.6.6
Type escape sequence to abort.
Tracing the route to 7.7.7.7
VRF info: (vrf in name/id, vrf out name/id)
  1 10.4.6.4 2 msec 3 msec 2 msec
  2 10.3.4.3 [MPLS: Labels 303/511 Exp 0] 10 msec 8 msec 7 msec
  3 10.5.7.5 [AS 65000] [MPLS: Label 511 Exp 0] 9 msec 8 msec 11 msec
  4 10.5.7.7 [AS 65000] 12 msec 12 msec *

MPLS Traffic Engineering Configuration


 

Global Configuration

First we start by enabling Traffic Engineering globally on all P and PE routers.

#P    Routers   Router1, Router2, Router3 
#PE   Routers   Router4, Router5

(config)#
mpls traffic-eng tunnels

Interface Configuration

The second step is adding the TE configuration to the interfaces in our MPLS core. This includes all interfaces between P routers and between P and PE routers. 

Router3(config-if)#mpls traffic-eng ?
  administrative-weight  Set the administrative weight for the interface
  attribute-flags        Set user-defined interface attribute flags
  backup-path            Configure an MPLS TE backup for this interface
  flooding               Set flooding parameters
  passive-interface      Force a flood of non-IGP link
  srlg                   Set shared risk link group parameters
  tunnels                enable MPLS Traffic Engineering tunnels

===================== 

# P Routers
Router1(config)#
int range gi0/0,gi0/1,gi0/3
mpls traffic-eng tunnels

Router2(config)#
int range gi0/0-2
mpls traffic-eng tunnels

Router3(config)#
int range gi0/0-3
mpls traffic-eng tunnels

# PE Routers

Router4(config)#
int range gi0/0, gi0/3
mpls traffic-eng tunnels

Router5(config)#
int range gi0/1, gi0/3
mpls traffic-eng tunnels

# Verification:
# Notice how the Tunnel column now says Yes

Router3#show mpls interfaces
Interface              IP            Tunnel   BGP Static Operational
GigabitEthernet0/0     Yes (ldp)     Yes      No  No     Yes
GigabitEthernet0/1     Yes (ldp)     Yes      No  No     Yes
GigabitEthernet0/2     Yes (ldp)     Yes      No  No     Yes
GigabitEthernet0/3     Yes (ldp)     Yes      No  No     Yes

OSPF Configuration

Next we need to configure OSPF with TE support by adding TE our area and configuring the router-id. 

Router1, Router2, Router3, Router4, Router5
(config)#router ospf 1
(config-router)#mpls traffic-eng area 0
(config-router)#mpls traffic-eng router-id loopback 0

RSVP Configuration

We add RSVP with a bandwidth reservation on the interfaces that have MPLS-TE enabled. This can be changed and configured depending on your situation. In this lab we just reserve a default value.

RouterX(config-if)#ip rsvp bandwidth ?
  <1-10000000>  Reservable Bandwidth (kbps)
  ingress       RSVP Ingress Reservable Bandwidth (kbps)
  percent       Specify a percentage of interface bandwidth
  <cr>          <cr>

===================== 

# P Routers
Router1(config)#
int range gi0/0,gi0/1,gi0/3
ip rsvp bandwidth 1000000

Router2(config)#
int range gi0/0-2
ip rsvp bandwidth 1000000

Router3(config)#
int range gi0/0-3
ip rsvp bandwidth 1000000

# PE Routers

Router4(config)#
int range gi0/0, gi0/3
ip rsvp bandwidth 1000000

Router5(config)#
int range gi0/1, gi0/3
ip rsvp bandwidth 1000000

Tunnel Interface Configuration

Next is configuring the headend router (also knows as the ingress or source router) with an explicit path and Tunnel interface. In this example our headend router will be PE Router4. Remember that tunnels are unidirectional, meaning the return traffic will not go though the same tunnel. You need to create another tunnel on the destination router if you want to steer the return traffic.

Explicit-path
An explicit path is a predefined, manually specified path that traffic should follow through the network, overriding the usual shortest-path routing calculated by Interior Gateway Protocols (IGP). For this lab I will create an explicit-path that will exclude the loopback address of P Router3 (3) in our tunnel’s path. 

Tunnel Interface
When creating the tunnel interface it will reference this explicit path and set it’s destination to the loopback of PE Router5. When it creates a path to the destination (5.5.5.5) it will exclude Router3 (3.3.3.3) in the path.

Tunnel autoroute announce
When you create the tunnel interface by default it isn’t used in routing yet. Sending traffic down the tunnel can be done in multiple ways. One example is with a simple static route  with the tunnel acting as next-hop. In this example the tunnel will be configured with the command “tunnel mpls traffic-eng autoroute announce“. 
If a tunnel is configured with autoroute announce it specifies that the Interior Gateway Protocol (IGP) should use the tunnel (if the tunnel is up) in its enhanced SPF calculation.

# First we create an explicit-path to exclude Router3. 
ip explicit-path name EXCLUDER3 enable
 exclude-address 3.3.3.3

#Tunnel configuration:
interface Tunnel1
 ip unnumbered Loopback0
 tunnel mode mpls traffic-eng
 tunnel destination 5.5.5.5
 tunnel mpls traffic-eng autoroute announce
 tunnel mpls traffic-eng priority 7 7
 tunnel mpls traffic-eng bandwidth 750
 tunnel mpls traffic-eng path-option 1 explicit name EXCLUDER3
 no routing dynamic
end


MPLS-TE Verification

When the tunnel is up we see the updated route on PE Router4 (4.4.4.4) to PE Router5 (5.5.5.5)

#====== Before the tunnel, following the MPLS path:
Router4#sh ip cef 5.5.5.5
5.5.5.5/32
  nexthop 10.3.4.3 GigabitEthernet0/0 label 303-(local:407)

#====== After creating the tunnel: 

Router4#sh ip cef 5.5.5.5
5.5.5.5/32
  nexthop 5.5.5.5 Tunnel1


#====== Tunnel and Path verification 

Router4#show mpls traffic-eng tunnels tun1

Name: Router4_t1                          (Tunnel1) Destination: 5.5.5.5
  Status:
    Admin: up         Oper: up     Path: valid       Signalling: connected
    path option 1, type explicit EXCLUDEP3 (Basis for Setup, path weight 3)

  Config Parameters:
    Bandwidth: 750      kbps (Global)  Priority: 7  7   Affinity: 0x0/0xFFFF
    Metric Type: TE (default)
    AutoRoute:  enabled   LockDown: disabled  Loadshare: 750      bw-based
    auto-bw: disabled
  Active Path Option Parameters:
    State: explicit path option 1 is active
    BandwidthOverride: disabled  LockDown: disabled  Verbatim: disabled


  InLabel  :  -
  OutLabel : GigabitEthernet0/3, 109
  RSVP Signalling Info:
       Src 4.4.4.4, Dst 5.5.5.5, Tun_Id 1, Tun_Instance 66
    RSVP Path Info:
      My Address: 10.1.4.4
      Explicit Route: 10.1.4.1 10.1.2.2 10.2.5.5 5.5.5.5
      Record   Route:   NONE
      Tspec: ave rate=750 kbits, burst=1000 bytes, peak rate=750 kbits
    RSVP Resv Info:
      Record   Route:   NONE
      Fspec: ave rate=750 kbits, burst=1000 bytes, peak rate=750 kbits
  Shortest Unconstrained Path Info:
    Path Weight: 2 (TE)
    Explicit Route: 10.3.4.3 10.3.5.5 5.5.5.5
  History:
    Tunnel:
      Time since created: 2 hours, 35 minutes
      Time since path change: 3 minutes, 14 seconds
      Number of LSP IDs (Tun_Instances) used: 66
    Current LSP:
      Uptime: 3 minutes, 14 seconds
    Prior LSP:
      ID: path option 1 [63]
      Removal Trigger: tunnel shutdown

Traceroute between CE routers after TE (R6->R7)

When performing a traceroute between CE routers before MPLS-TE we saw the default IGP shortest path behaviour.
R6 -> R4 -> R3 -> R5 -> R7.
After MPLS-TE we have created the following path:
R6 -> R4 -> R1 -> R2 -> R5 -> R7.

#====== Before the tunnel, following the default MPLS path:
Router6#traceroute 7.7.7.7
Type escape sequence to abort.
Tracing the route to 7.7.7.7
VRF info: (vrf in name/id, vrf out name/id)
  1 10.4.6.4 4 msec 3 msec 2 msec
  2 10.3.4.3 [MPLS: Labels 303/511 Exp 0] 9 msec 9 msec 8 msec
  3 10.5.7.5 [AS 65000] [MPLS: Label 511 Exp 0] 11 msec 6 msec 8 msec
  4 10.5.7.7 [AS 65000] 12 msec 8 msec *

#====== After the MPLS-TE, going throught the tunnel and avoiding P Router3:

Router6#traceroute 7.7.7.7
Type escape sequence to abort.
Tracing the route to 192.168.2.1
VRF info: (vrf in name/id, vrf out name/id)
  1 10.4.6.4 5 msec 3 msec 3 msec 
  2 10.1.4.1 [MPLS: Labels 108/502 Exp 0] 14 msec 7 msec 12 msec
  3 10.1.2.2 [MPLS: Labels 208/502 Exp 0] 13 msec 10 msec 12 msec
  4 10.5.7.5 [AS 65000] [MPLS: Label 502 Exp 0] 10 msec 9 msec 7 msec
  5 10.5.7.7 [AS 65000] 15 msec 12 msec *


Add a Comment

Your email address will not be published. Required fields are marked *


Index