Cisco CCNA (200-301)Network AccessMedium

A network engineer is configuring a new 802.1Q trunk link between two Cisco Catalyst switches, SW1 and SW2. The engineer wants to ensure that all VLANs, except for VLAN 99 (which is used for management and should not traverse this specific link), are allowed to pass through the trunk. Which of the following commands, when applied to the trunk interface on SW1, will achieve this requirement?

  1. Aswitchport trunk allowed vlan remove 99
  2. Bswitchport trunk allowed vlan except 99
  3. Cswitchport trunk allowed vlan 1-98,100-4094
  4. Dswitchport trunk allowed vlan all except 99
Show answer & explanation

Correct answer: B. switchport trunk allowed vlan except 99

The 'switchport trunk allowed vlan except' command is the most efficient and direct way to allow all VLANs except a specified one. This implicitly includes all other VLANs without needing to list them individually.

Why the other options are wrong

  • A. The 'remove' keyword is used to remove specific VLANs from an already existing allowed list, not to define the list initially as 'all except'.
  • C. This command explicitly lists a range, which is functionally correct but less efficient than 'except'.
  • D. The 'all' keyword is not used in conjunction with 'except' in this context; 'except' implies all others.

VLAN Trunk Filtering (Except)

The 'switchport trunk allowed vlan except <VLAN-ID>' command is used to allow all VLANs on a trunk link except for the specified VLAN(s).

  • It's a convenient way to exclude specific VLANs from a trunk.
  • This command implicitly includes all other VLANs.
  • It simplifies configuration compared to listing all allowed VLANs.

Memory trick: Exclude the VIP (Very Important Problematic) VLAN.

More Network Access questions