TrustSec and MACsec
ACLs decide by address, so every move means editing ACLs. TrustSec gives users and devices security group tags named after roles, assigned at classification, carried with the traffic, and enforced at the exit. MACsec, IEEE 802.1AE, encrypts traffic hop by hop on each wire between two MACsec peers, leaving it readable inside the switch so tags and QoS still work.
By Arif, founder of Daveth · Updated
The full 10 min walkthrough is in Daveth Pro (Network). See what the plan opens
What this page answers
How does 802.1X authentication work?
The switch, the authenticator, relays EAP between the endpoint's supplicant and the authentication server, ISE, whose access-accept carries the authorization, such as a VLAN, a downloadable ACL and an SGT. Devices without a supplicant fall back to MAB or WebAuth. Read it in “4.1 Tags for roles, not addresses”
What is MACsec?
IEEE 802.1AE Layer 2 hop-by-hop encryption: traffic is encrypted only on the wire between two MACsec peers and unencrypted inside the switch, so it can read SGTs and QoS markings. The switch's ASICs do the encryption. Read it in “4.1 Tags for roles, not addresses”
What is a TrustSec security group tag (SGT)?
A tag that represents a user's or device's role rather than its address, such as Mac_Corporate, so policy follows the role wherever the device connects; each group has a unique 16-bit number within a TrustSec domain. Read it in “4.1 Tags for roles, not addresses”
4.1 Tags for roles, not addresses
An ACL decides by address, so every time someone moves desk or changes subnet, somebody edits ACLs. TrustSec was built "to address the growing operational challenges related to maintaining firewall rules and ACLs by using Security Group Tag (SGT) tags". Think about the last time you went to a conference: your badge's colour says speaker, exhibitor or visitor, and the staff at each room's door check the colour, not your seat number. SGTs work the same way. They "represent the context of the user, device, use case, or function", so they're named after roles: a corporate Mac might get Mac_Corporate, and the same Mac failing posture Mac_Guest. Cisco's 17.9 guide says each group gets "a unique 16-bit security group number whose scope is global within a Cisco TrustSec domain".
Where does the badge come from? From the authentication the switch already does. With 802.1X, the switch (authenticator) relays EAP between the endpoint's supplicant and ISE, the authentication server, and ISE's access-accept carries the authorization, "VLAN 100,dACL-n, SGT" in Figure 25-7. Devices without a supplicant fall back to MAB, their MAC address as the identity, and users without one to WebAuth, a web portal; both can return an SGT too. "Cisco ISE assigns the SGT tags to users or devices that are successfully authenticated and authorized through 802.1x, MAB, or WebAuth", delivered "as an authorization option (in the same way as a dACL)", a downloadable ACL ISE sends to the switch. (802.1X, EAP, MAB and WebAuth in depth: bonus B-11.) It's like a badge printed at registration: nobody wears it on the way in, it's handed over at the desk.
Two facts people get wrong. "Endpoints are not aware of the SGT tag. The SGT tag is only known and applied in the network infrastructure". And the names are for people: Figure 25-9's Employees are 4, Contractors 5 and Developers 8, and what goes in a frame is the number. SD-Access calls the same thing a "scalable group tag". TrustSec then works in three phases: ingress classification, propagation and egress enforcement.
TrustSec's promise is that people can move desks without anyone rewriting an ACL, which may be the first networking feature facilities teams would actually applaud.
Classification is "the process of assigning SGT tags to users, endpoints, or other resources as they ingress the TrustSec network", and it happens dynamically or statically. Dynamic is what section 4.1 described: the tag is "downloaded as an authorization option from ISE when authenticating using 802.1x, MAB, or WebAuth". It acts kind of like the badge printed when you register.
Static is for places that don't authenticate, "such as a data center that do not require 802.1x, MAB, or WebAuth". There the tag is mapped on the device, by IP address, subnet, VLAN, Layer 2 interface, Layer 3 logical interface, port or port profile. That's roughly equivalent to the engraved plate on a server room door: nobody checks it in, it simply says what the room is. "As an alternative to assigning an SGT tag to a port", ISE can also hold a central database of IP addresses and their SGTs that SGT-capable devices download. On a dual-stack network the static form takes either family: cts role-based sgt-map accepts an IPv4 or IPv6 address or prefix.
| Static mapping | Typical use |
|---|---|
| IP to SGT; subnet to SGT | servers, printers, anything with a known address |
| VLAN to SGT | a whole VLAN that is one role |
| Layer 2 interface, Layer 3 logical interface, port, port profile to SGT | a port or interface that always serves one role |
Data centres don't require 802.1X, so their servers get tags the way office furniture gets asset stickers: once, by someone else, without being asked.
Propagation is how the enforcing devices learn the tag. There are two ways. With inline (native) tagging, "a switch inserts the SGT tag inside a frame" so upstream devices can read it; the tag sits in the Cisco metadata field, EtherType 0x8909, with a 16-bit value, and it's "completely independent of any Layer 3 protocol (IPv4 or IPv6)". If you've ever sent a parcel with a coloured priority sticker, that's inline tagging: the label travels with the thing.
The catch is hardware. Inline tagging "is supported only by Cisco network devices with ASIC support for TrustSec. If a tagged frame is received by a device that does not support native tagging in hardware, the frame is dropped". A sorting machine that can't read the sticker doesn't guess; it rejects the parcel.
The other way is SXP, "a TCP-based peer-to-peer protocol used for network devices that do not support SGT inline tagging in hardware". It sends IP-to-SGT bindings rather than tags: the sender is the speaker, the receiver the listener, and connections can be single-hop or multi-hop. Single-hop is one SXP connection, which can cross devices that don't run TrustSec at all (Figure 25-11's "Non-TrustSec Domain"); multi-hop is a relay, where "the second peer can have an SXP connection to a third peer ... until a hardware-capable peer is reached". Just like when you ring the next depot to say which parcels are whose: the parcels travel unlabelled, and the depot matches them by address. Figure 25-12 shows both at once: one access switch tags inline, another can't and uses SXP to tell the upstream switch, which then tags from there on. Even an access switch with no TrustSec at all can join: ISE itself becomes the SXP speaker and sends the binding to an upstream TrustSec device (Figure 25-13), or shares it through pxGrid. One SXP connection carries IPv4 and IPv6 bindings alike, from SXP version 3 on.
Hand a tagged frame to a switch that can't read tags and it doesn't guess, it drops it: the network's version of "return to sender".
"After the SGT tags have been assigned (classification) and are being transmitted across the network (propagation), policies can be enforced at the egress point of the TrustSec network". Two kinds: the Security Group ACL (SGACL) on routers and switches, "filtering based on source and destination SGT tags", and the Security Group Firewall (SGFW) on firewalls such as the ASA and NGFW, which "Requires tag-based rules to be defined locally on the firewall". Why egress? Because that's where the destination's group is resolved against the source tag: Cisco's guide says the egress device "uses the source SGT and the security group number of the destination entity (the destination SG, or DGT) to determine which access policy to apply from the SGACL policy matrix". It's like the door staff at each room: the building entrance doesn't know which room you're heading for, the room's own door does.
The matrix is where the policy lives. "The left side column represents the source SGT tags, and the top row represents the destination SGT tags", and "the direction is always from source SGT to destination SGT". You can think of it as the distance table in a road atlas: find the row, find the column, read the cell. In the guide's matrix, developers reach the development servers with a "permit IP ACL, while all other source SGT tags are denied with a deny IP ACL", and employees reach other employees through Permit_FTP, "only allowing FTP traffic (TCP port 21) and denying all other traffic"; port 21 is FTP's control connection, which is all the guide's ACL names. Figure 25-17 shows the result, and one detail worth noticing: "traffic is blocked on egress and not on ingress", and for two employees on the same switch, "the switch is acting as the ingress and egress point". Figure 25-17 also blocks developers from employees, a cell Figure 25-15 leaves empty; D1 shows it as blocked and says so.
Work it out from section 4.3 before you use D1: set a device in the path that can't read tags, with tags travelling inline. What happens to the developer's traffic, and what change fixes it?
D1

The tagged frame is dropped at that device, whoever tagged it. The fix has two parts: stop tagging on the link facing it ("The no propagate sgt command prevents the interface from transmitting the SGT to the peer") and carry the binding past it by SXP, so the frame crosses it untagged. The outcome holds for IPv4 and IPv6 alike, because the tag is independent of the IP version, on two conditions: the SGACL in the cell must cover IPv6 (the guide's Permit_FTP is set to "Agnostic", Figure 25-16), and SXP needs version 3 or later on both ends to carry IPv6 bindings. So, the three phases: tag at the door, carry the tag, decide at the exit.
SGACLs enforce at egress, so the employee's traffic crosses the whole network just to be told no at the server room door.
"MACsec is an IEEE 802.1AE standards-based Layer 2 hop-by-hop encryption method; this means the traffic is encrypted only on the wire between two MACsec peers and is unencrypted as it is processed internally within the switch". That's deliberate: it "allows the switch to look into the inner packets for things like SGT tags to perform packet enforcement or QoS prioritization", and "MACsec also leverages onboard ASICs to perform the encryption and decryption rather than having to offload to a crypto engine, as with IPsec". Just like when you send cash between banks by armoured van: locked on every road, but counted in the open inside each bank before the next van takes it on.
The frame grows: a "16-byte MACsec Security Tag field (802.1AE header) and a 16-byte Integrity Check Value (ICV) field are added", so "all devices in the flow of the MACsec communications must support MACsec for these fields to be used"; MACsec gives authentication with GMAC or authenticated encryption with AES-GCM. The header works like a delivery note stapled to the front, the ICV like a tamper seal on the back; "all devices in the flow" means both ends of every protected link, since each peer adds and removes them. The 16 bytes of the header include the optional SCI; without it the header is 8 bytes. Figure 25-18 shows the SGT's metadata inside the encrypted part. The SecTAG's fields are the MACsec EtherType 0x88e5, the TCI/AN octet, the short length, the packet number (for replay protection and the initialization vector) and the optional SCI. Cisco's 17.9 guide lists GCM-AES-128 and 256 and their XPN variants.
| SecTAG field | What it is |
|---|---|
| EtherType (octets 1-2) | 0x88e5: this is a MACsec frame |
| TCI/AN (octet 3) | tag control information and association number |
| SL (octet 4) | short length of the encrypted data |
| Packet Number (octets 5-8) | replay protection and the initialization vector |
| SCI (octets 9-16, optional) | the secure channel identifier |
Keys come from one of two protocols: SAP, "a proprietary Cisco keying protocol used between Cisco switches", or MKA, which "provides the required session keys and manages the required encryption keys" and works between endpoints and switches as well as between switches. MKA is the standards-based one: "The basic requirements of MKA are defined in 802.1x-REV". Cisco's 17.9 guide adds that MKA runs after authentication using "the certificate-based MACsec or Pre Shared Key (PSK) framework".
MACsec decrypts inside every switch, which makes each switch the colleague who opens everyone's post, reads it, and reseals it for the next van.
Downlink MACsec is the link between an endpoint and a switch, keyed by MKA; it needs a MACsec-capable switch and a MACsec-capable supplicant (the guide's example is AnyConnect), and the endpoint may encrypt in hardware or in software on its CPU. The switch can "force encryption, make encryption optional, or force non-encryption", set per port by hand ("not very common") or, much more commonly, as an authorization option from ISE, and "If ISE returns an encryption policy with the authorization result, the policy issued by ISE overrides anything set using the switch CLI". Have you ever noticed how a chain's head-office policy beats a branch manager's local rule, whatever the branch decided? The central policy wins.
Uplink MACsec encrypts switch to switch. "By default, uplink MACsec uses Cisco proprietary SAP encryption", with the same AES-GCM-128 as downlink; it can be set up manually, or dynamically, which "requires 802.1x authentication between the switches". Today's Catalyst 9300 does both: "Cisco TrustSec Network Device Admission Control (NDAC), Security Association Protocol (SAP) and MKA-based key exchange" between switches. It's basically like the armoured van again, but between two banks that trust each other's staff: the key agreement is between the two switches, not with any user. Work it out from section 4.5 before you look at D2: where along the path can the frame be read?
D2

Step 1 of 5 The laptop has a frame to send towards the distribution switch.

Step 2 of 5 Laptop to access switch (downlink): encrypted. MKA keys it; AES-GCM-128 with an 802.1AE header (16 bytes with the SCI) and a 16-byte ICV added.

Step 3 of 5 Inside the access switch: clear. Decrypted on arrival: the switch reads the SGT and applies SGACLs or QoS, then re-encrypts the frame for the uplink.

Step 4 of 5 Access switch to distribution switch (uplink): encrypted. SAP, Cisco’s own keying, the guide’s default for uplinks; AES-GCM-128.

Step 5 of 5 Inside the distribution switch: clear. Decrypted again on arrival: MACsec protects links, not the path end to end.
Everywhere inside a switch, and nowhere on a protected wire: MACsec protects links, not the path end to end. A laptop with no MACsec supplicant still works on an "optional" port, in the clear, and on a "force" (must-secure) port it gets nothing: "only EAPOL traffic will not be encrypted" (EAPOL: the 802.1X authentication frames themselves), and "Unencrypted packets are dropped". And if MACsec is off on the uplink, anyone tapping it reads the frames, SGT and all.
The guide says ISE's encryption policy overrides the switch CLI, which settles the old argument about who's in charge of the switch: not the person typing on it.
Continue the lesson
The whole lesson, with its drawings and its questions. The rest of this section and 9 more after it.







