Setting up a router on a stick is essential for understanding how VLANs function within a network. This method allows a single router interface to handle multiple VLANs, facilitating inter-VLAN communication.
Prerequisites
Before diving into the configuration, ensure you have:
GNS3 installed and set up correctly.
A basic knowledge of VLANs and routing concepts.
A switch and a router image available within GNS3.
Step-by-Step Configuration
To configure a router on a stick, follow these steps:
Create your Topology: In GNS3, drag and drop a router and a switch into the workspace.
Connect Devices: Use the appropriate cables to connect the router to the switch. Make sure you connect the router's physical interface to the switch’s trunk port.
Configure VLANs: On the switch, create the VLANs you require for your network by accessing the switch’s configuration mode.
Set Up Trunking: Enable trunking on the switch port connected to the router to allow it to send and receive traffic for multiple VLANs.
Create Sub-interfaces: On the router, configure sub-interfaces for each VLAN. Each sub-interface should be associated with a VLAN and have its own IP address.
Configure Routing: Ensure that the router has proper routing set up to handle traffic between the various VLANs.
Example Configuration Commands
Below is an example configuration for both the switch and router:
Switch Configuration:
enable
configure terminal
vlan 10
name Marketing
vlan 20
name Sales
interface gig0/1
switchport mode trunk
Once all configurations are complete, test the connectivity between devices identified under different VLANs. You can use the ping command to check connectivity between IPs assigned to various VLANs.
Troubleshooting Tips
If you encounter issues:
Ensure trunking is properly configured on the switch.
Verify that the sub-interfaces are correctly set up on the router.
Check your VLAN configuration on the switch.
Glossary of Terms
VLAN: Virtual Local Area Network.
Sub-interface: A virtual interface on a router used for communication with VLANs.
Pro Tips
Always document your configurations for future reference.
Regularly back up your GNS3 project to avoid loss of configurations.
Learn Router on a Stick Configuration Easily
Update: 06 Oct 2025
GNS3 download for free to PC or mobile
Create and test virtual networks effortlessly, tailored to your specific requirements.