Commands For Mac Address Table Configuration

3.5 Commands for MAC Address Table Configuration

 

3.5.1 clear collision-mac-table

Command: clear collision-mac-table
Function: Clears the hash collision mac table.
Parameters: None.
Command mode: Admin Mode
Default: None.
Usage guide: If enabled,the collision MAC table that issued the ffp (mac-address-table avoid-collision) can be cleared.
Example: clear the hash collision MAC table.

active500EM#clear collision-mac-address-table

 

3.5.2 clear mac-address-table dynamic

Command: clear mac-address-table dynamic [address <mac-addr>] [vlan <vlan-id>] [interface [ethernet | portchannel] <interface-name>] Function: Clear the dynamic address table.
Parameters:

  • <mac-addr>: the MAC address will be deleted.
  • <vlan-id>: VLAN ID.
  • <interface-name>: port name for forwarding the MAC packets.

Command mode: Admin Mode
Default: None.
Usage guide: Delete all dynamic address entries (except application system entries) which exist in the MAC address table. MAC address entries can be classified according to different sources. The types are as follows: dynamic, static, application, and system. Dynamic MAC address entries learned by the switch can be aged by the switch automatically. Static MAC address entries (including blackhole entries) are added by the user. Application MAC addresses are added via application protocol (such as dot1x, security port). The system MAC address is added according to the VLAN interface and is also static.
Example: Delete all dynamic MAC addresses.

active500EM#clear mac-address-table dynamic

 

3.5.3 mac-address-learning cpu-control

Command: mac-address-learning cpu-control
no mac-address-learning cpu-control
Function: This command enables MAC address learning controlled by the CPU.
Parameters: None.
Command mode: Global Mode
Default: Disabled.
Usage guide: Enable MAC learning through CPU control. The no command restores to the state where the switch chip automatically learns MAC addresses.
Example: This command is used to enable MAC learning through CPU control.

active500EM(config)#mac-address-learning cpu-control

 

3.5.4 mac-address-table aging-time

Command: mac-address-table aging-time <0 | aging-time>
no mac-address-table aging-time
Function: Sets the aging-time for the dynamic entries of the MAC address table.
Parameters:

  • <aging-time>: the aging-time in seconds. The range is from 10 to 1000000. 0 disables aging.

Command mode: Global Mode
Default: Default aging-time is 300 seconds.
Usage guide: If no packet destination address matches the address entry in aging-time, the address entry will age. Set the aging-time according to the network requirements, the default value is usually used.
Example: Set the aging-time to 600 seconds.

active500EM(config)#mac-address-table aging-time 600

 

3.5.5 mac-address-table static | static-multicast | blackhole

Command: mac-address-table {static | static-multicast | blackhole} address <mac-addr> vlan <vlan-id> [interface [ethernet | portchannel] <interface-name>] | [source | destination | both] no mac-address-table {static | static-multicast | blackhole | dynamic} [address <mac-addr>] [vlan<vlan-id>] [interface[ethernet | portchannel]<interface-name>] Function: Add or modify static address, static multicast, and filter address entries. The no command deletes the three entries.
Parameters:

  • static: selects the static entries.
  • static-multicast: selects the static multicast entries.
  • blackhole: selects filter entries which discard frames from a specific MAC address and can filter by source address, destination address, or both. When choosing the filter entries, the blackhole address cannot be based on a port or configured to an interface.
  • dynamic: selects dynamic address entries.
  • <mac-addr>: MAC address to be added or deleted.
  • <vlan-id>: VLAN number.
  • <interface-name>: name of the port transmitting the MAC data packet.
  • source: based on the source address filter.
  • destination: based on the destination address filter.
  • both: includes the source address and destination address filters. The default is both.

Command mode: Global Mode
Default: When the VLAN interface is configured, the system will generate a static address mapping entry of which inherent MAC addresses correspond to the VLAN number.
Usage guide: In certain special applications, or when the switch is unable to dynamically learn the MAC address, this command can manually establish a mapping relation between the MAC address, port, and VLAN. The no command is used to delete all dynamic, static, and filter MAC address entries existing in the MAC address list except application and system entries. MAC address entries can be classified as follows: dynamic, static, application, and system. Dynamic MAC address entries learned by the switch can be aged by the switch automatically. Static MAC address entries (including blackhole entries) are added by the user. Application MAC addresses are added via application protocol (such as dot1x, security port). The system MAC address is added according to the VLAN interface and is also static. When adding static entries, the command can also be used to map conflicting dynamic addresses, but not application and system addresses. After configuring the static multicast MAC with this command, the multicast MAC traffic will be forwarded to the specified port of the specified VLAN.
Example: Port 1/0/1 belongs to VLAN200, and establishes address mapping with MAC address 00-03-0f-f0-00-18.

active500EM(config)#mac-address-table static address 00-03-0f-f0-00-18
vlan 200 interface ethernet1/0/1

Configure a static multicast MAC 01-00-5e-00-00-01, the egress is ethernet1/0/1.

active500EM(config)#mac-address-table static-multicast address 01-00-5e-00-00-01 vlan 1 interface ethernet1/0/1

 

3.5.6 show collision-mac-address-table

Command: show collision-mac-address-table
Function: Show the HASH collision MAC address table.
Parameters: None.
Command mode: Global Mode
Default: None.
Usage guide: If enabled, the HASH collision MAC table that issued the ffp (mac-address-table avoid-collision) will be shown.
Example: Show the hash collision MAC table.

active500EM#show collision-mac-address-table
The max number can be recorded is 200
The max number of collision is 0
The current number recorded is 0
 MAC Address        VLAN  Collision-count

 

3.5.7 show mac-address-table

Command: show mac-address-table [static | blackhole | multicast | aging-time <aging-time> | count] [address <mac-addr>] [vlan <vlan-id>] [count] [interface <interface-name>] Function: Show the current MAC address table.
Parameters:

  • static: static entries.
  • blackhole: filter entries.
  • multicast: multicast entries.
  • <aging-time>: address aging time.
  • count: number of the entry.
  • <mac-addr>: entry?s MAC address.
  • <vlan-id>: entry?s VLAN number.
  • <interface-name>: entry?s interface name.

Command mode: Admin and Configuration Mode.
Default: MAC address table is not displayed.
Usage guide: This command can display various classes of MAC address entries. Users can also use ?show mac-address-table? to display all of the MAC address entries.
Example: Display all the static MAC address entries.

active500EM#show mac-address-table static
Read mac address table....
Vlan Mac Address                 Type    Creator   Ports
---- --------------------------- ------- -------------------------------------
1    01-00-5e-00-00-01           STATIC  System   CPU

 


Return to Controller Wired CLI Table of Contents