Showing posts with label MPLS TE. Show all posts
Showing posts with label MPLS TE. Show all posts

Sunday, February 5, 2017

CCIE SPv4 - MPLS Traffic Engineering - Directing Traffic to the TE Tunnel - Static Routing

Software versions:
IOS XE 15.5
IOS XR 5.3

The topology for this demo:
In this post, we will begin taking customer traffic and mapping it to the TE tunnel. There are several options available, so we'll take the first option, which you have seen in previous posts, static routing. Super simple to implement, relatively easy to verify, we'll take a look at both IOS and IOS XR for all of our examples. 

Static routing for TE tunnels is the simplest, effectively you are telling the TE headend how to get to the PE remote end. R3 will be sending traffic to XR1, remember that TE tunnels are unidirectional in nature. I have used TE tunnels from previous posts to leverage in this and future ones. I won't focus on tunnel creation but more on the steering of traffic over the tunnel. The tunnel we want to use is up and operational.

mpls traffic-eng lsp attributes DUAL_COLOR
 affinity 0x11 mask 0x11

interface Tunnel3
 ip unnumbered Loopback0
 tunnel mode mpls traffic-eng
 tunnel destination 192.168.1.11
 tunnel mpls traffic-eng path-option 3 dynamic attributes DUAL_COLOR

ip route 192.168.1.13 255.255.255.255 Tunnel3


R3#show mpls traffic-eng tunnels tunnel 3

Name: R3_t3                               (Tunnel3) Destination: 192.168.1.11
  Status:
    Admin: up         Oper: up     Path: valid       Signalling: connected
    path option 3, type dynamic (Basis for Setup, path weight 2)
!
RSVP Path Info:
      My Address: 10.14.3.3
      Explicit Route: 10.14.3.14 10.11.14.14 10.11.14.11 192.168.1.11

As we can see, the tunnel is up and working, pointing to XR1 in this case.


R3#sh ip route 192.168.1.11
Routing entry for 192.168.1.11/32
  Known via "static", distance 1, metric 0 (connected)
  Routing Descriptor Blocks:
    directly connected, via Tunnel3
      Route metric is 0, traffic share count is 1

Since we have configured a static route to steer traffic over the TE tunnel, we have an exit interface of Tunnel 3.

R3#sh ip cef 192.168.1.11 detail
192.168.1.11/32, epoch 2, flags [attached], per-destination sharing
  local label info: global/30
  3 RR sources [non-eos indirection, heavily shared]
  attached to Tunnel3

We see that the CEF table has allocated a global label of 30 and an exit of Tunnel3.

R3#sh mpls forwarding-table labels 30 detail
Local      Outgoing   Prefix           Bytes Label   Outgoing   Next Hop
Label      Label      or Tunnel Id     Switched      interface
30         Pop Label  192.168.1.11/32  0             Tu3        point2point
        MAC/Encaps=18/22, MRU=1500, Label Stack{24011}, via Gi1.143
        000C29769933000C290626448100008F8847 05DCB000
        No output feature configured
    Per-destination load-sharing, slots: 0 2 4 6 8 10 12 14

The transport label we'll use is 24011 to get to XR4. We'll do an MPLS traceroute to see if the core is correct.

R3#traceroute mpls traffic-eng tunnel 3
Type escape sequence to abort.
  0 10.14.3.3 MRU 1500 [Labels: 24011 Exp: 0]
L 1 10.14.3.14 MRU 1500 [Labels: implicit-null Exp: 0] 9 ms
! 2 10.11.14.11 8 ms

The core trace looks good. let's verify from R8 to R12.

R8#sh ip route vrf BGP 12.12.12.12

Routing Table: BGP
Routing entry for 12.12.12.12/32
  Known via "bgp 8", distance 20, metric 0
  Tag 50693, type external
  Last update from 83.0.0.3 00:00:12 ago
  Routing Descriptor Blocks:
  * 83.0.0.3, from 83.0.0.3, 00:00:12 ago
      Route metric is 0, traffic share count is 1
      AS Hops 2
      Route tag 50693
      MPLS label: none

We can see that normal BGP route propagation is working as expected. We see a route to R12's lo12121212 in R8's VRF BGP RIB.

R8#traceroute vrf BGP 12.12.12.12 source 8.8.8.8
Type escape sequence to abort.
Tracing the route to 12.12.12.12
VRF info: (vrf in name/id, vrf out name/id)
  1 83.0.0.3 3 msec 1 msec 0 msec
  2 10.14.3.14 [MPLS: Labels 24011/24027 Exp 0] 8 msec 5 msec 6 msec
  3 10.11.14.11 [MPLS: Label 24027 Exp 0] 5 msec 17 msec 20 msec
  4 112.0.0.12 24 msec *  10 msec

Seeing label 24011 as the transport label shows us that the TE tunnel is being used.

Thanks for stopping by!
Rob Riker, CCIE #50693

CCIE SPv4 - MPLS Traffic Engineering - TE Attributes - Auto Bandwidth

Software versions:
IOS XE 15.5
IOS XR 5.3

The topology for this demo:
This post will be a look at "auto-bandwidth or auto-bw". The idea behind this feature is make better use of bandwidth allocation for a tunnel rather than just give the tunnel all the bandwidth that the "bandwidth" command specified. Leveraging just the bandwidth definitely works and has it's use but if you specify 100 Mbps as the bandwidth reservation and the average bandwidth use is 10 Mbps, the tunnel is being under utilized. Auto BW would take a look at the utilization over a given period of time, 5 minutes by default, and allocate the highest bandwidth seen in that period of time to the tunnel. 

interface Tunnel7
 ip unnumbered Loopback0
 load-interval 60
 tunnel mode mpls traffic-eng
 tunnel destination 192.168.1.6
 tunnel mpls traffic-eng priority 7 7
 tunnel mpls traffic-eng bandwidth 6
 tunnel mpls traffic-eng affinity 0x0 mask 0x0
 tunnel mpls traffic-eng path-option 1 dynamic
 tunnel mpls traffic-eng auto-bw frequency 600 max-bw 100 min-bw 10


R3#show mpls traffic-eng tunnels tunnel 7 | sec auto-bw
    auto-bw: (600/328) 0  Bandwidth Requested: 10
          Samples Missed 0: Samples Collected 0

The auto-bw (600/xxx) means that every 600 seconds, the tunnel will get checked for bandwidth optimization. The "0" next to it would have the bandwidth allocated. Bandwidth requested is 10 here, for 10 Kbps. The drawback in my lab is that the platform limit is 100000 bps. 

R3#sh ip rsvp reservation filter session-type 7 tunnel-id 7
Destination     Tun Sender      TunID LSPID Next Hop        I/F      Fi Serv BPS
192.168.1.6     192.168.1.3     7     7     10.14.3.14      Gi1.143  SE LOAD 6K

As you can see the 6 Kbps of bandwidth reservation are signaled and working. However, since we are requesting less than the minimal limit that the auto-bw option can support, we won't actually see any modification. 

Thanks for stopping by!
Rob Riker, CCIE #50693

CCIE SPv4 - MPLS Traffic Engineering - TE Attributes - Path Options

Software versions:
IOS XE 15.5
IOS XR 5.3

The topology for this demo:
In this post we will take a look at the "path option" feature, which essentially determines how the TE tunnel will calculate its path. We can be either really "lazy" or really involved in this process, lazy with using the dynamic option and letting RSVP go out and find the shortest path and pretty much use IGPs path and call it a day. We could also use the explicit path option which allows us to have more control over where the traffic goes. We haven't covered PE to P LSPs yet for things like H-VPLS TE support, what we'll focus on here is R3 to XR3 and XR3 to R3 LSP signalling. The dynamic path option is the easiest and has been used so far in all of our testing so no reason to really break that out here. Let's focus on the explicit path and start there.

There are several ways to "code" the path, the "ip explicit-path" is the primary way. This method allows us to be really specific or be rather general. General in the sense I can give the path certain IPs that must be in the path and the others I may not care about. Other times I could give per interface path IPs and be really specific. Using the "loose" keyword allow us to specify the node we want to go through, but not necessarily how we go through. The strict keyword pretty much says you have to go through it. 

Our demo will start with leveraging the loose option and just build a TE tunnel path from R3 to XR3. The path we will take is XR4 to XR1 to R1 to XR5 to XR6 to R2 to XR3, not exactly direct but we want to exercise our capabilities. 

R3
ip explicit-path name LOOSE_TO_XR3 enable
 next-address loose 192.168.1.14
 next-address loose 192.168.1.11
 next-address loose 192.168.1.1
 next-address loose 192.168.1.15
 next-address loose 192.168.1.16
 next-address loose 192.168.1.2
 next-address loose 192.168.1.13
interface Tunnel4
 ip unnumbered Loopback0
 tunnel mode mpls traffic-eng
 tunnel destination 192.168.1.13
 tunnel mpls traffic-eng affinity 0x0 mask 0x0
 tunnel mpls traffic-eng path-option 1 explicit name LOOSE_TO_XR3


R3#show mpls traffic-eng tunnels tunnel 4

Name: R3_t4                               (Tunnel4) Destination: 192.168.1.13
  Status:
    Admin: up         Oper: up     Path: valid       Signalling: connected
    path option 1, type explicit LOOSE_TO_XR3 (Basis for Setup, path weight 1)

RSVP Path Info:
      My Address: 10.14.3.3
      Explicit Route: 10.14.3.14 192.168.1.14 192.168.1.11* 192.168.1.1*
                      192.168.1.15* 192.168.1.16* 192.168.1.2* 192.168.1.13*

Explicit Route: 10.14.3.3 10.14.3.14 10.14.15.14 10.14.15.15
                    10.15.16.15 10.15.16.16 10.16.2.16 10.16.2.2
                    10.13.2.2 10.13.2.13 192.168.1.13

As you can see above, we have configured our explicit path to use the TE ID of the nodes in the path to XR3. The * you see next to each of the router IDs is the indication of a loose path. The explicit path noted below the RSVP path is the actual path that will be taken from R3 to XR3. 

Now let's take a look at an strict explicit path.

R3
ip explicit-path name STRICT_TO_XR3 enable
 next-address 192.168.1.4
 next-address 192.168.1.15
 next-address 192.168.1.1
 next-address 192.168.1.12
 next-address 192.168.1.13
interface Tunnel5
 ip unnumbered Loopback0
 tunnel mode mpls traffic-eng
 tunnel destination 192.168.1.13
 tunnel mpls traffic-eng priority 4 4
 tunnel mpls traffic-eng affinity 0x0 mask 0x0
 tunnel mpls traffic-eng path-option 1 explicit name STRICT_TO_XR3

R3#show mpls traffic-eng tunnels tunnel 5

Name: R3_t5                               (Tunnel5) Destination: 192.168.1.13
  Status:
    Admin: up         Oper: up     Path: valid       Signalling: connected
    path option 1, type explicit STRICT_TO_XR3 (Basis for Setup, path weight 5)

RSVP Path Info:
      My Address: 10.3.4.3
      Explicit Route: 10.3.4.4 10.15.4.4 10.15.4.15 10.1.15.15
                      10.1.15.1 10.1.12.1 10.1.12.12 10.12.13.12
                      10.12.13.13 192.168.1.13

Explicit Route: 10.14.3.3 10.14.3.14 10.14.15.14 10.14.15.15
                    10.15.16.15 10.15.16.16 10.16.2.16 10.16.2.2
                    10.13.2.2 10.13.2.13 192.168.1.13

As you can see, the RSVP path is configured to use R4 to XR5 to R1 to XR2 to XR3. I don't have a static route or other traffic to tunnel mapping mechanism in place for this TE tunnel, so this path is simply a different output to show you the difference. The Other explicit route is the route that falls under the "Shortest Unconstrained Path" in the network, basically, this is the LDP path in the network. The RSVP path is the one that will be followed.


The next option is the "identifier" where state which devices we want the TE tunnel to go through.

ip explicit-path identifier 1 enable
 next-address 192.168.1.4
 next-address 192.168.1.5
 next-address 192.168.1.6
 next-address 192.168.1.2
 next-address 192.168.1.16
 next-address 192.168.1.15
 next-address 192.168.1.14
 next-address 192.168.1.11
 next-address 192.168.1.1
 next-address 192.168.1.12
 next-address 192.168.1.13
interface Tunnel6
 ip unnumbered Loopback0
 tunnel mode mpls traffic-eng
 tunnel destination 192.168.1.13
 tunnel mpls traffic-eng affinity 0x0 mask 0x0
 tunnel mpls traffic-eng path-option 1 explicit identifier 1

ip route 192.168.1.13 255.255.255.255 Tunnel6

R3#show mpls traffic-eng tunnels tunnel 6

Name: R3_t6                               (Tunnel6) Destination: 192.168.1.13
  Status:
    Admin: up         Oper: up     Path: valid       Signalling: connected
    path option 1, type explicit 1 (Basis for Setup, path weight 11)

RSVP Path Info:
      My Address: 10.3.4.3
      Explicit Route: 10.3.4.4 10.4.5.4 10.4.5.5 10.5.6.5
                      10.5.6.6 10.2.6.6 10.2.6.2 10.16.2.2
                      10.16.2.16 10.15.16.16 10.15.16.15 10.14.15.15
                      10.14.15.14 10.11.14.14 10.11.14.11 10.1.11.11
                      10.1.11.1 10.1.12.1 10.1.12.12 10.12.13.12
                      10.12.13.13 192.168.1.13

This path hits every router in the MPLS core, intentionally configured to show you it could be done that way. I also configured a static route pointing towards XR3 to use Tunnel 6. 

R3# traceroute mpls traffic-eng tunnel 6
Type escape sequence to abort.
  0 10.3.4.3 MRU 1500 [Labels: 28 Exp: 0]
L 1 10.3.4.4 MRU 1500 [Labels: 42 Exp: 0] 10 ms
L 2 10.4.5.5 MRU 1500 [Labels: 36 Exp: 0] 3 ms
L 3 10.5.6.6 MRU 1500 [Labels: 26 Exp: 0] 5 ms
L 4 10.2.6.2 MRU 1500 [Labels: 24013 Exp: 0] 4 ms
L 5 10.16.2.16 MRU 1500 [Labels: 24014 Exp: 0] 10 ms
L 6 10.15.16.15 MRU 1500 [Labels: 24010 Exp: 0] 17 ms
L 7 10.14.15.14 MRU 1500 [Labels: 24026 Exp: 0] 15 ms
L 8 10.11.14.11 MRU 1500 [Labels: 40 Exp: 0] 18 ms
L 9 10.1.11.1 MRU 1500 [Labels: 24014 Exp: 0] 11 ms
L 10 10.1.12.12 MRU 1500 [Labels: implicit-null Exp: 0] 17 ms
! 11 10.12.13.13 17 ms

Let's do a little recursion to make sure we still know how to figure out where the TE label gets allocated and why.

R3#show ip route 192.168.1.13
Routing entry for 192.168.1.13/32
  Known via "static", distance 1, metric 0 (connected)
  Routing Descriptor Blocks:
  * directly connected, via Tunnel6
      Route metric is 0, traffic share count is 1

R3#sh ip cef 192.168.1.13 detail
192.168.1.13/32, epoch 2, flags [attached]
  local label info: global/30
  3 RR sources [non-eos indirection, heavily shared]
  attached to Tunnel6

R3#sh mpls forwarding-table labels 30 detail
Local      Outgoing   Prefix           Bytes Label   Outgoing   Next Hop
Label      Label      or Tunnel Id     Switched      interface
30         Pop Label  192.168.1.13/32  0             Tu6        point2point
        MAC/Encaps=18/22, MRU=1500, Label Stack{28}, via Gi1.34
        000C2924DCA2000C29062644810000228847 0001C000
        No output feature configured

We will first look at the RIB, we see that traffic to XR3s loopback will be sent out Tunnel 6, if we do a CEF lookup we can see that a local global label of 30 has been allocated to that prefix. We can use that now in the MPLS lookup and see that 30 is the local label, label 28 is the outgoing label and it points out Tunnel 6.

Let's checkout XR3 now, we can also configure path options on XR3. They are almost identical in XR so I'll only show you the TE tunnel to R3 I created to show some basic verification against.

XR3
explicit-path identifier 1
 index 1 next-address strict ipv4 unicast 192.168.1.2
 index 2 next-address strict ipv4 unicast 192.168.1.6
 index 3 next-address strict ipv4 unicast 192.168.1.5
 index 4 next-address strict ipv4 unicast 192.168.1.4
 index 5 next-address strict ipv4 unicast 192.168.1.3
interface tunnel-te2
 ipv4 unnumbered Loopback0
 destination 192.168.1.3
 affinity ignore
 path-option 1 explicit identifier 1

RP/0/0/CPU0:XR3#show mpls traffic-eng tunnels 2
Sun Feb  5 03:18:33.883 UTC


Name: tunnel-te2  Destination: 192.168.1.3  Ifhandle:0x780
  Signalled-Name: XR3_t2
  Status:
    Admin:    up Oper:   up   Path:  valid   Signalling: connected

Node hop count: 5
  Hop0: 10.13.2.2
  Hop1: 10.2.6.2
  Hop2: 10.2.6.6
  Hop3: 10.5.6.6
  Hop4: 10.5.6.5
  Hop5: 10.4.5.5
  Hop6: 10.4.5.4
  Hop7: 10.3.4.4
  Hop8: 10.3.4.3
  Hop9: 192.168.1.3

We can see that the tunnel was successfully signalled and the path was built. Slightly different output from IOS but it still makes sense. I created a static route to point to R3 for verification purposes.

router static
 address-family ipv4 unicast
  192.168.1.3/32 tunnel-te2

RP/0/0/CPU0:XR3#sh cef 192.168.1.3 detail | in label
Sun Feb  5 03:20:18.416 UTC
     local label 24013      labels imposed {ImplNull}

RP/0/0/CPU0:XR3#show mpls traffic-eng forwarding p2p tunnel-id 2 detail
Sun Feb  5 03:21:07.423 UTC
P2P tunnels:

Tunnel ID:    2 LSP ID:    2 Destination:     192.168.1.3 Ctype:  7
  Source:    192.168.1.13 Ext Tun ID:    192.168.1.13
  Output: Gi0/0/0/0.132     Next Hop: 10.13.2.2       Output Label: 29
  Input:  -                 Prev Hop: None            Local Label:  24028


RP/0/0/CPU0:XR3#traceroute mpls traffic-eng tunnel-te 2 lsp active
Type escape sequence to abort.

  0 10.13.2.13 MRU 1500 [Labels: 29 Exp: 0]
L 1 10.13.2.2 MRU 1500 [Labels: 37 Exp: 0] 0 ms
L 2 10.2.6.6 MRU 1500 [Labels: 43 Exp: 0] 10 ms
L 3 10.5.6.5 MRU 1500 [Labels: 29 Exp: 0] 10 ms
L 4 10.4.5.4 MRU 1500 [Labels: implicit-null Exp: 0] 0 ms
! 5 10.3.4.3 10 ms

The routing table has R3s loopback pointed out Tunnel 2, the CEF output states that local label 24013 will be used. IOS XR has a separate but equally important traffic-eng forwarding table for us to leverage, we see that label 29 will be used for outbound forwarding. A MPLS trace proves that label 29 will be used as the transport label to R3.

As you can see, the path option is very handy in situations like this, being able to manipulate the forwarding is key in modern networks. 

Thanks for stopping by!
Rob Riker, CCIE #50693

Tuesday, January 31, 2017

CCIE SPv4 - MPLS Traffic Engineering - TE Attributes - Priority

Software versions:
IOS XE 15.5
IOS XR 5.3

The topology for this demo:
In this post we will focus on TE attribute - Priority. By default, priority is set to 7/7, 7 for the setup and 7 for the hold, which happens to mean that 7 is the lowest priority level, a TE tunnel with a priority 6 or higher will override the priority 7 tunnel. The 7 for setup is basically it initial launch, the 7 for hold is if this tunnel is up and another tunnel with a higher priority needs the bandwidth, the lower priority wins. 

We'll configure a TE tunnel, TE tunnel 3, which will have a priority of 6 and 6. This should disable the other tunnel with a high priority value in favor of this tunnel.


%MPLS_TE-5-LSP: LSP 192.168.1.3 3_3958: DOWN: path error
%MPLS_TE-5-TUN: Tun3: installed LSP nil for 3_3958 (popt 3), path error
%MPLS_TE-5-TUN: Tun3: LSP path change nil for 3_3958, path error
%MPLS_TE-5-TUN: Tun3: installed LSP 3_3959 (popt 3) for nil, got 1st feasible path opt
%MPLS_TE-5-LSP: LSP 192.168.1.3 3_3959: Path Error from 10.15.4.15: Admission control Failure: Requested bandwidth unavailable (flags 0)

This output indicates that the requested bandwidth is not available.

interface Tunnel3
 tunnel mpls traffic-eng priority 6 6

%MPLS_TE-5-TUN: Tun3: installed LSP 3_3968 (popt 3) for nil, got 1st feasible path opt
%MPLS_TE-5-LSP: LSP 192.168.1.3 1_538: DOWN: signalling shutdown
%MPLS_TE-5-TUN: Tun1: installed LSP nil for 1_538 (popt 1), signalling shutdown
%MPLS_TE-5-TUN: Tun1: LSP path change nil for 1_538, signalling shutdown
%MPLS_TE-5-TUN: Tun1: installed LSP 1_636 (popt 1) for nil, unprotected LSP failure
%MPLS_TE-5-LSP: LSP 192.168.1.3 1_636: Path Error from 10.15.4.15: Admission control Failure: equested bandwidth unavailable (flags 0)
%MPLS_TE-5-LSP: LSP 192.168.1.3 1_636: DOWN: path error
%MPLS_TE-5-TUN: Tun1: installed LSP nil for 1_636 (popt 1), path error
%MPLS_TE-5-TUN: Tun1: LSP path change nil for 1_636, path error
%MPLS_TE-5-LSP: LSP 192.168.1.3 3_3968: UP

%LINEPROTO-5-UPDOWN: Line protocol on Interface Tunnel1, changed state to down

R3#sh mpls traffic-eng tunnels tunnel 3

Name: R3_t3                               (Tunnel3) Destination: 192.168.1.13
  Status:
    Admin: up         Oper: up     Path: valid       Signalling: connected
    path option 3, type dynamic (Basis for Setup, path weight 204)

Config Parameters:
    Bandwidth: 100000   kbps (Global)  Priority: 6  6   Affinity: 0x0/0x0

So the configuration say that a path weight, or admin weight was seen which in my testing, didn't help steer the traffic. The priority is 6 6 and the affinity ix 0x0/0x0, which means it was told to ignore the affinity values.

R3#sh ip rsvp interface | in 100
Gi1.34       ena        100M       750M     750M     0

R3#$reservation detail filter session-type 7 | in 192.168.1.13|Label
Tun Dest:   192.168.1.13  Tun ID: 2  Ext Tun ID: 192.168.1.3
  Label: 24001 (outgoing)
  Tun Dest:   192.168.1.13  Tun ID: 3  Ext Tun ID: 192.168.1.3
  Label: 23 (outgoing)


I don't currently have a route advertisement mechanism in place to point traffic to the tunnel. I'll toss in a static route for now to prove the tunnel is usable.

ip route 192.168.1.13 255.255.255.255 Tunnel3

R3#sh ip route 192.168.1.13
Routing entry for 192.168.1.13/32
  Known via "static", distance 1, metric 0 (connected)
  Routing Descriptor Blocks:
  * directly connected, via Tunnel3
      Route metric is 0, traffic share count is 

Routing table point to tunnel 3 as hour next hop.

R3#sh ip cef 192.168.1.13 detail
192.168.1.13/32, epoch 2, flags [attached]
  local label info: global/36
  3 RR sources [non-eos indirection, heavily shared]
  attached to Tunnel3

The CEF table allocates local label 36 for the tunnel route.

R3#sh mpls forwarding-table labels 36 detail
Local      Outgoing   Prefix           Bytes Label   Outgoing   Next Hop
Label      Label      or Tunnel Id     Switched      interface
36         Pop Label  192.168.1.13/32  0             Tu3        point2point
        MAC/Encaps=18/22, MRU=1500, Label Stack{23}, via Gi1.34
        000C2924DCA2000C29062644810000228847 00017000
        No output feature configured

You can see that label 23 will be used as transport.

R3#traceroute mpls traffic-eng tunnel 3
Type escape sequence to abort.
  0 10.3.4.3 MRU 1500 [Labels: 23 Exp: 0]
L 1 10.3.4.4 MRU 1500 [Labels: 24006 Exp: 0] 13 ms
L 2 10.15.4.15 MRU 1500 [Labels: 24014 Exp: 0] 17 ms
L 3 10.15.16.16 MRU 1500 [Labels: 24015 Exp: 0] 17 ms
L 4 10.12.16.12 MRU 1500 [Labels: implicit-null Exp: 0] 62 ms
! 5 10.12.13.13 29 ms

As you can see, the TE tunnel is being used. 

Thanks for stopping by!
Rob Riker, CCIE #50693

Saturday, January 28, 2017

CCIE SPv4 - MPLS Traffic Engineering - TE Attributes - Bandwidth on IOS XR

Software versions:
IOS XE 15.5
IOS XR 5.3

The topology for this demo:
In this post we will take a look at configuring bandwidth on IOS XR, it's very similar operationally to IOS so I won't go dig into the details as deep as it's really all the same, slightly different outputs. One thing I did notice between the previous post and this, which could negatively effect operations in the network. Remember that MPLS TE tunnels are unidirectional, and are always signalled in a head end to tail end manner. In this scenario, I configured a TE tunnel from XR3 to R3, used the same TE attributes as the last post, config output below. The tunnel forms without any issue, but which path it uses to form the TE tunnel raises an interesting situation I wasn't prepared for.

XR3
interface tunnel-te1
 bandwidth 200000
 ipv4 unnumbered Loopback0
 priority 7 7
 destination 192.168.1.3
 affinity 0x10 mask 0x10
 path-option 1 dynamic

So with the above configuration, the TE tunnel does form relatively quickly. One mechanism used by MPLS TE tunnels is the concept of "make before break" where a tunnel has to be first signaled end to end, ensuring that the attributes can be met and then then tunnel will form. If there is a case, covered in the next post, where another tunnel has a higher priority or if the LSP has FRR setup on it, that the primary LSP will not be broken before the higher priority tunnel is built and ready or the FRR tunnel is also built and ready. This prevents the blackholing in the MPLS core. 

RP/0/0/CPU0:XR3#sh mpls traffic-eng tunnels 1
Sat Jan 28 01:51:41.499 UTC


Name: tunnel-te1  Destination: 192.168.1.3  Ifhandle:0x680
  Signalled-Name: XR3_t1
  Status:
    Admin:    up Oper:   up   Path:  valid   Signalling: connected
Path info (OSPF 1 area 0):
  Node hop count: 5
  Hop0: 10.12.13.12
  Hop1: 10.12.16.12
  Hop2: 10.12.16.16
  Hop3: 10.15.16.16
  Hop4: 10.15.16.15
  Hop5: 10.15.4.15
  Hop6: 10.15.4.4
  Hop7: 10.3.4.4
  Hop8: 10.3.4.3
  Hop9: 192.168.1.3

Resv Info: None
      Record Route: Disabled
      Fspec: avg rate=200000 kbits, burst=1000 bytes, peak rate=200000 kbits
Displayed 1 (of 1) heads, 0 (of 0) midpoints, 1 (of 2) tails
Displayed 1 up, 0 down, 0 recovering, 0 recovered heads

R3 uses the XR2 to XR3 link to terminate it's TE LSPs on XR3. Which let's us achieve the 2 connections we need with the bandwidth reservation and the affinity values specified. After I had finished the last post, I created a third tunnel with then intention of TE simply directing the third tunnel out the G1.34 link to R4. But when I watched the debugs roll by, I would see the entire path getting signalled until XR3 was reached and then an Admission control error was thrown. I was a bit baffled at first, so I slowly lowered the reservation amount down from 400 Mbps to 100 Mbps, no joy.  

I went to XR3 to see if I had missed something, that is when I spotted the issue, both the TE LSPs R3 had connected to XR3 where coming in on XR3s link to XR2, and the sum total of the bandwidth was 750 Mbps. Well, I found the issue, which then lead me to create a TE tunnel on XR3 back to R3, figuring it had to bypass the max'd out link to XR2 and use the path through R2 instead, not the case, to my surprise the tunnel came up with no issue. Remember, TE LSP are unidirectional. So even though the TE LSP was signalled and formed, there would be a contention spot in the network because of this. 

I have 3 solutions to solve this, 1, modify the affinity values to not match on "BROWN" links but to exclude "BLACK" links, thus eliminating the XR2 to XR3 path or, 2, use priority to force the R3 to XR3 tunnel with 100 Mbps to be decommissioned in favor of the higher priority link or, 3, tell TE not to take affinity into consideration. I chose this option as it is the easiest. 

interface tunnel 3
tunnel mpls traffic-eng affinity 0x0 mask 0x0

However the path still fails, this is because path wise, I could use admin weight or an explicit path to override this operation. If RSVP tries to use the G0/0/0/0.1213 link, the bandwidth reservation will not be met. Which means that XR3s tunnel R3 will form as the path from XR3 to R3 only has a 200 Mbps reservation and it isn't seeing the incoming TE reservation due to the TE tunnel being unidirectional. Instead, we'll finish verifying XR3s TE tunnel and I'll fix the R3 issue in the next post.

RP/0/0/CPU0:XR3#sh rsvp reservation session-type lsp-p2p detail destination 19$
Sat Jan 28 02:26:56.304 UTC
 Input adjusted interface: Gi0/0/0/0.1213. Input physical interface: Gi0/0/0/0.1213.
  Labels: Outgoing downstream: 24014.

RP/0/0/CPU0:XR3#sh mpls traffic-eng forwarding tunnel-id 1
Sat Jan 28 02:28:02.429 UTC
P2P tunnels:

Tunnel ID                  Ingress IF     Egress IF      In lbl  Out lbl Backup
-------------------------- -------------- -------------- ------- ------- -------
192.168.1.13 1_2                        - Gi0/0/0/0.1213 24023   24014   unknown

Displayed 1 tunnel heads, 0 label P2P rewrites
Displayed 0 tunnel heads, 0 label P2MP rewrites

We can see that the outgoing label value is 24014, and that shows up in the below traffic-eng traceroute.

RP/0/0/CPU0:XR3#traceroute mpls traffic-eng tunnel-te 1 lsp  active
Type escape sequence to abort.

  0 10.12.13.13 MRU 1500 [Labels: 24014 Exp: 0]
L 1 10.12.13.12 MRU 1500 [Labels: 24013 Exp: 0] 10 ms
L 2 10.12.16.16 MRU 1500 [Labels: 24004 Exp: 0] 10 ms
L 3 10.15.16.15 MRU 1500 [Labels: 18 Exp: 0] 10 ms
L 4 10.15.4.4 MRU 1500 [Labels: implicit-null Exp: 0] 10 ms
! 5 10.3.4.3 10 ms

So you can see that the TE tunnel is up and working. We have signaled a tunnel, but haven't actually gone and mapped traffic to it. But its working.

Thanks for stopping by!
Rob Riker, CCIE #50693

Friday, January 27, 2017

CCIE SPv4 - MPLS Traffic Engineering - TE Attributes - Bandwidth

Software versions:
IOS XE 15.5
IOS XR 5.3

The topology for this demo:
In this post we will be looking at bandwidth as a TE attribute. This is the most common attribute I have seen deployed and makes the most sense, since most customers want to make sure their applications riding over the MPLS core will have enough bandwidth to meet SLAs. There is a bandwidth reservation capability and a sub-pool capability. We'll examine the bandwidth option first. Typically the sub pool is used for traffic that has some QoS value associated, like EF or AF41 for instance. 

In IOS, when you tell an interface that it will participate in TE tunneling, RSVP is applied to that interface, almost like PIM is applied to an interface to build MDTs. IOS auto reserves/allocates 75% of the total bandwidth that is configured on that interface, so if it's a GigE interface you get 750 Mbps. I won't change this but you could manually configure the BW down to 50 Mbps to test reoptimization later on. 

In the above topology, I have brought up the right side of the topology, re-designing the "affinity" to give us more to work with than just 6 routers, I will eventually start wrapping multiple TE attributes together to see the complexity. Right now, I am currently only matching on the "BROWN" path, or 0x0010/0x0010. I have labeled each link with the appropriate affinity valures. I also enabled MPLS OAM on all the routers to trace inside the LSP as we're building it, since we aren't leveraging IGP for forwarding, it's best if we test the TE defined path.

We'll configure a TE tunnel to reserve 200 Mbps, I'll debug the RSVP RESV output so we can see the outputs, but I'll only show the relevant debugs. Bandwidth is reserved in "kilobits per second". So we'll reserve 200000 and fire away.

interface Tunnel1
 ip unnumbered Loopback0
 tunnel mode mpls traffic-eng
 tunnel destination 192.168.1.13
 tunnel mpls traffic-eng priority 7 7
 tunnel mpls traffic-eng bandwidth 200000
 tunnel mpls traffic-eng affinity 0x10 mask 0x10
 tunnel mpls traffic-eng path-option 1 dynamic

sub 0 from global tdb_bw_avail pool on link 10.12.13.12 hop_gen 0 link_gen 83 in forward link
    before:
    rrr_pcalc_print_bw_values nbr_p = 0x7EFF4C7BA398 pri 7
    Global inprogress 0, Global avail 0

So we see that from the link between XR2 and XR3, affinity is NOT the issue, the global BW available is ZERO. Unlike IOS, XR does not auto reserve the bandwidth, we have to manually tell XR what bandwidth values to allocate, we're going to say 750 Mbps to equal IOS. 

XR1-6
rsvp
 interface type/number.subinterface
  bandwidth 750000


sub 0 from global tdb_bw_avail pool on link 10.12.13.12 hop_gen 0 link_gen 101 in forward link
    before:
    rrr_pcalc_print_bw_values nbr_p = 0x7EFF4C35A2D8 pri 7
    Global inprogress 0, Global avail 750000
    Sub-pool inprogress 0, Sub-pool avail 0
        after:
    rrr_pcalc_print_bw_values nbr_p = 0x7EFF4C35A2D8 pri 7
    Global inprogress 0, Global avail 750000
    Sub-pool inprogress 0, Sub-pool avail 0
    192.168.1.13: 10.12.13.13
    192.168.1.13: 192.168.1.13
TE-PCALC-API: 192.168.1.3_538->192.168.1.13_1 {7}: P2P LSP Path Lookup result: success
MPLS_TE-5-LSP: LSP 192.168.1.3 1_538: UP
MPLS_TE-5-TUN: Tun1: installed LSP 1_538 (popt 1) for 1_511 (popt 1), reopt. LSP is up

So we can see from the debug output that there was bandwidth available, and the LSP was successfully signaled end to end, you'll also see on the last bolded line, "reopt" which means reoptimized. 

R3#sh mpls traffic-eng tunnels tunnel 1

Name: R3_t1                               (Tunnel1) Destination: 192.168.1.13
  Status:
    Admin: up         Oper: up     Path: valid       Signalling: connected
    path option 1, type dynamic (Basis for Setup, path weight 5)

  Config Parameters:
    Bandwidth: 200000   kbps (Global)  Priority: 7  7   Affinity: 0x10/0x10

So we can see that 1, the tunnel is up, so both the affinity values were good, and that there was enough BW available to allocate to this LSP. The setup and hold priority are both 7, the lowest, more on that in another post.

R3#$p reservation detail filter session-type 7 tunnel-id 1 | in Label|Bitrate
  Label: 1 (outgoing)
  Average Bitrate is 0 bits/sec, Maximum Burst is 1K bytes
  Label: 19 (outgoing)
  Average Bitrate is 200M bits/sec, Maximum Burst is 1K bytes

We can see that the signaling pulled the right amount of bandwidth and has also allocated a TE label of 19.

R3#sh ip rsvp interface
interface    rsvp       allocated  i/f max  flow max sub max  VRF
Gi1          ena        0          750M     750M     0
Gi1.34       ena        200M       750M     750M     0
Gi1.143      ena        0          750M     750M     0

We can see that we will use G1.34 to forward the traffic towards XR3. 

Now we add in a static route to map the customer traffic to the TE tunnel.

ip route 192.168.1.13 255.255.255.255 Tunnel1

R3#sh ip route 192.168.1.13
Routing entry for 192.168.1.13/32
  Known via "static", distance 1, metric 0 (connected)
  Routing Descriptor Blocks:
  * directly connected, via Tunnel1
      Route metric is 0, traffic share count is 1

We can see that any VPN based traffic that has a next hop of XR3, 192.168.1.13, will use the TE tunnel.

R3#sh ip cef 192.168.1.13 detail
192.168.1.13/32, epoch 2, flags [attached]
  local label info: global/36
  3 RR sources [non-eos indirection, heavily shared]
  attached to Tunnel1

We see that there is a CEF entry as well, the global/36 is applied, but this is the locally assigned label, not the transport or VPN label, nut we can use that label as reference to look at the MPLS forwarding table.

R3#sh mpls forwarding-table labels 36
Local      Outgoing   Prefix           Bytes Label   Outgoing   Next Hop
Label      Label      or Tunnel Id     Switched      interface
36    [T]  Pop Label  192.168.1.13/32  0             Tu1        point2point

[T]     Forwarding through a LSP tunnel.
        View additional labelling info with the 'detail' option

Since we are using a TE tunnel, we see the [T], which indicates that a TE tunnel is used. to know more we need to tack on the "detail" option.

R3#sh mpls forwarding-table labels 36 detail
Local      Outgoing   Prefix           Bytes Label   Outgoing   Next Hop
Label      Label      or Tunnel Id     Switched      interface
36         Pop Label  192.168.1.13/32  0             Tu1        point2point
        MAC/Encaps=18/22, MRU=1500, Label Stack{19}, via Gi1.34
        000C2924DCA2000C29062644810000228847 00013000
        No output feature configured

We can see that label 19 is used and is pointing out G1.34. Let's trace from R3 to XR3 in the core and see what happens. 

R3#traceroute mpls traffic-eng tunnel 1
Type escape sequence to abort.
  0 10.3.4.3 MRU 1500 [Labels: 19 Exp: 0]
L 1 10.3.4.4 MRU 1500 [Labels: 24000 Exp: 0] 11 ms
L 2 10.15.4.15 MRU 1500 [Labels: 24012 Exp: 0] 8 ms
L 3 10.15.16.16 MRU 1500 [Labels: 24013 Exp: 0] 9 ms
L 4 10.12.16.12 MRU 1500 [Labels: implicit-null Exp: 0] 15 ms
! 5 10.12.13.13 13 ms

Our first label is 19 which was allocated by TE.

I'm going to create another TE tunnel, telling the affinity to use the same values as before, but this time I need 600 Mbps.

interface Tunnel2
 ip unnumbered Loopback0
 tunnel mode mpls traffic-eng
 tunnel destination 192.168.1.13
 tunnel mpls traffic-eng priority 7 7
 tunnel mpls traffic-eng bandwidth 600000
 tunnel mpls traffic-eng affinity 0x10 mask 0x10
 tunnel mpls traffic-eng path-option 1 dynamic

%MPLS_TE-5-LSP: LSP 192.168.1.3 2_1: No path to destination, 192.168.1.13 (bw or affinity)

Since TE checks each hop along the way, having to make sure that the affinity values match and there is bandwidth available, in this case we are reserving more bandwidth than is available, I have asked for 600 Mbps, when only 550 are available for allocation. I'll change the BW to 550000 and see if that changes anything.

interface Tunnel2
 tunnel mpls traffic-eng bandwidth 550000

%MPLS_TE-5-TUN: Tun2: installed LSP 2_8 (popt 1) for nil, got 1st feasible path opt
%MPLS_TE-5-LSP: LSP 192.168.1.3 2_8: UP
%MPLS_TE-5-TUN: Tun2: LSP path change 2_8 for nil, normal
%LINEPROTO-5-UPDOWN: Line protocol on Interface Tunnel2, changed state to up

The tunnel comes up this time, which means that a path with the affinity applied matched and there was bandwidth available. 

R3#sh mpls traffic-eng tunnels tunnel 2 | b Status
  Status:
    Admin: up         Oper: up     Path: valid       Signalling: connected
    path option 1, type dynamic (Basis for Setup, path weight 5)

  Config Parameters:
    Bandwidth: 550000   kbps (Global)  Priority: 7  7   Affinity: 0x10/0x10
RSVP Path Info:
      My Address: 10.14.3.3
      Explicit Route: 10.14.3.14 10.14.15.14 10.14.15.15 10.15.16.15
                      10.15.16.16 10.12.16.16 10.12.16.12 10.12.13.12
                      10.12.13.13 192.168.1.13

In this example, we aren't using the same path as tunnel 1, we are using a path to XR4 and not R4.

R3#sh ip rsvp interface
interface    rsvp       allocated  i/f max  flow max sub max  VRF
Gi1          ena        0          750M     750M     0
Gi1.34       ena        200M       750M     750M     0
Gi1.143      ena        550M       750M     750M     0

G1.143 has an allocation of 550 Mbps. The documentation I have read doesn't give any indication of a protection mechanism of maxing out the tunnel maximums, but one could imagine that this is the case. 

R3#$reservation detail filter session-type 7 tunnel-id 2 | in Label|Bitrate
  Label: 1 (outgoing)
  Average Bitrate is 0 bits/sec, Maximum Burst is 1K bytes
  Label: 24001 (outgoing)
  Average Bitrate is 550M bits/sec, Maximum Burst is 1K bytes

We can see that label 24001 is allocated for this tunnel and 550 Mbps are reserved. 

R3#traceroute mpls traffic-eng tunnel 2
Type escape sequence to abort.
  0 10.14.3.3 MRU 1500 [Labels: 24001 Exp: 0]
L 1 10.14.3.14 MRU 1500 [Labels: 24003 Exp: 0] 10 ms
L 2 10.14.15.15 MRU 1500 [Labels: 24011 Exp: 0] 10 ms
L 3 10.15.16.16 MRU 1500 [Labels: 24012 Exp: 0] 10 ms
L 4 10.12.16.12 MRU 1500 [Labels: implicit-null Exp: 0] 14 ms
! 5 10.12.13.13 14 ms

I'll configure a third tunnel, this will grab 500 Mbps, which will max out both interfaces and completely oversubscribe Tunnel 2 which has 550 Mbps already reserved.

interface Tunnel3
 ip unnumbered Loopback0
 tunnel mode mpls traffic-eng
 tunnel destination 192.168.1.13
 tunnel mpls traffic-eng priority 7 7
 tunnel mpls traffic-eng bandwidth 500000
 tunnel mpls traffic-eng affinity 0x10 mask 0x10
 tunnel mpls traffic-eng path-option 1 dynamic

*Jan 28 00:35:42.088: %MPLS_TE-5-TUN: Tun3: installed LSP 3_10 (popt 1) for nil, got 1st feasible path opt
*Jan 28 00:35:42.137: %MPLS_TE-5-LSP: LSP 192.168.1.3 3_10: Path Error from 10.15.4.15: Admission control Failure: Requested bandwidth unavailable (flags 0)
*Jan 28 00:35:42.138: %MPLS_TE-5-LSP: LSP 192.168.1.3 3_10: DOWN: path error
*Jan 28 00:35:42.138: %MPLS_TE-5-TUN: Tun3: installed LSP nil for 3_10 (popt 1), path error
*Jan 28 00:35:42.138: %MPLS_TE-5-TUN: Tun3: LSP path change nil for 3_10

We get an obvious syslog message stating that the requested bandwidth isn't reservable, therefore the tunnel will fail to form. This message continues to repeat over and over. 

So as you can see, the bandwidth attribute is pretty straightforward. As long as the bandwidth is available, the tunnel should form pretty easily, assuming that the other TE attributes are able to met of course. 

Thanks for stopping by!
Rob Riker, CCIE #50693