I am building a client/server application that uses several network interfaces in parallel for redundancy, and I have noticed that while one network interface goes down or goes up, the communication on other interfaces hangs for several seconds.
I could reproduce this behavior without my application in a simple way:
- there are 2 interfaces available on computer 1 ( Ethernet and WiFi )
- ping from computer 2 the IP address of the Ethernet connection of computer 1
- disconnect the WiFi of computer 1
- ping hangs for seconds, and then the packets are traveling again between the 2 computers.
The hanging happens as well if I turn back on the WiFi connection on computer 1. It happens as well if I ping the WiFi IP, and turn off/on the Ethernet connection ( or unplug/plug the cable).
I am using Linux Ubuntu 12.04 on both computers.
Any ideas why is this happening, and if / how can it be avoided?