How to Configure Protocol-Independent MAC ACL Filtering
Protocol-independent MAC ACL filtering applies MAC ACLs to all ingress traffic types (for example, IPv4 traffic, IPv6 traffic, and MPLS traffic, in addition to MAC-layer traffic).
You can configure these interface types for protocol-independent MAC ACL filtering:
- VLAN interfaces
- Routed interfaces
- Physical LAN ports
- Logical LAN subinterfaces
Ingress traffic permitted or denied by a MAC ACL on an interface configured for protocol-independent MAC ACL filtering is processed by egress interfaces as MAC-layer traffic. You cannot apply egress IP ACLs to traffic that was permitted or denied by a MAC ACL on an interface configured for protocol-independent MAC ACL filtering.
To configure protocol-independent MAC ACL filtering, perform this task:
|
|
|
Step 1 |
Router(config)# interface {{ vlan vlan_ID } | { type slot/port [. subinterface ]} | { port-channel number [. subinterface ]}} |
Selects the interface to configure. |
Step 2 |
Router(config-if)# [ no ] mac packet-classify { input | output | use { ce_cos { input | output } | dscp { input | output }}} |
Enables protocol-independent MAC ACL filtering on the interface. By default, the mac packet-classify configuration command is disabled. |
- When the mac acl filtering is enabled, all other protocol features such as RACL, microflow policing will be ignored in the hardware.
This example shows how to configure VLAN interface 4018 for protocol-independent MAC ACL filtering and how to verify the configuration:
Router(config)# interface vlan 4018
Router(config-if)# mac packet-classify
Router# show running-config interface vlan 4018 | begin 4018
This example shows how to configure Gigabit Ethernet interface 6/1 for protocol-independent MAC ACL filtering and how to verify the configuration:
Router(config)# interface gigabitethernet 6/1
Router(config-if)# mac packet-classify
Router# show running-config interface gigabitethernet 6/1 | begin 6/1
interface GigabitEthernet6/1
mpls l2transport route 4.4.4.4 4094
This example shows how to configure Gigabit Ethernet interface 3/24, subinterface 4000, for protocol-independent MAC ACL filtering and how to verify the configuration:
Router(config)# interface gigabitethernet 3/24.4000
Router(config-if)# mac packet-classify
Router# show running-config interface gigabitethernet 3/24.4000 | begin 3/24.4000
interface GigabitEthernet3/24.4000
mpls l2transport route 4.4.4.4 4000
Configuring MAC ACLs
You can configure named ACLs that filter IP, IPX, DECnet, AppleTalk, VINES, or XNS traffic based on MAC addresses.
You can configure MAC ACLs that do VLAN-based filtering or CoS-based filtering or both.
You can globally enable or disable VLAN-based QoS filtering in MAC ACLs (disabled by default).
To configure a MAC ACL, perform this task:
|
|
|
Step 1 |
Router(config)# mac host name mac_addr |
(Optional) Assigns a name to a MAC address. |
Step 2 |
Router(config)# mac access-list extended list_name |
Configures a MAC ACL. |
Step 3 |
Router(config-ext-macl)# { permit | deny } { src_mac_mask | { host name src_mac_name } | any } { dest_mac_mask | { host name dst_mac_name } | any } [{ protocol_keyword | { ethertype_number ethertype_mask }} [ vlan vlan_ID ] [ cos cos_value ]] |
Configures an access control entry (ACE) in a MAC ACL. The source and destination MAC addresses can be specified by MAC address masks or by names created with the mac host command. |
- Cisco IOS Release 15.0SY supports the vlan and cos keywords.
- The vlan keyword for VLAN-based QoS filtering in MAC ACLs can be globally enabled or disabled and is disabled by default.
- You can enter MAC addresses as three 2-byte values in dotted hexadecimal format. For example, 0030.9629.9f84.
- You can enter MAC address masks as three 2-byte values in dotted hexadecimal format. Use 1 bits as wildcards. For example, to match an address exactly, use 0000.0000.0000 (can be entered as 0.0.0).
- You can enter an EtherType and an EtherType mask as hexadecimal values.
- Entries without a protocol parameter match any protocol.
- ACL entries are scanned in the order you enter them. The first matching entry is used. To improve performance, place the most commonly used entries near the beginning of the ACL.
- An implicit deny any any entry exists at the end of an ACL unless you include an explicit permit any any entry at the end of the list.
- All new entries to an existing list are placed at the end of the list. You cannot add entries to the middle of a list.
- This list shows the EtherType values and their corresponding protocol keywords:
–
0x0600—xns-idp—Xerox XNS IDP
–
0x0BAD—vines-ip—Banyan VINES IP
–
0x0baf—vines-echo—Banyan VINES Echo
–
0x6000—etype-6000—DEC unassigned, experimental
–
0x6001—mop-dump—DEC Maintenance Operation Protocol (MOP) Dump/Load Assistance
–
0x6002—mop-console—DEC MOP Remote Console
–
0x6003—decnet-iv—DEC DECnet Phase IV Route
–
0x6004—lat—DEC Local Area Transport (LAT)
–
0x6005—diagnostic—DEC DECnet Diagnostics
–
0x6007—lavc-sca—DEC Local-Area VAX Cluster (LAVC), SCA
–
0x6008—amber—DEC AMBER
–
0x6009—mumps—DEC MUMPS
–
0x0800—ip—Malformed, invalid, or deliberately corrupt IP frames
–
0x8038—dec-spanning—DEC LANBridge Management
–
0x8039—dsm—DEC DSM/DDP
–
0x8040—netbios—DEC PATHWORKS DECnet NETBIOS Emulation
–
0x8041—msdos—DEC Local Area System Transport
–
0x8042—etype-8042—DEC unassigned
–
0x809B—appletalk—Kinetics EtherTalk (AppleTalk over Ethernet)
–
0x80F3—aarp—Kinetics AppleTalk Address Resolution Protocol (AARP)
This example shows how to create a MAC-Layer ACL named mac_layer that denies dec-phase-iv traffic with source address 0000.4700.0001 and destination address 0000.4700.0009, but permits all other traffic:
Router(config)# mac access-list extended mac_layer
Router(config-ext-macl)# deny 0000.4700.0001 0.0.0 0000.4700.0009 0.0.0 dec-phase-iv
Router(config-ext-macl)# permit any any