3.4.6 Lab - Configure Vlans and Trunking Answers
3.4.6 Lab - Configure Vlans and Trunking Answers
Topology
Addressing Table
Device Interface IP Address Subnet Mask Default Gateway
Objectives
Part 1: Build the Network and Configure Basic Device Settings
Part 2: Create VLANs and Assign Switch Ports
Part 3: Maintain VLAN Port Assignments and the VLAN Database
Part 4: Configure an 802.1Q Trunk between the Switches
Part 5: Delete the VLAN Database
Background / Scenario
Modern switches use virtual local-area networks (VLANs) to improve network
performance by separating large Layer 2 broadcast domains into smaller ones. VLANs
can also be used as a security measure by controlling which hosts can communicate. In
general, VLANs make it easier to design a network to support the goals of an
organization.
VLAN trunks are used to span VLANs across multiple devices. Trunks allow the traffic
from multiple VLANS to travel over a single link, while keeping the VLAN identification
and segmentation intact.
In this lab, you will create VLANs on both switches in the topology, assign VLANs to
switch access ports, verify that VLANs are working as expected, and then create a VLAN
trunk between the two switches to allow hosts in the same VLAN to communicate through
the trunk, regardless of which switch the host is actually attached to.
Note: The switches used with CCNA hands-on labs are Cisco Catalyst
2960s with Cisco IOS Release 15.2(2) (lanbasek9 image). Other routers, switches, and
Cisco IOS versions can be used. Depending on the model and Cisco IOS version, the
commands available and the output produced might vary from what is shown in the
labs. Refer to the Router Interface Summary Table at the end of the lab for the
correct interface identifiers.
Note: Ensure that the routers and switches have been erased and have no startup
configurations. If you are unsure contact your Answers.
Answers Note: Refer to the Answers Lab Manual for the procedures to initialize and
reload devices.
Required Resources
2 Switches (Cisco 2960 with Cisco IOS Release 15.2(2) lanbasek9 image or
comparable)
2 PCs (Windows with a terminal emulation program, such as Tera Term)
Console cables to configure the Cisco IOS devices via the console ports
Ethernet cables as shown in the topology
Instructions
switch> enable
1. Enter configuration mode.
switch# config terminal
1. Assign a device name to the switch.
switch(config)# hostname S1
switch(config)# hostname S2
1. Disable DNS lookup to prevent the router from attempting to translate incorrectly
entered commands as though they were host names.
S1(config)# no ip domain-lookup
S2(config)# no ip domain-lookup
1. Assign class as the privileged EXEC encrypted password.
S1(config)# enable secret class
S2(config)# enable secret class
1. Assign cisco as the console password and enable login.
S1(config)# line console 0
S1(config-line)# password cisco
S1(config-line)# login
S2(config)# line console 0
S2(config-line)# password cisco
S2(config-line)# login
1. Assign cisco as the vty password and enable login.
S1(config)# line vty 0 4
S1(config-line)# password cisco
S1(config-line)# login
S2(config)# line vty 0 4
S2(config-line)# password cisco
S2(config-line)# login
1. Encrypt the plaintext passwords.
S1(config)# service password-encryption
S2(config)# service password-encryption
1. Create a banner that warns anyone accessing the device that unauthorized access is
prohibited.
S1(config)# banner motd $ Authorized Users Only! $
S2(config)# banner motd $ Authorized Users Only! $
1. Configure the IP address listed in the Addressing Table for VLAN 1 on the switch.
S1(config)# interface vlan 1
S1(config-if)# ip address 192.168.1.11 255.255.255.0
S1(config-if)# no shutdown
S1(config-if)# exit
S2(config)# interface vlan 1
S2(config-if)# ip address 192.168.1.12 255.255.255.0
S2(config-if)# no shutdown
S2(config-if)# exit
1. Shut down all interfaces that will not be used.
S1(config)# interface range f0/2-5, f0/7-24, g0/1-2
S1(config-if-range)# shutdown
S2(config)# interface range f0/2-17, f0/18-24, g0/1-2
S2(config-if-range)# shutdown
1. Set the clock on the switch.
S1# clock set 15:30:00 19 September 2019
S2# clock set 15:30:00 19 September 2019
1. Save the running configuration to the startup configuration file.
S1# copy running-config startup-config
S2# copy running-config startup-config
Close configuration window