Search code examples
network-programmingpacket

Asymmetric packet round trip time?


Recently, our project has been through a situation which machine A and machine B has different round trip time against each other.

ex. machine A sends a packet to B and it arrives in several milliseconds, while machine B sends a packet to A and it arrives in several MINUTES! Sometimes it is simply lost.

Our setup is fairly simple: machine A and machine B connect to the same router.

It works just fine mostly. However, sometimes the situation described in the example above will happen after we run a stress test for one or two days.

Finally, our underlying API is Raknet. Packets are sent in IMMEDIATE priority.

Any comments is appreciated.

Thanks!


Solution

  • As with any problem, you're going to need to start narrowing down the conditions under which it happens. Right now you're basically saying, "we have a problem that happens sometimes". That makes it hard to give anything other than a general answer.

    The first thing to do is start simplifying your setup. Can you connect the two systems directly with a crossover cable? If not, try a simple 10/100 hub if you can find one. Eliminate the router if at all possible.

    If the problem still occurs, you'll need to see what else might be happening. Maybe set up Wireshark on both machines with a circular buffer to hold the last several MB of data. Then try and stop the data capture when it happens and look for weirdness.