docs: fix talosctl pcap example indentation

Fixes whitespaces in examples.

Signed-off-by: Oscar Utbult <oscar.utbult@gmail.com>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
This commit is contained in:
Oscar Utbult 2023-11-16 19:04:56 +01:00 committed by Andrey Smirnov
parent de6caf5348
commit 0eb245e043
No known key found for this signature in database
GPG Key ID: FE042E3D4085A811
2 changed files with 16 additions and 16 deletions

View File

@ -41,23 +41,23 @@ var pcapCmd = &cobra.Command{
Default behavior is to decode the packets with internal decoder to stdout: Default behavior is to decode the packets with internal decoder to stdout:
talosctl pcap -i eth0 talosctl pcap -i eth0
Raw pcap file can be saved with --output flag: Raw pcap file can be saved with --output flag:
talosctl pcap -i eth0 --output eth0.pcap talosctl pcap -i eth0 --output eth0.pcap
Output can be piped to tcpdump: Output can be piped to tcpdump:
talosctl pcap -i eth0 -o - | tcpdump -vvv -r - talosctl pcap -i eth0 -o - | tcpdump -vvv -r -
BPF filter can be applied, but it has to compiled to BPF instructions first using tcpdump. BPF filter can be applied, but it has to compiled to BPF instructions first using tcpdump.
Correct link type should be specified for the tcpdump: EN10MB for Ethernet links and RAW Correct link type should be specified for the tcpdump: EN10MB for Ethernet links and RAW
for e.g. Wireguard tunnels: for e.g. Wireguard tunnels:
talosctl pcap -i eth0 --bpf-filter "$(tcpdump -dd -y EN10MB 'tcp and dst port 80')" talosctl pcap -i eth0 --bpf-filter "$(tcpdump -dd -y EN10MB 'tcp and dst port 80')"
talosctl pcap -i kubespan --bpf-filter "$(tcpdump -dd -y RAW 'port 50000')" talosctl pcap -i kubespan --bpf-filter "$(tcpdump -dd -y RAW 'port 50000')"
As packet capture is transmitted over the network, it is recommended to filter out the Talos API traffic, As packet capture is transmitted over the network, it is recommended to filter out the Talos API traffic,
e.g. by excluding packets with the port 50000. e.g. by excluding packets with the port 50000.

View File

@ -2421,23 +2421,23 @@ The command launches packet capture on the node and streams back the packets as
Default behavior is to decode the packets with internal decoder to stdout: Default behavior is to decode the packets with internal decoder to stdout:
talosctl pcap -i eth0 talosctl pcap -i eth0
Raw pcap file can be saved with --output flag: Raw pcap file can be saved with --output flag:
talosctl pcap -i eth0 --output eth0.pcap talosctl pcap -i eth0 --output eth0.pcap
Output can be piped to tcpdump: Output can be piped to tcpdump:
talosctl pcap -i eth0 -o - | tcpdump -vvv -r - talosctl pcap -i eth0 -o - | tcpdump -vvv -r -
BPF filter can be applied, but it has to compiled to BPF instructions first using tcpdump. BPF filter can be applied, but it has to compiled to BPF instructions first using tcpdump.
Correct link type should be specified for the tcpdump: EN10MB for Ethernet links and RAW Correct link type should be specified for the tcpdump: EN10MB for Ethernet links and RAW
for e.g. Wireguard tunnels: for e.g. Wireguard tunnels:
talosctl pcap -i eth0 --bpf-filter "$(tcpdump -dd -y EN10MB 'tcp and dst port 80')" talosctl pcap -i eth0 --bpf-filter "$(tcpdump -dd -y EN10MB 'tcp and dst port 80')"
talosctl pcap -i kubespan --bpf-filter "$(tcpdump -dd -y RAW 'port 50000')" talosctl pcap -i kubespan --bpf-filter "$(tcpdump -dd -y RAW 'port 50000')"
As packet capture is transmitted over the network, it is recommended to filter out the Talos API traffic, As packet capture is transmitted over the network, it is recommended to filter out the Talos API traffic,
e.g. by excluding packets with the port 50000. e.g. by excluding packets with the port 50000.