Ping command doesn't work in second ethernet interface in linux if both are configured in same subnet

If two interfaces are in same subnet then there could be a chance for linux kernel to choose the first to appear on routing table.

use route command to cross check routing table.

Because chances are there in linux kernel where it sees ICMP request through Interface 2 and sending ICMP reply on Interface 1, which hosts discards.
Use wireshark if you wants to troubleshoot and verify.

so for Ping Command use option -I
eg: ping -I eth0 x.x.x.x

This is applicable to wireless interface as well.

Last updated: Jan 01, 2024

Filed Under

Network

Recently Viewed

No recently viewed articles

Did you find this article helpful?