Skip to main content

IEEE 802.1Q: the bridge, its architecture, data-plane actions and forwarding process

· 9 min read
PhD candidate, LyRIDS (ECE) × CEDRIC (Cnam)

Every TSN mechanism in this series is described as an addition to "the bridge". This post opens that box. It uses the figures with which the IEEE 802.1 working group itself explains the bridge: in its 2013 tutorial to the IETF, and in its 2017 and 2018 introductions to TSN.

Simplified baggy-pants model of a MAC bridge: control plane with higher layer entities and an external agent above a data plane made of a relay and two ports
Figure 1. The simplified “baggy pants” model of a MAC bridge. The control plane (higher layer entities, or an external agent such as an SDN controller) sits above a data plane made of a relay and at least two ports. Below the ports, media-specific functions connect each port to its LAN, for example IEEE 802.3 Ethernet.Source: J. Farkas, “TSN Basic Concepts,” DetNet–TSN workshop, IEEE 802.1, 11 November 2018, slide 7; cropped, otherwise unchanged.
Abbreviations used in this post (26)
AbbreviationStands forMeaning
ATSAsynchronous Traffic ShapingIEEE 802.1Qcr: per-stream token-bucket shaping at every hop using local clocks only.
CBSCredit-Based ShaperThe IEEE 802.1Qav shaper that limits a traffic class to its reserved rate (idleSlope) with a per-queue credit. In MEF bandwidth profiles, CBS instead means Committed Burst Size.
CNCCentralized Network ConfigurationThe 802.1Qcc entity that computes paths, schedules and reservations for the whole network and configures the bridges.
CQFCyclic Queuing and ForwardingIEEE 802.1Qch: two queues per class alternate every cycle, so a frame advances one hop per cycle.
FRERFrame Replication and Elimination for ReliabilityIEEE 802.1CB: frames are numbered, sent over disjoint paths, and duplicates are removed.
IEEEInstitute of Electrical and Electronics EngineersThe professional association whose Standards Association publishes the IEEE 802 LAN/MAN standards.
IETFInternet Engineering Task ForceThe body that develops Internet standards, published as RFCs.
IS-ISIntermediate System to Intermediate SystemA link-state routing protocol (ISO/IEC 10589, RFC 1195); the control plane of SPB and PCR.
LANLocal Area NetworkA network covering a limited area, such as a building or a vehicle; IEEE 802 standardises LANs.
MACMedium Access ControlThe lower sublayer of the data link layer, which frames data and controls access to the medium. A MAC address identifies a network interface.
MMRPMultiple MAC Registration ProtocolThe MRP application that registers multicast MAC addresses.
MRPMultiple Registration ProtocolIEEE 802.1ak, now in 802.1Q: the framework for declaring and registering attributes such as VLANs, multicast addresses and streams.
MSTPMultiple Spanning Tree ProtocolIEEE 802.1s, now in 802.1Q: several spanning trees, each used by a group of VLANs.
MVRPMultiple VLAN Registration ProtocolThe MRP application that registers VLAN membership, so that VLAN traffic only goes where members are.
PCEPath Computation ElementAn entity that computes paths or trees from the network topology and constraints (RFC 4655).
PCRPath Control and ReservationIEEE 802.1Qca: IS-IS extensions with which a controller installs explicit, non-shortest trees (RFC 7813). In ATM, PCR instead means Peak Cell Rate.
PSFPPer-Stream Filtering and PolicingIEEE 802.1Qci: stream filters, stream gates and flow meters that enforce each stream’s contract at ingress.
QoSQuality of ServiceThe treatment a network gives to a flow or class, in terms of bandwidth, delay, jitter and loss.
RSTPRapid Spanning Tree ProtocolIEEE 802.1w, now in 802.1Q: a faster-converging spanning tree with alternate and backup port roles.
SDNSoftware-Defined NetworkingAn architecture that separates the control plane, run by a logically centralised controller, from the data plane of the network elements (RFC 7426).
SPBShortest Path BridgingIEEE 802.1aq: bridges compute shortest path trees with IS-IS, so all links can be used.
SRPStream Reservation ProtocolIEEE 802.1Qat: distributed admission control in which talkers advertise streams and listeners subscribe, reserving resources hop by hop.
TASTime-Aware ShaperIEEE 802.1Qbv scheduled traffic: a gate per queue, opened and closed by a repeating gate control list.
TSNTime-Sensitive NetworkingThe set of IEEE 802.1 standards that give Ethernet bounded latency, time synchronisation and high reliability.
VIDVLAN IdentifierThe 12-bit field of the 802.1Q tag that names a frame’s VLAN.
VLANVirtual LANA logical LAN within a bridged network, identified by a 12-bit VLAN ID in the 802.1Q tag.

1. Definition​

A bridge relays Ethernet frames between two or more LANs at Layer 2. The bridges of TSN are specified in IEEE 802.1Q, Bridges and Bridged Networks, which also defines virtual LANs [1][4].

Four principles from the IEEE 802.1 tutorial frame everything else [1]:

  • MAC addresses identify, they do not locate. A MAC address names a station, not where it is. The tutorial calls this a major Layer 2 value, not a defect.
  • Forwarding uses the destination MAC address and the VLAN ID.
  • Unknown destinations are flooded, known ones are filtered. A frame whose destination location is not known is sent to every port of its VLAN except the one it arrived on. Once the location is known, the other ports are filtered out.
  • Quality of service comes after the forwarding decision. It is based on the frame's priority, its drop eligibility, and time.

The last principle is where TSN enters: almost every TSN tool acts after the bridge has decided where a frame goes, and decides when and whether it goes there.

2. Architecture: control plane and data plane​

Figure 1 separates the two planes [2][3]:

  • the control plane runs the control protocols as higher layer entities inside the bridge. Alternatively, an external agent, such as an SDN controller, provides the control instead of the distributed protocols;
  • the data plane is made of a MAC relay and at least two ports.

The external agent is what the SDN post calls the CNC. The standard's own, more detailed picture is Figure 8-2, "VLAN-aware Bridge architecture", of 802.1Q [2].

A bridge specified as an A component and a B component with typed ports, implemented as a single relay with a port that combines the X, Y and Z functions
Figure 2. Specification versus implementation. 802.1Q describes a bridge as components (here A and B) whose ports have distinct types according to their role. A real bridge often implements all of them on a single relay, with one port combining several functions.Source: P. Thaler, N. Finn, D. Fedyk, J. Farkas, G. Parsons, E. Gray, “IEEE 802.1Q: Media Access Control Bridges and Virtual Bridged Local Area Networks,” IEEE 802.1 tutorial, IETF 86, 10 March 2013, slide 14; cropped, with the slide text beside the figure removed.

The standard describes a bridge as a set of components, one per type of Layer 2 virtual network, each with typed ports. This is a description language: it specifies the operation in distinct steps. It does not prescribe an implementation. Implementations often use a single MAC relay, and one physical port may implement several port functions. When the outermost EtherType of a frame does not match the component type, the reception port assigns the frame to a VLAN [1].

3. Data-plane actions​

The baggy-pants bridge redrawn as a pipeline: ingress port, relay and egress port, each with an action set and a table
Figure 3. The data plane redrawn as a pipeline. Each stage applies an action set, using its own table. “Baggy pants” is just the simple drawing of the same pipeline.Source: J. Farkas, “TSN Basic Concepts,” DetNet–TSN workshop, IEEE 802.1, 11 November 2018, slide 8; cropped, otherwise unchanged.

The baggy-pants drawing can be unfolded into a pipeline of three stages. Each applies an action set driven by a table [2][3]:

StageAction setActionsTSN additions at this stage
Ingress portAction set 1Filtering (drop), tagging and untagging, VID translation, de- and encapsulationStream identification, PSFP, the ingress side of FRER
RelayAction set 2Forwarding, filteringExplicit trees (802.1Qca), replication and elimination
Egress portAction set 3Filtering, tagging and untagging, VID translation, de- and encapsulation, metering, queuing, transmission selectionCBS, ATS, TAS, CQF, preemption

Most TSN tools therefore act on the egress port, where queuing and transmission selection happen.

4. The forwarding process​

The forwarding process of IEEE 802.1Q from reception port to transmission port, with the sub-clause of each step
Figure 4. The forwarding process of IEEE 802.1Q, from the reception port to the transmission port. Each box is a sub-clause of clause 8.6 of the standard. Frame filtering consults the filtering database, and queue management acts on the queues.Source: J. Farkas, “TSN Basic Concepts,” DetNet–TSN workshop, IEEE 802.1, 11 November 2018, slide 9; cropped, otherwise unchanged.

Inside the data plane, 802.1Q specifies the forwarding process as a fixed sequence of steps, each in its own sub-clause of clause 8.6 [2][3]:

StepSub-clauseWhat it does
Active topology enforcement8.6.1Discards frames that would use a port not in the active topology for that frame, for example a port blocked by the spanning tree
Ingress8.6.2Assigns a VLAN to frames that arrive without one, and drops frames from ports that are not members of the frame's VLAN
Frame filtering8.6.3Looks up the destination MAC address and VLAN ID in the filtering database to choose the output ports
Egress8.6.4Applies the output port's VLAN membership and tagging rules
Flow metering8.6.5Meters frames against a bandwidth profile; per-stream filtering and policing extends this step
Queuing frames8.6.6Places each frame in the queue of its traffic class at the output port
Queue management8.6.7Removes frames from the queues, for example frames held too long
Transmission selection8.6.8Chooses the next frame to send, among the queues allowed to transmit

Reading the TSN standards becomes much easier with this list in mind. Each amendment says which of these sub-clauses it changes. For example, scheduled traffic adds gates to transmission selection (8.6.8), and asynchronous traffic shaping adds a shaper in front of it.

5. Quality-of-service functions​

QoS functions of a bridge port: filtering and policing, shaping, queuing and transmission selection
Figure 5. The QoS functions of a port, in order from frame reception to frame transmission. Filtering, policing and shaping can work per stream or per class; queuing and transmission selection work per class. Together they form a hierarchy.Source: J. Farkas, “TSN Basic Concepts,” DetNet–TSN workshop, IEEE 802.1, 11 November 2018, slide 10; cropped, otherwise unchanged.

Figure 5 isolates the quality-of-service functions of a port [2]:

  1. Filtering and policing, which can be per stream or per class;
  2. Shaping, also per stream or per class;
  3. Queuing and transmission selection, which are per class.

The order matters for analysis. Policing makes a stream respect its arrival curve before it meets other traffic. Shaping changes the curve. Queuing and transmission selection then define the service curve that each class receives.

6. What the control plane controls​

Topology layers of a bridged network stacked as planes: physical network topology, active topology, VLAN topology and station location
Figure 6. The topology layers of a bridged network. Each layer is a subset, real or not, of the one below it: the physical network topology, the active topology, the VLAN topology, and the station locations (the MAC address topology).Source: P. Thaler, N. Finn, D. Fedyk, J. Farkas, G. Parsons, E. Gray, “IEEE 802.1Q: Media Access Control Bridges and Virtual Bridged Local Area Networks,” IEEE 802.1 tutorial, IETF 86, 10 March 2013, slide 25; cropped, otherwise unchanged.

The control plane maintains four layered views of the network [1][3]:

LayerContentMaintained by, for example
Physical network topologyAll links and bridgesManagement (enabling and disabling ports)
Active topologyThe links actually used: a spanning tree, shortest paths, or traffic-engineered pathsRSTP, MSTP, SPB, path control (PCR)
VLAN topologyWhich bridges and ports belong to each VLANMVRP, SPB, PCR, SRP
Station locationWhere each MAC address isSource address learning, MMRP, SPB, PCR, SRP
Control plane overview: VLANs assigned to control modes, and the control options for each topology layer
Figure 7. Control options. Each VLAN is assigned a control mode: spanning tree, shortest path bridging (IS-IS), or an external agent for software-defined VLANs. Several modes can coexist in one network, and an external agent can use non-802.1 protocols.Source: J. Farkas, “Introduction to IEEE 802.1: Focus on the Time-Sensitive Networking Task Group,” IEEE 802.1, 15 May 2017, slide 49; cropped, otherwise unchanged.

Each of these protocols has its own post: RSTP, MSTP, SPB, path control, MRP and MVRP, and SRP.

Control modes are assigned per VLAN. Distributed protocols and an external agent can therefore coexist in the same network, each controlling its own VLANs. The external control can even be a non-802.1 protocol, such as PCE or GMPLS [3]. This hybrid model is what lets a TSN network keep spanning tree for ordinary traffic while a CNC installs explicit paths for streams.

7. Where TSN plugs in​

The IEEE 802.1Q bridge: architecture and data-plane actionsIEEE 802.1Q bridge ↗Control planeSRP (Qat), TSN configuration (Qcc), path control (Qca)frame inframe outIngressPSFP (Qci)FRER (CB)Relayforwardingexplicit treesQueuingCBS (Qav)ATS (Qcr)Tx selectiongates (Qbv)CQF (Qch)MAC / PHYpreemption(Qbu, 802.3br)Common time: gPTP (802.1AS)
Figure 8. The same bridge as Figures 1 and 3, with the TSN tools added to each stage (own summary drawing; the 802.1 standard of each tool in brackets).Source: own drawing, after the bridge architecture, data-plane actions and QoS function chain in J. Farkas, TSN Basic Concepts, DetNet–TSN workshop, 11 November 2018, slides 7, 8 and 10.

The TSN toolbox post goes through the tools of Figure 8 one by one. Each has its own post in the TSN topic.

References​

  1. P. Thaler, N. Finn, D. Fedyk, J. Farkas, G. Parsons, E. Gray, "IEEE 802.1Q: Media Access Control Bridges and Virtual Bridged Local Area Networks," IEEE 802.1 tutorial, IETF 86, 10 March 2013, slides 12, 14 and 25. Slides
  2. J. Farkas, "TSN Basic Concepts," DetNet–TSN workshop, 11 November 2018, slides 7–10. Slides
  3. J. Farkas, "Introduction to IEEE 802.1: Focus on the Time-Sensitive Networking Task Group," 15 May 2017, slides 28 and 47–49. Slides
  4. IEEE, IEEE 802.1Q-2022, Bridges and Bridged Networks. IEEE SA. IEEE 802 standards are available free of charge through the IEEE GET Program.