Static MAC addresses are categorized into two types: static forwarding MAC addresses and static filtering MAC addresses.
The configured MAC addresses must be legal unicast MAC addresses instead of broadcast, multicast addresses.
One MAC address can only be configured as a static forwarding MAC address or a static filtering MAC address in a VLAN.
Configuration Condition
None
Configure Static Filtering MAC Addresses
After static filtering MAC address entries are configured, if the source or destination MAC addresses of the packets that are received by the corresponding VLAN match static filtering MAC address entries, the packets are discarded. This function prevents trustless devices from accessing the network, and prevents fraud and attacking activities of illegal users.
Table 8-8 Configuring Static Filtering MAC Addresses
Step
|
Command
|
Description
|
Enter the global configuration mode. |
configure terminal |
- |
Configure static filtering MAC addresses.
|
mac-address static mac-address-value vlan vlan-id drop
|
Mandatory.
By default, a device is not configured with static filtering MAC addresses.
|
Configure Static Forwarding MAC Addresses That Are Bound to a Port
With static forwarding MAC address entries configured, after the corresponding VLAN receives packets, the port matches the destination MAC addresses of the packets with the static forwarding MAC address entries that are configured on the device. If they match successfully, the device forwards the packets through the specified port. This function helps to control the routing principle of packets more flexibly, and prevents frequent migration of MAC address entries in the table.
Table 8-9 Configuring Static Forwarding MAC Addresses That Are Bound to a Port
Step
|
Command
|
Description
|
Enter the global configuration mode.
|
configure terminal
|
-
|
Configure static forwarding MAC addresses that are bound to a port.
|
mac-address static mac-address-value vlan vlan-id interface interface-name
|
Mandatory.
By default, a device is not configured with static forwarding MAC addresses.
|
Configure Static Forwarding MAC addresses That Are Bound to an Aggregation Group
With static forwarding MAC address entries configured, after the aggregation group receives packets, the port matches the destination MAC addresses of the packets with the static forwarding MAC address entries that are configured on the device. If they match successfully, the device forwards the packets through the specified aggregation group. This function helps to control the routing principle of packets more flexibly, and prevents frequent migration of MAC address entries in the table.
Table 8-10 Configuring Static Forwarding MAC Addresses That Are Bound to an Aggregation Group
Step
|
Command
|
Description
|
Enter the global configuration mode.
|
configure terminal
|
-
|
Configure static forwarding MAC addresses that are bound to an aggregation group.
|
mac-address static mac-address-value vlan vlan-id interface link-aggregation link-aggregation-id
|
Mandatory.
By default, a device is not configured with static forwarding MAC addresses.
|
-
Before configuring the command, ensure that the specified aggregation group has been created.
Configure Static BPDU MAC Address
After the static BPDU MAC address table entry is configured, when the destination MAC address value of the received packet matches the BPDU MAC address table entry, the packet will be discarded.
Table 8-11 Configure the static BPDU MAC address
Step
|
Command
|
Description
|
Enter the global configuration mode.
|
configure terminal
|
-
|
Configure the static filtering MAC address
|
mac-address bpdu mac-address-value
|
Mandatory
By default, do not configure the static BPDU MAC address in the device.
|
The following several kinds of BPDU mac can be configured:
(003) 0180-c200-0001
(005) 0180-c200-0003
(007) 0180-c200-0005
(009) 0180-c200-0007
(011) 0180-c200-0009
(013) 0180-c200-000b
(015) 0180-c200-000d
(017) 0180-c200-000f
(019) 0180-c200-0020/ffff-ffff-fff0
(021) 0180-c200-8585 |
(004) 0180-c200-0002
(006) 0180-c200-0004
(008) 0180-c200-0006
(010) 0180-c200-0008
(012) 0180-c200-000a
(014) 0180-c200-000c
(016) 0180-c200-000e
(018) 0180-c200-0010
(020) 0180-c200-008a |