Configuring Private VLANs Configuring and Associating VLANs in a Private VLAN Command or Action Purpose Device(config-vlan)# private-vlan community Step 15 exit Example: Device(config-vlan)# exit Returns to global configuration mode. Step 16 vlan vlan-id Example: Device(config)# vlan 20 Enters VLAN configuration mode for the primary VLAN designated in Step 4. Step 17 private-vlan association [add | remove] secondary vlan list _ _ Example: Device(config-vlan)# private-vlan association 501-503 Associates the secondary VLANs with the primary VLAN. It can be a single private-VLAN ID or a hyphenated range of private-VLAN IDs. • The secondary vlan list parameter _ _ cannot contain spaces.
It can contain multiple comma-separated items. Each item can be a single private-VLAN ID or a hyphenated range of private-VLAN IDs. • The secondary vlan list parameter can _ _ contain multiple community VLAN IDs but only one isolated VLAN ID. • Enter a secondary vlan list, or use the _ _ add keyword with a secondary vlan list _ _ to associate secondary VLANs with a primary VLAN. • Use the remove keyword with a secondary vlan list to clear the _ _ association between secondary VLANs and a primary VLAN. • The command does not take effect until you exit VLAN configuration mode. Step 18 end Example: Device(config)# end Returns to privileged EXEC mode.
VLAN Configuration Guide, Cisco IOS XE 17.16.x (Catalyst 9300 Switches) 78