vlan

Configures forwarding actions by VLAN ID to be performed on outgoing packets.

Syntax

vlan vlan-id
no vlan vlan-id

Parameters

vlan-id
Specifies the VLAN ID to be configured. Valid range is 1 through 4095.

Modes

Listener-policy config mode

Usage Guidelines

Action is determined by forward-action setting in the listener policy.
  • If the forward-action is set to deny, packets are dropped.
  • If the forward-action is set to permit, the VLAN ID is changed to the configured value for permitted packets.
  • Valid VLAN ID must be provided.
  • VLAN ID must be unique per listener policy.

Examples

The following example configures the VLAN ID for listener policy, and then uses the show command to verify the configuration.

device# configure terminal
device(config)# listener-policy lp1 12  
device(config-listener-policy)#  vlan 500 
device(config-listener-policy)# end
device#

device# show listener-policy lpl 12
forward-action permit
match ip access-list test_2 (active)
truncate 512
strip vn-tag
vlan 500
Policy matches: 0  packets, 0  bytes, 0 Packets/sec, 0 Bits/sec

The following example removes the VLAN ID configuration from the listener policy, and then uses the show command to verify the VLAN ID is removed from the configuration.

device# configure terminal
device(config)# listener-policy lp1 12  
device(config-listener-policy)#  no vlan 
device(config-listener-policy)# end
device#

device# show listener-policy lpl 12
forward-action permit
match ip access-list test_2 (active)
truncate 512
strip vn-tag
Policy matches: 0  packets, 0  bytes, 0 Packets/sec, 0 Bits/sec