MACsec (MAC Security)
What it is for
The fibre between two sites runs through public ducts, where someone could attach a splitter and capture traffic. Ethernet frames are plaintext, so a capture shows everything.
MACsec (802.1AE) encrypts frames on that link: the sender encrypts before transmitting and the receiver decrypts on arrival. A capture on the link sees only ciphertext.
Two limits
(1) The MAC header is not encrypted. Destination and source MACs must be plaintext so switches can look them up and forward. So an attacker can still see who is talking to whom, just not the contents.
(2) Hop by hop, not end to end. Each link encrypts and decrypts separately, so the frame is plaintext inside each intermediate switch.
IPsec is end to end, and devices in the middle never see plaintext. The two address different threats: MACsec protects against a tapped link, IPsec against untrusted devices along the path.
Common misconceptions
MACsec does not replace IPsec. MACsec protects one link; the data is plaintext inside every intermediate switch. End-to-end confidentiality requires IPsec or TLS.
MACsec does not hide who is communicating. The MAC header is plaintext, so traffic analysis still works: who talks to whom, how much, and when.
MACsec has a cost. Every frame grows by 24-32 bytes (SecTAG plus ICV), so the MTU must be raised; line-rate encryption needs dedicated hardware.