CCNA · LAB 3
Intervlan Routing
Objectives
- Configure intervlan routing using : Layer 3 Switch (SVI Method), Routed Ports Method (Physical Interfaces as L3) ,Router on a Stick(ROAS)
- Understanding the advantages and disadvantage of each of the technique used for intervlan routing
Theory
PCS in different Vlans cannot communicate with each other. To make Communication between two vlans we need a L3 device that routes traffic between different Vlans
| Method | How it Works | Advantages | Disadvantages |
|---|---|---|---|
| Router-on-a-Stick (ROAS) | One router interface with multiple subinterfaces using 802.1Q VLAN tagging. | Cost-effective, uses a single router port, easy to configure in labs. | Single point of failure, limited scalability, and the router link can become a bottleneck. |
| SVI (Layer 3 Switch) | VLAN interfaces (SVIs) are created on a multilayer switch to perform inter-VLAN routing. | Fast hardware-based routing, scalable, and no external router is required for local routing. | Requires a Layer 3 switch, higher initial cost, and more complex configuration. |
| Legacy Router (Multiple Interfaces) | Each VLAN connects to a separate physical router interface, with each interface acting as its VLAN's gateway. | Simple concept and easy to understand. | Not scalable, requires many physical router ports, and is expensive for larger networks. |
Network Topology
Interface Details & IP Addresses
| Sl.No | Device | Interface | IP Address |
|---|---|---|---|
| 1 | MLS | Fa0/0 | 192.168.10.1 |
| Fa0/1 | 192.168.20.1 | ||
| 2 | R1 | Gi0/0 | 192.168.10.1 |
| Gi0/1 | 192.168.20.1 | ||
| 3 | S1 | Fa0/3 | NA |
| Fa0/4 | NA | ||
| 4 | R2 | Gi0/0.10 | 192.168.10.1 |
| Gi0/0.20 | 192.168.20.1 | ||
| 5 | S1 | Fa0/3 | NA |
| Fa0/4 | NA |
Configuration Commands
1. Router-on-a-Stick (ROAS) Method
Switch
enable configure terminal vlan 10 name VLAN10 vlan 20 name VLAN20 interface FastEthernet0/1 switchport mode access switchport access vlan 10 interface FastEthernet0/2 switchport mode access switchport access vlan 20 interface FastEthernet0/3 switchport mode trunk switchport trunk allowed vlan 10,20 end
Router
enable configure terminal interface GigabitEthernet0/0/0 no shutdown interface GigabitEthernet0/0/0.10 encapsulation dot1Q 10 ip address 192.168.10.1 255.255.255.0 interface GigabitEthernet0/0/0.20 encapsulation dot1Q 20 ip address 192.168.20.1 255.255.255.0 end
2. Routed Ports Method
Switch
enable configure terminal vlan 10 name VLAN10 vlan 20 name VLAN20 interface FastEthernet0/1 switchport access vlan 10 switchport mode access interface FastEthernet0/2 switchport access vlan 20 switchport mode access interface FastEthernet0/3 switchport access vlan 10 switchport mode access interface FastEthernet0/4 switchport access vlan 20 switchport mode access end
Router
enable configure terminal ip routing interface FastEthernet0/3 no switchport ip address 192.168.10.1 255.255.255.0 no shutdown interface FastEthernet0/4 no switchport ip address 192.168.20.1 255.255.255.0 no shutdown end
3. Layer 3 Switch (SVI) Method
L3 Switch
enable configure terminal vlan 10 name VLAN10 vlan 20 name VLAN20 ip routing interface FastEthernet0/1 switchport mode access switchport access vlan 10 interface FastEthernet0/2 switchport mode access switchport access vlan 20 interface Vlan10 ip address 192.168.10.1 255.255.255.0 no shutdown interface Vlan20 ip address 192.168.20.1 255.255.255.0 no shutdown end
Verification Commands & Outputs
1. Router-on-a-Stick (ROAS) Method
On Switch (S1)
S1# show vlan brief
VLAN Name Status Ports 1 default active 10 VLAN10 active Fa0/1 20 VLAN20 active Fa0/2
S1# show interfaces trunk
Port Mode Encapsulation Status Native vlan Fa0/3 on 802.1q trunking 1 Port Vlans allowed on trunk Fa0/3 10,20 Port Vlans allowed and active in management domain Fa0/3 10,20
On Router (R2)
R2# show ip interface brief
Interface IP-Address OK? Method Status Protocol GigabitEthernet0/0/0 unassigned YES unset up up GigabitEthernet0/0/0.10 192.168.10.1 YES manual up up GigabitEthernet0/0/0.20 192.168.20.1 YES manual up up
R2# show ip route
Gateway of last resort is not set
C 192.168.10.0/24 is directly connected,
GigabitEthernet0/0/0.10
L 192.168.10.1/32 is directly connected,
GigabitEthernet0/0/0.10
C 192.168.20.0/24 is directly connected,
GigabitEthernet0/0/0.20
L 192.168.20.1/32 is directly connected,
GigabitEthernet0/0/0.20
PC1> ping 192.168.20.10
Reply from 192.168.20.10: bytes=32 time=1ms TTL=127 Reply from 192.168.20.10: bytes=32 time=1ms TTL=127 Reply from 192.168.20.10: bytes=32 time=1ms TTL=127 Reply from 192.168.20.10: bytes=32 time=1ms TTL=127 Packets: Sent = 4, Received = 4, Lost = 0 (0% loss)
2. Routed Ports Method
On Switch (S1)
S1# show vlan brief
VLAN Name Status Ports 1 default active 10 VLAN10 active Fa0/1, Fa0/3 20 VLAN20 active Fa0/2, Fa0/4
On Multilayer Switch (MLS)
MLS# show ip interface brief
Interface IP-Address OK? Method Status Protocol FastEthernet0/3 192.168.10.1 YES manual up up FastEthernet0/4 192.168.20.1 YES manual up up
MLS# show ip route
Gateway of last resort is not set C 192.168.10.0/24 is directly connected, FastEthernet0/3 L 192.168.10.1/32 is directly connected, FastEthernet0/3 C 192.168.20.0/24 is directly connected, FastEthernet0/4 L 192.168.20.1/32 is directly connected, FastEthernet0/4
MLS# show running-config
! ip routing ! interface FastEthernet0/3 no switchport ip address 192.168.10.1 255.255.255.0 ! interface FastEthernet0/4 no switchport ip address 192.168.20.1 255.255.255.0 !
PC1> ping 192.168.20.10
Reply from 192.168.20.10: bytes=32 time=1ms TTL=127 Reply from 192.168.20.10: bytes=32 time=1ms TTL=127 Reply from 192.168.20.10: bytes=32 time=1ms TTL=127 Reply from 192.168.20.10: bytes=32 time=1ms TTL=127 Packets: Sent = 4, Received = 4, Lost = 0 (0% loss)
3. Layer 3 Switch (SVI) Method
On Multilayer Switch (MLS)
MLS# show vlan brief
VLAN Name Status Ports 1 default active 10 VLAN10 active Fa0/1 20 VLAN20 active Fa0/2
MLS# show ip interface brief
Interface IP-Address OK? Method Status Protocol Vlan10 192.168.10.1 YES manual up up Vlan20 192.168.20.1 YES manual up up FastEthernet0/1 unassigned YES unset up up FastEthernet0/2 unassigned YES unset up up
MLS# show ip route
Gateway of last resort is not set C 192.168.10.0/24 is directly connected, Vlan10 L 192.168.10.1/32 is directly connected, Vlan10 C 192.168.20.0/24 is directly connected, Vlan20 L 192.168.20.1/32 is directly connected, Vlan20
MLS# show running-config
! ip routing ! interface Vlan10 ip address 192.168.10.1 255.255.255.0 ! interface Vlan20 ip address 192.168.20.1 255.255.255.0 !
PC1> ping 192.168.20.10
Reply from 192.168.20.10: bytes=32 time=1ms TTL=127 Reply from 192.168.20.10: bytes=32 time=1ms TTL=127 Reply from 192.168.20.10: bytes=32 time=1ms TTL=127 Reply from 192.168.20.10: bytes=32 time=1ms TTL=127 Packets: Sent = 4, Received = 4, Lost = 0 (0% loss)
Learning Outcomes
Understood the advantage and disadvantage of various intervlan technology
Verify configurations using Cisco IOS show commands and test connectivity between different VLANs using ping.