High Availability · Topic 1 of 5
Link Aggregation Groups and LACP
Learn LAGs for the JN0-364: ae interfaces on MX, device-count, member links, LACP active and passive, periodic fast, minimum-links and verification.
- 5 min
- Create
aeinterfaces withset chassis aggregated-devices ethernet device-count <n>. - Members:
set interfaces <member> gigether-options 802.3ad ae<n>; no units on members. - LACP is off by default; configure
lacp activeorpassiveunderaggregated-ether-options.
What it is
A link aggregation group (LAG) bundles several physical Ethernet links between two devices into one logical link. Junos calls the bundle an aggregated Ethernet interface, named ae0, ae1 and so on. Routing protocols, addresses and VLANs are configured on the ae interface, not on the members.
A LAG adds bandwidth and protects against a single link failure. If one member fails, traffic moves to the remaining members without the routing protocol seeing a topology change. The Link Aggregation Control Protocol (LACP), from IEEE 802.3ad, checks that every member really connects to the same partner device.
How it works
Step 1: create ae interfaces
An MX has no ae interfaces until you say how many to create:
user@R1# set chassis aggregated-devices ethernet device-count 2
This creates ae0 and ae1. Without device-count, no ae interface exists to bundle the members into.
Step 2: add members
Each member link gets only the 802.3ad statement naming its bundle. Members have no units and no addresses of their own.
user@R1# set interfaces ge-1/0/0 gigether-options 802.3ad ae0
user@R1# set interfaces ge-1/0/1 gigether-options 802.3ad ae0
All members of one LAG must run at the same speed in full duplex.
Step 3: configure the ae interface
user@R1# set interfaces ae0 aggregated-ether-options lacp active
user@R1# set interfaces ae0 aggregated-ether-options lacp periodic fast
user@R1# set interfaces ae0 aggregated-ether-options minimum-links 1
user@R1# set interfaces ae0 unit 0 family inet address 10.0.12.1/30
The same configuration in curly-brace form:
interfaces {
ge-1/0/0 {
gigether-options {
802.3ad ae0;
}
}
ae0 {
aggregated-ether-options {
minimum-links 1;
lacp {
active;
periodic fast;
}
}
unit 0 {
family inet {
address 10.0.12.1/30;
}
}
}
}
For Layer 2 on an MX, the ae unit takes family bridge with interface-mode access or trunk, exactly like a physical interface.
LACP modes and timers
LACP is not enabled by default. Without the lacp statement, the LAG is static: all members forward as soon as they are up, with no check on the far end.
| Local mode | Remote mode | Result |
|---|---|---|
| Active | Active | LACP negotiates; LAG up |
| Active | Passive | LACP negotiates; LAG up |
| Passive | Passive | Neither side sends LACPDUs; LAG does not come up |
| No LACP | LACP active | The LACP side receives no LACPDUs, so its members do not join the bundle |
| Setting | Values | Junos default |
|---|---|---|
periodic | fast (every 1 second) or slow (every 30 seconds) | fast |
minimum-links | Number of members that must be up for the ae interface to be up | 1 |
With LACP, a member that stops receiving LACPDUs from the partner is removed from the bundle after three missed intervals. With minimum-links 2, the whole ae interface goes down when fewer than two members are up, which lets routing move traffic to a better path instead of squeezing it onto one link.
Load balancing
A LAG spreads traffic per flow, using a hash of header fields such as addresses and ports. All packets of one flow use the same member, so a single flow never gets more than one member's bandwidth. This keeps packets of a flow in order.
Monitoring
| Command | Shows | |
|---|---|---|
| `show interfaces terse \ | match ae` | Members listed with aenet --> ae0 and the ae state |
show lacp interfaces | LACP state per member: actor and partner, active or passive, fast or slow, and the mux state | |
show lacp statistics interfaces ae0 | LACPDUs sent and received per member | |
show interfaces ae0 extensive | Bundle traffic and per member statistics |
In show lacp interfaces, a healthy member shows the mux state Collecting distributing. A member stuck in another state, or with no partner information, is not forwarding traffic in the bundle.
Troubleshooting checklist
| Symptom | Likely cause |
|---|---|
ae0 never appears | chassis aggregated-devices ethernet device-count missing or too small |
ae0 down with all members up | Both sides LACP passive, or minimum-links higher than the members up |
| One member not in the bundle | Speed mismatch, cabled to a different device, or LACP not running on the far end for that link |
| No LACPDUs received on a member | LACP not configured on the partner, or the link is faulty |
Use LACP whenever both ends support it. A static LAG cannot detect a member that is cabled to the wrong device, and it will send traffic into it.
Common mistakes
Putting addresses on member links. Members carry only gigether-options 802.3ad ae0. The unit and address go on ae0.
Forgetting device-count. Without it, no ae interface exists on the MX.
Configuring both ends as passive. Passive only answers LACPDUs. At least one side must be active.
Expecting a single flow to use all members. Hashing is per flow, so one flow stays on one member.
minimum-links brings the whole ae interface down when too few members are up. That is intended, but on an exam exhibit it can look like a fault when all you see is a down ae with some members up.
What to remember for the exam
- Create
aeinterfaces withset chassis aggregated-devices ethernet device-count <n>. - Members:
set interfaces <member> gigether-options 802.3ad ae<n>; no units on members. - LACP is off by default; configure
lacp activeorpassiveunderaggregated-ether-options. - Passive and passive never forms a LAG; at least one side must be active.
periodic fast(1 second) is the default;slowis 30 seconds.minimum-linksdefaults to 1.- Traffic is balanced per flow.
- Verify with
show lacp interfaces; healthy members are Collecting distributing.
Check yourself
Both ends of a LAG are set to
lacp passive. What happens?The LAG does not come up, because neither side starts sending LACPDUs.
What must be configured on an MX before
ae0can come up?set chassis aggregated-devices ethernet device-countwith a value of at least 1.A LAG has four 10 Gbps members. What is the most a single TCP flow can use?
About 10 Gbps, because all packets of a flow hash to the same member.
Topic 1 of 5 in High Availability
Test yourself on High Availability
The full Juniper JNCIS-SP JN0-364 question bank has 860 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by Juniper. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.