Ok here’s a recipe to try:
- Get a development board or PC that has two or more network interfaces,
- Assign each of them with a unique IP address,
- Connect the interfaces to a common network,
- Finally, ping one of the IP addresses from another machine.
Now, depending on which IP address you chose to ping, you may find that your pings will suddenly fail to respond and timeout when you disconnect the other interface (i.e. the interface you are not pinging). Bizarre, isn’t it?
However, as my colleague and I recently discovered whilst debugging a new Ethernet driver, this gotcha is actually correct behaviour for Linux – and in fact it is correct behaviour as defined by the relevant RFC’s. I thought I’d use this post to discover what is going on and why this is OK.