Lab 0 Basic Switch Configuration-1
Lab 0 Basic Switch Configuration-1
Lab 0 Basic Switch Configuration-1
Addressing Table
Device Interface IP Address / Prefix
Objectives
Part 1: Cable the Network and Verify the Default Switch Configuration
Part 2: Configure Basic Network Device Settings
• Configure basic switch settings.
• Configure the PC IP address.
Part 3: Verify and Test Network Connectivity
• Display device configuration.
• Test end-to-end connectivity with ping.
• Test remote management capabilities with Telnet.
Background / Scenario
Cisco switches can be configured with a special IP address known as the switch virtual interface (SVI). The
SVI, or management address, can be used for remote access to the switch to display or configure settings. If
the VLAN 1 SVI is assigned an IP address, by default all ports in VLAN 1 have access to the SVI IP address.
In this lab, you will build a simple topology using Ethernet LAN cabling and access a Cisco switch using the
console and remote access methods. You will examine default switch configurations before configuring basic
switch settings. These basic switch settings include device name, interface description, local passwords,
message of the day (MOTD) banner, IP addressing, and static MAC address. You will also demonstrate the
use of a management IP address for remote switch management. The topology consists of one switch and one
host using only Ethernet and console ports.
Note: The switches used are Cisco Catalyst 2960s with Cisco IOS Release 15.2(2) (lanbasek9 image). Other
switches and Cisco IOS versions can be used. Depending on the model and Cisco IOS version, the commands
available and output produced might vary from what is shown in the labs.
Note: Make sure that the switches have been erased and have no startup configurations. If you are unsure,
contact your instructor. Refer to Appendix A for the procedures to initialize and reload a switch.
Page 1 of 7
Lab - Basic Switch Configuration
Required Resources
• 1 Switch (Cisco 2960 with Cisco IOS Release 15.2(2) lanbasek9 image or comparable)
• 1 PC (Windows with terminal emulation program, such as Tera Term)
• 1 Console cable to configure the Cisco IOS device via the console port
• 1 Ethernet cable as shown in the topology
Part 1: Cable the Network and Verify the Default Switch Configuration
In Part 1, you will set up the network topology and verify default switch settings.
Why must you use a console connection to initially configure the switch? Why is it not possible to connect
to the switch via Telnet or SSH?
Switch> enable
Switch#
Notice that the prompt changed in the configuration to reflect privileged EXEC mode.
Verify that there is a clean default configuration file on the switch by issuing the show running-config
privileged EXEC mode command. If a configuration file was previously saved, it must be removed.
Depending on the switch model and IOS version, your configuration may look slightly different. However,
there should be no configured passwords or IP address. If your switch does not have a default configuration,
erase and reload the switch.
Note: Appendix A details the steps to initialize and reload a switch.
b. Examine the current running configuration file.
Switch# show running-config
Questions:
Page 2 of 7
Lab - Basic Switch Configuration
- What is the range of values shown for the vty lines? 0-4 and 5-15 or 0-15
Type your answers here.
c. Examine the startup configuration file in NVRAM.
Switch# show startup-config
startup-config is not present
Question:
Page 3 of 7
Lab - Basic Switch Configuration
b. Set the SVI IP address of the switch. This allows remote management of the switch.
Before you can manage S1 remotely from PC-A, you must assign the switch an IP address. The default
configuration on the switch is to have the management of the switch controlled through VLAN 1. However,
a best practice for basic switch configuration is to change the management VLAN to a VLAN other than
VLAN 1.
For management purposes, use VLAN 99. The selection of VLAN 99 is arbitrary and in no way implies that
you should always use VLAN 99.
First, create the new VLAN 99 on the switch. Then set the IP address of the switch to 192.168.1.2 with a
subnet mask of 255.255.255.0 on the internal virtual interface VLAN 99. IPv6 address can also be
configured on the SVI interface. Use the IPv6 addresses listed in the Addressing Table.
S1# configure terminal
Notice that the VLAN 99 interface is in the down state even though you entered the no shutdown
command. The interface is currently down because no switch ports are assigned to VLAN 99.
c. Assign all user ports to VLAN 99.
S1(config)# interface range f0/1 – 24,g0/1 - 2
S1(config-if-range)# switchport access vlan 99
S1(config-if-range)# exit
To establish connectivity between the host and the switch, the ports used by the host must be in the same
VLAN as the switch. Notice in the above output that the VLAN 1 interface goes down because none of the
Page 4 of 7
Lab - Basic Switch Configuration
ports are assigned to VLAN 1. After a few seconds, VLAN 99 comes up because at least one active port
(F0/6 with PC-A attached) is now assigned to VLAN 99.
d. Issue the show vlan brief command to verify that all ports are in VLAN 99.
S1# show vlan brief
e. Configure the default gateway for S1. If no default gateway is set, the switch cannot be managed from a
remote network that is more than one router away. Although this activity does not include an external IP
gateway, assume that you will eventually connect the LAN to a router for external access. Assuming that
the LAN interface on the router is 192.168.1.1, set the default gateway for the switch.
S1(config)# ip default-gateway 192.168.1.1
f. Console port access should also be restricted with a password. Use cisco as the console login password
in this activity. The default configuration is to allow all console connections with no password needed. To
prevent console messages from interrupting commands, use the logging synchronous option.
S1(config)#
g. Configure the virtual terminal (vty) lines for the switch to allow telnet access. If you do not configure a vty
password, you will not be able to telnet to the switch.
S1(config)#
Question:
Why is the login command required? Without the login command, the switch will not prompt for a
password.
Close configuration window
Page 5 of 7
Lab - Basic Switch Configuration
Page 6 of 7
Lab - Basic Switch Configuration
Display the MAC addresses using the show mac address-table command.
S1# show mac address-table
Questions:
How many options are available for the show mac address-table command?
Type your answers here.
b. Issue the show mac address-table dynamic command to display only the MAC addresses that were
learned dynamically.
S1# show mac address-table dynamic
Question:
Reflection Questions
1. Why should you configure the vty password for the switch? If you do not configure a vty password you will not
be able to telnet to the switch.
2. Why change the default VLAN 1 to a different VLAN number? For improved security
How can you prevent passwords from being sent in plain text? Issue the service password-encryptio
Page 7 of 7