School of Specs The 5G system architectureIn depth

Reaching further · chapter 22 of 27 · 13 minutes

22 Clocks, TSN and deterministic delivery

How 5G hands an accurate clock to a machine, tells the radio in advance when each burst will arrive, and pretends to be an Ethernet bridge inside a factory network.

Built from §5.27 §5.28 §5.28a §Annex H §Annex I §Annex K §Annex M

22.1 Why a factory wants a boring network, not a fast one

A robot cell, a printing press and a protection relay in a substation share one habit: the machine acts on a schedule. A command that arrives early is as wrong as one that arrives late, and a command whose arrival time wanders by a millisecond from one cycle to the next is worse than one that is reliably slow.

Ordinary networks are tuned for average speed. Machines need a delivery time you can write into a plan and then trust. The IEEE built Ethernet extensions for exactly that, called Time-Sensitive Networking (TSN); the IETF built a matching set for IP, called Deterministic Networking (DetNet).

Clause §5.27 is 3GPP's answer to the question "what must a radio network do to be allowed inside one of those?" §5.27.0.

One requirement and three restrictions apply to all of it. The requirement is that the UE (the device) asks for an always-on PDU session.

The restrictions: only SSC mode 1 is supported — the session keeps the same anchor and the same address for its whole life — home-routed roaming is not supported, and the session does not survive a move to 4G, so none of this reaches Living next to 4G §5.27.0.

22.2 Two separate ways time reaches a device

The specification carries two clock systems side by side §5.27.1.1.

  • 5G access stratum time distribution. The 5G internal system clock is traceable to a common time reference, is given to every user-plane node, and reaches the UE as the absolute timing of radio frames (TS 38.331). The UE passes it to the device-side translator §5.27.1.2.1.

  • (g)PTP time distribution. Real Precision Time Protocol messages from a real grandmaster clock, carried on the user plane — on a QoS Flow fast enough to meet the residence-time limit — and corrected on the way.

The second rides on the first, because both ends timestamp the messages with the 5G internal clock.

Figure 5.27.1-1: 5G system is modelled as PTP instance for supporting time synchronization
Figure 5.27.1-1: 5G system is modelled as PTP instance for supporting time synchronization 5.27.1.1

Three names to fix before going further. The grandmaster (GM) is the clock everybody else follows. The DS-TT (device-side TSN translator) sits behind the UE, facing the machine.

The NW-TT (network-side translator) sits inside the UPF, the box that forwards the packets, facing the wired network. Between them, the whole 5G system is modelled as a single clock device §5.27.1.1.

That device can be configured to behave as a time-aware system (IEEE 802.1AS), as a Boundary Clock, as a peer-to-peer Transparent Clock, or as an end-to-end Transparent Clock §5.27.1.1. Which delay measurement it may use follows from that choice §H.4.

22.2.1 What the translators actually do to a Sync message

The translator on the way in stamps the arrival time (TSi) using the 5G internal clock, adds the measured link delay from the upstream node into the message's correction field, replaces the cumulative rate ratio with its own, and appends TSi in the message's Suffix field §5.27.1.2.2.

That Suffix is a 3GPP-specific extension of the standard PTP message format §H.2.

The translator on the way out stamps the departure time (TSe). TSe minus TSi is how long the 5G system held the message. It converts that into grandmaster time using the rate ratio, adds it to the correction field, and strips the Suffix §5.27.1.2.2.

Several grandmasters can run at once. Each carries its own domainNumber, and the whole ingress-and-egress procedure simply repeats per domain §5.27.1.3.

22.2.2 Deciding who leads

PTP nodes elect a grandmaster by comparing Announce messages. The NW-TT keeps the port state of every DS-TT and NW-TT port, either by running that election (the best master clock algorithm) or by local configuration §5.27.1.6.

It also watches for Sync and Announce messages that stop arriving, and re-evaluates the port states when one times out §5.27.1.5.

The 5G system can also be the grandmaster itself. Then either the NW-TT generates the Sync, Follow_Up and Announce messages on behalf of a DS-TT, or the DS-TT generates them locally — in both cases stamped with the 5G internal system clock §5.27.1.7.

22.3 Who switches the service on

The TSCTSF is the control-plane function for all of this. An application function asks it what time synchronisation the network and each device can do, turns the service on or off for a set of devices, and subscribes to status changes §5.27.1.8.

The request can carry a good deal more than "on": a start and stop time, a coverage area given as tracking areas or a shape §5.27.1.10, a synchronisation error budget that the TSCTSF turns into a budget for the radio link §5.27.1.9, and a clock-quality level to report back.

Whether the device is allowed the service at all is checked against its subscription in the UDM §5.27.1.11.

Base stations and UPFs report when their own timing degrades or recovers, so the service can be narrowed or a notification sent, rather than quietly delivering bad time §5.27.1.12.

22.4 Telling the radio when the burst will arrive

Machine traffic is periodic and known in advance. If the base station is told the pattern, it can reserve the air in the right millisecond instead of waiting for packets to show up. That description travels in two nearly identical shapes §5.27.2.1.

  • The TSC Assistance Container describes the burst at the edge of the 5G system: the DS-TT for uplink, the NW-TT for downlink.

  • The TSC Assistance Information (TSCAI) describes it where the radio cares: the ingress of the base station for downlink, the egress of the UE for uplink.

Both carry the flow direction, the periodicity, the burst arrival time, an optional survival time (how long the application can live with no burst at all), and optional room to negotiate — a burst arrival window, a periodicity range, or a flag saying the application will move its sending time on request.

Two things can build the container. When the 5G system is inside an IEEE TSN network, the TSN AF — the application function that speaks for the factory's own controller — derives it from the per-stream filtering and policing configuration that controller gave it §5.27.2.2.

The arithmetic is in §I.1: periodicity from the stream gate cycle time, burst arrival time from the base time plus the closed intervals before the first open gate, burst size from the octet limit or the gate interval times the port bit rate.

Otherwise the TSCTSF builds it from what an application or a DetNet controller asked for §5.27.2.3.

Either way it reaches the PCF, becomes part of a policy rule, and lands at the SMF (the function that sets up a session and steers its traffic), which converts it into TSCAI for one QoS Flow §5.27.2.4:

  • Downlink: burst arrival time plus the static core-network part of the delay budget, giving the latest moment the first packet can reach the base station.

  • Uplink: burst arrival time plus the UE-to-DS-TT residence time, giving the latest moment it can leave the UE.

  • Both: corrected for the offset between the external clock and the 5G clock, and for the rate ratio, as measured and reported by the UPF.

22.4.1 When the radio answers back

The requested arrival time may not line up with the next transmission opportunity on the air. If the application said it can adapt, the base station returns a BAT offset — positive or negative — and may return an adjusted periodicity from the allowed range §5.27.2.5.1.

Given a burst arrival window, it does this up front, at QoS Flow setup, and the offset must fall inside the window; an offset of zero means the request was already fine §5.27.2.5.2.

Given only the adaptation flag, it does it later, when the delay budget starts failing, attaching the offset to the "guaranteed bit rate can no longer be guaranteed" notification §5.27.2.5.3.

The offset travels back through SMF and PCF to the application, and the SMF keeps the adjusted value so a handover hands the target base station the corrected schedule.

22.4.2 The QoS Flow underneath

A TSC QoS Flow uses the delay-critical GBR resource type of What the network promises. Within each period, exactly one burst of at most the maximum data burst volume must get through inside the radio part of the delay budget, and the budget is split explicitly into a radio part and a core part §5.27.3.

22.5 Hold and forward: making the output boring again

Traffic that has crossed a radio link arrives in a slightly different rhythm each cycle. That jitter is unacceptable to the machine at the far end, so the translators buffer it back into shape.

Each DS-TT and NW-TT port runs up to eight queues behind transmission gates, and only one gate is ever open at a time. Frames wait until their gate opens §5.27.4.

The queue is picked from the priority value in the VLAN tag, or zero when there is no tag. The gate schedule is four parameters — AdminControlList, AdminBaseTime, AdminCycleTime and TickGranularity — pushed to the port from the network.

22.6 When the 5G system pretends to be an Ethernet bridge

To the factory network, the 5G system should look like one more Ethernet bridge, with ports and delays like any other §5.28.0.

Figure 5.28.1-1: Per UPF based 5GS bridge
Figure 5.28.1-1: Per UPF based 5GS bridge 5.28.1

One bridge is one UPF, per network instance or per DNN and slice. Its ports are the NW-TT ports facing the wired network plus one DS-TT port per PDU session, and its bridge ID is bound to the UPF ID §5.28.1.

There is exactly one PDU session per DS-TT port, and each DS-TT port needs a globally unique MAC address — used only to identify the session and its bridge port, never in user traffic.

The bridge then reports itself to the network's central configuration controller through the TSN AF: port list, per-port-pair and per-traffic-class delays, propagation delay, VLAN configuration, discovered neighbours, and how many stream filters and gates it can hold §5.28.1.

Those delays are not measured, they are assembled §5.27.5. The part that does not depend on frame size comes from the UE-to-DS-TT residence time plus a pre-configured per-traffic-class delay between UE and UPF; the part that does depend on frame size comes from the link speed of the ingress port.

Because residence times differ per device, the numbers are only final once the PDU session exists.

The controller answers with a configuration: forwarding entries, per-stream filters and gates, and gate schedules §5.28.2. A stream between two devices on the same bridge is split into one uplink stream and one or more downlink streams, and the UPF switches it locally.

Figure 5.28.4-1: QoS Mapping Function distribution between PCF and TSN AF
Figure 5.28.4-1: QoS Mapping Function distribution between PCF and TSN AF 5.28.4

Translating TSN priorities into 5G quality is a two-table job §5.28.4. The TSN AF holds traffic classes, priorities and pre-configured delays; the PCF holds the mapping from those into a 5QI, a data burst volume and a bit rate. An operator can map at most eight traffic classes.

22.7 The container that crosses the boundary

The translators are not 5G functions, so the network cannot configure them with 5G signalling. Instead it carries opaque blobs end to end: a Port Management Information Container (PMIC) per port, and a User Plane Node Management Information Container (UMIC) for the node §5.28.3.1.

Their route is worth knowing §5.28.3.2. From the device side, the DS-TT hands a PMIC to the UE, which puts it in a session-management message to the SMF, which passes it through the PCF to the TSN AF or TSCTSF.

From the network side, the NW-TT hands it to the UPF, which reports it to the SMF over N4 — or, if both support it, straight to the consumer. The reverse direction is a policy update that ends as a session modification towards the UE or the UPF.

What may travel that way is listed in §K.1: gate control parameters, neighbour discovery, traffic class tables, PTP data sets.

The consumer first asks what each translator supports — instance types, transports, delay mechanisms, whether it can act as grandmaster, which PTP profiles, how many instances §K.2.1 — and then creates PTP instances by ID, first in the NW-TT, then adding each DS-TT port to them §K.2.2.1.

22.8 Deterministic IP, and TSN under the floor

The same machinery serves the IETF's version. Here the 5G system is a DetNet router rather than a bridge, again one per UPF, again with device-side ports that are PDU sessions §5.28.5.1.

Only IP DetNet is supported, not MPLS, and the TSCTSF talks to the DetNet controller in YANG over NETCONF or RESTCONF. It reports the ports and their addresses so the controller can build a topology §5.28.5.2.

One more layer sits underneath all of it. The links between base station and UPF may themselves run over a TSN transport network. Then the SMF plays the role of the user configuring that network, sending stream requirements per QoS Flow to the transport controller and getting a schedule back §5.28a.1.

The mapping from 5G parameters into the talker and listener descriptions that interface expects is §M.1, including how a stream is identified — separate tunnel endpoint addresses per QoS Flow, or a mask-and-match rule on the tunnel header.

Where the base station and UPF support it, they hold and release traffic themselves, configured through a container of their own §5.28a.2, and announce their topology with transmit-only link discovery so nothing has to ask the control plane §5.28a.3.

22.9 Where this meets the rest of the system

The delay-critical resource type, the delay budget split and the notification control this chapter leans on are all from What the network promises.

The always-on session and its single anchor come from The connection to a data network, the local switching between two devices on one bridge from Where the packets actually go, and the policy rules that carry the assistance container from Rules, and paying for them.

The application side of the TSCTSF request is exposure, described in Computing close by, and opening the door, and the same assistance information is reused for extended reality traffic in Very fast, very reliable, very picky. Most deployments of any of this are the closed networks of Networks that are not for everybody.

Check yourself

Answers appear when you pick one, with where they come from.

Q22.1 What kind of PDU session must a device have before any of these features work?

Q22.2 The NW-TT stamped a Sync message on the way in, the DS-TT stamps it on the way out. What does the difference become?

Q22.3 What is one 5GS TSN bridge made of?

Q22.4 TSCAI gives the radio a Burst Arrival Time. Expressed against which clock?

Q22.5 The radio cannot line the requested burst arrival up with a transmission opportunity. What may it send back?

Q22.6 Which four parameters configure hold-and-forward buffering in a translator?

This chapter was written against TS 23.501 version 20.2.0, verified 2026-08-04. A newer version of the document may say something else.