[ Contents] [ Prev] [ Next] [ Index] [ Report an Error]

Configuring Load Balancing Based on MPLS Labels

To load-balance based on the MPLS label information, include the family mpls statement at the [edit forwarding-options hash-key] hierarchy level:

[edit forwarding-options hash-key]
family mpls {
label-1;
label-2;
label-3;
no-labels;
no-label-1-exp;
payload {
ether-pseudowire;
ip {
layer-3-only;
port-data {
destination-lsb;
destination-msb;
source-lsb;
source-msb;
}
}
}
}

This feature applies to aggregated Ethernet and aggregated SONET/SDH interfaces as well as multiple equal-cost MPLS next hops. In addition, on the T Series, MX Series, M120, and M320 routers only, you can configure load balancing for IPv4 traffic over Layer 2 Ethernet pseudowires. You can also configure load balancing for Ethernet pseudowires based on IP information. The option to include IP information in the hash key provides support for Ethernet circuit cross-connect (CCC) connections. For more information about configuring load balancing for Ethernet pseudowires, see Configuring Load Balancing for Ethernet Pseudowires.

To include the first label in the hash key, include the label-1 option. This is used for a one-label packet.

To include the first and second label in the hash key, include both the label-1 and label-2 options. This is used for a two-label packet. The router provides hashing on the first and second labels by default. If both labels are specified, the entire first label and the first 16 bits of the second label are hashed.

To include the third MPLS label in the hash function, include the label-3 option at the [edit forwarding-options hash-key family mpls] hierarchy level. To include no MPLS labels in the hash function, include the no-labels option at the [edit forwarding-options hash-key family mpls] hierarchy level.

Hashing can include IP addresses to provide better distribution of traffic to aggregated interfaces.

To include the bits in the IP address of the IPv4 or IPv6 payload as well as the first label in the hash key, include the label-1 and payload ip statements at the [edit forwarding-options hash-key family mpls] hierarchy level:

[edit forwarding-options hash-key]
family mpls {
label-1;
payload {
ip;
}
}

To include the bits of the IP address of the IPv4 or IPv6 payload as well as both the first label and the second label in the hash key, include the label-1, label-2, and payload ip statements at the [edit forwarding-options hash-key family mpls] hierarchy level.

[edit forwarding-options hash-key family mpls]
label-1;
label-2;
label-3;
no-labels;
payload {
ip {
layer-3-only;
port-data {
source-msb;
source-lsb;
destination-msb;
destination-lsb;
}
}
}
}

To include only Layer 3 IP information in the hash key, specify the layer-3-only option at the [edit forwarding-options hash-key family mpls payload ip] hierarchy level. To include the most significant byte of the source port, specify the source-msb option. To include the least significant byte of the source port, specify the source-lsb option. To include the most significant byte of the destination port, specify the destination-msb option. To include the least significant byte of the destination port, specify the destination-lsb option.

By default, the most significant byte and least significant byte of the source and destination port fields are hashed. To select specific bytes to be hashed, include one or more of the source-msb, source-lsb, destination-msb, and destination-lsb options at the [edit forwarding-options hash-key family mpls payload ip port-data] hierarchy level. To prevent all four bytes from being hashed, include the layer-3-only option at the [edit forwarding-options hash-key family mpls payload ip] hierarchy level.

In an Layer 2 VPN scenario, the router could encounter a reordering complication. When a burst of traffic pushes the customer traffic bandwidth to exceed its limits, the traffic might be affected in mid flow. Packets may be reordered as a result.

You can configure the EXP bit of the top label to be excluded from the hash calculations to avoid the reordering complication. To exclude the EXP bit of the first label from the hash calculations, include the no-label-1-exp statement at the [edit forwarding-options hash-key family mpls] hierarchy level:

[edit forwarding-options hash-key]
family mpls {
label-1;
no-label-1-exp;
payload {
ip;
}
}

You must also configure the label-1 statement when configuring the no-label-1-exp statement.


[ Contents] [ Prev] [ Next] [ Index] [ Report an Error]