Skip to content

Instantly share code, notes, and snippets.

@martinkennelly
Last active October 18, 2023 12:24
Show Gist options
  • Save martinkennelly/ad37bc7e022b737676ff47f0f655c142 to your computer and use it in GitHub Desktop.
Save martinkennelly/ad37bc7e022b737676ff47f0f655c142 to your computer and use it in GitHub Desktop.
Easily tracing a packet with ofproto/trace and ovs-tcpundump
# Get packet info thatll later be used for the trace. This info describes the flow.
1. tcpdump -XX -c1 -nn -i <dev> <some filter thatll just capture the flow you want> | ovs-tcpundump
# Lookup the port ID on which the packet is coming in
2. ovs-ofctl show <ovs bridge>
# Perform trace
ovs-appctl ofproto/trace <ovs bridge> in_port=${port id in step 2} ${pkt data from step 1}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment