Router-on-a-Stick is a configuration method used to perform inter-VLAN routing using a single physical interface on a router. This approach is commonly used when multiple VLANs need to communicate with each other, but only one physical connection is available between the router and the switch. Here's how Router-on-a-Stick configuration for Inter-VLAN Routing works: ### 1. Configure VLANs on the Switch: First, create the VLANs on the switch and assign switch ports to their respective VLANs using VLAN configuration commands. ``` Switch(config)# vlan Switch(config-vlan)# name Switch(config-vlan)# exit Switch(config)# interface Switch(config-if)# switchport mode access Switch(config-if)# switchport access vlan ``` Repeat this process for each VLAN and its associated switch ports. ### 2. Configure the Trunk Port: Next, configure the switch port connected to the router as a trunk port to allow traffic from multiple VLANs to pass through a single physical connection. ``` Switch(config)# interface Switch(config-if)# switchport mode trunk Switch(config-if)# switchport trunk allowed vlan ``` Replace `` with a comma-separated list of VLAN IDs allowed on the trunk port. ### 3. Configure the Router: On the router, configure a subinterface for each VLAN on the trunk port. Each subinterface represents a virtual interface associated with a specific VLAN. ``` Router(config)# interface . Router(config-subif)# encapsulation dot1q Router(config-subif)# ip address ``` Replace `` and `` with the physical interface connected to the switch and `` with the VLAN ID. Configure an IP address and subnet mask for each subinterface. ### 4. Enable Inter-VLAN Routing: Enable routing on the router to allow traffic between the VLANs. ``` Router(config)# ip routing ``` ### 5. Verify Configuration: Verify the Router-on-a-Stick configuration using show commands on both the switch and the router to ensure that VLANs are properly configured and inter-VLAN routing is functioning correctly. ``` Switch# show vlan Switch# show interfaces trunk Router# show ip interface brief Router# show ip route ``` ### Conclusion: Router-on-a-Stick configuration allows a single physical interface on a router to perform inter-VLAN routing by creating subinterfaces for each VLAN. This method provides a cost-effective solution for routing traffic between VLANs when only one physical connection is available between the router and the switch.