3.5. Configuring MAC Address Table
Overview
Function Introduction
MAC address table contains address information for the switch to forward traffic between ports. The address table includes these types of address:
Dynamic address: the source address learnt by the switch and will be aged after aging time if this address is not hit. We only support IVL learning mode.
Static address: the source address manually added by administrators.
Following is a brief description of terms and concepts used to describe the MAC address table:
IVL: Independent VLAN Learning: for a given set of VLANs, if a given individual MAC Address is learned in one VLAN, it can’t be used in forwarding decisions taken for that address relative to any other VLAN in the given set.
SVL: Shared VLAN Learning: for a given set of VLANs, if an individual MAC Address is learned in one VLAN, it can be used in forwarding decisions taken for that address relative to all other VLANs in the given set.
Reference to standard:IEEE 802.1D IEEE 802.1Q
Principle Description
N/A
Configuration
Configuring Address Aging Time
The aging time is not exact time. If aging time set to N, then the dynamic address will be aged after N~2N interval. The default aging time is 300 seconds.
step 1 Enter the configure mode
Switch# configure terminal
step 2 Set dynamic address aging time
Switch(config)# mac-address-table ageing-time 10
step 3 Exit the configure mode
Switch(config)# end
step 4 Validation
Use the following command to display the aging time:
Switch# show mac address-table ageing-time
MAC address table ageing time is 10 seconds
Configuring Static Unicast Address
Unicast address can be only bound to one port. According to the picture, Mac-Da 0000.1234.5678 should forward via eth-0-1.
step 1 Enter the configure mode
Switch# configure terminal
step 2 Set static mac address table
Switch(config)# mac-address-table 0000.1234.5678 forward eth-0-1 vlan 1
step 3 Exit the configure mode
Switch(config)# end
step 4 Validation
Use the following command to display the mac address table:
Switch# show mac address-table
Mac Address Table
-------------------------------------------
(*) - Security Entry
Vlan Mac Address Type Ports
---- -------------- ------- --------
1 0000.1234.5678 static eth-0-1
Configuring Static Multicast Address
Multicast address can be bound to multi-port.According to the picture, Mac-Da 0100.0000.0000 can forward via eth-0-1 and eth-0-2.
step 1 Enter the configure mode
Switch# configure terminal
step 2 Set static multicast mac address table
Switch(config)# mac-address-table 0100.0000.0000 forward eth-0-1 vlan 1
Switch(config)# mac-address-table 0100.0000.0000 forward eth-0-2 vlan 1
step 3 Exit the configure mode
Switch(config)# end
step 4 Validation
Use the following command to display the mac address table:
Switch# show mac address-table
Mac Address Table
-------------------------------------------
(*) - Security Entry
Vlan Mac Address Type Ports
---- -------------- ------- -------
1 0100.0000.0000 static eth-0-1 eth-0-2
Configuring MAC Filter Address
MAC filter will discard these frames whose source or destination address is set to discard. The MAC filter has higher priority than MAC address.
step 1 Enter the configure mode
Switch# configure terminal
step 2 Add unicast address to be discarded
Switch(config)# mac-address-table 0000.1234.5678 discard
step 3 Exit the configure mode
Switch(config)# end
step 4 Validation
Use the following command to display the mac address filter:
Switch# show mac-filter address-table
MAC Filter Address Table
----------------------------------
Current count : 1
Max count : 128
Left count : 127
Filter address list :
----------------------------------
0000.1234.5678
Configuring MAC Filter Address with special VLAN
MAC filter will discard these frames whose source or destination address is set to discard with VLAN matches. The MAC filter has higher priority than MAC address.
step 1 Enter the configure mode
Switch# configure terminal
step 2 Create VLAN
Switch(config)# vlan 2
step 3 Exit VLAN view
Switch(config-vlan)# exit
step 4 Add unicast address to be discarded
Switch(config)# mac-address-table 0000.1234.5678 discard vlan 2
step 5 Exit the configure mode
Switch(config)# end
step 6 Validation
Use the following command to display the mac address filter with special VLAN:
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.1234.5678 blackhole drop
Application cases
N/A