Sending commands to multiple Terminal Sessions at one time

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:

  1. Ping the PC IP address – This refreshes the ARP and MAC-Address tables with the current MAC address and ports
  2. Determine the MAC address from the ARP table on a layer three device < show ip arp | include IP_ADDRESS >
  3. 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.

First enable Command (Chat) Window under View:

After the Chat Window has been enabled SecureCRT will have a blank box at the bottom of the screen as seen below:

The chat window alone will not send commands to all of the active sessions, that feature must b enabled by right clicking in the chat window and selecting “Send Commands to All Sessions”:

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!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s