01 - Basic Switch Configurations-2
01 - Basic Switch Configurations-2
Topology
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
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 et SSH.
Part 4: Manage the MAC Address Table
• Record the MAC address of the host.
• Determine the MAC addresses that the switch has learned.
• List the show mac address-table command options.
• Set up a static MAC address.
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.
Close 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
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.
b. Examine the current running configuration file.
Switch# show running-config
Questions:
Ty
f. Connect an Ethernet cable from PC-A to port 6 on the switch and examine the IP properties of the SVI
VLAN 1. Allow time for the switch and PC to negotiate duplex and speed parameters.
Switch# show ip interface vlan1
Question:
Is VLAN 1 active?
Type you
r answers here.
What type of VLAN is the default VLAN?
Type your answers here.
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
S1(config)# vlan 99
S1(config-vlan)# exit
S1(config)# interface vlan99
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan99, changed state to down
S1(config-if)# ip address 192.168.1.2 255.255.255.0
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)# line con 0
S1(config-line)# logging synchronous
S1(config-line)# password cisco
S1(config-line)# login
S1(config-line)# exit
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)# line vty 0 15
S1(config-line)# password cisco
S1(config-line)# login
S1(config-line)# end
S1#
Question:
b. From the command prompt on PC-A, ping the SVI management address of S1.
C:\> ping 192.168.1.2
C:\> ping 2001:db8:acad:1::2
Because PC-A needs to resolve the MAC address of S1 through ARP, the first packet may time out. If ping
results continue to be unsuccessful, troubleshoot the basic device configurations. Check both the physical
cabling and logical addressing.
d. Configure user authentication: The SSH server can authenticate users locally or using an authentication
server. To use the local authentication method, create a username and password pair using the username
username secret password global configuration mode command. In this lab, the user admin is assigned the
password ccna.
e. Configure the vty lines: Enable the SSH protocol on the vty lines by using the transport input ssh line
configuration mode command. Use the line vty global configuration mode command and then the login local
line configuration mode command to require local authentication for SSH connections from the local
username database.
f. Enable SSH version 2: By default, SSH supports both versions 1 and 2. When supporting both versions,
this is shown in the show ip ssh output as supporting version 2. Enable SSH version using the ip ssh version
2 global configuration command.
g. From a SSH Client on the PCA, try to connect to the S1 by SSH protocol.
Display the MAC addresses using the show mac address-table command.
S1# show mac address-table
Questions:
Does the dynamic MAC address match the MAC address of PC-A?
e your answers here.
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:
c. View the MAC address entry for PC-A. The MAC address formatting for the command is xxxx.xxxx.xxxx.
S1# show mac address-table address <PC-A MAC here>
If S1 has not yet relearned the MAC address for PC-A, ping the VLAN 99 IP address of the switch from PC-
A, and then repeat the show mac address-table command.
d. To specify which ports a host can connect to, one option is to create a static mapping of the host MAC
address to a port.
Set up a static MAC address on F0/6 using the address that was recorded for PC-A in Part 4, Step 1. The
MAC address 0050.56BE.6C89 is used as an example only. You must use the MAC address of PC-A,
which is different than the one given here as an example.
Reflection Questions
1. Why should you configure the vty password for the switch?
Type your answers here.
3. How can you prevent passwords from being sent in plain text?
Type your answers here.