Replies: 5 comments 1 reply
-
Yeah, we could have "netlab capture" that would run tcpdump. Can tcpdump do decapsulation on the fly or is there something else we could add there to do the decapsulation? It would be nice for netlab capture to produce a clean stream of packets |
Beta Was this translation helpful? Give feedback.
-
Unfortunately it's not a real decapsulation, but a "parse this udp as eth" - and tcpdump does not support it. On a CLI the same can be shown with tshark, i.e. however, if you save the pcap file, it will have the additional "UDP" headers: (and, if you open it later, you need to apply the "parsing filter" again). OTOH there could be a workaround, implementing two "methods":
I already tried to use a pipeline |
Beta Was this translation helpful? Give feedback.
-
(and if you are asking "how can they do live sniffing on GNS3"... they implemented an user space "bridge" that they always put in the middle in every link, with the capability to sniff in real time ;) https://github.com/GNS3/ubridge ) |
Beta Was this translation helpful? Give feedback.
-
Example with "offline" edit with editcap:
|
Beta Was this translation helpful? Give feedback.
-
We may be able to use eBPF filters to selectively monitor traffic and strip UDP headers if needed. I have played a bit with eBPF here: https://github.com/jbemmel/srl-evpn-proxy/blob/main/src/static-vxlan-agent/filter-vxlan-arp.c For example, here https://android.googlesource.com/kernel/common/+/f88eb7c0d002/samples/bpf/xdp_tx_iptunnel_kern.c is an XDP example program that adds an IP header and tunnels packets. Removing an UDP header should be similar. CloudFlare has created xdpcap (https://github.com/cloudflare/xdpcap) which might help to capture the output of such an XDP program |
Beta Was this translation helpful? Give feedback.
-
Live packet capture, i.e. with tcpdump or wireshark, is essentials for troubleshooting stuff, but also for better learn all the different protocols.
When using libvirt p2p links, the packets are "raw encapsulated" inside UDP.
It's annoying to force wireshark to decapsulate "udp port X" as ethernet on every new capture, so I created a script to pass the right info to the wireshark command line (and to perform remote sniffing - I am using netlab remotely, but of course this can be run directly with a local wireshark instance) (
-d "udp.port==10002,eth"
):I think we can
1 - document this trick on the documentation
2 - in the future create a command wrapper through "netlab" command tool.
Beta Was this translation helpful? Give feedback.
All reactions