lldpd and cdpr: finding the switch port from Linux

An article on Debian Administration got my attention today, since it listed something my colleague just showed to me the other day.

Often, when debugging network issues, you call up some support guy and he wants to know which switch ports your NIC is using. Often, you're in the office and the server is in a distant data center. So getting to the cables is next impossible or very time-consuming at the very least. And often, documentation is not trusted because you are having problems to begin with.

Using CDPR or the less brand-specific lldpd can become a god-sent tool. It allows you to monitor Cisco Discovery Protocol packets from the command line and tell the network admin exactly what he needs to know. :)

Solaris admins have snoop to make use of. Linux guys can also use tcpdump:
tcpdump -nn -v -i  -s 1500 -c 1 ‘ether[20:2] == 0×2000’

No comments: