A few weeks ago I had to hunt down PCs but had no idea where they physically were or what switchports they were connected to. To determine the location of a PC the following steps were taken:
- Ping the PC IP address – This refreshes the ARP and MAC-Address tables with the current MAC address and ports
- Determine the MAC address from the ARP table on a layer three device < show ip arp | include IP_ADDRESS >
- Trace the MAC address to it’s port < show mac address-table address MAC_ADDRESS >
While in a normal environment, the most switches that have to be touched is usually two (the default gateway, and the switch the device is connected to). However, for this instance 9 switches were daisy chained together in a ring like fashion… Throw in the fact roughly 35 devices needed to be traced I got tired of clicking through all of the terminal sessions and tracing the MAC address I got annoyed pretty quickly… Luckily I remembered something that stuck out to me from one of the wonderful CBT Nuggets of the VIRL series by Anthony Sequeira. He had mentioned the Command (Chat) Window in SecureCRT that could be used to send the same commands to multiple sessions at the same time. After poking around for a few minutes I figured out how to enable the chat window and have it send commands to every active session. Once setup tracking down those PCs was a lot less time consuming!
Setting up Command Chat is pretty straight forward.
After that anything typed into the chat window will be sent to all active sessions!
Here is the command window in action:
As with anything always be mindful of what you are doing! Having sessions open that you may forget about and then push commands to can be very very bad!!
A few examples of when this can come in handy are:
- Tracing MAC addresses
- Tracing routes across the network
- Creating the same VLANS across multiple switches
- Pushing standard configurations for initial configurations in VIRL
- Many more!