6.4.2. permit (MAC)

Syntax

[sequence <1-2147483647>] permit (A:B:C:D:E:F/A:B:C:D:E:F|any) (A:B:C:D:E:F/A:B:C:D:E:F|any) [vlan <1-4094>] [cos <0-7>]

[ethtype <0x0600-0xFFFF>]

no sequence <1-2147483647>

Parameter

<1-2147483647>

(Optional) Specify sequence index of ACE, thesequence index represent the priority of an ACE in ACL.

(A :B:C:D:E:F/A:B:C:D:E:F|any)

Specify the source MAC address and mask ofpacket or any MAC address.

(A :B:C:D:E:F/A:B:C:D:E:F|any)

Specify the destination MAC address and maskof packet or any MAC address

[vlan <1-4094>]

(Optional) Specify the vlan ID of packet.

[cos <0-7>]

(Optional) Specify the Class of Service valueand mask of packet.

[ethtype <0x0600-0xFFFF>]

(Optional) Specify Ethernet protocol number ofpacket

Default

No default is defined

Mode

MAC ACL Configuration

Usage

Use the permit command to add permit conditions for a mac ACE that bypass those packets hit the ACE. The “sequence” also represents hit priority when ACL bind to an interface. An ACE not specifies “sequence” index would assign a sequence index which is the largest existed index plus 20. If packet content can match more than one ACE, the lowest sequence ACE is hit. An ACE can not be added if has the same conditions as existed ACE.

Example

The example shows how to add an ACE that permit packets with source MAC address 22:33:44:55:66:77, VLAN 3 and Ethernet type 1999. You can verify settings by the following show acl command

Switch(config)# mac acl test
Switch(mac-al)# sequence 999 permit 22:33:44:55:66:77/FF:FF:FF:FF:FF:FF any vlan 3 ethtype 0x2800
Switch(mac-al)# show acl
MAC access list test
sequence 999 permit 22:33:44:55:66:77/FF:FF:FF:FF:FF:FF any vlan 3 ethtype 0x2800