Inter-VLAN Routing Lab 4.5.2
Inter-VLAN Routing Lab 4.5.2
Topology
VLAN Table
VLAN Name Assigned interface
VLAN 10
10 Management S2: VLAN 10
20 Sales S1: F0/6
30 Operations S2: F0/18
S1: F0/2-4, F0/7-24, G0/1-2
999 Parking Lot S2: F0/2-17, F0/19-24, G0/1-2
1000 Native N/D
2019 - Cisco and/or its subsidiaries. All rights reserved. Public information from Cisco Page 1 of 14
[Link]
Laboratory: Implement inter-VLAN routing
Objectives
Part 1: Set up the network and configure the basic parameters of the devices
Part 2: Create VLAN networks and assign switch ports
Part 3: configure a 802.1Q trunk link between the Switches
Part 4: Configure Inter-VLAN Routing on the Router
Part 5: Verify that Inter-VLAN Routing is functioning
Basic aspects/situation
Modern switches use virtual local area networks (VLANs) to improve network performance.
by dividing large layer 2 broadcast domains into smaller ones. VLANs also
they can be used as a security measure by separating the traffic of confidential data from the rest of the network.
Generally, VLANs facilitate the design of a network to support the objectives of a
Organization. Communication between VLANs requires a device that operates at layer 3 of the model.
OSI. The addition of an interVLAN router allows the organization to segregate and separate broadcast domains.
same time that allows them to communicate with each other.
VLAN trunk links are used to span VLAN networks across multiple devices. The
trunk links allow traffic from several VLANs to be transferred over a single link and maintain
intact the segmentation and identification of VLAN. A particular type of routing between VLAN, called
"Router-on-a-Stick" uses a trunk from the router to the switch to allow all VLANs to pass through.
router.
In this lab, you will create VLANs on both switches of the topology, assign VLANs to the ports of
switch access, and verify that the VLANs are functioning as expected, create VLAN trunks between the two
switches and between S1 and R1, and configure the routing between VLAN on R1 to allow hosts from
different VLANs communicate, regardless of the subnet the host resides in.
Note: The routers used with the CCNA practical labs are Cisco 4221 with Cisco IOS XE.
version 16.9.4 (universalk9 image). The switches used in the labs are Cisco Catalyst 2960s with
Cisco IOS Release 15.2 (2) (lanbasek9 image). Other routers, switches, and other versions can be used.
of Cisco IOS. Depending on the model and the version of Cisco IOS, the available commands and the results that are
The results obtained may differ from those shown in the laboratory practices. Please refer to the Summary table.
router interfaces at the end of the lab practice to obtain the correct interface identifiers.
Note: Make sure that the routers and switches have been cleared and do not have startup configurations. If
If you are not sure, consult the instructor.
Necessary resources
1 router (Cisco 4221 with universal image Cisco IOS XE version 16.9.4 or comparable)
2 switches (Cisco 2960 with Cisco IOS version 15.0(2), lanbasek9 image or comparable)
2 PCs (Windows with a terminal emulation program, such as Tera Term)
Console cables to configure devices with Cisco IOS through the console ports
Ethernet cables, as shown in the topology
Instructions
Part 1: Set up the network and configure the basic settings of the devices
In part 1, you will establish the network topology and configure the basic parameters on the host devices.
the switches.
2019 - Cisco and/or its subsidiaries. All rights reserved. Public information from Cisco Page 2 of 14
[Link]
Laboratory: Implement inter-VLAN routing
Router>enable
b. Enter configuration mode.
Router#configure terminal
c. Assign a device name to the router.
Router(config)#hostname R1
d. Disable DNS search to prevent the router from attempting to translate incorrectly entered commands as
if they were host names.
R1(config)#no ip domain lookup
e. Assign class as the encrypted password of the privileged EXEC mode.
R1(config)#enable secret class
f. Assign ciscocomo as the console password and enable login.
R1(config)#line console 0
R1(config-line)#password cisco
R1(config-line)#login
2019 - Cisco and/or its subsidiaries. All rights reserved. Public information from Cisco Page 3 of 14
[Link]
Laboratory: Implement inter-VLAN routing
Switch(config)#hostname S2
b. Disable the DNS search to prevent the router from trying to translate incorrectly entered commands as
if they were host names.
S1(config)#no ip domain-lookup
S2(config)#no ip domain-lookup
S2(config)#line console 0
S2(config-line)#password cisco
S2(config-line)#login
S2(config-line)#
S2(config)#line vty 0 4
S2(config-line)#password cisco
S2(config-line)#login
S2(config-line)#
S2(config)#service password-encryption
2019 - by Cisco and/or its subsidiaries. All rights reserved. Public information from Cisco Page 4 of 14
[Link]
Laboratory: Implement inter-VLAN routing
g. Create a notice warning anyone accessing the device that unauthorized access is prohibited
forbidden.
S1(config)#banner motd %"ACCESO DENEGADO"%
S1(config)#vlan 10
S1(config-vlan)#name Management
S1(config-vlan)#vlan 20
S1(config-vlan)#name Sales
S1(config-vlan)#vlan 30
S1(config-vlan)#name Operations
S1(config-vlan)#vlan 999
S1(config-vlan)#name Parking_Lot
S1(config-vlan)#vlan 1000
S1(config-vlan)#name Native
2019 - Cisco and/or its subsidiaries. All rights reserved. Public information from Cisco Page 5 of 14
[Link]
Laboratory: Implementing inter-VLAN routing
S1(config-vlan)#exit
S1(config)#
S2(config)#vlan 10
S2(config-vlan)#name Management
S2(config-vlan)#vlan 20
S2(config-vlan)#name Sales
S2(config-vlan)#vlan 30
S2(config-vlan)#name Operations
S2(config-vlan)#vlan 999
S2(config-vlan)#name Parking_Lot
S2(config-vlan)#vlan 1000
S2(config-vlan)#name Native
S2(config-vlan)#exit
S2(config)#
b. Configure the management interface and the default gateway on each switch with the information
of the IP address included in the routing table.
S1(config)#interface vlan 10
S1(config-if)#ip address [Link] [Link]
S1(config-if)#no shutdown
S1(config-if)#exit
S1(config)#ip default-gateway [Link]
S1(config)#
S2(config)#interface vlan 10
S2(config-if)#ip address [Link] [Link]
S2(config-if)#no shutdown
S2(config-if)#exit
S2(config)#ip default-gateway [Link]
S2(config)#
c. Assign all unused ports of the switch to the Parking_Lot VLAN, configure them for the mode of
static access and disable them administratively.
Note: The interface range command is useful for carrying out this task with the few commands that are
necessary.
S1(config)#interface range f0/2-4,f0/7-24,g0/1-2
S1(config-if-range)#switchport mode access
S1(config-if-range)#switchport access vlan 999
S1(config-if-range)#shutdown
2019 - Cisco and/or its subsidiaries. All rights reserved. Public information from Cisco Page 6 of 14
[Link]
Laboratory: Implementing inter-VLAN routing
S2(config)#interface f0/18
S2(config-if)#switchport mode access
S2(config-if)#switchport access vlan 30
S2(config-if)#exit
2019 - Cisco and/or its subsidiaries. All rights reserved. Public information from Cisco. Page 7 of 14
[Link]
Laboratory: Implementing inter-VLAN routing
Step 1: Manually configure the trunk interface F0/1 on switch S1 and S2.
a. Configure the static trunk connection on interface F0/1 for both switches.
Open the settings window
S1(config)#interface f0/1
S1(config-if)#switchport mode trunk
S2(config)#interface f0/1
S2(config-if)#switchport mode trunk
c. Specify that VLANs 10, 20, 30, and 1000 can traverse the trunk.
S1(config-if)#switchport trunk allowed vlan 10,20,30,1000
2019 - Cisco and/or its affiliates. All rights reserved. Public information from Cisco Page 8 of 14
[Link]
Laboratory: Implement inter-VLAN routing
d. Check the trunk link ports, the native VLAN, and the allowed VLANs on the trunk.
2019 - Cisco and/or its affiliates. All rights reserved. Public information from Cisco Page 9 of 14
[Link]
Laboratory: Implement inter-VLAN routing
Question:
R1(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0/1, changed state to up
R1(config-if)#
2019 - Cisco and/or its subsidiaries. All rights reserved. Public information from Cisco. Page 10 of 14
[Link]
Laboratory: Implement inter-VLAN routing
b. Configure the subinterfaces for each VLAN as specified in the IP address table. All the
Subinterfaces use 802.1Q encapsulation. Make sure that the native VLAN subinterface does not
assign an IP address. Include a description for each subinterface.
R1(config)#interface g0/0/1.10
Management Network
R1(config-subif)#encapsulation dot1q 10
R1(config-subif)#ip address [Link] [Link]
R1(config-subif)#interface g0/0/1.20
R1(config-subif)#description Sales Network
R1(config-subif)#encapsulation dot1q 20
R1(config-subif)#ip address [Link] [Link]
R1(config-subif)#interface g0/0/1.30
R1(config-subif)#description Operations Network
R1(config-subif)#encapsulation dot1q 30
R1(config-subif)#ip address [Link] [Link]
R1(config-subif)#interface g0/0/1.1000
R1(config-subif)#description Red Native
R1(config-subif)#encapsulation dot1q 1000 native
R1(config-subif)#
2019 - Cisco and/or its subsidiaries. All rights reserved. Public information from Cisco Page 11 of 14
[Link]
Laboratory: Implement inter-VLAN routing
2019 - aa Cisco and/or its subsidiaries. All rights reserved. Public information from Cisco Page 12 of 14
[Link]
Laboratory: Implement inter-VLAN routing
Question:
Note: To know the router configuration, observe the interfaces to identify the type of router and
how many interfaces does it have. There is no effective way to compile a list of all the combinations of
configurations for each class of router. This table includes the identifiers for the possible
combinations of Ethernet and serial interfaces on the device. This table does not include any other type
of interface, although there may be other types of interfaces on a given router. The BRI ISDN interface is a
example of this. The string in parentheses is the legal abbreviation that can be used in a command for
Cisco IOS to represent the interface.
End of document
2019 - Cisco and/or its subsidiaries. All rights reserved. Public information from Cisco Page 13 of 14
[Link]
Laboratory: Implement inter-VLAN routing
2019 - at Cisco and/or its subsidiaries. All rights reserved. Public information from Cisco Page 14 of 14
[Link]