Introduction:
Inter-VLAN Routing
means enabling communication between originally isolatedvlans
, andRouter on a Stick
(also called single-arm routing) refers to implementingvlan
communication on a single port of a router.
Objective:
Configure multiple
vlan
groups on a single router port and enable communication between differentvlans
.
Simulation Scenario:
vLan | IP(Subnet) |
---|---|
vlan10 | 10.10.10.0/24 |
vlan20 | 10.10.20.0/24 |
PC1 is in vlan10, PC2 is in vlan20, the IPs of the two computers are in different segments, and the router settings allow PC1 and PC2 to communicate with each other.
Router Settings (Cisco 2901)
|
|
Enter
Global Configuration Mode
|
|
Select physical port 0/1 and enable it
|
|
Configure sub-interface on physical port 0/1
Configure 802.1Q protocol and assign vlan10
Set the IP address of the interface
|
|
Configure sub-interface on physical port 0/1
Configure 802.1Q protocol and assign vlan20
Set the IP address of the interface
|
|
Save the configuration
DHCP Server Setup on the Router
|
|
Enter
Global Configuration Mode
|
|
10.10.10.1 - 10.10.10.50 are reserved IP address segments, not assigned to devices.
Create an address allocation pool named dhcp.vlan10
Default router IP address 10.10.10.1
Network segment is 10.10.10.0/24
DNS server is 1.1.1.1
|
|
10.10.20.1 - 10.10.20.50 are reserved IP address segments, not assigned to devices.
Create an address allocation pool named dhcp.vlan20
Default router IP address 10.10.20.1
Network segment is 10.10.20.0/24
DNS server is 1.1.1.1
|
|
Save the configuration
Switch Settings (Cisco 2960)
|
|
Enter
Global Configuration Mode
|
|
Create and name vlan10
|
|
Create and name vlan20
|
|
Configure port 0/1 in access mode and assign it to vlan10
|
|
Configure port 0/2 in access mode and assign it to vlan20
|
|
Configure port 0/24 in trunk mode to connect to the router
|
|
Save the configuration
Test Connectivity
Connect PC1 to
FastEthernet 0/1
and PC2 toFastEthernet 0/5
on the switch. Connect the router’sGigabitEthernet 0/1
port to the switch’sGigabitEthernet 0/1
port. Set PC1 and PC2 to obtain IP addresses automatically. They should receive IP addresses from their respective DHCP pools.
PC1 is assigned the IP address 10.10.10.51 (vlan10 network segment)
PC2 is assigned the IP address 10.10.20.51 (vlan20 network segment)
Test connectivity between PC1 and PC2 by using the ping
command.
Conclusion:
We be able to successfully send and receive packets between PC1 and PC2, even though they are on different VLANs. This demonstrates successful inter-VLAN communication using the Router on a Stick method.