Determine hostname of connected ethernet switch

Posted by Beastcraft on Server Fault See other posts from Server Fault or by Beastcraft
Published on 2012-10-18T09:18:33Z Indexed on 2012/10/18 11:03 UTC
Read the original article Hit count: 221

Filed under:
|
|

I've a bonding on two interfaces. I'd like to monitor wether they are connected to different switches (the switches have hostnames). ethX should be connected to switchX and ethY to switchY.

Currently I'm checking this with following command:

tcpdump -vv -s0 -i ethX ether host 01:00:0c:cc:cc:cc

After a minute it prints out the hostname (and much more information) from the switch.

Are there any other solutions to monitor this?

Greeting

© Server Fault or respective owner

Related posts about bash

Related posts about scripting