deny (MAC)
To set deny conditions (conditions are also known as access control entries [ACEs]) for a MAC-based ACL, use the deny MAC Access-List Configuration mode command.
To remove a MAC-based ACE, use the no sequence command.
Syntax
deny {any | source source-wildcard} {any | destination destination-wildcard} [vlan vlan-id] [cos cos cos-wildcard] [ethtype value] [disable-port]
no sequence value
Parameters
any—Any source or destination MAC address of the packet.
source—Source MAC address of the packet.
source-wildcard—Wildcard bits to be applied to the source MAC address.
destination—Destination MAC address of the packet.
destination-wildcard—Wildcard bits to be applied to the destination MAC address.
vlan vlan-id—(Optional) Specifies the VLAN ID of the packet. (Range: 1 to 4094)
cos cos—(Optional) Specifies the CoS value of the packet. (Range: 0 to 7)
cos-wildcard—(Optional) Wildcard bits to be applied to the CoS value.
ethtype value—(Optional) Specifies the Ethernet type in hexadecimal format of the packet.
disable-port—(Optional) Disables the Ethernet interface if the condition is matched.
Default Configuration
No MAC-based ACE is defined.
Command Mode
MAC Access-List Configuration mode
User Guidelines
After an ACE is added to an ACL, an implicit deny any any condition exists at the end of the list. That is, if there are no matches, the packets are denied. However, before the first ACE is added, the list permits all packets.
Example
switchxxxxxx(config)# mac access-list extended server1
switchxxxxxx(config-mac-acl)# deny 00:00:00:00:00:01 00:00:00:00:00:ff any