Cisco IOS Command Line Interface(CLI)

The Cisco IOS command line interface (CLI) is the user interface used for configuring, troubleshooting, and monitoring Cisco devices like routers and switches. The iOS command s are issued on the CLI . The information needed from the router and switch is also displayed on the CLI using the show commands.
To access the CLI of the router or switch you need to install software on your computer. Some Softwares are putty, SecureCRT.


The most common methods to access the CLI are mentioned below.
1)Console
2)Telnet
3) Secure Shell(SSH)

Console is the physical Port available on the router or switch. Using Console port you directly connect the router or switch to your computer or laptop.


Accessing the CLI using Console

For creating a console connection we need a Console Port on the router , the physical serial port on a switch, and a cable that connects the console and serial ports.
The serial port is a 9pin socket available at the back of pc. It is also called as COM port or an RS-232 port.


The console Port on the router is the ethernet RJ-45 Port.






The rollover cable has the RJ-45 jack at one end and DB-9 connector at the other end. RJ-45 jack connects to the console port of the router or switch and the DB-9 connector connects to the serial port of the computer.

Check the below diagram to understand the connection of the computer and the router using the rollover cable.





As the technology has advanced, the serial ports on computers were replaced by USB ports. So to connect the cisco device to the computer you need a USB-to-SERIAL converter. The connection is shown in the below figure.


Now Cisco is also providing USB ports for the console connection of the devices. So you don't need a rollover cable now. You can use a USB cable to connect to the Cisco device as shown in the below diagram.


Once the PC is Physically connected to the console port you can use the software like Putty or Secure CRT to configure the Cisco device.


Accessing the CLI using Telnet and SSH.



If the Cisco device is not physically accessible then you can access it remotely if there is a TCP/IP connection available to the Cisco device. Telnet and SSH both allow you to connect to the router or switch remotely through TCP/IP.
Telnet client is available on the user computer and the Telnet server is available on the Cisco device. Telnet client will send the commands to the Telnet server. Telnet uses port 23 of the TCP.
The problem with telnet is that it's not secure. Telnet sends data in clear-text format.
SSH is more secure than telnet. SSH encrypts the data while sending it. SSH uses TCP port 22.