Configure Inter-VLAN Routing as Router-on-a-Stick on Cisco Router

  • Post category:Blog
  • Post comments:0 Comments
  • Reading time:3 mins read

Configure Inter-VLAN Routing as Router-on-a-Stick on Cisco Router

Inter-VLAN routing is crucial for allowing communication between different VLANs within a network. In this tutorial, we’ll configure inter-VLAN routing using the Router-on-a-Stick method on a Cisco router. Follow the steps below to set up the topology shown in the image.

Topology Overview

Configure Inter-VLAN Routing as Router-on-a-Stick on Cisco Router Topology
Configure Inter-VLAN Routing as Router-on-a-Stick on Cisco Router Topology

Type of Inter-VLAN Routing

  1. Legacy Inter-VLAN Routing
  2. Inter-VLAN Routing as Router-on-a-Stick
  3. Inter-VLAN Routing as SVI

In this topology, we have:

  • A Cisco Router (R1) connected to a Cisco Switch (S1) via a trunk link.
  • Two VLANs:
    • VLAN 10 (IT) with subnet 192.168.10.0/24
    • VLAN 20 (HR) with subnet 192.168.20.0/24
  • PCs in each VLAN:
    • PC10 and PC11 in VLAN 10
    • PC20 and PC21 in VLAN 20

Type of Inter-VLAN Routing

  1. Legacy Inter-VLAN Routing
  2. Inter-VLAN Routing as Router-on-a-Stick
  3. Inter-VLAN Routing as SVI

Router Configuration

  1. Enable the Router and Enter Global Configuration Mode
    Router>enable
    Router#configure terminal
    Router(config)#hostname R1
    
  2. Configure the Physical Interface (GigabitEthernet 0/0/0)
    R1(config)#interface gigabitEthernet 0/0/0
    R1(config-if)#no shutdown
    R1(config-if)#exit
    
  3. Create Sub-Interface for VLAN 10
    R1(config)#interface gigabitEthernet 0/0/0.10
    R1(config-subif)#encapsulation dot1Q 10
    R1(config-subif)#ip address 192.168.10.1 255.255.255.0
    R1(config-subif)#exit
    
  4. Create Sub-Interface for VLAN 20
    R1(config)#interface gigabitEthernet 0/0/0.20
    R1(config-subif)#encapsulation dot1Q 20
    R1(config-subif)#ip address 192.168.20.1 255.255.255.0
    R1(config-subif)#exit
    

Switch Configuration

  1. Enable the Switch and Enter Global Configuration Mode
    Switch>enable
    Switch#configure terminal
    Switch(config)#hostname S1
    
  2. Create VLANs and Assign Names
    S1(config)#vlan 10
    S1(config-vlan)#name IT
    S1(config-vlan)#exit
    
    S1(config)#vlan 20
    S1(config-vlan)#name HR
    S1(config-vlan)#exit
    
  3. Assign VLANs to Ports
    S1(config)#interface range fastEthernet 0/10-11
    S1(config-if-range)#switchport mode access
    S1(config-if-range)#switchport access vlan 10
    S1(config-if-range)#exit
    
    S1(config)#interface range fastEthernet 0/20-21
    S1(config-if-range)#switchport mode access
    S1(config-if-range)#switchport access vlan 20
    S1(config-if-range)#exit
    
  4. Configure Trunk Port
    S1(config)#interface gigabitEthernet 0/1
    S1(config-if)#switchport mode trunk
    S1(config-if)#exit
    

Conclusion

By following these steps, you have successfully configured inter-VLAN routing using the Router-on-a-Stick method on a Cisco router. This setup enables communication between devices in different VLANs while maintaining VLAN segmentation.

Feel free to leave a comment if you have any questions or run into any issues!

4.8 8 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments