A subinterface is a logical Layer 3 router interface created from a physical interface. Each subinterface can have its own IP address and VLAN association, allowing one physical router link to route between multiple VLANs. section 12.4.1
In router on a stick, the router’s physical interface connects to a switch trunk. VLAN-tagged frames arrive on the physical interface, and the router selects the appropriate subinterface from the 802.1Q VLAN tag. section 12.4.1
Configure a Cisco subinterface by completing these steps:
- Enter a subinterface such as interface g0/0.10; the identifier distinguishes the subinterface but does not have to match the VLAN ID. section 12.5
Three VLANs on one router interface
R1 can use G0/0.10 for VLAN 10 at 172.16.1.1, G0/0.20 for VLAN 20 at 172.16.1.65, and G0/0.30 for VLAN 30 at 172.16.1.129. A PC in VLAN 20 can therefore reach a PC in VLAN 10 through ROAS.
