Router-on-a-Stick (ROAS) Configuration Guide

0:00
/11:00

Here’s a simple step-by-step guide for configuring Router-on-a-Stick in Packet Tracer using a Cisco router, switch, two VLANs, and two end devices (each in separate networks). This setup allows a router to route traffic between VLANs using a single physical interface (via subinterfaces).

Scenario Overview

  • Router: Cisco router with one physical interface connecting to the switch.
  • Switch: Cisco switch with two VLANs.
  • End Devices: Two PCs, each in a different VLAN/network.
  • VLANs:
    • VLAN 10: 192.168.10.0/24
    • VLAN 20: 192.168.20.0/24

Step 1: Setup Devices in Packet Tracer

  1. Add the Devices:
    • Drag and drop the following into the workspace:
      • One Cisco Router (e.g., 2911).
      • One Cisco Switch (e.g., 2960).
      • Two End Devices (PC1 and PC2).
  2. Connect the Devices:
    • PC1 to Switch Port FastEthernet0/1.
    • PC2 to Switch Port FastEthernet0/2.
    • Switch Port FastEthernet0/24 to Router GigabitEthernet0/0.

Step 2: Configure the Switch

Enter the Switch CLI:

Click the switch, go to the CLI tab.

Enter Privileged EXEC Mode:

enable

Enter Global Configuration Mode:

configure terminal

Create VLAN 10 and VLAN 20:

vlan 10
name Sales
exit
vlan 20
name Engineering
exit

Assign Ports to VLANs:

Assign FastEthernet0/1 to VLAN 10:

interface FastEthernet0/1
switchport mode access
switchport access vlan 10
end

Assign FastEthernet0/2 to VLAN 20:

interface FastEthernet0/2
switchport mode access
switchport access vlan 20
end

Configure Trunk Port on Switch:

Set FastEthernet0/24 (connected to the router) as a trunk port:

interface FastEthernet0/24
switchport mode trunk
end

Save the Configuration:

write memory

Step 3: Configure the Router

Access the Router CLI:

Click the router and go to the CLI tab.

Enter Privileged EXEC Mode:

enable

Enter Global Configuration Mode:

configure terminal

Create Subinterfaces for VLANs:

For VLAN 10 (192.168.10.0/24):

interface GigabitEthernet0/0.10
encapsulation dot1Q 10
ip address 192.168.10.1 255.255.255.0
end

For VLAN 20 (192.168.20.0/24):

interface GigabitEthernet0/0.20
encapsulation dot1Q 20
ip address 192.168.20.1 255.255.255.0
end

Enable the Router Interface:

Enable the physical interface (GigabitEthernet0/0):

interface GigabitEthernet0/0
no shutdown
end

Save the Configuration:

write memory

Step 4: Configure the End Devices

Configure PC1 (VLAN 10):

Click PC1, go to Desktop > IP Configuration.

Set the following IP configuration:

  • IP Address: 192.168.10.2
  • Subnet Mask: 255.255.255.0
  • Default Gateway: 192.168.10.1

Configure PC2 (VLAN 20):

Click PC2, go to Desktop > IP Configuration.

Set the following IP configuration:

  • IP Address: 192.168.20.2
  • Subnet Mask: 255.255.255.0
  • Default Gateway: 192.168.20.1

Step 5: Test the Configuration

Verify VLAN Configuration:

On the switch, verify VLAN assignment:

show vlan brief

Ping Between PCs:

Go to PC1 and ping PC2:

ping 192.168.20.2

If the setup is correct, you should receive successful ping replies, indicating that routing between the VLANs is working via the router.

Summary

You have successfully configured Router-on-a-Stick with two VLANs. The router is routing traffic between VLAN 10 and VLAN 20 using subinterfaces on a single physical connection.