- [Narrator] The majority of Cisco configuration
is through the command line.
It's for this reason that Cisco tests heavily over it,
and why I'll be spending extra time covering it.
Initial configuration of Cisco kit
is done via console connection.
Cisco equipment will have a dedicated console port
which appears to be a standard RJ45 port.
Some modern equipment also has mini-USB interfaces
that can be directly connected to a laptop's USB port,
those these require special drivers on the laptop.
The console port uses a standard rollover cable
to connect to an RS-232 interface.
Laptops have an included serial ports and ages,
but RS-232 to USB adapters can be had
for about 15 bucks online.
Once the console cable is physically connected to the device
a terminal emulator must be run on the laptop.
There are a myriad of choices,
but I usually just use the free Windows app Putty.
When connecting the settings should be
baud rate of 9600 bits per second,
no hardware flow control, data bits at eight bit ASCII,
no parity bits, and one stop bit.
Once the console connection is made,
and the initial configuration is applied to the Cisco device
remote access should be enabled either via Telnet or SSH.
Telnet is a plain text protocol, as in,
everything is unencrypted as it moves across the network,
so it should be avoided.
SSH however does encrypt the connection between
the management station and the Cisco device.
So this is the preferred remote CLI connection method.
The Cisco CLI has five modes,
so depending on what needs to be accomplished,
an engineer will have to move in and out of them.
When a user first logs in,
either via SSH, Console, or Telnet,
they are placed into the user exec mode.
If the prompt shows a greater than symbol
then the session is in the user exec mode.
From here, only a few commands can be issued.
Once any real show commands or testing needs to be done,
the user will need to move to enable mode
by typing the enable command.
This mode is sometimes called privileged
or privileged exec mode and is signified
by having a hashtag in the prompt.
Global configuration mode is accessed from enable mode
with configure terminal.
From here configuration commands can be administered.
I'll do a little CLI work.
I'm connecting via console, so I start in user mode.
Notice the greater than symbol.
From here I'll enter enable mode.
Notice how the prompt changes.
I'll now move to global configuration mode.
Config t.
I'll start by giving my device a name,
which is done with a host name command.
Host name router one.
As soon as this is in place,
the command prompt changes with the device name.
This helps me ensure I'm configuring the correct device
when I have multiple windows open.
I'll now add an enable mode password.
This is done with enable secret, and my password,
which I'll make Greg Sowell.
I can test it by backing out and coming back in.
Exit exit, back in,
enable, and my password, Greg Sowell.
Excellent.
There are a lot of useful features of the CLI,
with none more important than the question mark.
At any point on the CLI the question mark will provide
all the available commands.
When more options are available
than can be displayed at once
the more text will show at the bottom.
To advance a single line at a time,
the enter key can be pressed.
To advance an entire page at a time,
the spacebar can be pressed.
To stop the list at any time, Control C can be pressed.
The question mark also has the ability
to help complete commands.
I'll start by typing a command, ACC, and hit question mark.
This shows all the commands at this level
that start with those letters.
I can also hit Tab to auto complete a command.
The system will try and auto complete the command
until it requires additional letters to make it unique.
En, Tab.
Control plus U will erase whatever I've typed.
Up arrow will move to the previous command,
and down arrow will scroll back down
to more recent commands.
I can also use the left and right arrows
to move the cursor around on the existing command.
The most common commands to be used in Cisco
are show commands.
These will display configuration and other information.
A common command is show running config,
this will display the currently
running system configuration.
Cisco has the awesome ability
to accept an incomplete command, so long as it's unique,
so the same output can be reached by just typing show run.
The same system configuration that will be used
when the device first boots up is known as
the start up config and can be viewed with the
show start up config command.
Show, start.
Whenever changes are made to standard Cisco IOS,
they are live as soon as they are entered,
though they are not saved.
From time to time, I'll clear the terminal,
just to make things easier.
All new commands are part of the running config,
and if I want to save them to the start up config,
I'll issue the copy, run, start command,
and then choose enter.
An older, shorter way is to type the
write memory command or W-R-M-E-M.
To erase a start up config,
I can issue write erase, or erase start up config.
Once the start up config is clean,
issuing a reload command to reboot the router
will start the device from a blank state.
Basic movement through the CLI is mandatory
for every Cisco admin, so practice, practice, and practice.