device# configure terminal
device(config)# mac access-list extended macl
device(conf-macl-ext)# seq 10 permit host 0010.9400.0010 host 0010.9400.0014 vlan 20 count mirror device(conf-macl-ext)# seq 20 permit host 0010.9400.0011 host 0010.9400.0015 vlan 20 count mirror device(conf-macl-ext)# seq 30 permit host 0010.9400.0012 host 609c.9f01.58cb vlan 21 count mirror device(conf-macl-ext)# seq 40 permit host 0010.9400.0013 host 609c.9f01.58cb vlan 22 count mirror device(conf-macl-ext)# seq 50 permit any any count mirror
device(conf-macl-ext)# exit
device(config)# ip access-list extended ipv4acl
device(conf-ipv4acl-ext)# seq 10 permit ip host 11.12.13.14 any count mirror
device(conf-ipv4acl-ext)# exit
device(config)# acl-mirror source ethernet 0/1 destination port-channel 1
device(config)# interface ethernet 0/4
device(conf-if-eth-0/1)# mac access-group mac1 in
device(conf-if-eth-0/1)# ip access-group ipv4acl in
device(conf-if-eth-0/1)# end
device# show statistics access-list interface ethernet 0/1 in mac access-list macl on Ethernet 0/1 at Ingress (From User) seq 10 permit host 0010.9400.0010 host 0010.9400.0014 vlan 20 count mirror (105555094236 frames) seq 20 permit host 0010.9400.0011 host 0010.9400.0015 vlan 20 count mirror (105555103123 frames) seq 30 permit host 0010.9400.0012 host 609c.9f01.58cb vlan 21 count mirror (105555072247 frames) seq 40 permit host 0010.9400.0013 host 609c.9f01.58cb vlan 22 count mirror (105555083432 frames) seq 50 permit any any count mirror (0 frames)
device# copy running-config startup-config
device# configure terminal device(config)# mac access-list extended macl device(conf-macl-ext)# seq 10 permit host 0010.9400.0010 host 0010.9400.0014 vlan 20 count mirror device(conf-macl-ext)# seq 20 permit host 0010.9400.0011 host 0010.9400.0015 vlan 20 count mirror device(conf-macl-ext)# seq 30 permit host 0010.9400.0012 host 609c.9f01.58cb vlan 21 count mirror device(conf-macl-ext)# seq 40 permit host 0010.9400.0013 host 609c.9f01.58cb vlan 22 count mirror device(conf-macl-ext)# seq 50 permit any any count mirror device(conf-macl-ext)# exit device(config)# acl-mirror source ethernet 0/1 destination port-channel 1 device(config)# interface ethernet 0/1 device(conf-if-eth-0/1)# mac access-group mac1 in device(conf-if-eth-0/1)# end device# show statistics access-list interface ethernet 0/1 in device# copy running-config startup-config
Note
Only the Layer 2 ACL creation is shown in this example.