I have a machine with three network cards. One card is connected to a WAN and the other two cards are connected to the same switch with the same subnet (192.168.1.0/24). What I want to do is send data between the two cards, but make sure the data actually goes through the switch, rather than stay internal to the Linux network stack.
When I set up the two cards normally and try to ping one from the other, it works but Wireshark does not show any traffic, so it is not going to the network.
I have tried setting up static routes to the switch trying to force all traffic to have to go through the switch. When I do this, the pings are net responded to and I get a flood of unanswered ARP requests trying to find the other address. But either address can ping another machine on the subnet, and that machine can ping either address.
I have tried changing the arp filter settings on the Linux Kernel, but no luck.
Any suggestions? Thanks!
Also, bonus points for setting up one NIC with IP aliasing to do the same thing.