Analysis of Time Sensitive Networking (TSN) Technology for Deterministic Networks
Analysis of Time Sensitive Networking (TSN) Technology for Deterministic Networks
Author | Lu Yingchuan, unit: China Mobile Smart Home Operation Center
Labs Guide
Compared with other deterministic network technologies, such as Flexible Ethernet (FlexE) working at Layer 1.5 and Deterministic Networking (DetNet) working at Layer 3, TSN mainly solves the problem of deterministic assurance of Layer 2 networks, which is achieved through a series of protocol standards. Transmission with zero congestion and packet loss provides low latency and jitter with an upper bound guarantee, and provides deterministic transmission guarantees for latency-sensitive traffic.
The existing Ethernet technology was first proposed in 1973, and was officially put into commercial application in 1982 (Ethernet V2). Although relying on the quality of service (QoS) technology to classify and mark all data packets, under certain conditions, the purpose of forwarding according to different priorities can be achieved. However, the characteristics of network serial transmission and the best-effort forwarding mechanism make the delay, jitter and quality of service uncontrollable when data is transmitted end-to-end. Based on this, the 802.1 task group of the IEEE formulated the Audio Video Bridging (AVB, Audio Video Bridging) specification in 2005, which is a set of Ethernet protocols for real-time audio and video transmission. The task group officially changed its name to Time in November 2012. Time Sensitive Network (TSN, Time Sensitive Network) has become a new-generation network standard based on Ethernet at the same time. It has real-time functions such as time synchronization and delay guarantee, and has gradually been widely used in industrial control, intelligent manufacturing and 5G fields.
Part 01 Definition of TSN
Compared with other deterministic network technologies, such as Flexible Ethernet (FlexE) working at Layer 1.5 and Deterministic Networking (DetNet) working at Layer 3, TSN mainly solves the problem of deterministic assurance of Layer 2 networks, which is achieved through a series of protocol standards. Transmission with zero congestion and packet loss provides low latency and jitter with an upper bound guarantee, and provides deterministic transmission guarantees for latency-sensitive traffic.
Figure 1 TSN protocol layers
TSN is a VLAN that conforms to the IEEE802.1Q standard, and a VLAN tag with a length of 4 bytes is inserted into the standard Ethernet frame. TSN defines different priority protocol levels of the flow through PCP (Priority Code Point) and VID (VLAN ID) in the VLAN tag [1].
- Tag Protocol Identifier: 16bit length, tag protocol identification, identification of TSN network, the value is 0X8100.
- Priority Code Point: 3-bit length, priority code, identifying traffic priority, 3-bit PCP defines 8 priorities.
- Drop Eligible Indicator: 1-bit length, the drop flag can be set for data with low QoS requirements, and can be dropped when the network is congested to ensure the QoS of high-priority data.
- VLAN Identifier (VID): 12bit length, the identification number of the VLAN network. VID=0 is used to identify the frame priority, VID=FFF is reserved, and the remaining values are used to identify the VLAN.
Figure 2 Frame structure of TSN
Part 02 Technology of TSN
In order to achieve deterministic transmission in local area networks, Time Sensitive Networking (TSN) implements precise network time synchronization mechanisms, flow shaping, classification and traffic scheduling mechanisms for traffic with different priorities, and end-to-end, network switches are configured so that A systematic network configuration mechanism that provides services such as reserved bandwidth for time-sensitive data.
Figure 3 TSN key technologies
Figure 4 TSN protocol component set
2.1 Time synchronization
Time synchronization is the basis of TSN and the key to subsequent traffic scheduling based on time slots. TSN uses the IEEE 802.1AS protocol to achieve the purpose of clock synchronization of the entire network. This is a precision time protocol, which ensures that the clocks of related network devices are consistent and do not need to be synchronized with the clocks of nature. This protocol is extended on the basis of the precision time protocol (PTP) of IEEE 1588-2008, and a general precision time protocol (gPTP) is proposed. Global time synchronization is the basis for TSN to truly realize the end-to-end deterministic delay and queue-free transmission requirements of communication flows. It further improves the synchronization protocol of Ethernet, increases the synchronization of distributed networks, and adopts two-way information channels to improve the accuracy of transmission signals. At the same time, the updated and revised IEEE802.1 AS-REV protocol adds the ability to perform time synchronization for multiple time domains, and can quickly switch to other domains when the global clock in one domain fails.
2.2 Flow Control
TSN traffic control mainly involves traffic classification, traffic shaping, and traffic scheduling and preemption. Determine the type and priority of the corresponding traffic according to the relevant attribute information of the VLAN tag in the frame; perform shaping processing such as rate limiting or temporary buffering on the identified TSN traffic, and control the traffic to be sent and received at the preset rate; through certain scheduling algorithms and mechanisms , schedule the shaped or queuing flows to the output end, complete the forwarding in the switch in the corresponding order, and ensure the quality of service requirements during the transmission of various flows according to QoS. In this process, the transmission of low-priority frames is interrupted through inter-frame slicing to ensure the timely forwarding of high-priority streams, and finally the real-time and ultra-low latency requirements of high-priority frame transmission are achieved [2]. There are mainly CBS shaper (Credit-based Shaper, based on IEEE 802.1Qav), TAS shaper (Time-aware Shaper, based on IEEE 802.1Qbv), CQF shaper (Cyclic Queuing and Forwarding, based on 802.1Qch) and IEEE ATS shaper (Asynchronous Traffic Shaping, based on 802.1Qcr).
2.3 Network Configuration
Using the IEEE 802.1Qcc protocol to define the configuration model for Time Sensitive Networking (TSN), TSN can currently provide three different configuration models: fully centralized, hybrid and fully distributed according to specific needs. The switch can be customized and configured to provide services such as reserved bandwidth for subsequent time-sensitive data transmission on this network.
Part 03 Features of TSN
Compared with standard Ethernet, the biggest feature of TSN is that it can ensure the determinism of data exchange. After determining the transmission period of time-sensitive data flow (called scheduled traffic) in advance, and the size of data transmitted in each period, as long as the data is sent The party sends the data according to the agreement, and TSN can guarantee that the data will be exchanged to the receiver at a certain time [3].
Part 04 Application of TSN
TSN provides guarantee for the deterministic service quality of local area networks. With the integration of OT (operational technology), IT (information technology) and CT (communication technology), TSN can send periodic and aperiodic data streams in these converged local area networks. It has broad application prospects in the fields of Internet of Vehicles, industrial control, smart grid, 5G, etc., and the TSN network will develop faster.
4.1 Industrial Internet
TSN can effectively take into account the requirements of high-efficiency data transmission and high reliability in the industrial Internet of Things scenario, effectively promoting the integration of industrial OT systems and IT systems. At the same time, combined with the deterministic transmission technology of URLLC under 5G, existing industrial equipment such as sensors and actuators can be wirelessly connected to the TSN network, which can realize flexible deployment and application without the limitation of cable installation, and the whole system can be more automated. , reducing human intervention and dependence, and will continue to promote the evolution of the underlying architecture of the Industrial Internet.
4.2 In-Vehicle Network
With the development of intelligence and automation of automobiles, in-vehicle networks need to meet the bearing and interconnection requirements of advanced driver assistance systems (ADAS), intelligent on-board diagnostic systems (OBD), in-vehicle multimedia systems and other various in-vehicle systems. The existing in-vehicle network is still dominated by the coexistence of various buses, and media signals and control signals cannot be uniformly transmitted on the same link. Therefore, how to ensure that the requirements of end-to-end transmission delay, jitter, and packet loss rate for various types of traffic are met under the condition of mixed flow, which is the technical difficulty and question of the current in-vehicle network. TSN can provide different degrees of end-to-end bounded delay guarantee and smaller jitter according to different priorities of data traffic. And the quality of service can be confirmed by theory. These features can meet the development needs of in-vehicle network, so as to meet the application requirements of in-vehicle Ethernet [4].
references
[1] Internet documents, one article to understand TSN, https://www.sdnlab.com/25482.html.
[2] SDNLAB, Analysis of TSN Time Sensitive Network Technology, 2022.4.
[3] Internet Documentation, FAST-based TNS Exchange, https://blog.csdn.net/m0_37537704/article/details/86747622.
[4] Industrial Internet Industry Alliance, White Paper on Time Sensitive Network Industry, 2020.8.