I have to secure interfaces on Linux servers by setting bonding interfaces. The cabling information is not accurate.
Is there a simple way to know if two interfaces are connected to the same LAN?
Some interfaces have no IP, if possible I would prefer to not set dummies IPs.
I finally did it using
arping, it was already installed on the servers:
ifconfig eth2 up ifconfig ethO up tcpdump -i eth2 -c 3 arp net 10.10.10.10
and in another terminal :
arping -D -I eth0 10.10.10.10
tcpdump should displays lines like that:
16:15:43.032103 arp who-has 10.10.10.10 (Broadcast) tell 0.0.0.0 16:15:44.032277 arp who-has 10.10.10.10 (Broadcast) tell 0.0.0.0 16:15:45.032441 arp who-has 10.10.10.10 (Broadcast) tell 0.0.0.0
-D is optional but it gives a nice 0.0.0.0 source address.