Using nemesis-udp to simulate local host
Looked around, couldn't find similar threads. If I missed anything, please forgive me.
Here is my setup.
1. I am using nemesis as a simulation tool for a distributed application.
2. For testing purposes, my distributed application basically listens to a UDP port (#50000) for incoming packets. When it receives the packets, it prints out the details to stdout. Packets can come from remote peers or from the localhost itself.
3. nemesis is used to simulate both the remote peers (10 of them) and the local host itself (which means the test host will receive a UDP packet on the network interface where the source and destination IP addresses are the same).
Here is my problem.
When both my test application and the nemesis program are run on the same platform (my Ubuntu laptop), everything works fine. All packets received are printed to stdout.
However, when the test application is run on a separate box (another Ubuntu platform), all except one packet are received by the test application.
I have verified the following:
- all packet contents are the same
- all destination IPs and ports are the same
- the receiving computer receives all packets, as per tcpdump
- the receiving application does not receive the UDP packet that pretends to be coming from the localhost itself.
Here is my question:
Why is the packet "pretending to be from the receiving host" not being handed over to the application?
Could it be that the network stack may be discarding packets that should have a source IP different than that of the local host itself?
Any help is appreciated.