Objectives
The simulator ticks each one as soon as the network meets it.
Create VLAN 10 and VLAN 20 on SW1.
Put the PC1 port in VLAN 10 and the PC2 port in VLAN 20.
Make the SW1–R1 link a trunk carrying VLANs 10 and 20.
On R1 bring up G0/0 and create G0/0.10 and G0/0.20 with encapsulation dot1Q and addresses .1.
Ping PC2 from PC1.
Before you start
Switch: vlan, switchport mode access/trunk. Router: interface g0/0.10 → encapsulation dot1Q 10 → ip address. The physical port needs no shutdown.
Concept
Router-on-a-stick: routing between VLANs over one trunk
One router interface is split into subinterfaces, one per VLAN. The switch sends every VLAN to the router over a single trunk; the router routes between the subinterfaces and sends the packet back down the same link, tagged with the other VLAN.
Concept
802.1Q trunks: VLAN tags on the wire
A trunk carries many VLANs over one link. To keep them apart, the sending switch inserts a 4-byte 802.1Q tag into each frame saying which VLAN it belongs to; the receiving switch reads the tag and removes it before delivering the frame to an access port.