Router-on-a-stick inter-VLAN routing uses router subinterfaces, one logical subinterface per VLAN. For VLAN 20 on Ethernet0/0, the subinterface should be Ethernet0/0.20, followed by 802.1Q encapsulation for VLAN 20 and the gateway IP address for that VLAN. The physical interface normally remains without an IP address, while each subinterface receives its own VLAN-tagged configuration. The command encapsulation dot1q 20 tells the router to expect and send frames tagged for VLAN 20 on that subinterface. The IP address 10.20.20.1 255.255.255.0 then becomes the default gateway address for hosts in VLAN 20. Option A incorrectly configures encapsulation and IP addressing under the physical Ethernet0/0 interface. Option C misses the encapsulation command, so the router would not associate the subinterface with VLAN 20. Option D is only a plain routed interface configuration. Cisco CCNA 200-301 v1.1 includes this as a foundational VLAN routing pattern. The correct command set is option B.
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit