Skip to content

Instantly share code, notes, and snippets.

@spellancer
Created July 6, 2015 12:21
Show Gist options
  • Save spellancer/01011fa9a88f8cb97998 to your computer and use it in GitHub Desktop.
Save spellancer/01011fa9a88f8cb97998 to your computer and use it in GitHub Desktop.
tcpdump cdp
#!/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