0% found this document useful (0 votes)
12 views22 pages

Chapter3 InterVLAN Routing

Chapter 3 discusses InterVLAN routing, explaining the difference between Intra-VLAN and Inter-VLAN communication, where the latter requires a Layer 3 device for routing between different VLANs. It outlines three methods for Inter-VLAN routing: using physical router interfaces, logical sub-interfaces (Router-on-a-stick), and a Layer 3 switch. The chapter provides configuration details and examples for each method to facilitate effective network communication across VLANs.

Uploaded by

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

Chapter3 InterVLAN Routing

Chapter 3 discusses InterVLAN routing, explaining the difference between Intra-VLAN and Inter-VLAN communication, where the latter requires a Layer 3 device for routing between different VLANs. It outlines three methods for Inter-VLAN routing: using physical router interfaces, logical sub-interfaces (Router-on-a-stick), and a Layer 3 switch. The chapter provides configuration details and examples for each method to facilitate effective network communication across VLANs.

Uploaded by

mam838343
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 22

Chapter 3

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.

Users of the same VLAN are grouped


according to their function, services,
access rights, etc.

VLANs allow broadcast domains to be


logically segmented for better
performance on the network.

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.

Which type of communication?

 Intra – VLAN Vlan Vlan1


 Inter – VLAN 10 0
Vlan2 Vlan
0 20
 It depends on to which VLAN each
switch port belongs.

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.

Vlan x Vlan x Intra-Vlan Switching is provided by a


level 2 switch.
Vlan x Vlan x

Inter-VLAN Communication
It is a communication between two machines that belong to two different VLANs.

Vlan x Vlan y Inter-Vlan Switching cannot be


provided by a level 2 switch.
6
Intra-VLAN Switching
Untagged Frame Untagged Frame
Adding the tag
Sour Vlan x Destinati
ce
on
Vlan x Tagged Frame Vlan x
Vlan x Vlan x
Trunk Link
Vlan y Vlan y
S1 S2
Vlan y I have to tell S2
According to the tag, Vlan y
the VID of the
what is the type of
source!
communication?

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)

Inter-Vlan routing is the process of forwarding network traffic from


one Vlan to another using a Layer 3 device.

9
Inter-VLAN Routing(2/12)
How?
 There are 3 methods (options) to provide Inter-VLAN routing :

Option 1: Inter-VLAN routing by physical router interface


 Each physical interface on the router is dedicated to the traffic of a single VLAN
 There must be as many physical interfaces on the router as there are interconnected VLANs

Option 2: Inter-VLAN routing via logical sub-interfaces (Router-on-a-stick)


 A single physical interface of the router is used to route traffic between different VLANs.

Option 3: Use of a level 3 switch


 A level 3 switch is added to the network to provide Inter-VLAN routing.
10
Inter-VLAN Routing(3/12)
Option 1 : Inter-Vlan routing by physical router interface (1/3)
Principle: Use as many IP interfaces as VLANs
 Each VLAN (data and management) is
associated with a physical interface.
 The IP address of each router interface
belongs to the valid @IP range of the
associated VLAN.
 The IP addresses of the router interfaces are
the default gateway addresses at the PC level.
 When a packet is received from a VLAN, the
routing will switch the packet to the
appropriate interface according to the
destination IP address and the routing table
verification.

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

Task IOS Command


Enter the global configuration mode. Router# configure terminal
Configure the IP address of one router interface for Router(config)# interface interface-name
each VLAN Router(config-if)# ip address IP_address IP_Mask

Activation of the IP interface Router(config-if)# no shutdown


Save configuration Router(config-if)# do write memory

Configure an interface for each VLAN, even the management VLAN

12
Inter-VLAN Routing (5/12)
Option 1 : Inter-Vlan routing by physical router interface (3/3)
Example
Step 1: Configuration of the Switch

 Configuration of the VLANs


 Access mode port assignment for VLANs
1

13
Inter-VLAN Routing(5/12)
Option 1 : Inter-Vlan routing by physical router interface (3/3)
Example
Step 2: Configuration of the routeur

Configuration et activation of router IP interfaces


2

If the number of VLANs increases


 we will need more router interfaces!!!
14
Inter-VLAN Routing (6/12)
Option 1 : Checking the configuration of the router

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.

How to create logical sub-


interfaces on a single physical
interface?

Solution: Use of the 802.1q standard


1. The physical interface of the router must be connected to a trunk link on the adjacent switch.
2.Each sub-interface is assigned an IP address specific to its VLAN and is also configured to tag (label) frames for that
VLAN (802.1q encapsulation). 16
Inter-VLAN Routing (8/12)
Option 2 : Inter-VLAN routing by sub-interfaces (Router-on-a-stick) (2/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)
1/ Configuration of VLAN Trunk
Task IOS Command
Enter global configuration mode. Switch# configure terminal
Enter interface configuration mode Switch(config)# interface interface-id
Set the port to Trunk mode Switch(config-if)# switchport mode trunk
Choose a native VLAN other than VLAN 1.
Switch(config-if)# switchport trunk native vlan vlan-id
Caution: The Native VLAN must already be created
Specify the list of allowed VLANs on the trunk link. Switch(config-if)# switchport trunk allowed vlan vlan-list

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

@ IP_PC1: 172.17.10.10 @ IP_PC2: 172.17.30.23


Mask: 255.255.255.0 Mask: 255.255.255.0
19
Gateway: 172.17.10.1 Gateway: 172.17.30.1
Inter-VLAN Routing (10/12)
Option 2 : Inter-VLAN routing by sub-interfaces (Router-on-a-stick) (4/4)
Example 2
2 sub-interfaces: Step 2: Configuration of Router-on-a-stick
G0/0 G0/0.10 : 172.17.10.1/24
G0/0.30 : 172.17.30.1/24  Configuration of sub-interfaces
Trunk
1  Encapsulation dot1q on the VLAN
F0/5  Configuration of VLAN Trunk
VLAN 30  Activating the IP interface
VLAN 10

Vlan 10 Vlan 30

@ IP_PC1: 172.17.10.10 @ IP_PC2: 172.17.30.23


Mask: 255.255.255.0 Mask: 255.255.255.0
20
Gateway: 172.17.10.1 Gateway : 172.17.30.1
Inter-VLAN Routing (11/12)
Option 2 : Checking the configuration of the router-on-a-stick (2/2)

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

@ IP_PC1: 172.17.10.10 @ IP_PC2: 172.17.30.23


Mask: 255.255.255.0 Mask: 255.255.255.0
Gateway: 172.17.30.1 22
Gateway: 172.17.10.1
Fin chapitre 3

23

You might also like