MAC Address Formatting Conversions
My work is now using non-Cisco devices as their gateway, which means I've been spending a decent amount of time converting Standard MAC Addresses to Cisco whenever I need to rundown an issue based on its IP address. Because of this I've create the two functions to convert the MACs back and forth for these formats. Below is the script I use and the process for adding it to your .bashrc file. How it works when you're done tc = "to Cisco" from Standard fc = "from Cisco" to Standard Script # ------------------------------------------------------------------------------ _tocisco() # ------------------------------------------------------------------------------ # Changes standard format MACs to Cisco's amazing '.' format { # Use a standard format MAC like 'F4:15:63:C9:30:CD' # and this will convert to 'f415.63c9.30cd' if [ "$1" != "" ] then _arg=`echo $1` echo $_arg | s...