Created
July 6, 2015 12:21
-
-
Save spellancer/01011fa9a88f8cb97998 to your computer and use it in GitHub Desktop.
tcpdump cdp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ -z "$1" ] ; then | |
echo "Usage: command interface " | |
else | |
sudo tcpdump -nn -v -i $1 -s 1500 -c 1 'ether[20:2] == 0x2000' | grep -E 'Device-ID|Port-ID' | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment