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 | all ]

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.
all
Specifies all MAC ACLs.

Modes

Config mode

Usage Guidelines

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

The no form of the command removes the specific or all configured MAC ACLs.

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)# 

device# show running-config access-list 
mac access-list L2 

device# show running-config mac access-list L2 
mac access-list L2 

device# show running-config mac access-list all 
mac access-list L2 

The following example deletes the MAC ACL named L2.

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