Cisco CCNA (200-301)Network AccessHard

SW1's Gi0/1 trunk is configured with 'switchport trunk allowed vlan 10,20,30'. The administrator wants VLAN 40 to also be permitted across the trunk without removing VLANs 10, 20, or 30. Which command accomplishes this?

  1. Aswitchport trunk native vlan 40
  2. Bswitchport trunk allowed vlan replace 40
  3. Cswitchport trunk allowed vlan 40
  4. Dswitchport trunk allowed vlan add 40
Show answer & explanation

Correct answer: D. switchport trunk allowed vlan add 40

The 'add' keyword appends the specified VLAN(s) to the existing allowed VLAN list on the trunk without disturbing the VLANs already permitted. Simply reissuing 'switchport trunk allowed vlan 40' without 'add' would overwrite the list, leaving only VLAN 40 allowed, and 'replace' explicitly substitutes the list; the native vlan command changes the untagged VLAN, not the allowed list.

Why the other options are wrong

  • A. This changes the native (untagged) VLAN, unrelated to the allowed VLAN list.
  • B. 'replace' explicitly substitutes the entire list rather than adding to it.
  • C. Without 'add', this command replaces the entire allowed VLAN list with just VLAN 40.

Trunk Allowed VLAN Modification

IOS provides 'add', 'remove', and 'except' keywords to modify an existing trunk's allowed VLAN list incrementally instead of overwriting it.

  • 'switchport trunk allowed vlan X' alone overwrites the list
  • 'add' appends new VLANs to the existing list
  • 'remove' deletes specific VLANs from the list
  • 'except' allows all VLANs except those listed

Memory trick: Forget 'add' and you erase the whole guest list!

More Network Access questions