linuxnetwork-programmingtcpdumptcpreplay

Using tcpreplay for vxlan packets


I am quite unfamiliar with the way tcpreplay works and I just started using it.

I am feeding a pcap of vxlan packets to an ethernet interface that has vxlan configured on top of it. Can we see the decapsulated packets on the vxlan interface? Do I need to tweak the ip/mac? Is it even possible or am I trying something weird?

Is there any other way to achieve what I am trying to do? Basically receive vxlan pcap, decapsulate the vxlan headers and send it to an interface. Any help is much appreciated.


Solution

  • No, you can't send the vxlan packets on an interface and see the decapsulated frames on the sub-interface on the same host... at least on Linux because the frame is immediately sent out and won't be seen as an inbound packet.

    You'd need to sniff the packets on another host/NIC and set the IP/MAC to that remote host.