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
mping, which was already available on the servers.
Installing new commands without going through the change process was considered non ethical by the change managment.
Type this into one terminal:
ifconfig eth2 up ifconfig ethO up tcpdump -i eth2 -c 3 arp net 10.10.10.10
and in another one that:
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 give a nice 0.0.0.0 source address, which I prefered as I was broadcasting and seemed unlikely to trigger any reply.