To enable inter-VLAN routing using router-on-a stick, start by enabling trunking on the switch port that is connected to the router.
In the figure, router R1 is connected to switch S1 on trunk port F0/5. VLANs 10 and 30 are added to switch S1.
Because switch port F0/5 is configured as a trunk port, the port does not need to be assigned to any VLAN. To configure switch port F0/5 as a trunk port, execute the switchport mode trunk command in interface configuration mode for port F0/5.
Note: The router does not support the Dynamic Trunking Protocol (DTP), which is used by switches, so the following commands cannot be used: switchport mode dynamic auto or switchport mode dynamic desirable.
The router can now be configured to perform inter-VLAN routing.