Grabbing the ARP table normally looks like this:
arp -an | grep -vi 'incomplete'
You can pipe in the ‘sed’ (stream editor) command to remove the colons and replace them with periods every 4 characters instead, and use the ‘tr’ (translator) command to change the case from upper to lower:
arp -an | sed -e 's/\(..\):\(..\)/\1\2/g' | tr ':[:upper:]' '.[:lower:]'
Now you can copy the output for use in Cisco devices.
arp -an | sed -e 's/\(..\):\(..\)/\1\2/g' | tr ':[:upper:]' '.[:lower:]' | grep 10.10.83.159
SecureCRT Button
If
you’re lazy (or efficient) like me, you’ll just add this to your button bar in
SecureCRT, and you’ll need to use double up on the backslashes ‘\’ as a single
backslash is seen as an escape character. arp -an | sed -e 's/\\(..\\):\\(..\\)/\\1\\2/g' | tr ':[:upper:]' '.[:lower:]'
All