You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Deterministic Threat Detection with Time-Sensitive Networking (TSN)
2
2
3
-
This project demonstrates a Time-Sensitive Networking (TSN) sample application for deterministic, low-latency delivery of AI-processed video and sensor data in a shared network with other traffic.
3
+
This project demonstrates a Time-Sensitive Networking (TSN) sample application for
4
+
deterministic, low-latency delivery of AI-processed video and sensor data in a shared network
5
+
with other traffic.
4
6
5
7
## Overview
6
8
7
-
This sample application showcases how TSN can be used to protect latency-sensitive AI and sensor workloads in industrial and edge AI deployments. It demonstrates:
9
+
This sample application showcases how TSN can be used to protect latency-sensitive AI and
10
+
sensor workloads in industrial and edge AI deployments. It demonstrates:
8
11
9
12
- Multi-camera video acquisition over Ethernet
10
13
- Precise time synchronization using **IEEE 802.1AS (gPTP)**
@@ -16,10 +19,15 @@ This sample application showcases how TSN can be used to protect latency-sensiti
16
19
17
20
## Use Case
18
21
19
-
The use case involves multiple RTSP cameras streaming video to edge compute nodes for AI inference. Simultaneously, a sensor data producer generates telemetry data. Both inference results and sensor data are published over MQTT.
22
+
The use case involves multiple RTSP cameras streaming video to edge compute nodes for AI
23
+
inference. Simultaneously, a sensor data producer generates telemetry data. Both inference
24
+
results and sensor data are published over MQTT.
20
25
21
-
An aggregation node measures the end-to-end latency. By injecting background traffic and then enabling TSN features, the demonstration shows how TSN provides consistent and deterministic latency for critical data streams.
26
+
An aggregation node measures the end-to-end latency. By injecting background traffic and then
27
+
enabling TSN features, the demonstration shows how TSN provides consistent and deterministic
28
+
latency for critical data streams.
22
29
23
30
## Getting Started
24
31
25
-
For detailed instructions on how to set up the environment and run the demonstration, please refer to the user guide in the `docs/user-guide` directory. Start with [get-started.md](./docs/user-guide/get-started.md).
32
+
For detailed instructions on how to set up the environment and run the demonstration, please
33
+
refer to the user guide in the `docs/user-guide` directory. Start with the [Overview](./docs/user-guide/index.md).
This guide provides a streamlined path to setting up and running the Deterministic Threat Detection demonstration. It covers the essential prerequisites and the main steps to see the system in action.
4
-
5
-
# Use Case
6
-
7
-
This use case demonstrates how Time-Sensitive Networking (TSN) enables deterministic and reliable delivery of AI-processed video and sensor data in a shared Ethernet network carrying mixed traffic.
8
-
9
-
Multiple Ethernet-connected RTSP cameras stream video to edge compute nodes where each frame is timestamped using a PTP-synchronized system clock and processed through an AI inference pipeline. In parallel, a simulated sensor data producer generates time-stamped telemetry data. Both video inference results and sensor data are published over MQTT to a centralized aggregation node.
10
-
11
-
The aggregation node subscribes to all MQTT topics and measures end-to-end latency by comparing the frame or sensor generation timestamp with the message reception time. Since all devices share a common time reference through IEEE 802.1AS (gPTP), the measured latency accurately reflects network and processing delays.
12
-
13
-
To evaluate the impact of network congestion, best-effort background traffic is intentionally injected using iperf. Without TSN traffic shaping, this background traffic interferes with critical video and sensor data, resulting in increased latency and jitter.
14
-
15
-
The experiment then enables VLAN-based traffic separation and IEEE 802.1Qbv (Time-Aware Shaper) on a TSN-capable switch to prioritize critical traffic. With TSN enabled, the system demonstrates consistent and deterministic latency for video and sensor data, even in the presence of heavy background traffic.
16
-
17
-
This use case validates how TSN can be used to protect latency-sensitive AI and sensor workloads in industrial and edge AI deployments.
18
-
19
-
---
3
+
This guide provides a streamlined path to setting up and running the Deterministic Threat
4
+
Detection demonstration. It covers the essential prerequisites and the main steps to see the
5
+
system in action.
20
6
21
7
## Hardware Details
22
8
23
9
-**AXIS RTSP Cameras**: Cameras that support RTSP streaming.
24
10
-**MOXA TSN Switch**: A switch that supports IEEE 802.1AS (PTP) and IEEE 802.1Qbv (Time-Aware Shaper).
25
11
-**Arrow Lake Machines**: Linux-based systems equipped with Intel i226 TSN-capable network cards.
26
12
27
-
---
28
-
29
13
## Network Topology
30
14
31
15
The experimental setup consists of:
@@ -34,25 +18,25 @@ The experimental setup consists of:
| Machine 1 | Camera 1 RTSP Capture + AI Inference |
44
28
| Machine 2 | Camera 2 RTSP Capture + AI Inference |
45
29
| Machine 3 | Sensor Data Producer (MQTT) |
46
30
| Machine 4 | MQTT Aggregator + Visualization |
47
31
| Machine 5 | Traffic Injector (`iperf`) |
48
32
49
-
All machines are connected to the MOXA switch and synchronized using PTP.
50
-
51
-
---
33
+
All machines are connected to a MOXA switch and synchronized using PTP.
52
34
53
35
## Steps to Test the Use Case
54
36
55
-
1.**Configure PTP on all machines**: Synchronize the system clocks of all machines to a common time reference using Precision Time Protocol (PTP). This is essential for accurate latency measurement.
37
+
1.**Configure PTP on all machines**: Synchronize the system clocks of all machines to a
38
+
common time reference using Precision Time Protocol (PTP). This is essential for accurate
39
+
latency measurement.
56
40
57
41
```bash
58
42
sudo apt-get update
@@ -62,17 +46,21 @@ All machines are connected to the MOXA switch and synchronized using PTP.
62
46
# Terminal 1: Run ptp4l to synchronize the PTP clock
Note: Make sure to replace `enp1s0` with the actual network interface name associated with the `i226` network card.
51
+
> **Note:** Make sure to replace `enp1s0` with the actual network interface name associated
52
+
> with the `i226` network card.
68
53
69
-
For detailed instructions on configuring PTP, refer to the [PTP Configuration Guide](./how-to-configure-ptp.md).
54
+
> For detailed instructions on configuring PTP, refer to the [PTP Configuration Guide](./how-to-guides/configure-ptp.md).
70
55
71
-
2. **Create VLAN on all machines**: Set up Virtual LANs (VLANs) to segregate network traffic, isolating critical data from best-effort traffic.
56
+
2.**Create VLAN on all machines**: Set up Virtual LANs (VLANs) to segregate network traffic,
57
+
isolating critical data from best-effort traffic.
72
58
73
-
Configure the VLAN on the MOXA as mentioned in the [MOXA VLAN Configuration Guide](./how-to-configure-vlan-on-moxa-switch.md) to assign vlan id on TSN switch.
59
+
> Configure the VLAN on the MOXA as mentioned in the [MOXA VLAN Configuration Guide](./how-to-guides/configure-vlan-on-moxa-switch.md) to assign VLAN ID on TSN switch.
60
+
61
+
On the Arrow Lake machines, create VLAN interfaces corresponding to the VLAN IDs
62
+
configured on the MOXA switch.
74
63
75
-
On the Arrow Lake machines, create VLAN interfaces corresponding to the VLAN IDs configured on the MOXA switch.
76
64
```bash
77
65
sudo ip link add link enp1s0 name enp1s0.1 type vlan id 1
78
66
sudo ip link set enp1s0.1 type vlan egress-qos-map 0:1
@@ -86,52 +74,38 @@ All machines are connected to the MOXA switch and synchronized using PTP.
86
74
sudo ip link set enp1s0.5 type vlan egress-qos-map 0:5
87
75
sudo ifconfig enp1s0.5 192.168.5.31 up
88
76
```
89
-
Note: Make sure to replace `enp1s0` with the actual network interface name associated with the `i226` network card.
90
77
91
-
For detailed instructions on creating VLANs on HOST machines, refer to the [HOST VLAN Configuration Guide](./how-to-create-vlan-on-all-machines.md).
78
+
> **Note:** Make sure to replace `enp1s0` with the actual network interface name associated
79
+
> with the `i226` network card.
80
+
81
+
> For detailed instructions on creating VLANs on HOST machines, refer to the [HOST VLAN Configuration Guide](./how-to-guides/create-vlan-on-all-machines.md).
92
82
93
83
3.**Run RTSP Camera Capture and AI Inference**: Start the video pipeline on Machines 1 and 2. This involves capturing the RTSP stream, timestamping frames using the PTP-synchronized clock, and running AI inference on the video and publish the results over MQTT.
94
84
95
-
For detailed instructions on running RTSP camera capture and AI inference, refer to the [RTSP Camera and AI Inference Guide](./how-to-run-rtsp-camera-and-ai-inference.md).
85
+
> For detailed instructions on running RTSP camera capture and AI inference, refer to the [RTSP Camera and AI Inference Guide](./how-to-guides/run-rtsp-camera-and-ai-inference.md).
96
86
97
87
4.**Run Sensor Data Producer**: On Machine 3, start the Python script that simulates a sensor generating and publishing timestamped data over MQTT.
98
88
99
-
For detailed instructions on running the sensor data producer, refer to the [Sensor Data Producer Guide](./how-to-run-sensor-data-producer.md).
89
+
> For detailed instructions on running the sensor data producer, refer to the [Sensor Data Producer Guide](./how-to-guides/run-sensor-data-producer.md).
100
90
101
91
5.**Run MQTT Aggregator and Visualization**: On Machine 4, launch the application that subscribes to the MQTT topics, calculates end-to-end latency, and displays it on a live dashboard.
102
92
103
-
<img src="./_images/mqtt-data-aggregator.png" alt="MQTT Data Aggregator" width="750">
93
+
<imgsrc="./_assets/mqtt-data-aggregator.png"alt="MQTT Data Aggregator"width="750">
104
94
105
-
For detailed instructions on running the MQTT aggregator and visualization, refer to the [MQTT Aggregator and Visualization Guide](./how-to-run-mqtt-aggregator-and-visualization.md).
95
+
> For detailed instructions on running the MQTT aggregator and visualization, refer to the
96
+
[MQTT Aggregator and Visualization Guide](./how-to-guides/run-mqtt-aggregator-and-visualization.md).
106
97
107
-
6. **Run Traffic Injector**: On Machine 5, use `iperf3` to generate high-volume background traffic to simulate network congestion.
98
+
6.**Run Traffic Injector**: On Machine 5, use iPerf3 to generate high-volume background
99
+
traffic to simulate network congestion.
108
100
109
-
<img src="./_images/mqtt-data-aggregator-with-traffic.png" alt="MQTT Data Aggregator With Traffic" width="750">
110
-
For detailed instructions on running the traffic injector, refer to the [Traffic Injector Guide](./how-to-run-traffic-injector.md).
101
+
<img src="./_assets/mqtt-data-aggregator-with-traffic.png" alt="MQTT Data Aggregator With Traffic" width="750">
102
+
103
+
> For detailed instructions on running the traffic injector, refer to the [Traffic Injector Guide](./how-to-guides/run-traffic-injector.md).
111
104
112
105
7.**Enable TSN Traffic Shaping**: Configure the Time-Aware Shaper (IEEE 802.1Qbv) on the MOXA switch to prioritize the critical traffic from cameras and sensors, protecting it from the background traffic.
113
106
114
-
<img src="./_images/moxa-time-aware-shaper-port-setting.png" alt="MOXA Time Aware Shaper" width="750">
115
-
116
-
For detailed instructions on enabling TSN traffic shaping, refer to the [TSN Traffic Shaping Guide](./how-to-enable-tsn-traffic-shaping.md).
117
-
118
-
8. **Analyze Results and Visualize Latency**: Observe the latency graphs on the MQTT Aggregator dashboard. With TSN enabled, the latency for critical traffic should remain low and deterministic, even with the `iperf` traffic running.
<imgsrc="./_assets/moxa-time-aware-shaper-port-setting.png"alt="MOXA Time Aware Shaper"width="750">
108
+
109
+
> For detailed instructions on enabling TSN traffic shaping, refer to the [TSN Traffic Shaping Guide](./how-to-guides/enable-tsn-traffic-shaping.md).
110
+
111
+
8.**Analyze Results and Visualize Latency**: Observe the latency graphs on the MQTT Aggregator dashboard. With TSN enabled, the latency for critical traffic should remain low and deterministic, even with the iPerf3 traffic running.
0 commit comments