Skip to content

Commit bfe7daf

Browse files
authored
Merge pull request #229089 from James-Green-Microsoft/packet-caputre-fix
Fixes based on bug 537183
2 parents 3bb82e6 + 241660f commit bfe7daf

File tree

1 file changed

+12
-15
lines changed

1 file changed

+12
-15
lines changed

articles/private-5g-core/data-plane-packet-capture.md

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ms.custom: template-how-to
1212

1313
# Perform data plane packet capture for a packet core instance
1414

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

1717
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.
1818

@@ -29,34 +29,31 @@ Data plane packet capture works by mirroring packets to a Linux kernel interface
2929

3030
1. In a command line with kubectl access to the Azure Arc-enabled Kubernetes cluster, enter the UPF-PP troubleshooter pod:
3131

32-
`kubectl exec -it -n core core-upf-pp-0 -c troubleshooter -- bash`.
32+
`kubectl exec -it -n core core-upf-pp-0 -c troubleshooter -- bash`
3333

3434
1. View the list of interfaces that can be monitored:
3535

36-
`upft list`.
37-
38-
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.
36+
`upft list`
37+
38+
1. 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:
39+
- To run capture packets on all interfaces run `upftdump -i any -w any.pcap`
40+
- 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).
41+
42+
> [!IMPORTANT]
43+
> 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.
4744
1. Leave the container:
4845

4946
`exit`
5047

5148
1. Copy the output files:
5249

53-
`kubectl cp -n core core-upf-pp-0:<path to output file> <location to copy to> -c troubleshooter`.
50+
`kubectl cp -n core core-upf-pp-0: <path to output file> <location to copy to> -c troubleshooter`
5451

5552
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.
5653

5754
1. Remove the output files:
5855

59-
`kubectl exec -it -n core core-upf-pp-0 -c troubleshooter – bash rm`
56+
`kubectl exec -it -n core core-upf-pp-0 -c troubleshooter –- bash rm <path to output file>`
6057

6158
## Next steps
6259

0 commit comments

Comments
 (0)