Lab Basic Switch Configuration
Lab Basic Switch Configuration
• Addressing Table
Device Interface IP Address / Prefix
S1 VLAN 99
2001:db8:acad:1::2 /64
S1 VLAN 99
fe80::2
PC-A NIC 192.168.1.10 /24
PC-A NIC
2001:db8:acad:1::10 /64
• Objectives
Part 1: Cable the Network and Verify the Default Switch Configuration
• 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.
The default bias template used by the Switch Database Manager (SDM) does not provide IPv6
address capabilities. Verify that SDM is using either the dual-ipv4-and-ipv6 template or the lanbase-
routing template. The new template will be used after reboot even if the configuration is not saved.
Open configuration window
• 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
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?
The switch is a new switch with no configuration, so we need to use a console cable to configure
it.
Type your answers here.
In this step, you will examine the default switch settings, such as current switch configuration, IOS
information, interface properties, VLAN information, and flash memory.
You can access all the switch IOS commands in privileged EXEC mode. Access to privileged EXEC
mode should be restricted by password protection to prevent unauthorized use because it provides
direct access to global configuration mode and commands used to configure operating parameters.
You will set passwords later in this lab.
The privileged EXEC mode command set includes those commands contained in user EXEC mode,
as well as the configure command through which access to the remaining command modes is
gained. Use the enable command to enter privileged EXEC mode.
• Assuming the switch had no configuration file stored in nonvolatile random-access
memory (NVRAM), A console connection using Tera Term or other terminal emulation
program will place you at the user EXEC mode prompt on the switch with a prompt of
Switch>. Use the enable command to enter privileged EXEC mode.
Open configuration window
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.
What is the Cisco IOS version that the switch is running? Version 15.0(2)SE4
Type your answers here.
What is the system image filename? "flash:c2960-lanbasek9-mz.150-2.SE4.bin"
Type your answers here.
What is the base MAC address of this switch? 00:60:47:E6:26:9A
Type your answers here.
• Examine the default properties of the FastEthernet interface used by PC-A.
Switch# show interface f0/6
Question:
hostname S1
service password-encryption
banner motd #
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.
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.
• Assign all user ports to VLAN 99.
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 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.
• Issue the show vlan brief command to verify that all ports are in VLAN 99.
• 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.
• 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)# line con 0
S1(config-line)# logging synchronous
• 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.
Question:
Why is the login command required?to allow user to enter the password and continue
Type your answers here.
Close configuration window
Assign the IP address and subnet mask to the PC as shown in the Addressing Table. An abbreviated
version of the procedure is described here. A default gateway is not required for this topology;
however, you can enter 192.168.1.1 and fe80::1 to simulate a router attached to S1.
Use the console connection on PC-A to display and verify the switch configuration. The show run
command displays the entire running configuration, one page at a time. Use the spacebar to advance
paging.
• A sample configuration is shown here. The settings you configured are highlighted in
yellow. The other configuration settings are IOS defaults.
Open configuration window
version 15.2
no service pad
service password-encryption
hostname S1
boot-start-marker
boot-end-marker
no aaa new-model
no ip domain-lookup
!
<output omitted>
interface FastEthernet0/24
interface GigabitEthernet0/1
interface GigabitEthernet0/2
interface Vlan1
no ip address
no ip route-cache
interface Vlan99
ip default-gateway 192.168.1.1
ip http server
ip http secure-server
banner motd ^C
line con 0
password 7 00071A150754
logging synchronous
login
line vty 0 4
password 7 121A0C041104
login
line vty 5 15
password 7 121A0C041104
login
end
• Verify the management VLAN 99 settings.
S1# show interface vlan 99
Questions:
You will now use Telnet to remotely access the switch. In this lab, PC-A and S1 reside side by side. In
a production network, the switch could be in a wiring closet on the top floor while your management
PC is located on the ground floor. In this step, you will use Telnet to remotely access switch S1 using
its SVI management address. Telnet is not a secure protocol; however, you will use it to test remote
access. With Telnet, all information, including passwords and commands, are sent across the session
in plain text. In subsequent labs, you will use SSH to remotely access network devices.
• Open Tera Term or other terminal emulation program with Telnet capability.
• Do this.
• Scroll down
•
•
•
• Select the Telnet server and provide the SVI management address to connect to S1. The
password is cisco.
•
•
• After entering the password cisco, you will be at the user EXEC mode prompt. Access
privileged EXEC mode using the enable command and providing the secret password
class.
• Save the configuration.
• Type exit to end the Telnet session.
Display the MAC addresses using the show mac address-table command.
How many options are available for the show mac address-table command?3
Type your answers here.
• 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:
• Remove the static MAC entry. Enter global configuration mode and remove the
command by putting a no in front of the command string.
Note: The MAC address 0050.56BE.6C89 is used in the example only. Use the MAC address for
PC-A.
• Reflection Questions
• Why should you configure the vty password for the switch?
• If you do not configure a vty password and you will not be able to telnet to the switch.
Type your answers here.
• Why change the default VLAN 1 to a different VLAN number?
Switch> enable
Switch#
• Use the show flash command to determine if any VLANs have been created on the
switch.
Switch# show flash
Directory of flash:/
Switch#
• Use the erase startup-config command to erase the startup configuration file from
NVRAM. You are prompted to remove the configuration file. Press Enter to confirm.
Switch# erase startup-config
Erasing the nvram filesystem will remove all configuration files! Continue?
[confirm]
[OK]
Switch#
• Reload the switch to remove any old configuration information from memory. You will
then receive a prompt to confirm reloading of the switch. Press Enter to proceed.
Switch# reload
Proceed with reload? [confirm]
• Note: You may receive a prompt to save the running configuration prior to reloading the
switch. Respond by typing no and press Enter.
System configuration has been modified. Save? [yes/no]: no
• After the switch reloads, you should see a prompt to enter the initial configuration dialog.
Respond by entering no at the prompt and press Enter.
Would you like to enter the initial configuration dialog? [yes/no]: no
Switch>
Close configuration window
End of document