cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
Webcast -VXLAN BGP EVPNt

MPLS Top Label Hash

902
Views
0
Helpful
0
Comments

 

Why Top Label Hash?

Traffic is running across the bundle with multiple member-links. If all the member-links are up but traffic is not getting forwarded currently there is no way to know if there is traffic black holing happening. This feature allows us to monitor all the member links and ensure they are up and running thereby avoids any traffic black holing.

Why Normal Hashing won’t help here?

With Normal Hashing we hash based on the bottom label (eos =1) and router-id. This is not predictable at every hop. Top label hash does the hashing based on the topmost label. With top label hash user can predict the hash and the member-link through which traffic is going to get forwarded giving user full control over defined LSP’s.

Introduction: MPLS Top Label Hash

MPLS Top label hash allows Label switch routers (LSRs) to switch MPLS OAM packets based on the top label hashing mechanism. LSRs generate a hash of the label stack to discriminate flows and use this discriminator to distribute the flows over equal cost multipaths (ECMPs) that exists.

Topology

 Refer to top-label-topo.png attachment

Overview:

Top label hash provides us the capability of hashing based on the Top Label. MPLS static LSP is used on all the routers, connected via bundle-ether with multiple member links, in the forwarding path. At each hop top-label is popped and the packet is forwarded via the chosen bundle-member link to the next hop. The sequence of labels should be defined in such a way that each label uses a different bundle-member to load-balance amongst the member-links

How MPLS static OAM works?

When a router receives a labeled packet the topmost label is looked up. LSR sees the 20-bit field in the top label, which carries the actual value of the label. Hash is calculated on this value and corresponding bundle-member link is chosen. Based on the value of the label, corresponding label operation such as swap, push or pop is performed and packet is forwarded to the next hop via the chosen member-link.

Basic configuration steps

LER1:

mpls static  

interface Bundle-Ether21

interface Bundle-Ether31

address-family ipv4 unicast

top-label-hash                                 -> Enables Top label hash                         

   local-label 14000 allocate              --> specifies the incoming label as 14000

   forward

     path 1 nexthop Bundle-Ether21 14.0.4.2 out-label pop     --> label operation pop

 

LSR2:

mpls static

interface Bundle-Ether21

interface Bundle-Ether22

address-family ipv4 unicast

top-label-hash

local-label 14001 allocate                 --> specifies the incoming label as 14001

   forward

     path 1 nexthop Bundle-Ether22 14.0.5.1 out-label pop --> label operation pop

 

LER2:

mpls static

interface Bundle-Ether22

interface Bundle-Ether32

address-family ipv4 unicast

top-label-hash

local-label 14002 allocate               --> specifies the incoming label as 14002

   forward

     path 1 nexthop Bundle-Ether32 32.0.1.1 out-label pop --> label operation pop

 

Packet- flow

OAM Packet with static label stack is being sent from traffic generator IXIA. Packet enters LER1 with stack of 3 labels (14000,14001,14002). LFIB lookup happens on the LER1 router and it learns what the nexthop is and what label operation (push,pop or swap) is to be performed on the LER1.

1) Since LER1 has a pop operation defined for the nexthop, label 14000 is popped from LER1 and the packet is sent to LSR1 with 2 labels.

Based on the output of the command “show bundle load-balancing bundle-ether21 location 0/0/CPU0” the nexthop member-link with LON value of 0 is chosen.

This value is calculated by doing a MOD on the last byte of the topmost label value with the total number of member-links

(

eg:

i) hex of 14000 = 36B0; 

ii) last 2 bytes is B0

iii) convert this hex value back to decimal : decimal(B0) = 176

iv) 176 mod 3 = 2

so member link with LON value of 2 is chosen)

2) Then the LFIB table on LSR1 is looked up and packet is forwarded to LER2, which is the nexthop by popping label 14001. Next hop member link is chosen using the following (eg: mod 14001 % 3 = 0; so member link with LON value of 0 is chosen)

3) Finally the packet reaches LER2 and the label 14002 is popped and the final IP packet is sent to the traffic generator IXIA-2.Next hop member link is chosen using the following (eg: mod 14002 % 3 = 1; so member link with LON value of 1 is chosen)

 

RP/0/RSP0/CPU0:LER3#sh bundle load-balancing bundle-ether 21 location 0/0/CPU0

Wed Jan 13 14:52:53.829 PST

 

Bundle-Ether21

Type:                 Ether (L3)

Members <current/max>: 3/64

Total Weighting:       3

Load balance:         Default

Locality threshold:   65

Avoid rebalancing?     False

Sub-interfaces:       0

 

Member Information:

   Port:                 LON ULID BW

   -------------------- --- ---- --

   Hu0/0/0/2               2     2   1

   Hu0/0/0/3               0     0   1

   Hu0/0/0/4             1     1   1

 

Platform Information:

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

 

                 * Bundle Summary Information *

                   --------------------------

 

Interface             : Bundle-Ether21       Ifhandle           : 0x0203eaa0

Lag ID                : 2                     Virtual Port       : 255

Number of Members     : 3                     Local to LC       : Yes

Hash Modulo Index     : 3

MGSCP Operational Mode : No

 

Member Information:

LON     Interface         ifhandle   Base         SFP   port slot remote/

                                     Transport                     rack_id

-----   -------------     ---------- ----------   ---   ---- ---- -------

0       Hu0/0/0/3         0x00000100 0x00000100   120   116   0     0/0

1      Hu0/0/0/4         0x00000180 0x00000180   132   117   0     0/0

2       Hu0/0/0/2         0x00000200 0x00000200   108   117   0     0/0

 

Preroute Member Information:

LON       Interface       ifhandle     SFP   port   slot remote/rack_id

-----   ---------------   ----------   ---   ----   ---- --------------

0       Hu0/0/0/3         0x00000100   120   116     0       0/0

 

                   * Bundle Table Information *

                     ------------------------

 

[NP 0]:

----------------------------------------------------------------------

   Unicast (Global) LAG table     |     Unicast (Rack) LAG table

----------------------------------------------------------------------

idx local   VQI   port   VQI-LB | idx local   VQI   port   VQI-LB

----------------------------------------------------------------------

1     0   120   116     0       1     0   120   116     0

2     0   132   117     0       2     0   132   117     0

3     0   108   117     0       3     0   108   117     0

 

[NP 1]:

-------------------------------------------------------------------------------------------------------------

   Unicast (Global) LAG table     |   Multicast (Local) LAG table   |   Unicast (Rack) LAG table

-------------------------------------------------------------------------------------------------------------

idx local   VQI   port   VQI-LB | idx local   VQI   port   VQI-LB | idx local   VQI   port   VQI-LB

-------------------------------------------------------------------------------------------------------------

   1     1   120   116     0       1     1   120   116     0       1     1   120   116     0

   2     0   132   117     0       2     1   108   117     0       2     0   132   117     0

   3     1   108   117     0       3     0     0     0     0       3     1   108   117     0

 

[NP 2]:

-------------------------------------------------------------------------------------------------------------

   Unicast (Global) LAG table     |   Multicast (Local) LAG table   |   Unicast (Rack) LAG table

-------------------------------------------------------------------------------------------------------------

idx local   VQI   port   VQI-LB | idx local   VQI   port   VQI-LB | idx local   VQI   port   VQI-LB

-------------------------------------------------------------------------------------------------------------

   1     0   120   116     0       1     1   132   117     0       1     0   120   116     0

   2     1   132   117     0       2     0     0     0     0       2     1   132   117     0

   3     0   108   117     0       3     0     0     0     0       3     0   108   117     0

 

[NP 3]:

----------------------------------------------------------------------

   Unicast (Global) LAG table     |     Unicast (Rack) LAG table

----------------------------------------------------------------------

idx local   VQI   port   VQI-LB | idx local   VQI   port   VQI-LB

----------------------------------------------------------------------

1     0   120   116     0       1     0   120   116     0

2     0   132   117     0       2     0   132   117     0

3     0   108   117     0       3     0   108   117      0

 

                   * SW LAG Table Information *

                     ------------------------

 

--------------------------------------------------------------------------------------

         Global/Rack LAG table         |             Local LAG table

--------------------------------------------------------------------------------------

idx local   LON   VQI   port   VQI-LB | idx local   LON   VQI   port   VQI-LB

--------------------------------------------------------------------------------------

   1     1     0   120   116     0     1     1     0   120   116     0

   2     1     1   132   117     0     2     1     1   132   117     0

   3     1     2   108   117     0     3     1     2   108   117     0

 

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

 

 

sh mpls forwarding private detail location 0/0/CPU0

14000 Pop         No ID             BE21         14.0.4.2       805122162624

     Updated: Jan 13 11:08:07.710

     Version: 16, Priority: 4

     Label Stack (Top -> Bottom): { Imp-Null }

     NHID: 0x0, Path idx: 0, Backup path idx: 0, Weight: 0

     MAC/Encaps: 14/14, MTU: 1500

     Packets Switched: 10322079008

Caveats

CSCus77690 Top Label Hash is not indexing to correct intf with mixed bundle speeds

Example Use-case:Top label hash behavior for Bundle with mixed bandwidth

For mixed bandwidth member bundles, it is based on the credit. For example, if there is a bundle with one 100Gig member and 1 10Gig member, then first 10 hash values point to 1st member and 11th will point to 10Gig member.  Here is hashing is based on the assumption that there are 11 members (module 11 = 10+1).

Show commands output:

show bundle load-balancing bundle-ether 21 location 0/1/CPU0

 

Bundle-Ether21

  Type:                  Ether (L3)

  Members <current/max>: 4/64

  Total Weighting:       22   <===   because there are 2 100gig members and 2 10Gig members

  Load balance:          Default

  Locality threshold:    65

  Avoid rebalancing?     False

  Sub-interfaces:        0

 

  Member Information:

    Port:                 LON  ULID  BW

    --------------------  ---  ----  --

    Hu0/1/0/3               0     0  10  <=== 

    Hu0/2/0/0               1     1  10  <===

    Te0/0/0/8               2     3   1

    Te0/0/0/9               3     2   1

 

  Platform Information:

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

 

                  * Bundle Summary Information *

                    --------------------------

 

Interface: Bundle-Ether21      

Ifhandle: 0x02002d60  

Lag ID: 4                       

Virtual Port: 255       

Number of Members:4                                           Local to LC        : Yes       

Hash Modulo Index: 22          <======================         

MGSCP Operational Mode: No                   

 

Member Information:

LON     Interface         ifhandle    Base         SFP   port  slot remote/

                                      Transport                     rack_id

-----   -------------     ----------  ----------   ---   ----  ---- -------

0       Hu0/1/0/3         0x06000140  0x06000140   234    116    3     0/0  <=== VOQ used for the member

1       Hu0/2/0/0         0x080000c0  0x080000c0   324     10    4     0/0  <=== VOQ used for the member

3       Te0/0/0/9         0x04000300  0x04000300    90      6    2     0/0  <=== VOQ used for the member

2       Te0/0/0/8         0x040002c0  0x040002c0    95      4    2     0/0  <=== VOQ used for the member

 

Preroute Member Information:

LON        Interface       ifhandle     SFP   port   slot remote/rack_id

-----   ---------------   ----------    ---   ----   ---- --------------

0       Hu0/1/0/3         0x06000140    234    116      3       0/0

 

                   * Bundle Table Information *

                     ------------------------

 

[NP 0]:

----------------------------------------------------------------------

    Unicast (Global) LAG table     |    Unicast  (Rack) LAG table   

----------------------------------------------------------------------

 idx  local    VQI   port   VQI-LB | idx  local   VQI   port   VQI-LB 

----------------------------------------------------------------------

  1      0    234    116      0       1      0    234    116      0  <=== All in blue are hash values for member 234 (Hun0/1/0/3)

  2      0    234    116      0       2      0    234    116      0

  3      0    234    116      0       3      0    234    116      0

  4      0    234    116      0       4      0    234    116      0

  5      0    234    116      0       5      0    234    116      0

  6      0    234    116      0       6      0    234    116      0

  7      0    234    116      0       7      0    234    116      0

  8      0    234    116      0       8      0    234    116      0

  9      0    234    116      0       9      0    234    116      0

 10      0    234    116      0      10      0    234    116      0

 11      0    324     10     12      11      0    324     10     12  <== 10 of these are hash values for member 324 (Hun0/2/0/0)

 12      0    324     10     12      12      0    324     10     12

 13      0    324     10     12      13      0    324     10     12

 14      0    324     10     12      14      0    324     10     12

 15      0    324     10     12      15      0    324     10     12

 16      0    324     10     12      16      0    324     10     12

 17      0    324     10     12      17      0    324     10     12

 18      0    324     10     12      18      0    324     10     12

 19      0    324     10     12      19      0    324     10     12

 20      0    324     10     12      20      0    324     10     12

 21      0     95      4      0      21      0     95      4      0

 22      0     90      6      0      22      0     90      6      0 <== hash values of 10g Member links ten0/0/0/8 and ten0/0/0/9 with 95 and 90 as hash values respectively.

IOS-XR Release

Feature is supported starting IOS-XR release 5.3.2

References:

N/A

Related Information:

Sheetal Bhogale, Sr. Software Engineer, CSG

Xander Thuijs, Principal Engineer, CSG

Sadananda Phadke, Sr. Technical Lead, CSG

 

CreatePlease to create content
Ask the Expert French- routing protocols