Skip to content

Commit 97f8e98

Browse files
[DOCS][Metro] Deterministic Threat Detection - prepublishing alignment (#1739)
1 parent 961c91c commit 97f8e98

24 files changed

Lines changed: 283 additions & 225 deletions
Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
# Deterministic Threat Detection with Time-Sensitive Networking (TSN)
22

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.
46

57
## Overview
68

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:
811

912
- Multi-camera video acquisition over Ethernet
1013
- 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
1619

1720
## Use Case
1821

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.
2025

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.
2229

2330
## Getting Started
2431

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).

metro-ai-suite/deterministic-threat-detection/docs/user-guide/_images/TSN-Network-Topology.svg renamed to metro-ai-suite/deterministic-threat-detection/docs/user-guide/_assets/TSN-Network-Topology.svg

File renamed without changes.

metro-ai-suite/deterministic-threat-detection/docs/user-guide/_images/moxa-time-aware-shaper-port-setting.png renamed to metro-ai-suite/deterministic-threat-detection/docs/user-guide/_assets/moxa-time-aware-shaper-port-setting.png

File renamed without changes.

metro-ai-suite/deterministic-threat-detection/docs/user-guide/_images/moxa-time-aware-shaper.png renamed to metro-ai-suite/deterministic-threat-detection/docs/user-guide/_assets/moxa-time-aware-shaper.png

File renamed without changes.

metro-ai-suite/deterministic-threat-detection/docs/user-guide/_images/moxa-vlan-configuration.png renamed to metro-ai-suite/deterministic-threat-detection/docs/user-guide/_assets/moxa-vlan-configuration.png

File renamed without changes.

metro-ai-suite/deterministic-threat-detection/docs/user-guide/_images/moxa-vlan-port-configuration.png renamed to metro-ai-suite/deterministic-threat-detection/docs/user-guide/_assets/moxa-vlan-port-configuration.png

File renamed without changes.

metro-ai-suite/deterministic-threat-detection/docs/user-guide/_images/moxa-webui.png renamed to metro-ai-suite/deterministic-threat-detection/docs/user-guide/_assets/moxa-webui.png

File renamed without changes.

metro-ai-suite/deterministic-threat-detection/docs/user-guide/_images/mqtt-data-aggregator-with-traffic.png renamed to metro-ai-suite/deterministic-threat-detection/docs/user-guide/_assets/mqtt-data-aggregator-with-traffic.png

File renamed without changes.

metro-ai-suite/deterministic-threat-detection/docs/user-guide/_images/mqtt-data-aggregator.png renamed to metro-ai-suite/deterministic-threat-detection/docs/user-guide/_assets/mqtt-data-aggregator.png

File renamed without changes.
Lines changed: 39 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,15 @@
1-
# Getting Started
1+
# Get Started
22

3-
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.
206

217
## Hardware Details
228

239
- **AXIS RTSP Cameras**: Cameras that support RTSP streaming.
2410
- **MOXA TSN Switch**: A switch that supports IEEE 802.1AS (PTP) and IEEE 802.1Qbv (Time-Aware Shaper).
2511
- **Arrow Lake Machines**: Linux-based systems equipped with Intel i226 TSN-capable network cards.
2612

27-
---
28-
2913
## Network Topology
3014

3115
The experimental setup consists of:
@@ -34,25 +18,25 @@ The experimental setup consists of:
3418
- **1 × [Moxa Managed Switch TSN-G5000 Series](https://www.moxa.com/getmedia/a0db0ef9-2741-4bad-91c6-1ec1827aca64/moxa-tsn-g5000-series-web-console-manual-v2.3.pdf)**
3519
- **5 × Arrow Lake Linux Machines with `Intel i226` TSN network cards**
3620

37-
![TSN Network Topology](./_images/TSN-Network-Topology.svg)
21+
![TSN Network Topology](./_assets/TSN-Network-Topology.svg)
3822

3923
### Logical Roles
4024

4125
| Machine | Role |
42-
|------|------|
26+
|---------|------|
4327
| Machine 1 | Camera 1 RTSP Capture + AI Inference |
4428
| Machine 2 | Camera 2 RTSP Capture + AI Inference |
4529
| Machine 3 | Sensor Data Producer (MQTT) |
4630
| Machine 4 | MQTT Aggregator + Visualization |
4731
| Machine 5 | Traffic Injector (`iperf`) |
4832

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.
5234

5335
## Steps to Test the Use Case
5436

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.
5640

5741
```bash
5842
sudo apt-get update
@@ -62,17 +46,21 @@ All machines are connected to the MOXA switch and synchronized using PTP.
6246
# Terminal 1: Run ptp4l to synchronize the PTP clock
6347
sudo ptp4l -i enp1s0 -f configs/gPTP.cfg --step_threshold=1 -m -s
6448
# Terminal 2: Run phc2sys to synchronize the system clock to the PTP clock
65-
sudo phc2sys -s enp1s0 -c CLOCK_REALTIME --step_threshold=1 --transportSpecific=1 -w -m
49+
sudo phc2sys -s enp1s0 -c CLOCK_REALTIME --step_threshold=1 --transportSpecific=1 -w -m
6650
```
67-
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.
6853
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).
7055
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.
7258

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.
7463

75-
On the Arrow Lake machines, create VLAN interfaces corresponding to the VLAN IDs configured on the MOXA switch.
7664
```bash
7765
sudo ip link add link enp1s0 name enp1s0.1 type vlan id 1
7866
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.
8674
sudo ip link set enp1s0.5 type vlan egress-qos-map 0:5
8775
sudo ifconfig enp1s0.5 192.168.5.31 up
8876
```
89-
Note: Make sure to replace `enp1s0` with the actual network interface name associated with the `i226` network card.
9077

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).
9282
9383
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.
9484

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).
9686
9787
4. **Run Sensor Data Producer**: On Machine 3, start the Python script that simulates a sensor generating and publishing timestamped data over MQTT.
9888

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).
10090
10191
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.
10292

103-
<img src="./_images/mqtt-data-aggregator.png" alt="MQTT Data Aggregator" width="750">
93+
<img src="./_assets/mqtt-data-aggregator.png" alt="MQTT Data Aggregator" width="750">
10494

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).
10697

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.
108100

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).
111104
112105
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.
113106

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.
119-
120-
<!--hide_directive
121-
:::{toctree}
122-
:hidden:
123-
124-
get-started
125-
how-to-configure-moxa-switch‎
126-
how-to-configure-ptp
127-
how-to-configure-vlan-on-moxa-switch
128-
how-to-configure-vlan-on-all-machines
129-
how-to-enable-tsn-traffic-shaping
130-
how-it-run-mqtt-aggregator-and-visualization
131-
how-to-run-rtsp-camera-and-ai-inference
132-
how-to-run-sensor-data-producer‎
133-
how-to-run-traffic-injector‎
134-
135-
Source Code < https://github.com/open-edge-platform/edge-ai-suites/blob/main/metro-ai-suite/deterministic threat detection/docs/user-guide>
136-
:::
137-
hide_directive-->
107+
<img src="./_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

Comments
 (0)