With router-on-a-stick configurations, a common problem is assigning the wrong VLAN ID to the subinterface.
As shown in Figure 1, router R1 has been configured with the wrong VLAN on subinterface G0/0.10, preventing devices configured on VLAN 10 from communicating with subinterface G0/0.10. This subsequently prevents those devices from being able to send data to other VLANs on the network.
Using the show interface and the show running-config commands can be useful in troubleshooting this type of issue, as shown in the figure.
The show interface command produces a lot of output, making it sometimes difficult to see the problem, as shown in Figure 2. However, the top highlighted section shows that the subinterface G0/0.10 on router R1 uses VLAN 100.
The show running-config command confirms that subinterface G0/0.10 on router R1 has been configured to allow access to VLAN 100 traffic and not VLAN 10.
To correct this problem, configure subinterface G0/0.10 to be on the correct VLAN using the encapsulation dot1q 10 subinterface configuration mode command. When the subinterface has been assigned to the correct VLAN, it is accessible by devices on that VLAN and the router can perform inter-VLAN routing.
With proper verification, router configuration problems are quickly addressed, allowing inter-VLAN routing to function properly.