rss logo

How to connect to network switches with a console cable from Windows or GNU/Linux

Cisco logo

Connect Serial Cable to Console Port

Connecting to a device's console port allows to configure it from the CLI when starting up for the first time, or if remote access is not available (ssh, http etc…).

Nowadays, most serial cables use the USB interface to be connected from a computer. On devices (switchs, routers etc…), the connection is made via a classic console port, USB or mini USB.

Diagram showing a console cable connected from a Cisco switch to a laptop via USB for configuration
Console Port connection between Switch and Computer

From a GNU/Linux computer

Debian logo

First connect the USB cable to your Linux computer.

Installing screen

Screen is a terminal multiplexer. It will enable us to connect to the switch's console port from our USB-to-serial converter.

  • Install the screen software:
root@host:~# apt update && apt install screen

Identify USB device

  • Find device name:
root@host:~# dmesg | grep -i "serial.*tty" [33994.065881] usb 2-1: FTDI USB Serial Device converter now attached to ttyUSB0

Connection

  • In most cases, you will be able to connect with this command (you can specify 300, 1200, 9600 (default), 19200, or 115200 as the value for the baud rate):
user@client:~$ screen /dev/ttyUSB0 115200
  • If required, you can also specify the transmission of eight (or seven) bits per byte (by specifying cs8 or cs7):
user@client:~$ screen /dev/ttyUSB0 115200,cs8

From a Windows computer

Microsoft logo

First connect the USB cable to your Windows computer.

Device Manager

  • Open the Device Manager to retrieve name of the Serial line:
Device Manager window showing USB Serial Port (COM7) highlighted for serial connection setup

Putty

PuTTY download page showing the 64-bit x86 version of putty.exe highlighted for download
  • Open putty.exe and configure the serial menu whith the information retrieved, then click on Open to connect:
PuTTY Configuration window showing Serial settings with COM7 selected for serial line connection

Tera Term (alternative to Putty)

As a good alternative to Putty, we can choose to use Tera Term: https://en.wikipedia.org/wiki/Tera_Term.

  • Unzip the downloaded archive and run ttempro.exe:
Folder view showing Tera Term installation files with ttermpro.exe highlighted for launching the application
  • Select Serial, your USB serial port and click OK:
Tera Term New Connection window showing Serial option selected and COM7 USB Serial Port chosen for connection
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Contact :

contact mail address