Watch on Instagram

Network Bytes · Episode 103 · CCNA 2.8

"The console port: managing a switch with no IP"

A brand-new switch has no IP address, so you can't reach it over the network. The console port is a private, out-of-band management port: connect a rollover or USB console cable, open a terminal program at 9600 bits per second (the Cisco default), press Enter and the command line appears. It is also the way in when the network is broken, so protect it with a password under line console 0.

Posted · About a 1 minute watch, 4 minute read · Take the quiz

Why a new switch needs another way in

Telnet, SSH and web pages all reach a switch over the network, and every one of them needs the switch to have an IP address. A brand-new switch out of the box has none. So for the very first setup you need a way in that doesn't depend on the network at all.

That way in is the console port. It is an out-of-band management port: it carries only your keystrokes and the switch's replies, straight down a cable, separate from the network ports that carry users' traffic.

The cable

On most Cisco switches the console port is an RJ-45 socket labelled CONSOLE. It takes a rollover cable (the classic light-blue "console cable"), which ends in a 9-pin serial plug. Laptops rarely have a serial port today, so you add a USB-to-serial adapter.

Many newer switches also have a USB console port (Mini-B or USB-C). Then a plain USB cable is all you need, and when it is plugged in it takes over from the RJ-45 console port.

The terminal settings

On the laptop you open a terminal emulator program (such as PuTTY, Tera Term or screen) and pick the serial port the cable shows up as. Then you match the switch's settings. The Cisco default is:

`` Speed (baud): 9600 Data bits: 8 Parity: none Stop bits: 1 Flow control: none ``

This is often written 9600 8N1. Press Enter and the prompt appears, for example Switch>, even though the switch has no IP address.

Locking the front door

The console works even when the network is broken, which makes it the way in for recovery too. It also means anyone standing next to the switch can plug in, so you protect it:

`` Switch> enable Switch# configure terminal Switch(config)# line console 0 Switch(config-line)# password <password> Switch(config-line)# login ``

password sets the password and login tells the switch to ask for it. With login local instead, the switch asks for a username and password from its local user list.

Try it yourself

In Cisco Packet Tracer (free with a Cisco Networking Academy account), add a switch and a PC. Connect them with the light-blue Console cable from the PC's RS-232 port to the switch's Console port, open the PC's Desktop > Terminal, keep the default settings and click OK. Press Enter and you're at the switch's command line, with no IP address configured anywhere. Then set a console password with line console 0, password and login, type exit until you log out, and press Enter again to see it ask for the password.

Good to know

  • CCNA 2.8 covers network device management access: Telnet, SSH, HTTP, HTTPS, console, TACACS+/RADIUS and cloud managed.
  • The console port is an out-of-band serial management port: it needs no IP address or working network, so it is used for first setup and recovery.
  • Cisco devices traditionally use an RJ-45 console port and a light-blue rollover cable to a DB-9 serial port or a USB-to-serial adapter; many newer models also have a USB Mini-B or USB-C console port that takes precedence when connected.
  • The Cisco default console settings are 9600 baud, 8 data bits, no parity, 1 stop bit (8N1), with flow control usually set to none. Some newer platforms default to or allow 115200 baud.
  • With 8N1, each character is framed by one start bit and one stop bit, so 10 bits cross the line for each character.
  • The console is protected with line console 0, then password <password> and login (or login local to use local usernames). An exec-timeout is also good practice.
  • "Front door" is the analogy.

For CCNA learners

CCNA exam topic 2.8 lists console access among the ways to manage a network device. Know that the console needs no IP address, that it uses a rollover or USB console cable, that the Cisco default terminal settings are 9600 8N1, and that it is secured under line console 0 with password and login.

Answer to the comment question

960 characters per second. Each character takes 10 bits on the wire (1 start bit, 8 data bits, 1 stop bit), so at 9600 bits per second: 9600 ÷ 10 = 960 characters each second, assuming the line is busy the whole second.

Test your knowledge

Quick quiz: "The console port: managing a switch with no IP"

4 multiple-choice questions. Pick one answer for each, then check how you did.

1Why can you log in through the console port on a brand-new switch?
2Which cable is the classic Cisco console cable?
3What speed does a Cisco switch's console use by default?
4Which commands put a password on the console?

Sources

Video transcript

A brand-new switch has no IP address. So how do you log in to set it up?

You plug straight into its console port: the switch's private front door, no network needed.

Connect a console cable from your laptop: a blue rollover cable with an adapter, or, on newer switches, a USB cable.

Open a terminal program and match the speed: 9600 bits per second, the Cisco default.

Press Enter, and the command line appears, even with no IP address at all.

That's also your way in when the network is broken. Protect it with a password, set under line console 0.

Each character takes 10 bits on the wire. At 9600 bits per second, how many characters arrive each second? Comment your answer below!

That's your byte.

More from Network Bytes

All Network Bytes lessons