Chapter3 InterVLAN Routing
Chapter3 InterVLAN Routing
InterVLAN Routing
Module Switched Networks
3rd Year
2021/2022
1
Part 1
Intra-VLAN versus Inter-VLAN switching
3
Reminder: What is a VLAN?
A logical collection of entities or users
that can be grouped together
regardless of their physical location.
4
Types of VLAN communication (1/2)
VLAN = Separate broadcast domain
Broadcast
Broadcasts should be limited to the level Frame Vlan 10
of a VLAN.
Vlan 20
55
Types of VLAN communication (2/2)
Intra-VLAN Communication
It is a communication between two machines that belong to the same VLAN.
Inter-VLAN Communication
It is a communication between two machines that belong to two different VLANs.
S1 tells S2 the VID of the source S2 checks the tag and identifies the nature of
in an 802.1Q tag the communication:
Intra-Vlan: S2 removes the tag and switches the frame
7
Part 2
Inter-VLAN routing and configuration methods
8
Inter-VLAN Routing (1/12)
Inter-Vlan routing is defined as communication between two machines belonging to different
VLANs This cannot be achieved by a Layer 2 switch.
Vlan x Vlan y
Vlan x Vlan y
Solution: Add a level 3 device (Router or level 3 switch)
9
Inter-VLAN Routing(2/12)
How?
There are 3 methods (options) to provide Inter-VLAN routing :
11
Inter-VLAN Routing(4/12)
Option 1 : Inter-Vlan routing by physical router interface (2/3)
Configuration: After configuring the required VLANs on the switches, the routing is configured on the router
12
Inter-VLAN Routing (5/12)
Option 1 : Inter-Vlan routing by physical router interface (3/3)
Example
Step 1: Configuration of the Switch
13
Inter-VLAN Routing(5/12)
Option 1 : Inter-Vlan routing by physical router interface (3/3)
Example
Step 2: Configuration of the routeur
0/1
0/1
15
Inter-VLAN Routing (7/12)
Option 2 : Inter-VLAN routing by sub-interfaces (Router-on-a-stick) (1/4)
Principle: Use a single physical interface of the
router to ensure Inter-VLAN communication.
• Logical sub-interfaces are created: one sub- Trunk Link
interface per VLAN.
• Each sub-interface is configured with an IP
address of the VLAN it represents.
17
Inter-VLAN Routing (9/12)
Option 2 : Inter-VLAN routing by sub-interfaces (Router-on-a-stick) (3/4)
Configuration: The configuration is done on :
1/ The switch connected to the router (trunk configuration on the link (switch-Router))
2/ The router (Router-on-a-stick)
2/ Configuration of the sub-interfaces and activation of the interface
Task IOS Command
Enter global configuration mode. Router# configure terminal
Enter sub-interface configuration mode Router(config)# interface interface-id.id_VLAN
Always start with the 802.1Q encapsulation for
Router(config-subif)# encapsulation dot1q id_vlan
the VLAN associated with the sub interface.
Configure the IP address of the sub-interface
Warning: This IP address must belong to the Router(config-subif)# ip address IP_address IP_Mask
VLAN network and will be the default gateway Router(config-subif)# exit
for the machines in this VLAN
Router(config) # interface interface_name
Activation of the router interface
Router(config-if)# no shutdown
18
Inter-VLAN Routing (10/12)
Option 2 : Inter-VLAN routing by sub-interfaces (Router-on-a-stick) (4/4)
Example
Step 1: Configuration of the Switch
G0/0
Trunk Configuration of VLANs
1 Access mode port assignment for Data VLANs
F0/5 Configuration of Trunk VLAN
VLAN 30
VLAN 10
Vlan 10 Vlan 30
Vlan 10 Vlan 30
The show vlan command displays information The show ip route displays the networks
about the sub-interfaces associated with the sub-interfaces
21
Inter-VLAN Routing (12/12)
Checking the configuration of the router-on-a-stick (2/2)
G0/0.10 G0/0.30
172.17.10.1 172.17.30.1
Vlan 30
Vlan 10
F0/1
VLAN 30
VLAN 10
Vlan 10 Vlan 30
23