Static MAC Filtering Commands

Use these commands to configure static MAC filtering.

The commands in this section describe how to configure static MAC filtering. Static MAC filtering allows you to configure destination ports for a static multicast MAC filter irrespective of the platform.

macfilter

M4250

M4350

This command adds a static MAC filter entry for the MAC address macaddr on the VLAN vlanid. A packet with a specific destination MAC address in a specific VLAN is admitted only if the ingress port is defined in the set of source ports, otherwise the packet is dropped.

On the egress side, a packet that was admitted is sent through all ports that are defined in the set of destination ports.

The value of the macaddr parameter is a 6-byte hexadecimal number in the format of b1:b2:b3:b4:b5:b6. The restricted MAC Addresses are: 00:00:00:00:00:00, 01:80:C2:00:00:00 to 01:80:C2:00:00:0F, 01:80:C2:00:00:20 to 01:80:C2:00:00:21, and FF:FF:FF:FF:FF:FF. The vlanid parameter must identify a valid VLAN.

The number of static mac filters supported on the system is different for MAC filters where source ports are configured and MAC filters where destination ports are configured.

  • For unicast MAC address filters and multicast MAC address filters with source port lists, the maximum number of static MAC filters supported is 20.
  • For multicast MAC address filters with destination ports configured, the maximum number of static filters supported is 256.

For example, you can configure the following combinations:

  • Unicast MAC and source port (max = 20)
  • Multicast MAC and source port (max = 20)
  • Multicast MAC and destination port (only) (max = 256)
  • Multicast MAC and source ports and destination ports (max = 20)
Format macfilter macaddr vlanid
Mode Global Config

no macfilter

M4250

M4350

This command removes all filtering restrictions and the static MAC filter entry for the MAC address macaddr on the VLAN vlanid. The macaddr parameter must be specified as a 6-byte hexadecimal number in the format of b1:b2:b3:b4:b5:b6.

The vlanid parameter must identify a valid VLAN.

Format no macfilter macaddr vlanid
Mode Global Config

macfilter adddest

M4250

M4350

Use this command to add the interface or range of interfaces to the destination filter set for the MAC filter with the specified macaddr and VLAN of vlanid. The macaddr parameter must be specified as a 6-byte hexadecimal number in the format of b1:b2:b3:b4:b5:b6. The vlanid parameter must identify a valid VLAN.

Note: Configuring a destination port list is only valid for multicast MAC addresses.
Format macfilter adddest macaddr vlanid
Mode Interface Config

no macfilter adddest

This command removes a port from the destination filter set for the MAC filter with the specified macaddr and VLAN of vlanid. The macaddr parameter must be specified as a 6-byte hexadecimal number in the format of b1:b2:b3:b4:b5:b6. The vlanid parameter must identify a valid VLAN.

Format no macfilter adddest macaddr vlanid
Mode Interface Config

macfilter adddest all

M4250

M4350

This command adds all interfaces to the destination filter set for the MAC filter with the specified macaddr and VLAN of vlanid. The macaddr parameter must be specified as a 6-byte hexadecimal number in the format of b1:b2:b3:b4:b5:b6. The vlanid parameter must identify a valid VLAN.

Note: Configuring a destination port list is only valid for multicast MAC addresses.
Format macfilter adddest all macaddr vlanid
Mode Global Config

no macfilter adddest all

This command removes all ports from the destination filter set for the MAC filter with the specified macaddr and VLAN of vlanid. The macaddr parameter must be specified as a 6-byte hexadecimal number in the format of b1:b2:b3:b4:b5:b6. The vlanid parameter must identify a valid VLAN.

Format no macfilter adddest all macaddr vlanid
Mode Global Config

macfilter addsrc

M4250

M4350

This command adds the interface or range of interfaces to the source filter set for the MAC filter with the specified macaddr and VLAN of vlanid. The macaddr parameter must be specified as a 6-byte hexadecimal number in the format of b1:b2:b3:b4:b5:b6. The vlanid parameter must identify a valid VLAN.

Format macfilter addsrc macaddr vlanid
Mode Interface Config

no macfilter addsrc

This command removes a port from the source filter set for the MAC filter with the specified macaddr and VLAN of vlanid. The macaddr parameter must be specified as a 6-byte hexadecimal number in the format of b1:b2:b3:b4:b5:b6. The vlanid parameter must identify a valid VLAN.

Format no macfilter addsrc macaddr vlanid
Mode Interface Config

macfilter addsrc all

M4250

M4350

This command adds all interfaces to the source filter set for the MAC filter with the specified macaddr and VLAN of vlanid. The macaddr parameter must be specified as a 6-byte hexadecimal number in the format of b1:b2:b3:b4:b5:b6. The vlanid parameter must identify a valid VLAN.

Format macfilter addsrc all macaddr vlanid
Mode Global Config

no macfilter addsrc all

This command removes all interfaces from the source filter set for the MAC filter with the specified macaddr and VLAN of vlanid. The macaddr parameter must be specified as a 6-byte hexadecimal number in the format of b1:b2:b3:b4:b5:b6. The vlanid parameter must identify a valid VLAN.

Format no macfilter addsrc all macaddr vlanid
Mode Global Config

show mac-address-table static

M4250

M4350

This command displays the static MAC filtering information for all static MAC filters. If you specify all, all the static MAC filters in the system are displayed. If you supply a value for macaddr, you must also enter a value for vlanid, and the system displays static MAC filter information only for that MAC address and VLAN.

Format show mac-address-table static {macaddr vlanid | all}
Mode Privileged EXEC
Term Definition
MAC Address The MAC address of the static MAC filter entry.
VLAN ID The VLAN ID of the static MAC filter entry.
Source Ports The source port of the static MAC filter entry.
Note: Only multicast address filters can have destination port lists.

show mac-address-table staticfiltering

M4250

M4350

This command displays the Static Filtering entries in the Multicast Forwarding Database (MFDB) table.

Format show mac-address-table staticfiltering
Mode Privileged EXEC
Term Definition
VLAN ID The VLAN in which the MAC Address is learned.
MAC Address A unicast MAC address for which the switch has forwarding and or filtering information. As the data is gleaned from the MFDB, the address will be a multicast address. The format is 6 two-digit hexadecimal numbers that are separated by colons, for example 01:23:45:67:89:AB.
Type The type of the entry. Static entries are those that are configured by the end user. Dynamic entries are added to the table as a result of a learning process or protocol.
Description The text description of this multicast table entry.
Interfaces The list of interfaces that are designated for forwarding (Fwd:) and filtering (Flt:).