Configuring 802.3ad Link Aggregation for Ethernet
IEEE 802.3ad link aggregation enables you to group Ethernet interfaces at the physical layer to form a single link layer interface, also known as a link aggregation group (LAG) or bundle. For more information, see IEEE Standard 802.3ad, Link Aggregation.
Some users require more bandwidth in their network than a single Fast Ethernet link can provide, but cannot afford the expense or do not need the bandwidth of a higher-speed Gigabit Ethernet link. Using IEEE 802.3ad link aggregation in this situation provides increased port density and bandwidth at lower cost. For example, if you need 450 Mbps of bandwidth to transmit data and have only a 100-Mbps Fast Ethernet link, creating a LAG bundle containing five 100-Mbps Fast Ethernet links is more cost effective than purchasing a single Gigabit Ethernet link.
For information about the modules that support link aggregation, see ERX Module Guide, Appendix A, Module Protocol Support and E120 and E320 Module Guide, Appendix A, IOA Protocol Support.
LACP
The Link Aggregation Control Protocol (LACP) is a mechanism for exchanging port and system information to create and maintain LAG bundles. The LAG bundle distributes MAC clients across the link layer interface and collects traffic from the links to present to the MAC clients of the LAG bundle.
To create the links in the LAG bundles, you can add one or more Ethernet physical interfaces to it. The LACP detects Ethernet interfaces as links if they are configured on the same line module and have the same physical layer characteristics. The LACP also assigns to the LAG bundle the same MAC address of the Ethernet link with the highest port priority, which is the lowest value.
The LACP also controls the exchange of LACP protocol data units (PDUs) between the Ethernet links in the LAG bundle. The PDUs contain information about each link and enable the LAG bundle to maintain them.
By default, Ethernet links do not exchange PDUs, which contain information about the state of the link. You can configure Ethernet links to actively transmit PDUs, or passively transmit them, sending out LACP PDUs only when it receives them from another link. The transmitting link is known as the Actor and the receiving link is known as the Partner.
Higher-Level Protocols
After you configure the LAG bundle, you can route IP traffic over it, create a VLAN over it, route PPPoE traffic over it, or route MPLS traffic over it.
Figure 20 displays the interface stack for 802.3ad link aggregation.
![]()
For information about configuring higher-level protocols over VLANs, see Common VLAN Configurations.
Load Balancing and QoS
You can configure load balancing across 802.3ad links to provide quality of service (QoS). To ensure that QoS is symmetrically applied to all the links, the router periodically rebalances the traffic on the LAG. When you attach a QoS profile to the LAG, the load balancing properties that are configured are applied to the LAG, and determines how traffic is distributed.
For example, if VLANs are configured, IP queues are provisioned over the VLANs. In this case, the default behavior is per-VLAN load balancing.
For more information, see JUNOSe Quality of Service Configuration Guide, Chapter 20, Configuring QoS for Gigabit Ethernet Interfaces and VLAN Subinterfaces.
Configuration Tasks for 802.3ad Link Aggregation
To configure link aggregation on Ethernet interfaces, you must configure the Ethernet interface, create the LAG bundle, and add the Ethernet interface as a member link in the LAG bundle. Optionally, you can then configure IP, a VLAN subinterface, a PPPoE subinterface, or MPLS for the LAG bundle.
For more information about specifying LAG interfaces and subinterfaces on E-series routers, see Interface Types and Specifiers in JUNOSe Command Reference Guide, About This Guide.
Configuring an Ethernet Physical Interface
To configure a member link, perform the following steps:
- Specify a Fast Ethernet or Gigabit Ethernet interface for which you want to create a member link.
host1(config)#interface gigabitEthernet 2/0- Configure LACP in passive or active mode.
host1(config-if)#lacp active- Specify the speed and the duplex mode for the Ethernet interface.
host1(config-if)#speed 100host1(config-if)#duplex full- To configure additional member links, repeat steps 1 to 3.
NOTE: All of the member links that you configure must have the same physical layer characteristics, such as speed and duplex mode.
Configuring a LAG Bundle
To configure a LAG bundle and add member links, perform the following steps:
- Create the LAG bundle.
host1(config)#interface lag bundleBoston- Add a member link to the LAG bundle.
host1(config-if)#memberinterface gigabitEthernet 2/0Configuring IP for a LAG Bundle
To configure IP for a LAG bundle, perform the following steps:
- Specify the LAG bundle.
host1(config)#interface lag bundleBoston- Assign an IP address and mask.
host1(config-if)#ip address 192.5.127.8 255.255.255.0Configuring a VLAN Subinterface for a LAG Bundle
To configure a VLAN subinterface for the LAG bundle, perform the following steps:
- Specify VLAN as the encapsulation method.
host1(config-if)#encapsulation vlan- Specify the VLAN subinterface for the LAG bundle by adding a unique subinterface number to the LAG interface identification command.
host1(config)# interface lag bundleBoston.1- Assign a VLAN ID for the subinterface.
host1(config-if)#vlan id 203- Assign an IP address and mask.
host1(config-if)#ip address 192.168.1.1 255.255.0.0Configuring a PPPoE Subinterface for a LAG Bundle
To configure a PPPoE subinterface for the LAG bundle, perform the following steps:
- Specify PPPoE as the encapsulation method.
host1(config-if)#encapsulation pppoe- Specify the PPPoE subinterface for the LAG bundle in either of the following ways:
host1(config)#interface lag bundleBoston.2Use the pppoe subinterface lag command to add a unique subinterface number to the LAG bundle name. host1(config)#pppoe subinterface lag bundleBoston.2
- Specify PPP as the encapsulation method on the PPPoE subinterface.
host1(config-if)#encapsulation ppp- Assign an IP address and mask.
host1(config-if)#ip address 192.168.1.2 255.255.0.0You can also configure a PPPoE subinterface over a VLAN subinterface over a LAG bundle. For an example of this configuration, see Example: Configuring a PPPoE Subinterface over a VLAN for a LAG Bundle.
Configuring MPLS for a LAG Bundle
To configure MPLS for a LAG bundle, perform the following steps:
- Specify the LAG bundle.
host1(config)#interface lag bundleBoston- Create an MPLS interface.
host1(config-if)#mpls802.3ad Link Aggregation Configuration Examples
This section provides examples for the following 802.3ad link aggregation configurations:
- IP interface over a LAG bundle
- PPPoE subinterface over a LAG bundle
- PPPoE subinterface over a VLAN subinterface over a LAG bundle
- MPLS over a LAG bundle
- MPLS over a VLAN subinterface over a LAG bundle
Example: Configuring an IP Interface for a LAG Bundle
The following example displays configuration of LACP for two Fast Ethernet interfaces in slot 0. The interfaces are enabled for active LACP. The speed and duplex characteristics are the same for both interfaces.
host1(config)#interface fastEthernet 0/0host1(config-if)#speed 100host1(config-if)#duplex fullhost1(config-if)#lacp activehost1(config-if)#interface fastEthernet 0/5host1(config-if)#speed 100host1(config-if)#duplex fullhost1(config-if)#lacp activeThe following commands create a virtual router, add the Ethernet physical interfaces to a LAG bundle named bundleBoston, and assign an IP address and mask to the bundle.
host1(config)#virtual-router bostonhost1:boston(config)#interface lag bostonhost1:boston(config-if)#member-interface fastEthernet 0/0host1:boston(config-if)#member-interface fastEthernet 0/5host1:boston(config-if)#ip address 1.1.1.1 255.255.255.0Example: Configuring a PPPoE Subinterface for a LAG Bundle
The following example displays LACP configuration for two Fast Ethernet interfaces in slot 4. The interfaces are enabled for passive LACP. The speed and duplex characteristics are the same for both interfaces.
host1(config)#interface fastEthernet 4/0host1(config-if)#speed 100host1(config-if)#duplex fullhost1(config-if)#lacp passivehost1(config-if)#interface fastEthernet 4/3host1(config-if)#speed 100host1(config-if)#duplex fullhost1(config-if)#lacp passiveThe following commands add the Ethernet physical interfaces to a LAG bundle named chicago.
host1(config)#interface lag chicagohost1(config-if)#member-interface fastEthernet 4/0host1(config-if)#member-interface fastEthernet 4/3The following commands configure a PPPoE subinterface for the LAG bundle named chicago. In the LAG interface identification command (interface lag chicago.1), the number 1 represents the subinterface number for the PPPoE subinterface.
host1(config-if)#encapsulation pppoehost1(config)#interface lag chicago.1host1(config-if)#encapsulation ppphost1(config-if)#ip address 10.10.1.1 255.255.0.0As an alternative to using the command interface lag chicago.1 to configure the PPPoE subinterface in this example, you can also use the command pppoe subinterface lag chicago.1 to achieve the same result. For more information, see pppoe subinterface lag.
Example: Configuring a PPPoE Subinterface over a VLAN for a LAG Bundle
The following example displays LACP configuration for two Fast Ethernet interfaces in slot 3. The interfaces are enabled for active LACP. The speed and duplex characteristics are the same for both interfaces.
host1(config)#interface fastEthernet 3/0host1(config-if)#speed 100host1(config-if)#duplex fullhost1(config-if)#lacp activehost1(config-if)#interface fastEthernet 3/1host1(config-if)#speed 100host1(config-if)#duplex fullhost1(config-if)#lacp activeThe following commands add the Ethernet physical interfaces to a LAG bundle named sunnyvale.
host1(config)#interface lag sunnyvalehost1(config-if)#member-interface fastEthernet 3/0host1(config-if)#member-interface fastEthernet 3/1The following commands configure a VLAN subinterface for the LAG bundle named sunnyvale. In the LAG interface identification command (interface lag sunnyvale.1), the number 1 represents the subinterface number for the VLAN subinterface.
host1(config-if)#encapsulation vlanhost1(config)#interface lag sunnyvale.1host1(config-if)#vlan id 100The following commands configure a PPPoE subinterface over the VLAN subinterface for the LAG bundle named sunnyvale. In the LAG interface identification command (interface lag sunnyvale.1.2), the number 2 represents the subinterface number for the PPPoE subinterface.
host1(config-if)#encapsulation pppoehost1(config)#interface lag sunnyvale.1.2host1(config-if)#encapsulation ppphost1(config-if)#ip address 10.10.2.2 255.255.0.0As an alternative to using the command interface lag sunnyvale.1.2 to configure the PPPoE subinterface in this example, you can also use the command pppoe subinterface lag sunnyvale.1.2 to achieve the same result. For more information, see pppoe subinterface lag.
Example: Configuring MPLS for a LAG Bundle
The following example displays configuration of LACP for two Fast Ethernet interfaces in slot 5. The interfaces are enabled for active LACP. The speed and duplex characteristics are the same for both interfaces.
host1(config)#interface fastEthernet 5/0host1(config-if)#speed 100host1(config-if)#duplex fullhost1(config-if)#lacp activehost1(config-if)#interface fastEthernet 5/1host1(config-if)#speed 100host1(config-if)#duplex fullhost1(config-if)#lacp activeThe following commands create a virtual router, add the Ethernet physical interfaces to a LAG bundle named kanata, assign an IP address, and configure MPLS.
host1(config)#virtual router kanatahost1:kanata(config)#interface lag kanatahost1:kanata(config-if)#member-interface fastEthernet 0/0host1:kanata(config-if)#member-interface fastEthernet 0/5host1:kanata(config-if)#ip address 1.1.1.1 255.255.255.0host1(config-if)#mplsExample: Configuring MPLS over a VLAN for a LAG Bundle
The following example displays configuration of LACP for two Fast Ethernet interfaces in slot 5. The interfaces are enabled for active LACP. The speed and duplex characteristics are the same for both interfaces.
host1(config)#interface fastEthernet 5/0host1(config-if)#speed 100host1(config-if)#duplex fullhost1(config-if)#lacp activehost1(config-if)#interface fastEthernet 5/1host1(config-if)#speed 100host1(config-if)#duplex fullhost1(config-if)#lacp activeThe following commands add the Ethernet physical interfaces to a LAG bundle named kanata.
host1(config)#virtual router kanatahost1:kanata(config)#interface lag kanatahost1:kanata(config-if)#member-interface fastEthernet 5/0host1:kanata(config-if)#member-interface fastEthernet 5/1The following commands configure a VLAN subinterface for the LAG bundle named kanata. In the LAG interface identification command (interface lag kanata.1), the number 1 represents the subinterface number for the VLAN subinterface.
host1:kanata(config-if)#encapsulation vlanhost1:kanata(config)#interface lag kanata.1host1:kanata(config-if)#vlan id 100The following command creates an MPLS interface.
host1:kanata(config)#mplsinterface lag
- Use to create an IEEE 802.3ad LAG interface, also known as an LAG bundle, or a subinterface for the LAG bundle.
- Examples
host1(config)#interface lag bostonhost1(config)#interface lag boston.2host1(config)#interface lag boston.2.1Use the no version to delete the LAG bundle. lacp
- Use to configure whether an Ethernet link in a LAG bundle participates actively or passively in the LACP.
- Use the active keyword to indicate that the Ethernet link participates in the protocol regardless of whether its Partner member link is set to active or passive LACP PDU participation.
- Use the passive keyword to indicate that the Ethernet link to transmit LACP PDUs only when it receives LACP PDUs from its Partner member link.
- By default, Ethernet links in a LAG bundle do not send LACP PDUs.
- Example
host1(config-if)#lacp activeUse the no version to restore the default behavior. lacp port-priority
- Use to set the priority for an Ethernet link in a LAG bundle.
- The member with the lowest value has the highest priority, and is selected to join the LAG bundle first.
- Valid values are in the range 065535.
- Example
host1(config-if)#lacp port-priority 100Use the no version to restore the default value of 32768. member-interface
- Use to add a Fast Ethernet interface or Gigabit Ethernet interface, also known as a bundle member, to a LAG bundle.
- Example
host1(config-if)#member-interface fastEthernet 4/0Use the no version to remove the specified Ethernet link from the bundle. mpls
host1(config)#mplsUse the no version to halt MPLS on the interface and delete the MPLS interface configuration. pppoe subinterface lag
host1(config-if)#pppoe subinterface lag boston.1Use the no version to remove the PPPoE subinterface from the LAG bundle. virtual-router
- From Global Configuration mode, use this command to create a virtual router or access the context of a previously created virtual router or a VRF.
- Example
host1(config)#virtual-router bostonUse the no version of the command only to delete the VR and return the router to the default VR.