Cisco CCNA VLANs and 802.1Q Trunking 4 — Questions and Answers
Question 1: A network engineer needs to allow VLANs 10, 20, and 30 on a trunk and remove all others. Which command accomplishes this?
- switchport trunk allowed vlan 10,20,30 (Correct answer)
- switchport trunk allowed vlan add 10,20,30
- switchport trunk vlan allow 10,20,30
- switchport allowed vlan 10,20,30
Correct answer: switchport trunk allowed vlan 10,20,30
Using `switchport trunk allowed vlan 10,20,30` replaces the entire allowed list with only VLANs 10, 20, and 30.
Question 2: What is the function of the Priority Code Point (PCP) field in the 802.1Q tag?
- It specifies the Class of Service (CoS) priority for QoS (Correct answer)
- It identifies the VLAN number
- It indicates whether the frame is eligible to be dropped
- It signals that the frame is a native VLAN frame
Correct answer: It specifies the Class of Service (CoS) priority for QoS
The 3-bit PCP field carries Layer 2 Class of Service markings used for QoS prioritization.
Question 3: What does the `show vlan brief` command NOT display?
- Which ports are trunking (Correct answer)
- VLAN names
- VLAN status (active/suspended)
- Ports assigned to each VLAN
Correct answer: Which ports are trunking
`show vlan brief` shows VLAN IDs, names, status, and assigned access ports, but trunk ports are not shown in this output.
Question 4: An access port is assigned to a VLAN that does not exist in the switch's VLAN database. What is the result?
- The port is placed in an inactive state (Correct answer)
- The port operates in VLAN 1 instead
- The port floods traffic to all VLANs
- The switch automatically creates the VLAN
Correct answer: The port is placed in an inactive state
If a port is assigned to a non-existent VLAN, it becomes inactive and does not pass traffic until the VLAN is created.
Question 5: Which DTP mode will actively attempt to negotiate a trunk with the neighboring switch?
- dynamic desirable (Correct answer)
- dynamic auto
- trunk
- access
Correct answer: dynamic desirable
Dynamic desirable actively sends DTP frames to negotiate a trunk, while dynamic auto only responds to DTP from the other side.
Question 6: What is the size of the 802.1Q tag inserted into an Ethernet frame?
- 4 bytes (Correct answer)
- 2 bytes
- 6 bytes
- 8 bytes
Correct answer: 4 bytes
The 802.1Q tag is 4 bytes: 2 bytes for the TPID (0x8100) and 2 bytes for the TCI (PCP, DEI, and VID fields).
Question 7: A switch port is set to `switchport mode trunk`. The neighboring port is set to `switchport mode dynamic auto`. What will be the result?
- A trunk forms because one side is statically set to trunk (Correct answer)
- No trunk forms because dynamic auto won't respond to a static trunk
- An access link forms between the two ports
- DTP negotiation fails and the port goes err-disabled
Correct answer: A trunk forms because one side is statically set to trunk
A statically configured trunk port causes the dynamic auto neighbor to form a trunk because dynamic auto responds to trunk negotiation.
A network engineer needs to allow VLANs 10, 20, and 30 on a trunk and remove all others.
Which command accomplishes this?