I have a tool that replays traffic from a .pcap file and another tool that interprets that traffic. For testing purposes, I need to play traffic out one interface and have it come in another. Obviously I could simply attach a crossover cable between two of my NICs, but surely there's a better way I could do this from within Linux? I've tried using a loopback interface (play traffic out lo, interpret traffic from lo) but it didn't work.
Is there a way that I could create virtual interfaces, and then bridge the two virtual interfaces? Ideally I would be able to play traffic out 'virt-eth1' and have my other tool listening on 'virt-eth2'. When the traffic is sent to virt-eth1, it should be bridged and come in on virt-eth2. What happens from there is of no consequence.