Wednesday, January 25, 2017

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

Software versions:
IOS XE 15.5
IOS XR 5.3

The topology for this demo:
In this post we will look at TE with "affinity" from IOS XR. Very similar to IOS, but much easier. Going further, the goal is to do a technology post on IOS first, then XR in the next. XRs implementation of TE is very similar configuration wise to IOS, and as we progress, you'll see overall its simplified. 

XR1 will be our test bed to connect to R3 so that R12 and R8 will be our guinea pigs. I have also enabled MPLS OAM or Operations, Administration and Maintenance on R1, R3, R4, XR1, XR4 and XR5 globally. This will allows us to do mpls pings/traces and trace the LSP and not the IGP path. 

Referencing the topology diagram above, we will specify that any path with RED or 0x4 or 0100 is to be included in the TE path. IOS XR has significantly more output in debugs. I'll add in what I believe is useful.

MPLS OAM for IOS
mpls oam

MPLS OAM for IOS XR
mpls oam

When you create a TE tunnel in XR, you use the "tunnel-te" option to do so. We also need a way to forward traffic to the remote PE, we'll use a static route.

XR1
interface tunnel-te1
 ipv4 unnumbered Loopback0
 logging events all
 destination 192.168.1.3
 affinity include 0x0100
 path-option 10 dynamic

You can see that I included 0x0100 or 0x4 which tells RSVP PCALC to use only RED paths.

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

RP/0/0/CPU0:XR1#sh route static
Wed Jan 25 13:15:09.165 UTC

S    192.168.1.3/32 is directly connected, 00:59:47, tunnel-te1


RP/0/0/CPU0:XR1#sh mpls traffic-eng tunnels 1
Wed Jan 25 13:05:06.036 UTC


Name: tunnel-te1  Destination: 192.168.1.3  Ifhandle:0x480
  Signalled-Name: XR1_t1
  Status:
    Admin:    up Oper:   up   Path:  valid   Signalling: connected

The tunnel was successfully signalled and the tunnel attributes we specified were able to be met.

Path info (OSPF 1 area 0):
  Node hop count: 2
  Hop0: 10.11.14.14
  Hop1: 10.14.3.14
  Hop2: 10.14.3.3
  Hop3: 192.168.1.3

This is the hop by hop path from XR1 to R3.

Path Info:
      Incoming Address: 10.11.14.11
      Incoming:
      Explicit Route:
        Strict, 10.11.14.11
        Strict, 10.1.11.11
        Strict, 10.1.11.1
        Strict, 192.168.1.1

      Outgoing:
        Explicit Route:
          Strict, 10.1.11.1
          Strict, 192.168.1.1

This shows both the incoming info for the explicit route but the outgoing as well.

After the signalling is done, we need to check the RSVP reservation database to see which labels were assigned.

RP/0/0/CPU0:XR1#sh rsvp reservation detail session-type lsp-p2p | in Labels
Wed Jan 25 13:08:32.852 UTC
  Labels: Local downstream: 24001, Outgoing downstream: 3.
  Labels: Outgoing downstream: 24004.

We will assign 24001 locally and 24004 towards the next hop.

RP/0/0/CPU0:XR1#show cef 192.168.1.3 detail | in "tunnel|label"
Wed Jan 25 13:12:58.794 UTC
   via tunnel-te1, 3 dependencies, weight 0, class 0 [flags 0x8]
     local label 24003      labels imposed {ImplNull}
    0     Y   tunnel-te1                point2point


RP/0/0/CPU0:XR1#sh mpls forwarding labels 24004
Wed Jan 25 13:19:42.146 UTC
Local  Outgoing    Prefix             Outgoing     Next Hop        Bytes
Label  Label       or ID              Interface                    Switched
------ ----------- ------------------ ------------ --------------- ------------
24004  19          192.168.1.4/32     Gi0/0/0/0.111 10.1.11.1       0
       24003       192.168.1.4/32     Gi0/0/0/0.1114 10.11.14.14     0

We can see that label 24004 is locally assigned and label 24003 is the outgoing label towards R3.

RP/0/0/CPU0:XR1#sh mpls forwarding labels 24003
Wed Jan 25 13:21:51.187 UTC
Local  Outgoing    Prefix             Outgoing     Next Hop        Bytes
Label  Label       or ID              Interface                    Switched
------ ----------- ------------------ ------------ --------------- ------------
24003  Pop         192.168.1.3/32     tt1          point2point     0

Label 24003 as the local label pushes us to the TE tunnel where are supposed to go. 

It says we are to use label 24003 to forward to R3's loopback. However in our MPLS traces we see 24004 in the output.


RP/0/0/CPU0:XR1#traceroute mpls traffic-eng tunnel-te 1 lsp active

Type escape sequence to abort.

  0 10.11.14.11 MRU 1500 [Labels: 24004 Exp: 0]
L 1 10.11.14.14 MRU 1500 [Labels: implicit-null Exp: 0] 10 ms
! 2 10.14.3.3 10 ms

R12 sees 24004 in the output as well.

R12#traceroute vrf BGP 8.8.8.8 source 12.12.12.12 num
Type escape sequence to abort.
Tracing the route to 8.8.8.8
VRF info: (vrf in name/id, vrf out name/id)
  1 112.0.0.11 3 msec 0 msec 1 msec
  2 10.11.14.14 [MPLS: Labels 24004/52 Exp 0] 8 msec 5 msec 7 msec
  3 83.0.0.3 [MPLS: Label 52 Exp 0] 15 msec 16 msec 15 msec
  4 83.0.0.8 21 msec *  8 msec


The traffic gets there and the correct labels show up. 

Now let's change the affinity values and choose the all BLUE path.

XR1
interface tunnel-te1
 affinity 0x1 mask 0x1

%ROUTING-MPLS_TE-5-LSP_EXPLICITROUTE : tunnel-te1 (signalled-name: XR1_t1, LSP Id: 4) explicit-route, 10.11.14.14, 10.14.15.14, 10.14.15.15, 10.15.4.15, 10.15.4.4, 10.3.4.4, 10.3.4.3, 192.168.1.3.Jan 25 13:27:04.146 : te_control[1044]: %ROUTING-MPLS_TE-5-LSP_RECORDROUTE : tunnel-te1 (signalled-name: XR1_t1, LSP Id: 4) record-route empty.

te_control[1044]: %ROUTING-MPLS_TE-5-LSP_REROUTE_PENDING_CLEAR : tunnel-te1 (signalled-name: XR1_t1, old LSP Id: 3, new LSP Id: 4) has been reoptimized.
Jan 25 13:27:24.265 : te_control[1044]: %ROUTING-MPLS_TE-5-LSP_REOPT : tunnel-te1 (signalled-name: XR1_t1, old LSP Id: 3, new LSP Id: 4)

RP/0/0/CPU0:XR1(config-if)#do sh mpls traffic-eng tunnels 1
Wed Jan 25 13:27:29.754 UTC


Name: tunnel-te1  Destination: 192.168.1.3  Ifhandle:0x480
  Signalled-Name: XR1_t1
  Status:
    Admin:    up Oper:   up   Path:  valid   Signalling: connected

Config Parameters:
    Bandwidth:        0 kbps (CT0) Priority:  7  7 Affinity: 0x1/0x1

RP/0/0/CPU0:XR1#sh rsvp reservation det session-type lsp-p2p | in Labels
Wed Jan 25 13:37:44.952 UTC
  Labels: Local downstream: 24001, Outgoing downstream: 3.
  Labels: Outgoing downstream: 24005.

We see that label 24005 has been allocated.

We can't rely on the IPv4 unicast MPLS table for verifying the MPLS labels, we need to reference the traffic-engineering table.

RP/0/0/CPU0:XR1#sho mpls traffic-eng forwarding detail tunnel-id 1 p2p
Wed Jan 25 13:41:01.309 UTC
P2P tunnels:

Tunnel ID:    1 LSP ID:  396 Destination:     192.168.1.1 Ctype:  7
  Source:     192.168.1.3 Ext Tun ID:     192.168.1.3
  Output: Gi0/0/0/0.111     Next Hop: 10.1.11.1       Output Label: 3
  Input:  Gi0/0/0/0.1114    Prev Hop: None            Local Label:  24001
  LSD queue: 10
  Backup Tunnel: No backup available

Tunnel ID:    1 LSP ID:    4 Destination:     192.168.1.3 Ctype:  7
  Source:    192.168.1.11 Ext Tun ID:    192.168.1.11
  Output: Gi0/0/0/0.1114    Next Hop: 10.11.14.14     Output Label: 24005
  Input:  -                 Prev Hop: None            Local Label:  24002
  LSD queue: 10
  Backup Tunnel: No backup available

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

As you can see we allocate the local label 24002 and the outgong label 24005 for this tunnel. Let's do an MPLS traceroute.

RP/0/0/CPU0:XR1#traceroute mpls traffic-eng tunnel-te 1 lsp active

Type escape sequence to abort.

  0 10.11.14.11 MRU 1500 [Labels: 24005 Exp: 0]
L 1 10.11.14.14 MRU 1500 [Labels: 24000 Exp: 0] 0 ms
L 2 10.14.15.15 MRU 1500 [Labels: 20 Exp: 0] 0 ms
L 3 10.15.4.4 MRU 1500 [Labels: implicit-null Exp: 0] 0 ms
! 4 10.3.4.3 10 ms

So as you can see, very straightforward in terms of setup and verification. One more trace from R12 to R8 will verify that the end to end connection is still good.

R12#traceroute vrf BGP 8.8.8.8 source 12.12.12.12 num
Type escape sequence to abort.
Tracing the route to 8.8.8.8
VRF info: (vrf in name/id, vrf out name/id)
  1 112.0.0.11 3 msec 1 msec 1 msec
  2 10.11.14.14 [MPLS: Labels 24005/52 Exp 0] 11 msec 9 msec 11 msec
  3 10.14.15.15 [MPLS: Labels 24000/52 Exp 0] 22 msec 31 msec 31 msec
  4 10.15.4.4 [MPLS: Labels 20/52 Exp 0] 31 msec 30 msec 31 msec
  5 83.0.0.3 [MPLS: Label 52 Exp 0] 16 msec 14 msec 16 msec
  6 83.0.0.8 19 msec *  11 msec

Thanks for stopping by!
Rob Riker, CCIE #50693

No comments:

Post a Comment