Per-Flow Hashing

The 7705 SAR supports per-flow hashing for LAG and ECMP. Per-flow hashing uses information in a packet as an input to the hash function, ensuring that any given traffic flow maps to the same egress LAG port or ECMP path.

Depending on the type of traffic that needs to be distributed in an ECMP or LAG path, different variables are used as the input to the hashing algorithm that determines the selection of the next hop (ECMP) or port (LAG). The hashing result can be changed using the options described in Per-Service Hashing, LSR Hashing, Layer 4 Load Balancing, TEID Hashing for GTP-encapsulated Traffic, and Entropy Labels.

Table: Hashing Algorithm Inputs (ECMP and LAG)  summarizes the possible inputs to the hashing algorithm for ECMP and LAG.

Fragmented packets cannot use Layer 4 UDP/TCP ports or tunnel endpoint IDs (TEIDs). The datapath looks at IP source address and destination address only, even if configured to use Layer 4 UDP/TCP ports or TEID.

In Table: Hashing Algorithm Inputs (ECMP and LAG) , the hashing inputs in the Service ID column and the inputs in the other columns are mutually exclusive. Where checkmarks appear on both the per-service and per-flow sides of the table, refer to the table note in the Service ID column to determine when per-service hashing is used.

Table: Hashing Algorithm Inputs (ECMP and LAG) 

Traffic Type

Per- Service

Per-Flow

Service ID

System IPv4 Address1

Ingress Port 2

Source and Destination

TEID 4

Internal Multicast Group ID 5

MPLS Label Stack

Entropy Label

MAC Address

IP Address

UDP/TCP Port 3

ECMP

IPv4 routed

6

IPv6 routed

6

MPLS LSR

7,8

7

7

9

9

MPLS MVPN (LSR, eLER)

VPLS

10

Epipe

Apipe, Cpipe, Fpipe, Ipipe, Hpipe

LAG

IPv4 routed

IPv6 routed

MPLS LSR

7,8

7

7

9

9

MPLS MVPN (LSR, eLER)

VPLS

11

Epipe

11

Apipe, Cpipe, Fpipe, Ipipe, Hpipe

Notes:

  1. The system IP address can be included as a hashing input using the system-ip-load-balancing command at the system level. For MPLS LSR, this configuration is ignored when the hashing algorithm is configured as lbl-only using the lsr-load-balancing command.

  2. Optional hashing input that is included when the use-ingress-port option is enabled in the lsr-load-balancing command.

  3. Optional hashing input that is included when the l4-load-balancing command is enabled (for all except MPLS LSR) or when the hashing algorithm is configured as lbl-ip-l4-teid using the lsr-load-balancing command (for MPLS LSR only). Layer 4 load balancing at the service level is not affected by Layer 4 load balancing at the system, router interface, or service interface levels (IES and VPRN).

  4. Optional hashing input that is included when the teid-load-balancing command is enabled (for all except MPLS LSR) or when the hashing algorithm is configured as lbl-ip-l4-teid using the lsr-load-balancing command (for MPLS LSR only). TEID load balancing at the service level is not affected by TEID load balancing at the router interface or service interface levels (IES and VPRN).

  5. Only applies to multicast traffic. The internal multicast group ID is generated from either the (S,G) record (IGMP snooping, MLD snooping, and PIM snooping), the point-to-multipoint label binding, or the VPLS service creation.

  6. Only for Layer 3 traffic going to a Layer 3 spoke SDP interface.

  7. Only included when the first 4 bits (first nibble) after the last MPLS header (bottom of stack = 1) has a value of 4 (decimal), in which case the next header encapsulation is considered to be an IPv4 header.

  8. Optional hashing input that is included when LSR hashing is configured as lbl-ip or label-ip-l4-teid using the lsr-load-balancing command.

  9. MPLS label stack and entropy label are mutually exclusive hashing inputs. When an entropy label indicator (ELI) and entropy label (EL) are found in the label stack, the MPLS labels are not used as hashing inputs.

  10. When the per-service-hashing command is enabled in a VPLS service, the service ID and an internal spoke SDP binding ID are included as inputs to the hashing algorithm.

  11. When the per-service-hashing command is enabled in a VPLS or Epipe service, only the service ID is included as an input to the hashing algorithm.