0% found this document useful (0 votes)
59 views14 pages

Inter-VLAN Routing Lab 4.5.2

This document describes how to implement VLAN routing in a network lab. A network topology is provided that includes a router and two switches. IP addresses are assigned to the devices and VLAN tables are created. The objective is to create VLANs on the switches, assign ports, configure trunk links between switches and between switches and the router, and configure inter-VLAN routing on the router to allow communication between hosts in different VLANs across subnets.

Translated by

ScribdTranslations
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views14 pages

Inter-VLAN Routing Lab 4.5.2

This document describes how to implement VLAN routing in a network lab. A network topology is provided that includes a router and two switches. IP addresses are assigned to the devices and VLAN tables are created. The objective is to create VLANs on the switches, assign ports, configure trunk links between switches and between switches and the router, and configure inter-VLAN routing on the router to allow communication between hosts in different VLANs across subnets.

Translated by

ScribdTranslations
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Laboratory: Implement inter-VLAN routing

Topology

Address assignment table


Mask of Gateway
Device Interface IP Address subreddit default

R1 G0/0/1.10 [Link] [Link] N/A


G0/0/1.20 [Link] [Link]
R1 N/A

G0/0/1.30 [Link] [Link]


R1 N/A

G0/0/1.1000 Does not correspond Not applicable


R1 It does not correspond

S1 VLAN 10 [Link] [Link] [Link]


S2 VLAN 10 [Link] [Link] [Link]
PC-A NIC [Link] [Link] [Link]
PC-B NIC [Link] [Link] [Link]

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

Step 1: Perform the network cabling as shown in the topology


Connect the devices as shown in the topology and make the necessary wiring.

Step 2: configure the basic parameters for the router.


a. Access the router via the console port and enable privileged EXEC mode.
Open the settings window

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

g. Assign cisco as the vty password and enable login.


R1(config)#line vty 0 4
R1(config-line)#password cisco
R1(config-line)#login
R1(config-line)#
R1(config-line)#exit
h. Encrypt plaintext passwords.
R1(config)#service password-encryption
Create a notice warning anyone accessing the device that unauthorized access is prohibited.
forbidden.
R1(config)#banner motd %"ACCESS DENIED"%
R1(config)#exit
j. Save the running configuration to the startup configuration file
R1#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
R1#
k. Configure the clock on the router.
R1#clock set 12:41:00 17 Aug 2021
Close the settings window

2019 - Cisco and/or its subsidiaries. All rights reserved. Public information from Cisco Page 3 of 14
[Link]
Laboratory: Implement inter-VLAN routing

Step 3: Configure the basic parameters for each switch


a. Assign a device name to the switch.
Switch(config)#hostname S1

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

c. Assign class as the encrypted password of privileged EXEC mode.


S1(config)#enable secret class

S2(config)#enable secret class

d. Assign cisco as the console password and enable login.


S1(config)#line console 0
S1(config-line)#password cisco
S1(config-line)#login
S1(config-line)#

S2(config)#line console 0
S2(config-line)#password cisco
S2(config-line)#login
S2(config-line)#

e. Assign cisco as the vty password and enable login.


S1(config)#line vty 0 4
S1(config-line)#password cisco
S1(config-line)#login
S1(config-line)#

S2(config)#line vty 0 4
S2(config-line)#password cisco
S2(config-line)#login
S2(config-line)#

f. Encrypt plaintext passwords.


S1(config)#service password-encryption

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"%

S2(config)#banner motd %"ACCESS DENIED"%


h. Adjust the clock on the switch.
S1#clock set 09:44 17 Aug 2021

S1#clock set 10:30 17 Aug 2021

i. Save the running configuration to the startup configuration


S1#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
OK
S1#

S2#copy running-config startup-config


Destination filename [startup-config]?
Building configuration...
OK
S2#

Close the settings window

Step 4: Configure the host devices


Refer to the addressing table to obtain information on the addresses of the host devices.

Part 2: Create VLAN networks and assign switch ports


In Part 2, you will create VLAN as specified in the table above on both switches. Next,
will assign the VLANs to the appropriate interface and verify the configuration values. Complete the following
tasks on each switch.

Step 1: Create the VLANs on the switches


a. Create and assign a name to the necessary VLANs on each switch in the table above.
Open the settings window

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

S2(config)#interface range f0/2-17,f0/19-24,g0/1-2

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-if-range)#switchport mode access


S2(config-if-range)#switchport access vlan 999
S2(config-if-range)#shutdown

Step 2: Assign the VLANs to the correct switch interfaces


a. Assign the used ports to the appropriate VLAN (as specified in the previous VLAN table) and configure them.
for the static access mode.
S1(config)#interface f0/6
S1(config-if)#switchport mode access
S1(config-if)#switchport access vlan 20
S1(config-if)#exit

S2(config)#interface f0/18
S2(config-if)#switchport mode access
S2(config-if)#switchport access vlan 30
S2(config-if)#exit

b. Check that the VLANs are assigned to the correct interfaces.

Close the settings window

2019 - Cisco and/or its subsidiaries. All rights reserved. Public information from Cisco. Page 7 of 14
[Link]
Laboratory: Implementing inter-VLAN routing

Part 3: Configure a 802.1Q trunk link between the switches


In Part 3, you will manually configure the interface F0/1 as a trunk.

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

b. Set the native VLAN to 1000 on both switches.


S1(config-if)#switchport trunk native vlan 1000

%CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on


FastEthernet0/1 (1000), with Switch FastEthernet0/1 (1).

S2(config-if)#switchport trunk native vlan 1000


%CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on
FastEthernet0/1 (1000), with Switch FastEthernet0/1 (1).

c. Specify that VLANs 10, 20, 30, and 1000 can traverse the trunk.
S1(config-if)#switchport trunk allowed vlan 10,20,30,1000

S2(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.

Step 2: Manually configure the trunk interface of S1 F0 / 5


a. Configure interface F0/5 of S1 with the same trunk parameters as F0/1. This is the trunk of
router.
S1(config)#interface f0/5
S1(config-if)#switchport mode trunk
S1(config-if)#switchport trunk native vlan 1000
S1(config-if)#switchport trunk allowed vlan 10,20,30,1000

b. Save the running configuration to the startup configuration file


S1#copy running-configuration startup-configuration
Destination filename [startup-config]?
Building configuration...
OK
S1#

2019 - Cisco and/or its affiliates. All rights reserved. Public information from Cisco Page 9 of 14
[Link]
Laboratory: Implement inter-VLAN routing

S2#copy running-config startup-config


Destination filename [startup-config]?
Building configuration...
[OK]
S2#

c. Check the trunk connection.

Question:

What happens if G0/0/1 on R1 is down?


The GigabitEthernet interface is inactive on the router, so its status is not displayed.
Close the settings window

Part 4: Configure routing between VLANs on the router


Step 1: Set up the router
Open the settings window

a. Activate the G0/0/1 interface as needed on the router.


R1(config)#interface g0/0/1
R1(config-if)#no shutdown

R1(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0/1, changed state to up

Line protocol on 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)#

c. Verify that the subinterfaces are operational

Close the settings window

Part 5: Verify that inter-VLAN routing is working


Step 1: Complete the following PC-A tests. Everything should succeed.
Note: You may need to disable the PC firewall for pings to work.
a. Ping from PC-A to its default gateway.
b. Send a ping command from PC-A to PC-B
c. Ping from PC-A to S2

2019 - Cisco and/or its subsidiaries. All rights reserved. Public information from Cisco Page 11 of 14
[Link]
Laboratory: Implement inter-VLAN routing

Step 2: Complete the following PC-B test


From the command window on PC-B, execute the command tracert to the address of PC-A.

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:

What intermediate IP addresses are shown in the results?


The results first show the gateway address of PC-B, which would be
the same address of interface G0/0/1.30 of R1. And the second address is that of PC-A

Router Interface Summary Table


Model of
router Ethernet Interface 1 Ethernet Interface #2 Serial interface 1 Serial interface #2

Fast Ethernet 0/0 Fast Ethernet 0/1


1800 (F0/0) (F0/1) Serial 0/0/0 (S0/0/0) Serial 0/0/1 (S0/0/1)
Gigabit Ethernet 0/0 Gigabit Ethernet 0/1
1900 (G0/0) (G0/1) Serial 0/0/0 (S0/0/0) Serial 0/0/1 (S0/0/1)
Fast Ethernet 0/0 Fast Ethernet 0/1
2801 (F0/0) (F0/1) Serial 0/1/0 (S0/1/0) Serial 0/1/1 (S0/1/1)
Fast Ethernet 0/0 Fast Ethernet 0/1
2811 (F0/0) (F0/1) Serial 0/0/0 (S0/0/0) Serial 0/0/1 (S0/0/1)
Gigabit Ethernet 0/0 Gigabit Ethernet 0/1
2900 (G0/0) (G0/1) Serial 0/0/0 (S0/0/0) Serial 0/0/1 (S0/0/1)
Gigabit Ethernet 0/0/0 Gigabit Ethernet 0/0/1
4221 (G0/0/0) (G0/0/1) Serial 0/1/0 (S0/1/0) Serial 0/1/1 (S0/1/1)
Gigabit Ethernet 0/0/0 Gigabit Ethernet 0/0/1
4300 (G0/0/0) (G0/0/1) Serial 0/1/0 (S0/1/0) Serial 0/1/1 (S0/1/1)

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]

You might also like