Are you on a Cisco Network – and need to know just what switch and port you are on?
Then visit monkeymetal.com
and get the latest tarball of the cdpr source.
Change the Makefile line for CDFLAGS to look like this:
CFLAGS = -Wall -ggdb -lpcap -I/sw/include
If it compiles all is well and run as follows…
sudo ./cdpr (Or if you copy the cdpr into a dir in your path just plain “sudo cdpr”.)
When it launches cdpr will ask what ethernet interface to look at.
If all is well it will return the DEVICE ID of the switch you are connected to, and its IP AND its port ID.
The cdpr utility can be very useful when central IT doesn’t know where everything is connected.