Lab - Basic Switch Configuration
Lab - Basic Switch Configuration
Topology
Addressing Table
Device Interface IP Address / Prefix
S1 VLAN 99
2001:db8:acad::2 /64
S1 VLAN 99
fe80::2
PC-A NIC
2001:db8:acad:3 /64
PC-A NIC
fe80::3
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.
© 2013 - 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 1 of 11 www.netacad.com
Lab - Basic 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
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?
Type your answers here.
© 2013 - 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 2 of 11 www.netacad.com
Lab - Basic Switch Configuration
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.
Questions:
© 2013 - 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 3 of 11 www.netacad.com
Lab - Basic Switch Configuration
© 2013 - 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 4 of 11 www.netacad.com
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 arbit rary 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.
c. 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.
d. Issue the show vlan brief command to verify that all ports are in VLAN 99.
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.
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
© 2013 - 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 5 of 11 www.netacad.com
Lab - Basic Switch Configuration
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.
Question:
© 2013 - 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 6 of 11 www.netacad.com
Lab - Basic Switch Configuration
!
enable secret 5 $1$mtvC$6NC.1VKr3p6bj7YGE.jNg0
!
no aaa new-model
system mtu routing 1500
!
!
no ip domain-lookup
!
<output omitted>
!
interface FastEthernet0/24
switchport access vlan 99
!
interface GigabitEthernet0/1
switchport access vlan 99
!
interface GigabitEthernet0/2
switchport access vlan 99
!
interface Vlan1
no ip address
no ip route-cache
!
interface Vlan99
ip address 192.168.1.2 255.255.255.0
ipv6 address FE80::2 link-local
ipv6 address 2001:DB8:ACAD::2/64
!
ip default-gateway 192.168.1.1
ip http server
ip http secure-server
!
banner motd ^C
Unauthorized access is strictly prohibited. ^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
© 2013 - 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 7 of 11 www.netacad.com
Lab - Basic Switch Configuration
b. From the command prompt on PC-A, ping the SVI management address of S1.
C:\> ping 192.168.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.
© 2013 - 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 8 of 11 www.netacad.com
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:
© 2013 - 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 9 of 11 www.netacad.com
Lab - Basic Switch Configuration
f. 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.
S1(config)# no mac address-table static 0050.56BE.6C89 vlan 99 interface
fastethernet 0/6
g. Verify that the static MAC address has been cleared.
S1# show mac address-table
Question:
Reflection Questions
1. Why should you configure the vty password for the switch?
Type your answers here.
2. Why change the default VLAN 1 to a different VLAN number?
Type your answers here.
3. How can you prevent passwords from being sent in plain text?
Type your answers here.
4. Why configure a static MAC address on a port interface?
Type your answers here.
© 2013 - 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 10 of 11 www.netacad.com
Lab - Basic Switch Configuration
Switch> enable
Switch#
b. Use the show flash command to determine if any VLANs have been created on the switch.
Switch# show flash
Directory of flash:/
c. If the vlan.dat file was found in flash, then delete this file.
Switch# delete vlan.dat
Delete filename [vlan.dat]?
d. You are prompted to verify the filename. If you have entered the name correctly, press Enter; otherwise,
you can change the filename.
You are prompted to confirm deletion of this file. Press Enter to confirm.
Delete flash:/vlan.dat? [confirm]
Switch#
e. 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]
Erase of nvram: complete
Switch#
f. 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
g. 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
© 2013 - 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 11 of 11 www.netacad.com