HARDWARE
Switch OR Router (Password Protected)
Rollover Cable
Laptop w/ Serial Port OR USB to Serial Adapter
SOFTWARE
Linux OS
Minicom
Switch OR Router (Password Protected)
Rollover Cable
Laptop w/ Serial Port OR USB to Serial Adapter
SOFTWARE
Linux OS
Minicom
Minicom Program...
Minicom is a text-based serial port communications program. It is used to talk to external RS-232 devices such as mobile phones, routers, and serial console ports.
Purpose of Demo...
To walk you through how to establish a serial connection to Cisco equipment using Linux. There are numerous applications to accomplish this but we will leverage Minicom in this tutorial.
Demonstration in a nutshell:
Minicom is a text-based serial port communications program. It is used to talk to external RS-232 devices such as mobile phones, routers, and serial console ports.
Purpose of Demo...
To walk you through how to establish a serial connection to Cisco equipment using Linux. There are numerous applications to accomplish this but we will leverage Minicom in this tutorial.
Demonstration in a nutshell:
- Install Minicom on the Linux OS (Kali Linux)
- Set Cisco Console Parameters
- Connect Network Topology
- Test Connection!
1. Install Minicom on the Linux OS (Kali Linux)
We will first need to obtain the Minicom application. In this demonstration, I will be using Kali Linux as this lab is intended to support an Ethical Hacking series.
Verify Internet Connectivity
Ensure your OS has an Internet connection. To test, you can open a terminal prompt and ping Google’s DNS Server (8.8.8.8)
Linux Commands
root@kali:~# ping 8.8.8.8
We will first need to obtain the Minicom application. In this demonstration, I will be using Kali Linux as this lab is intended to support an Ethical Hacking series.
Verify Internet Connectivity
Ensure your OS has an Internet connection. To test, you can open a terminal prompt and ping Google’s DNS Server (8.8.8.8)
Linux Commands
root@kali:~# ping 8.8.8.8
A reply from the 8.8.8.8 device indicates we are connected to the Internet. To stop the ping, use [crtl] + [c].
After confirming our Internet connection, let's install the minicom application. We will use the Advanced Packaging Tool (apt-get) to locate, download and install the Minicom application.
Linux Commands
root@kali:~# apt-get install minicom
After confirming our Internet connection, let's install the minicom application. We will use the Advanced Packaging Tool (apt-get) to locate, download and install the Minicom application.
Linux Commands
root@kali:~# apt-get install minicom
NOTE: To install the application, you will need root access which in this example, I already have. If you are using a de-privileged account, you will need to “sudo” the command (below).
root@kali:~# sudo apt-get install minicom
sudo will allow you to execute the apt-get command with the privileges of root and may require the root password.
Determine the Serial Port mapping in Linux
Within the Linux OS, the serial port name will be needed to configure Minicom to use it for our connection. Serial ports are designated as “/dev/ttys#” where the # will be replaced with a port assignment number. In the above, /dev is the directory where device files are stored/listed, /tty represents TeleTypewriter devices and s# is the actual serial port.
Linux Commands
root@kali:~# dmesg | grep tty
root@kali:~# sudo apt-get install minicom
sudo will allow you to execute the apt-get command with the privileges of root and may require the root password.
Determine the Serial Port mapping in Linux
Within the Linux OS, the serial port name will be needed to configure Minicom to use it for our connection. Serial ports are designated as “/dev/ttys#” where the # will be replaced with a port assignment number. In the above, /dev is the directory where device files are stored/listed, /tty represents TeleTypewriter devices and s# is the actual serial port.
Linux Commands
root@kali:~# dmesg | grep tty

NOTE: If you are using a serial to USB adapter, you will follow this same process. The output will appear as “/dev/ttyUSB#” (as shown below)
2. Set the Cisco Serial Parameters
Now that we know the serial port identification in the Linux OS, let’s launch and configure Minicom.
Linux Commnads
root@kali:~# minicom –s
Now that we know the serial port identification in the Linux OS, let’s launch and configure Minicom.
Linux Commnads
root@kali:~# minicom –s
NOTE: Keep in mind the command required if you are requiring Root access!
root@kali:~# sudo minicom –s
With Minicom installed, let's configure our serial connection parameters. From the resulting menu, we are interested in serial based connections. Select “serial port setup” from the menu (Up/Down arrows) and hit [Enter].
root@kali:~# sudo minicom –s
With Minicom installed, let's configure our serial connection parameters. From the resulting menu, we are interested in serial based connections. Select “serial port setup” from the menu (Up/Down arrows) and hit [Enter].
Press “A” to select the serial device parameters.
Once your cursor is in the correct setting, enter the port ID we discovered with the dmesg command and hit [Enter]. Correct setting in my case would be as follows:
Next, we’ll adjust the speed, parity and data/stop bits to meet Cisco requirements. Press “E” to select the correct parameters settings.
9600, 8-N-1-None – Cisco will require a certain speed, parity and data/stop parameters set in order to communicate with its Console port. The 9600, 8-N-1-None is a quick way to remember these settings:
We will use the following keyboard keys to set this appropriately: [c] key, [q] key, [Enter].
- 9600 = Bits per Second (Bps)
- 8 = 8 Data Bits
- N = No Parity
- 1 = 1 Stop Bit
- None = No Flow Control (This references the Software Flow Control Setting!)
We will use the following keyboard keys to set this appropriately: [c] key, [q] key, [Enter].
Results will be as follows:
Lastly, hit [Enter] to return to the main menu of Minicom. Let’s save the connection so configuration to re-use in the future. You can save it as the default connection settings if you prefer by selecting ”Save setup as dfl”.
I’ll create this as a custom configuration by choosing “Save setup as…” and pressing [Enter].
Next, I’ll type in the configuration name of CiscoDevices and hit [Enter]. Keep in mind, the profile name you assign IS case sensitive!
Select ”Exit from Minicom” and hit [Enter].
3. Connect the Topology
Using a Console Cable (Rollover), connect the serial connector to the laptops serial port and the RJ45 connector to the Console port of the Cisco device.
Using a Console Cable (Rollover), connect the serial connector to the laptops serial port and the RJ45 connector to the Console port of the Cisco device.
NOTE: If the PC does not have a serial port, you can leverage a USB to Serial Adapter and Console connection. Cabling would be setup as follows:
4. Test Connection
At this time, we should be ready to connect to our Cisco device! Power on the switch / router and launch Minicom.
root@kali:~# minicom CiscoDevices
NOTE: The profile entry, CiscoDevices IS CASE SENSITIVE! Once the session starts, hit [Enter] to begin interaction with the device.
Once connected, you can use [crtl] + [a] to access the connection status. From there, [z] gains you access to the Help menu.
To exit, use [crtl] + [c] to access the connection status. From there, [x] will leave session.