You can create a link aggregation group (LAG) for a group of Ethernet ports. Layer 2 bridging traffic is load balanced across the member links of this group, making the configuration attractive for congestion concerns as well as for redundancy. You can configure up to 480 LAG bundles on an MX-series router. Each LAG bundle contains up to 16 links.
By default, the hash key mechanism to load-balance frames across LAG interfaces is based on Layer 2 fields (such as frame source and destination address) as well as the input logical interface (unit). No Layer 3 or Layer 4 fields are examined and are part of the default hash process, so the default is not optimized for Layer 2 switching (the frame source and destination MAC addresses are the same). In a Layer 2 switch, one link is overutilized and other links are underutilized.
You can configure the load balancing hash key for Layer 2 traffic to use fields in the Layer 3 and Layer 4 headers inside the frame payload for load-balancing purposes using the payload statement. You can configure the statement to look at layer-3 (and source-address-only or destination-address-only packet header fields) or layer-4 fields. You configure this statement at the [edit forwarding-options hash-key family multiservice] hierarchy level.
This example configures the load-balancing hash key to use the source Layer 3 IP address option and Layer 4 header fields as well as the source and destination MAC addresses for load balancing on a LAG link:
- [edit forwarding-options hash-key]
- family multiservice {
- source-mac;
- destination-mac;
-
- payload {
-
- ip {
-
- layer-3 {
- source-address-only;
- }
- layer-4;
- }
- }
- }
You can configure Layer 3 or Layer 4 options, or both. The source-address-only or destination-address-only options are mutually exclusive. The layer-3-only statement is not available on the MX-series.
For more information about LAG configuration, see the Network Interfaces Configuration Guide.