mac access-list

Creates a MAC access control list that contains rules that permit or deny traffic based on packet fields of the L2 OSI layer.

Syntax

mac access-list name
no mac access-list name

Parameters

name
Specifies the name of the MAC ACL. Names cannot exceed 64 characters and must start with an alphabetic character or an underscore, followed by alphabetic or numeric characters or dots. Reserved keywords cannot be used, such as all or egress.

Modes

Config mode

Table 1. Error messages
Message Reason
Error: l2-acl name identifier cannot exceed 64 characters. Name is longer than 64 characters.
Error: l2-acl name identifier must start with an alphabetic character or an underscore. Name begins with non-alphabetic character or does not begin with an underscore.
Error: l2-acl name identifier must be an arbitrary sequence of alphabets, numerals, underscores, hyphens, or dots. Name contains invalid characters.
Error: l2-acl name identifier must not be reserved keyword Name includes the reserved word identified.
Error: keypath contains key value with unsupported character (@, $, #, '[, ]'). Name contains invalid characters.

Usage Guidelines

Command-line mode changes from config to config-mac-acl after new MAC ACL is created.

Examples

The following example creates a MAC ACL named L2 and on successful creation, the mode changes to config-mac acl.

device# configure terminal
device(config)# mac access-list L2
device(config-mac-acl)# 

The following example deletes the MAC ACL named L2.

device# configure terminal
device(config)# no mac access-list L2