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]
[OK]
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)

SW1#reload

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.



NOTICE!
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>
Switch>enable
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 10.1.1.11 255.255.255.0

SW1(config-if)#no shutdown
SW1(config-if)#


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 10.1.1.11/24

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.



NOTICE!
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

SW1#

SW1#clock
% Incomplete command.

SW1#

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

SW1#clock

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.



NOTICE!
Packet Tracer does not support 'terminal length' command.


Cisco: Beginner Level

Main Page |  CCNA Exercises   |   CCNP Labs | Contact Lesson Labs: Lesson 2 - Lab . CCNA Lessons: 01 - Connecting to Ci...