An welchem Switch hängt mein Rechner und an welchem Port?
Fragen, die bei der Fehlersuche im Netzwerk sehr nützlich sind.
CDP (Cisco Discovery Protocol)
yum install cdpr
# cdpr -h
cdpr - Cisco Discovery Protocol Reporter
Version 2.4
Copyright (c) 2002-2010 - MonkeyMental.com
d: Specify device to use (eth0, hme0, etc.)
h: Print this usage
t: time in seconds to abort waiting for a packet (should be > 60)
v[vv]: Set verbose mode
r: read from file instead of network device
** Options dealing with server updates: **
u: Send cdpr information to a cdpr server
requires config file as arg
l: Location/description of this port for use with -u or -s and -p
n: Override the hostname reported to the server for use with -u or -s and -p
s: Server to send information to specify port with a : after Server/IP
Example: 192.168.1.20:88 (default: 80) requires -p (overridden by -u)
p: Path of server script to send data to requires -s (overridden by -u)
Eine Suche für das Interface eth0
ist also:
cdpr -d eth0
Sollte man noch mehr Informationen haben wollen (Gerätetyp, Netzwerkkartentyp, VTP Domain), heißt es:
cdpr -d eth0 -vvv
Mit dem Parameter -u ist es sogar möglich, die Daten an einen Server zu schicken. Konfirurationen findet man unter /usr/share/doc/cdpr-2.4/README.cdprs
Diskussion