Sub topic 5
Static Bundling and Its Risks
This chapter assumes you know how a LAG distributes frames with a hash, and that you can read basic switch CLI output. It also assumes you know what a Layer 2 loop is and how spanning tree reacts to one.
What static bundling is
A static LAG is a bundle that both ends build because an administrator told them to, with no conversation between them. On Cisco IOS this is channel-group N mode on. On Linux it is the balance-xor bonding mode. Some vendors call it "unconditional aggregation" or "mode on".
Each end puts the configured ports into the bundle as soon as the link is up. Neither end sends any control frames. Each switch assumes the other end is configured the same way.
Compare this with LACP, which exchanges LACPDUs (Link Aggregation Control Protocol Data Units) before any port carries traffic. In a static bundle, nothing checks that the far end agrees.
A basic static configuration
This IOS-style example bundles two ports as a static trunk. Compare it with the LACP version from the configuration chapter. The only change is the last word of the channel-group line.
interface range GigabitEthernet0/1 - 2
switchport mode trunk
switchport trunk allowed vlan 10,20
channel-group 1 mode on
!
interface Port-channel1
switchport mode trunk
switchport trunk allowed vlan 10,20The Linux equivalent uses balance-xor. It hashes by the policy you choose and sends no LACPDUs.
ip link add bond0 type bond mode balance-xor miimon 100 xmit_hash_policy layer3+4
ip link set eth0 down
ip link set eth0 master bond0
ip link set eth1 down
ip link set eth1 master bond0
ip link set bond0 up
cat /proc/net/bonding/bond0The status output shows the mode and the member links. It shows no partner details, because no partner information was ever exchanged.
Why anyone still uses it
Static mode has a few legitimate uses:
- The other device does not implement LACP. Some older appliances, embedded devices and simple load balancers fall into this group.
- You need the bundle up before an LACP daemon is running. Examples are a network boot, a recovery environment, or a hypervisor host in early startup.
- You are testing, and you want the simplest possible behavior with no negotiation timers.
Outside these cases, LACP is almost always the better choice. The sections below explain why.
Risk 1: a one-sided bundle
The most common static failure is a bundle configured on only one end. Suppose switch A has mode on on two ports, and switch B has two ordinary trunk ports with no channel-group.
Switch A treats both links as one logical interface. It hashes frames across them and learns source MAC addresses on the Port-channel. Switch B sees two independent links to the same neighbor. It learns the same MAC addresses on two different physical ports. Two things then go wrong:
- MAC flapping. Switch A hashes frames from one source MAC onto link 1 for some flows and link 2 for others. Switch B sees that MAC arriving on different ports and keeps moving its table entry. You see
%SW_MATM-4-MACFLAP_NOTIFmessages (or your platform's equivalent) in the log. - A Layer 2 loop. Switch A sends a broadcast out one member only, but switch B floods it out its other port, back toward A. Switch A receives it on the second member and treats it as arriving on the same logical port. Depending on the STP state and the platform, this produces duplicated frames or a broadcast storm.
Spanning tree on switch B cannot always save you. Switch A sends BPDUs on only one member link, because it sees one logical port. Switch B then sees BPDUs on one port and silence on the other, so it may leave the second port forwarding.
Risk 2: mixing static and LACP
Static and LACP are not compatible. If one end uses mode on and the other uses active or passive, the LACP end sends LACPDUs and gets no reply. The static end ignores them. Outcomes vary by platform. Commonly the LACP end leaves its ports standalone or suspended. The static end still has its bundle up and hashes traffic onto links the partner is not treating as a bundle. You then get the same loss and flapping as in Risk 1.
| Local mode | Remote mode | Result |
|---|---|---|
| on | on | Bundle forms |
| active | active | Bundle forms |
| active | passive | Bundle forms |
| passive | passive | No bundle, nobody starts negotiation |
| on | active or passive | No valid bundle, with the problems above |
Risk 3: no detection of a bad link or wrong cable
LACP can notice that two ports in the bundle lead to different switches. Each port reports the partner's system ID, and those IDs differ. Static mode has no such information. If someone plugs one member cable into the wrong switch, or into a port in a different bundle, the static end still believes everything is fine.
Static mode also gives you no protection when the link stays up but the far end has stopped processing frames properly. Physical link state is the only signal. A hung control plane, a misprogrammed port or a one-way fiber fault can keep the carrier up while frames go nowhere. LACP, with its periodic LACPDUs, would remove such a member after a timeout. With static mode, the hash keeps assigning flows to the dead path and those flows are silently lost.
Risk 4: configuration drift goes unnoticed
A port channel makes the member ports share settings such as trunk mode, allowed VLANs, speed and duplex. With LACP, a member whose settings differ from the rest is typically kept out of the bundle, and you see it in the status. With static mode on some platforms, mismatched members can still be forced into the bundle or can disrupt it. Even where the switch refuses, the other end cannot tell you why, because there is no LACP state to compare. Later chapters cover the member requirements in detail.
Reducing the risk if you must use static mode
If you have to use static bundling, take these precautions:
- Configure both ends in the same change window, and verify both ends before relying on the bundle.
- Keep the member settings identical: speed, duplex, trunk mode and allowed VLANs.
- Enable spanning tree's EtherChannel misconfiguration guard where available. On IOS,
spanning-tree etherchannel guard misconfigis on by default and err-disables ports when STP detects BPDUs that suggest a one-sided bundle. Check that the setting has not been turned off. - Watch the logs for MAC flap and misconfiguration messages.
- Document which ports belong to the bundle and where each cable goes.
Verify the local state with the same commands you use for LACP.
show etherchannel summary
show etherchannel port-channelIn the summary, a bundled static member shows the P flag, the same as an LACP member. The protocol column shows - for a static bundle and LACP for an LACP one. So a P flag does not prove the other end agrees. Only a check of the partner's own configuration does that.
Exercise
Switch A has channel-group 1 mode on on two ports. Switch B has the two connected ports as ordinary trunks, with no bundle. Name two symptoms you would expect, and say why the P flag in show etherchannel summary on switch A does not rule this problem out.
Show answer
Expect MAC address flapping on switch B (the same source MAC arrives on two different ports as A hashes flows across both links) and loops, duplicated frames or a broadcast storm (B floods frames out its second port, which A treats as the same logical port). The P flag on A only means A has put the port into its local bundle. Static mode exchanges no information with the partner, so the flag says nothing about whether B agrees.