Objectives
| # | Objective |
| 1 | Create matching VLANs 10 and 20 on both SW1 and SW2 (manually โ VTP not yet active) |
| 2 | Configure the inter-switch link as an 802.1Q trunk โ allow VLANs 10 and 20 |
| 3 | Verify the trunk with show interfaces trunk and understand DTP negotiation |
| 4 | Configure VTP โ set SW1 as server, SW2 as client, and observe automatic VLAN propagation |
| 5 | Assign access ports on both switches and confirm cross-switch intra-VLAN ping works |
| 6 | Open 802.1Q Frame Inspector โ step through how a tagged frame crosses the trunk |
| 7 | Knowledge check โ trunking, DTP and VTP concepts |
Key Concepts
| Concept | What it means |
| 802.1Q trunk | A link that carries frames from multiple VLANs, each tagged with a 4-byte VLAN ID header. Access ports carry one VLAN untagged; trunk ports carry many. |
| 802.1Q tag | A 4-byte field inserted into the Ethernet frame between the source MAC and EtherType. Contains the TPID (0x8100) and 12-bit VLAN ID. |
| Native VLAN | The one VLAN whose frames cross a trunk untagged. Both ends must agree or frames get misdelivered. Default is VLAN 1. |
| DTP | Dynamic Trunking Protocol โ Cisco proprietary. Allows two switches to automatically negotiate trunk mode. Best practice: disable it and configure trunks manually. |
| VTP | VLAN Trunking Protocol โ propagates VLAN database from a VTP Server to VTP Clients across trunk links. Removes the need to manually create VLANs on every switch. |
| VTP domain | A group of switches sharing the same VTP domain name. VTP updates only propagate within the same domain. |
Topology โ Two Switches, Trunk Link
| Device | Port | Role | VLAN / Mode |
| SW1 Gi0/0 | โ PC1 | Access | VLAN 10 |
| SW1 Gi0/1 | โ PC2 | Access | VLAN 20 |
| SW1 Gi0/3 | โ SW2 Gi0/3 | Trunk | VLANs 10,20 |
| SW2 Gi0/0 | โ PC3 | Access | VLAN 10 |
| SW2 Gi0/1 | โ PC4 | Access | VLAN 20 |
| SW2 Gi0/3 | โ SW1 Gi0/3 | Trunk | VLANs 10,20 |
PC Addressing
| Device | IP | VLAN | Switch |
| PC1 | 192.168.10.10/24 | VLAN 10 | SW1 Gi0/0 |
| PC2 | 192.168.20.10/24 | VLAN 20 | SW1 Gi0/1 |
| PC3 | 192.168.10.11/24 | VLAN 10 | SW2 Gi0/0 |
| PC4 | 192.168.20.11/24 | VLAN 20 | SW2 Gi0/1 |
Key Commands
| Command | Purpose |
| switchport trunk encapsulation dot1q | Set trunk encapsulation to 802.1Q (needed before mode trunk on some platforms) |
| switchport mode trunk | Force port into trunk mode (disables DTP negotiation) |
| switchport trunk allowed vlan 10,20 | Allow only VLANs 10 and 20 on the trunk |
| switchport nonegotiate | Disable DTP โ stops sending DTP frames |
| show interfaces trunk | Show trunk links, allowed VLANs, native VLAN |
| show interfaces Gi0/3 switchport | Verify trunk mode and encapsulation on a specific port |
| vtp mode server / client / transparent | Set VTP operating mode |
| vtp domain <name> | Set VTP domain name (must match on all switches) |
| show vtp status | Show VTP mode, domain, revision number |
Once the trunk is up and you can ping across switches, click ๐ท๏ธ Frame Inspector to step through exactly how the 802.1Q tag is added, carried, and stripped.
Tab to complete ยท โโ for history ยท Switch between SW1, SW2, and PC tabs using the toolbar.