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
Copy file name to clipboardExpand all lines: articles/private-5g-core/data-plane-packet-capture.md
+12-13Lines changed: 12 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ ms.custom: template-how-to
12
12
13
13
# Perform data plane packet capture for a packet core instance
14
14
15
-
Packet capture for data plane packets is performed using the **UPF Trace (UPFT)** tool. UPFT is similar to **tcpdump**, a data-network packet analyzer computer program that runs on a command line interface. You can use this tool to monitor and record packets on any user plane interface on the access network or data network on your device.
15
+
Packet capture for data plane packets is performed using the **UPF Trace (UPFT)** tool. UPFT is similar to **tcpdump**, a data-network packet analyzer computer program that runs on a command line interface. You can use this tool to monitor and record packets on any user plane interface on the access network (N3 interface) or data network (N6 interface) on your device.
16
16
17
17
Data plane packet capture works by mirroring packets to a Linux kernel interface, which can then be monitored using tcpdump. In this how-to guide, you'll learn how to perform data plane packet capture for a packet core instance.
18
18
@@ -29,34 +29,33 @@ Data plane packet capture works by mirroring packets to a Linux kernel interface
29
29
30
30
1. In a command line with kubectl access to the Azure Arc-enabled Kubernetes cluster, enter the UPF-PP troubleshooter pod:
1. View the list of interfaces that can be monitored:
35
35
36
-
`upft list`.
36
+
`upft list`
37
+
37
38
38
39
1. Either:
39
-
- Run `upftdump` with any parameters that you would usually pass to tcpdump. In particular, `-i` to specify the interface, and `-w` to specify where to write to. Close the UPFT tool when done by pressing <kbd>Ctrl + C</kbd>.
40
-
- Or if you wish to enable packet capture and run tcpdump separately:
41
-
1. Enable packet capture by running `upft start <interface> <duration>`, where
42
-
- \<interface\> specifies the interface or interfaces to enable capture on. You can specify `any` to enable packet capture on all possible interfaces.
43
-
- \<duration\> specifies the time in seconds before packet capture automatically disables.
44
-
1. Type *yes* when prompted and then press <kbd>Enter</kbd> to continue.
45
-
1. Run `tcpdump` on the interface.
46
-
1. Once complete, run `upft stop <interface>` to disable packet capture if the timer has not expired.
40
+
- Run `upftdump` with any parameters that you would usually pass to tcpdump. In particular, `-i` to specify the interface, and `-w` to specify where to write to. Close the UPFT tool when done by pressing <kbd>Ctrl + C</kbd>. The following examples are common use cases:
41
+
- To run capture packets on all interfaces run `upftdump -i any -w any.pcap`
42
+
- To run capture packets for the N3 interface and the N6 interface for a single data network, enter the UPF-PP troubleshooter pod in two separate windows. In one window run `upftdump -i n3trace -w n3.pcap` and in the other window run `upftdump -i <N6 interface> -w n6.pcap` (use the N6 interface for the data network as identified in step 2).
43
+
44
+
> [!IMPORTANT]
45
+
> Packet capture files may be large, particularly when running packet capture on all interfaces. Specify filters when running packet capture to reduce the file size - see the tcpdump documentation for the available filters.
47
46
1. Leave the container:
48
47
49
48
`exit`
50
49
51
50
1. Copy the output files:
52
51
53
-
`kubectl cp -n core core-upf-pp-0: <path to output file> <location to copy to> -c troubleshooter`.
52
+
`kubectl cp -n core core-upf-pp-0: <path to output file> <location to copy to> -c troubleshooter`
54
53
55
54
The `tcpdump` may have been stopped in the middle of writing a packet, which can cause this step to produce an error stating `unexpected EOF`. However, your file should have copied successfully, but you can check your target output file to confirm.
0 commit comments