11.2. Vlan Security Commands

11.2.1. vlan mac-limit maximum

Command Purpose

Use this command to set maximum of mac addresses in specified vlan. Use the no vlan mac-limit maximum command to restore the default setting.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

vlan VLAN_ID mac-limit maximum MAXINUM

no vlan VLAN_ID mac-limit maximum

Parameter

Parameter Description

Parameter Value

VLAN_ID

VLAN id

1-4094

MAXINUM

maximum of mac addresses

1-65535

Command Mode

VLAN Configuration

Default

No mac-limit on all vlans

Usage

The vlan must be created before this command

Examples

This example shows how to set/unset maximum of mac addresses for specified vlan:

Switch# configure terminal
Switch(config)# vlan database
Switch(config-vlan)# vlan 2
Switch(config-vlan)# vlan 2 mac-limit maximum 1000
Switch(config-vlan)# no vlan 2 mac-limit maximum

11.2.2. vlan mac-limit action

Command Purpose

Use this command to set action for specified vlan.

Use the no vlan mac-limit action command to restore the default setting.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

vlan VLAN_ID mac-limit action ( discard | warn | forward )

no vlan VLAN_ID mac-limit action

Parameter

Parameter Description

Parameter Value

VLAN_ID

VLAN id

1-4094

discard

If the count of mac addresses reaches the maximum, packets with unknown source mac address from this VLAN will be discarded

-

warn

If the count of mac addresses reaches the maximum, packets with unknown source mac address from this VLAN will be discarded, and warning log will be printed in syslog

-

forward

If the count of mac addresses reaches the maximum, all packets from this VLAN will be forwarded without neither mac learning nor warning log

-

Command Mode

VLAN Configuration

Default

Forward

Usage

The vlan must be created before this command.

Examples

This example shows how to set/unset action for specified vlan:

Switch# configure terminal
Switch(config)# vlan database
Switch(config-vlan)# vlan 2
Switch(config-vlan)# vlan 2 mac-limit action warn
Switch(config-vlan)# no vlan 2 mac-limit action

Related Commands

show vlan-security

11.2.3. vlan mac learning

Command Purpose

Use this command to enable/disable mac learning for specified vlan.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

vlan VLAN_ID mac learning ( enable | disable )

Parameter

Parameter Description

Parameter Value

VLAN_ID

VLAN id

1-4094

enable

Enable learning

-

disable

Disable learning

-

Command Mode

VLAN Configuration

Default

Enable

Usage

The vlan must be created before using this command.

Examples

This example shows how to enable mac learning for specified vlan:

Switch# configure terminal
Switch(config)# vlan database
Switch(config-vlan)# vlan 2
Switch(config-vlan)# vlan 2 mac learning enable

Related Commands

show vlan-security

11.2.4. show vlan-security

Command Purpose

Use this command to show configuration about vlan security.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

show vlan-security ( vlan VLAN_ID )

Parameter

Parameter Description

Parameter Value

VLAN_ID

VLAN id

1-4094

Command Mode

Privileged EXEC

Default

None

Usage

None

Examples

This example shows how to show configuration about vlan security:

Switch# configure terminal
Switch(config)# vlan database
Switch(config-vlan)# vlan 2
Switch(config-vlan)# vlan 2 mac-limit maximum 1000
Switch(config-vlan)# vlan 2 mac-limit action warn
Switch# show vlan-security

Vlan learning-en  max-mac-count  cur-mac-count  action
 ----------------------------------------------------------------------------
 2    Enable     1000           0              Warn

Related Commands

vlan mac-limit maximum

vlan mac-limit action