3.3. MAC Address Table Commands
3.3.1. mac-address-table aging-time
Command Purpose
Use the mac-address-table aging-time Global Config command on the switch to set the length of time that a dynamic entry remains in the MAC address table after the entry is used or updated. Use the no form of this command to return to the default setting. The aging time applies to all VLANs.
Prerequisites
Platform |
Software |
License |
Comments |
---|---|---|---|
AQ-N3000 |
7.0 |
Base |
|
AQ-N5000 |
7.0 |
Base |
|
AQ-N6000 |
7.0 |
Base |
Command Syntax
mac_address-table aging-time SECONDS
no mac_address-table aging-time
Parameter |
Parameter Description |
Parameter Value |
---|---|---|
SECONDS |
Aging time. |
0, 10-1000000, 0 means that MAC aging function does not work, unit:second |
Command Mode
Global Config
Default
The default is 300 seconds
Usage
If packets are not received continuously, user can increase the aging time to make the system recording the dynamic entries for a longer time. Increasing the time can reduce the possibility of flooding when the hosts send again.
Examples
This example shows how to set the aging time to 200 seconds for all VLANs:
Switch# configure terminal
Switch(config)# mac-address-table aging-time 200
3.3.2. mac-address-table hardware-learning
Command Purpose
Use the mac-address-table hardware-learning enable Global Config command on the switch to study FDB without software. Use the no form of this command to return to 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
mac_address-table hardware-learning enable
no mac_address-table hardware-learning enable
Command Mode
Global Config
Default
Disable
Usage
Hardware learning is more faster than software learning.
Examples
This example shows how to enable hardware learning:
Switch# configure terminal
Switch(config)# mac-address-table hardware-learning enable
Related Commands
None
3.3.3. mac-address-table forward
Command Purpose
Use the mac-address-table forward Global Config command on the switch to add static addresses to the MAC address table. Use the no form of this command to remove static entries from the table.
Prerequisites
Platform |
Software |
License |
Comments |
---|---|---|---|
AQ-N3000 |
7.0 |
Base |
|
AQ-N5000 |
7.0 |
Base |
|
AQ-N6000 |
7.0 |
Base |
Command Syntax
mac_address-table MAC_ADDR forward ( IFNAME | eps EPS_ID | remote-vtep REMOTE_VTEP_ID | smart-link SMART_LINK_ID ) vlan VLAN_ID
no mac_address-table MAC_ADDR forward ( IFNAME | eps EPS_ID | remote-vtep REMOTE_VTEP_ID | smart-link SMART_LINK_ID ) vlan VLAN_ID
Parameter |
Parameter Description |
Parameter Value |
---|---|---|
MAC_ADDR |
Destination MAC address (unicast or multicast) to add to the address table. Packets with this destination address received in the specified VLAN are forwarded to the specified interface |
Mac address in HHHH.HHHH.HHHH format |
IFNAME |
Interface to which the received packet is forwarded. |
Valid interfaces include physical ports and link aggregation ports |
VLAN_ID |
Specify the VLAN for which the packet with the specified MAC address is received. |
1-4094 |
EPS_ID |
EPS protection group. |
1-2048 |
REMOTE_VTEP_ID |
Remote VTEP |
1-65535 |
SMART_LINK_ID |
Smart-Link Group |
1-16 |
Command Mode
Global Config
Default
None
Usage
The static address entries which are added by this command are not aged.
Examples
This example shows how to add the static address c2f3220a12f4 to the MAC address table When a packet is received in VLAN 4 with this MAC address as its destination, the packet is forwarded to the specified interface:
Switch# configure terminal
Switch(config)# mac-address-table c2f3.220a.12f4 forward eth-0-1 vlan 4
Related Commands
show mac address-table
3.3.4. mac-address-table discard
Command Purpose
Use the mac-address-table discard Global Config command on the switch to enable unicast MAC address filtering and to configure the switch to drop traffic with a specific source or destination MAC address. Use the no form of this command to return to 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
mac_address-table MAC_ADDR discard
no mac_address-table MAC_ADDR discard
Parameter |
Parameter Description |
Parameter Value |
---|---|---|
MAC_ADDR |
Source or Destination MAC address (unicast) to add to the address filtering table |
- |
Command Mode
Global Config
Default
None
Usage
Follow these guidelines when using this feature:
Multicast MAC addresses, broadcast MAC addresses, and router MAC addresses are not supported. Packets that are forwarded to the CPU are also not supported.
Examples
This example shows how to enable unicast MAC address filtering and to configure the switch to drop packets that have a source or destination address of c2f3220a12f4 When a packet is received with this MAC address as its source or destination, the packet is dropped:
Switch# configure terminal
Switch(config)# mac-address-table c2f3.220a.12f4 discard
Related Commands
mac-address-table forward
3.3.5. clear mac address-table
Command Purpose
Use the clear mac address-table privileged EXEC command on the switch to delete all dynamic(or static, or multicast) addresses, or all dynamic(or static, or multicast) addresses on a particular interface, or all dynamic(or static, or multicast) addresses on a particular VLAN from the MAC address table.
Prerequisites
Platform |
Software |
License |
Comments |
---|---|---|---|
AQ-N3000 |
7.0 |
Base |
|
AQ-N5000 |
7.0 |
Base |
|
AQ-N6000 |
7.0 |
Base |
Command Syntax
clear mac address-table ( static | dynamic | multicast ) { address MAC_ADDR | interface IFNAME | vlan VLAN_ID }
Parameter |
Parameter Description |
Parameter Value |
---|---|---|
dynamic |
Delete the dynamic MAC address |
- |
static |
Delete the static MAC address |
- |
multicast |
Delete the multicast MAC address |
- |
address MAC_ADDR |
Delete the specified MAC address |
Mac address in HHHH.HHHH.HHHH format |
interface IFNAME |
Delete all MAC addresses on the specified physical port or link aggregation port |
Supportphysical/aggregationports |
vlan VLAN_ID |
Delete all MAC addresses for the specified VLAN. |
1-4094 |
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
This example shows how to remove a specific MAC address from the dynamic address table:
Switch# clear mac address-table dynamic address 0058.3f70.0007
Related Commands
show mac address-table
3.3.6. port-bridge
Command Purpose
Use this command to support to forward packets with the src-mac and dset-mac learned by the same port.
Prerequisites
Platform |
Software |
License |
Comments |
---|---|---|---|
AQ-N3000 |
7.0 |
Base |
|
AQ-N5000 |
7.0 |
Base |
|
AQ-N6000 |
7.0 |
Base |
Command Syntax
switchport port-bridge enable
no switchport port-bridge enable
Command Mode
Interface Configuration
Default
None
Usage
None
Examples
This example shows how to enable port-bridge function:
Switch# configure terminal
Switch(config)# interface eth-0-1
Switch(config-if)# no switchport port-bridge enable
Related Commands
None
3.3.7. show mac address-table aging-time
Command Purpose
Use the show mac address-table aging-time privileged EXEC command to display the aging time of all address table instances on all VLANs.
Prerequisites
Platform |
Software |
License |
Comments |
---|---|---|---|
AQ-N3000 |
7.0 |
Base |
|
AQ-N5000 |
7.0 |
Base |
|
AQ-N6000 |
7.0 |
Base |
Command Syntax
show mac address-table aging-time
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
This is an example of output from the show mac address-table aging-time command:
Switch# show mac address-table aging-time
MAC address table aging time is 300 seconds
Related Commands
mac-address-table aging-time
3.3.8. show mac address-table
Command Purpose
Use the show mac address-table privileged EXEC command to display a specific MAC address table static and dynamic entry or the MAC address table static and dynamic entries on a specific interface or VLAN.
Prerequisites
Platform |
Software |
License |
Comments |
---|---|---|---|
AQ-N3000 |
7.0 |
Base |
|
AQ-N5000 |
7.0 |
Base |
|
AQ-N6000 |
7.0 |
Base |
Command Syntax
show mac address-table ( dynamic | static | multicast | ) ( address MAC_ADDR | interface IFNAME | vlan VLAN_ID | )
Parameter |
Parameter Description |
Parameter Value |
---|---|---|
dynamic |
Display the dynamic MAC address |
- |
static |
Display the static MAC address |
- |
multicast |
Display the multicast MAC address |
- |
address MAC_ADDR |
Display the specified MAC address |
Mac address in HHHH.HHHH.HHHH format |
interface IFNAME |
Display all MAC addresses on the specified physical port or link aggregation port |
Supportphysical/aggregationports |
vlan VLAN_ID |
Display all MAC addresses for the specified VLAN. |
1-4094 |
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
This is an example of output from the show mac address-table command:
Switch# show mac address-table
Mac Address Table
------------------------------------------------
(*) - Security Entry (M) - MLAG Entry
(MO) - MLAG Output Entry (MI) - MLAG Input Entry
Vlan Mac Address Type Ports
---- ---------- ---- -----
1 0000.0000.0001 static eth-0-2
1 0000.0001.0003 static(\*) eth-0-1
1 0000.0001.0002 static(\*) eth-0-1
2 26fc.72e5.0100 dynamic(\*) eth-0-9
1 0100.0000.0001 static eth-0-2
Related Commands
mac-address-table
3.3.9. show mac address-table hardware
Command Purpose
Use the show mac address-table hardware privileged EXEC command to display a specific MAC address table static and dynamic entry or the MAC address table static and dynamic entries on a specific interface or VLAN in hardware.
Prerequisites
Platform |
Software |
License |
Comments |
---|---|---|---|
AQ-N3000 |
7.0 |
Base |
|
AQ-N5000 |
7.0 |
Base |
|
AQ-N6000 |
7.0 |
Base |
Command Syntax
show mac address-table hardware ( dynamic | static | ) ( address MAC_ADDR | interface IFNAME | vlan VLAN_ID | )
Parameter |
Parameter Description |
Parameter Value |
---|---|---|
dynamic |
Display the dynamic MAC address |
- |
static |
Display the static MAC address |
- |
address MAC_ADDR |
Display the specified MAC address |
Mac address in HHHH.HHHH.HHHH format |
interface IFNAME |
Display all MAC addresses on the specified physical port or link aggregation port |
Supportphysical/aggregationports |
vlan VLAN_ID |
Display all MAC addresses for the specified VLAN. |
1-4094 |
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
This is an example of output from the show mac address-table hardware command:
Switch# show mac address-table hardware
Mac Address Table
-------------------------------------
(*) - Security Entry (M) - MLAG Entry
(MO) - MLAG Output Entry (MI) - MLAG Input Entry
Vlan Mac Address Type Ports
---- ----------- ---- -----
1 0000.0000.0001 static eth-0-2
1 0000.0001.0003 static(\*) eth-0-1
1 0000.0001.0002 static(\*) eth-0-1
2 26fc.72e5.0100 dynamic(\*) eth-0-9
1 0100.0000.0001 static eth-0-2
Related Commands
mac-address-table
3.3.10. show mac address-table count
Command Purpose
Use the show mac address-table count privileged EXEC command to display the number of addresses present in all VLANs.
Prerequisites
Platform |
Software |
License |
Comments |
---|---|---|---|
AQ-N3000 |
7.0 |
Base |
|
AQ-N5000 |
7.0 |
Base |
|
AQ-N6000 |
7.0 |
Base |
Command Syntax
show mac address-table count
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
This is an example of output from the show mac address-table count command:
Switch# show mac address-table count
Dynamic Address Count : 0 (Security: 0)
Static Address Count : 0 (Security: 0)
Blackhole Address Count: 1
Total Mac Addresses : 1 (Security: 0)
Related Commands
show mac address-table
3.3.11. show mac address-table hardware count
Command Purpose
Use the show mac address-table count privileged EXEC command to display the number of addresses present in all VLANs in hardware.
Prerequisites
Platform |
Software |
License |
Comments |
---|---|---|---|
AQ-N3000 |
7.0 |
Base |
|
AQ-N5000 |
7.0 |
Base |
|
AQ-N6000 |
7.0 |
Base |
Command Syntax
show mac address-table hardware count
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
This is an example of output from the show mac address-table hardware count command:
Switch# show mac address-table hardware count
MAC address count in hardware table:
(Include MAC security entry)
--------------------------------------------
Dynamic Address Count : 0
Static Address Count : 0
Total Mac Addresses : 0
Related Commands
show mac address-table hardware
3.3.12. show mac address-table add-fdb-fail
Command Purpose
Use the show mac address-table add-fdb-fail privileged EXEC command to display all failed static FDB entries when adding FDB table in chip for hash conflict.
Prerequisites
Platform |
Software |
License |
Comments |
---|---|---|---|
AQ-N3000 |
7.0 |
Base |
|
AQ-N5000 |
7.0 |
Base |
|
AQ-N6000 |
7.0 |
Base |
Command Syntax
show mac address-table add-fdb-fail
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
This is an example of output from the show mac address-table add-fdb-fail command:
Switch# show mac address-table add-fdb-fail
Vlan Mac Address Type Ports
----------------------------------------------
1 0000.0000.0001 static eth-0-1
1 0000.0000.0002 static eth-0-2
Related Commands
show mac address-table
3.3.13. show mac-filter address-table
Command Purpose
Use the show mac-filter address-table privileged EXEC command to display the number of filter addresses present in all VLANs.
Prerequisites
Platform |
Software |
License |
Comments |
---|---|---|---|
AQ-N3000 |
7.0 |
Base |
|
AQ-N5000 |
7.0 |
Base |
|
AQ-N6000 |
7.0 |
Base |
Command Syntax
show mac-filter address-table
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
This is an example of output from the show mac-filter address-table command:
Switch# show mac-filter address-table
MAC Filter Address Table
-----------------------------------
Current count : 0
Max count : 128
Left count : 128
Filter address list :
-----------------------------------
Related Commands
show mac address-table
3.3.14. show resource mac-filter
Command Purpose
Use this command to display the resource statistic used by mac-filter.
Prerequisites
Platform |
Software |
License |
Comments |
---|---|---|---|
AQ-N3000 |
7.0 |
Base |
|
AQ-N5000 |
7.0 |
Base |
|
AQ-N6000 |
7.0 |
Base |
Command Syntax
show resource mac-filter
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
The following is sample output from the show resource mac-filter command:
Switch# show resource mac-filter
MAC-FILTER
Resource Used Capability
=============================================================
Blackhole MAC Addresses 0 128
Related Commands
show resource static-fdb
3.3.15. show resource static-fdb
Command Purpose
Use this command to display the resource statistic used by static FDB.
Prerequisites
Platform |
Software |
License |
Comments |
---|---|---|---|
AQ-N3000 |
7.0 |
Base |
|
AQ-N5000 |
7.0 |
Base |
|
AQ-N6000 |
7.0 |
Base |
Command Syntax
show resource static-fdb
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
The following is sample output from the show resource static-fdb command:
Switch# show resource static-fdb
STATIC-FDB
Resource Used Capability
=============================================================
Static FDB 0 1024
Related Commands
show resource mac-filter
3.3.16. mac-address-table discard vlan
Command Purpose
Use the mac-address-table discard configuration command on the switch to enable unicast MAC address filtering and to configure the switch to drop traffic with a specific source or destination MAC address and VLAN matches. Use the no form of this command to return to 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
mac_address-table MAC_ADDR discard ( vlan VLAN_ID | )
Parameter |
Parameter Description |
Parameter Value |
---|---|---|
MAC_ADDR |
Source or Destination MAC address (unicast) to add to the address filtering table |
- |
vlan VLAN_ID |
VLAN to add to the address filtering table |
1-4094 |
Command Mode
Global Config
Default
None
Usage
Follow these guidelines when using this feature:
Multicast MAC addresses, broadcast MAC addresses, and router MAC addresses are not supported. Packets that are forwarded to the CPU are also not supported.Designed VLAN should be created in advance.
Examples
This example shows how to enable unicast MAC address filtering and to configure the switch to drop packets that have a source or destination address of c2f3220a12f4 When a packet is received with this MAC address as its source or destination, the packet is dropped:
Switch# configure terminal
Switch(config)# vlan 2
Switch(config-vlan)#exit
Switch(config)# mac-address-table c2f3.220a.12f4 discard vlan 2
Related Commands
mac-address-table forward
3.3.17. clear mac address-table blackhole
Command Purpose
Use the clear mac address-table privileged EXEC command on the switch to delete all designed blackhole addresses on a particular VLAN from the MAC address table.
Prerequisites
Platform |
Software |
License |
Comments |
---|---|---|---|
AQ-N3000 |
7.0 |
Base |
|
AQ-N5000 |
7.0 |
Base |
|
AQ-N6000 |
7.0 |
Base |
Command Syntax
clear mac address-table blackhole ( vlan VLAN_ID | )
Parameter |
Parameter Description |
Parameter Value |
---|---|---|
vlan VLAN_ID |
Delete the designed blackhole MAC address |
1-4094 |
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
This example shows how to remove a specific VLAN from the blackhole address table:
Switch# clear mac address-table blackhole vlan 2
Related Commands
show mac address-table
3.3.18. show mac address-table
Command Purpose
Use the show mac address-table privileged EXEC command to display a specific MAC address table blackhole entry on a specific VLAN.
Prerequisites
Platform |
Software |
License |
Comments |
---|---|---|---|
AQ-N3000 |
7.0 |
Base |
|
AQ-N5000 |
7.0 |
Base |
|
AQ-N6000 |
7.0 |
Base |
Command Syntax
show mac address-table blackhole ( vlan VLAN_ID | )
Parameter |
Parameter Description |
Parameter Value |
---|---|---|
vlan VLAN_ID |
Display the blackhole MAC address with special VLAN |
1-4094 |
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
This is an example of output from the show mac address-table blackhole command:
Switch# show mac address-table blackhole
Mac Address Table
-------------------------------------
(*) - Security Entry (M) - MLAG Entry
(MO) - MLAG Output Entry (MI) - MLAG Input Entry
(E) - EVPN Entry (EO) - EVPN Output Entry
(EI) - EVPN Input Entry
Vlan Mac Address Type Ports
---- ----------- ---- -----
2 0000.0000.0001 blackhole drop
Related Commands
mac-address-table