Tuesday, January 12, 2016

Lab 1-1: Switch Startup and Initial Configuration.

Lab pre-requisites:
The whole purpose of this and subsequent post is to check how good the Packet Tracer simulator is while preparing practically to a role of CCNA. 

Let's rock 'n' roll then!

At the end of this lab, our topology should look like this. Direct neighbors should be able to pin each other.

Task 1: Reload and check that the Switch is set to factory defaults.
Task 2: Defining a hostname and enabling a management IP address.
Task 3: Using context-sensitive help.
Task 4: Changing default CLI parameters.

Here we go!

Task 1: Reload and check that the Switch is set to factory defaults.

Let's use SW1 and bring factory defaults to it. Remember that on Cisco switches the configuration is kept in two different files (on real equipment):

  • STARTUP-CONFIG is kept in the flash memory as 'config.text' file.
  • VLANs are kept in a separate file called vlan.dat.
On a real switch one way of removing all those files goes as follows:

SW1#erase startup-config
Erasing the nvram filesystem will remove all configuration files! Continue? [confirm]
Erase of nvram: complete
%SYS-7-NV_BLOCK_INIT: Initialized the geometry of nvram
SW1#delete flash:vlan.dat
Delete filename [vlan.dat]?
Delete flash:/vlan.dat? [confirm]
%Error deleting flash:/vlan.dat (No such file or directory)


If a switch is asking you to save current configuration in nvram, you should answer 'no' and proceed with the reload by hitting enter twice confirming the last question.

Packet Tracer does not greet you with: 'Would you like to enter initial configuration dialog' which is the case on a real switch. Instead, it gives you access to the user exec mode.

Task 2: Defining a hostname and enabling a management IP address.

This task is pretty straight-forward.

Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname SW1
SW1(config)#interface vlan 1
SW1(config-if)#ip address

SW1(config-if)#no shutdown

Don't forget to verify your configuration every step of the way.

SW1(config-if)#do show int vlan 1
Vlan1 is up, line protocol is up
Hardware is CPU Interface, address is 0050.0f3a.e022 (bia 0050.0f3a.e022)

Internet address is

Alternatively you can issue the following command:

SW1(config-if)#do show ip int brief

Scroll down to the very end of the output by pressing space bar a few times. The last line shows the IP address (no mask though) and the status of the interface Vlan1.

Packet Tracer does NOT support piping (|) with keywords such as 'include', 'exclude', 'section' etc. keywords. Those are very nice in terms of displaying partial information.

You may have noticed the 'do' keyword preceding 'show' commands. It is necessary to use show commands (and other) which are only available in the user/privileged mode.

Task 3: Using context-sensitive help.

Cisco suggests that you practice using built-in context-sensitive help by assigning a clock settings on the switch. Example:

SW1#show clock
*0:13:23.535 UTC Mon Mar 1 1993


% Incomplete command.


As system suggests, there should be word(s) after keyword 'clock' by saying that the command is incomplete. Let's try it again:

SW1#clock ?
set Set the time and date


Clearly, IOS expects us to provide extra keywords, here: set. This time around we are going to be smarter:

Every time we add a parameter we use 'space' and question mark to ask what should follow next. This way we reach the end of possible parameters. It is indicated by 'carriage return' (cr) option at the end of the options. Whenever we see carriage return at the end of help options this will mean that at this point we can accept the command by hitting enter key.

Task 4: Changing default CLI parameters.

Let's change a few defaults here:

The number of commands remembered in the history is dependent on a device. Usually it is either 10 or 20 last commands. You can verify that by typing:

We can easily changed that in two different contexts:

  • In the privileged exec mode (level 15) which will NOT be kept after console session ends.
  • In the context of console line 0, which (if saved) WILL remain after console session ends.
The number of commands kept in history is between 0 and 512 commands.

Here's an example of setting this to a value of 50 commands:

On a real Cisco switch you can verify that change by issuing two different commands:

  • show terminal or
  • show line con 0
The latter does NOT work in Packet Tracer though.

Another thing we can change in terms of using CLI is related to display paging. By default CLI will display 24 lines of output and at the end of the page you will see 'more' indicating that you can still scroll by pressing either enter (line by line scrolling) or 'space bar' which allows screen by screen paging.

Default values are listed in 'show terminal' command:

The command that changes this behavior is 'terminal length'. The value of 0 indicates scrolling top-to-bottom without any paging.

Packet Tracer does not support 'terminal length' command.


CCNA Basics | Cisco Advanced | Linux Last Update: 19/02/2019 - eBGP Peering CCNA Lessons: 01 - Connecting to Cisco Cons...