How to Connect a Cisco Device through Console Port on Ubuntu 18.04 and Mac OS X

Linux Ubuntu 18.04 LTS

Here some steps necessary to correctly configure Minicom in order to connect a Console port on Cisco Devices, if we have a USB console cable adapter. In this test I'm using Ubuntu 18.04 on VMware, and a Cisco 2911 Router, IOS Version 15.0(1r)M9.

First of all we need to open a Terminal window, and run Minicom :

sudo Minicom -s

with the "-s" option we can modify some settings. All we need is to go to "Serial port setup" option and change :


  • option A - Serial Device, with /dev/ttyUSB0
  • option E - Bps/Par/Bits, with 9600

just remember to save the configuration with the option "Save setup as dfl".

As a second step we can connect our USB adapter, and run the following command

lsusb

We should see an output like this:

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 002 Device 012: ID 0e0f:0008 VMware, Inc.
Bus 001 Device 003: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port


I marked the last row because it is the one we are interested in.

We now need to add to configure this device with the command modprobe:

modprobe usbserial vendor=0x067b product=0x2303

Please note that those codes related to vendor and product are taken from the previous output, and can vary from device to device.

now we can check if the operation was successful with the command dmesg, we should read something like this :

[ 2216.679590] usbserial: USB Serial Driver core
[ 2216.680638] USB Serial support registered for pl2303
[ 2216.680706] pl2303 2-2.2:1.0: pl2303 converter detected
[ 2216.693539] usb 2-2.2: pl2303 converter now attached to ttyUSB0
[ 2216.693555] usbcore: registered new interface driver pl2303
[ 2216.693556] pl2303: Prolific PL2303 USB to serial adaptor driver


as last thing, we could change permission to our device, ttyUSB0:

sudo chmod 777 /dev/ttyUSB0

We can now connect our Console cable to the Console port of our Cisco device, and with the command

sudo minicom

we should be able to access to the CLI.

MAC OS X 10.7.5

Few differences between these two OSs, since they come from the same root. The main difference here is that we prior need to download drivers for our pl2303 adapter. I found the right ones for this current version of MAC OS X from sourceforge, here.

Once downloaded and installed, we should be able to see our adapter name by opening a terminal window and typing

sudo ls -l  /dev/cu*

We need this name on the next step... now. We can finally open the device console with this command : 

sudo cu -l /dev/<name_of_our_adapter> -s 9600

Cheers

P.S. another very useful blog about this topic is visible here 





 


Comments

Popular Posts