Skip to main content
Version: current

acl


interface/ethernet/switch/acl

Syscap: musicswitch
Type: Directory

Access Control List consists of ingress policy and egress policy engines and allows configuration of up to 128 policy rules (limited by RouterOS). It is an advanced tool for wire-speed packet filtering, forwarding, shaping, and modifying based on Layer2, Layer3, and Layer4 protocol header field conditions.

note

Due to hardware limitations, it is not possible to match broadcast/multicast traffic on specific ports. You should use port isolation, drop traffic on ingress ports, or use VLAN filtering to prevent certain broadcast/multicast traffic from being forwarded.

FlagNameDescription
Xdisabled
Iinvalid
ArgumentTypeDescription
tableenum (ingress | egress) { ingress:0, egress:1 }Selects the policy table for incoming or outgoing packets.
invert-matchboolInverts the whole ACL rule matching.
src-portsmulti { array-id }Matching physical source ports or trunks.
dst-portsmulti { array-id }Matching physical destination ports or trunks. It is not possible to match broadcast/multicast traffic on the egress port due to a hardware limitation.
service-vidsuper { ! , service-vid: range [ .. 4095] }Matching service VLAN ID.
service-pcpnumMatching service PCP.
service-deinumMatching service DEI.
customer-vidsuper { ! , customer-vid: range [ .. 4095] }Matching customer VLAN ID.
customer-pcpnumMatching customer PCP.
customer-deinumMatching customer DEI.
src-l3-portsuper { ! , src-l3-port: range [ .. 65535] }Matching Layer3 source port.
dst-l3-portsuper { ! , dst-l3-port: range [ .. 65535] }Matching Layer3 destination port.
custom-fieldsobject { custom-field: super { ! , custom-field: super { base: enum (start-of-frame | end-of-l2-header | end-of-l3-header) { start-of-frame:0, end-of-l2-header:1, end-of-l3-header:2 } , [offset] :num [ .. 127] , [range] :range [ .. 65535] , [mask] [ /num [ .. 65535]] } } }
prioritynumMatching internal priority. Valid only in the egress table.
drop-precedenceenum (green | yellow | red | drop)Matching internal drop precedence. Valid only in the egress table.
dst-addr-registeredboolDefines whether to match packets with a registered state - packets whose destination MAC address is in UFDB/MFDB/RFDB. Valid only in the egress table.
service-tagenum (untagged | priority-tagged | tagged | tagged-or-priority-tagged) { untagged:0, priority-tagged:1, tagged:2, tagged-or-priority-tagged:3 }Format of the service tag.
customer-tagenum (untagged | priority-tagged | tagged | tagged-or-priority-tagged) { untagged:0, priority-tagged:1, tagged:2, tagged-or-priority-tagged:3 }Format of the customer tag.
mac-src-addresssuper { address: macAddr , [mask] [ /macAddr] }Source MAC address and mask.
mac-dst-addresssuper { address: macAddr , [mask] [ /macAddr] }Destination MAC address and mask.
mac-protocolalt { protocol-name: enum (ip-or-ipv6 | non-ip) { ip-or-ipv6:0x10000, non-ip:0x10001 } , protocol-number: num [ .. 65535] }

Ethernet payload type (MAC-level protocol).

  • 802.2 - 802.2 Frames (0x0004)
  • arp - Address Resolution Protocol (0x0806)
  • capsman - CAPsMAN to CAP MAC layer connection (0x88BB)
  • dot1x - EAPoL IEEE 802.1X (0x888E)
  • homeplug-av - HomePlug AV MME (0x88E1)
  • ip - Internet Protocol version 4 (0x0800)
  • ip-or-ipv6 - IPv4 or IPv6 (0x0800 or 0x86DD)
  • ipv6 - Internet Protocol Version 6 (0x86DD)
  • ipx - Internetwork Packet Exchange (0x8137)
  • lacp - Link Aggregation Control Protocol (0x8809)
  • lldp - Link Layer Discovery Protocol (0x88CC)
  • loop-protect - Loop Protect Protocol (0x9003)
  • macsec - MAC security IEEE 802.1AE (0x88E5)
  • mpls-multicast - MPLS multicast (0x8848)
  • mpls-unicast - MPLS unicast (0x8847)
  • mvrp - Multiple VLAN Registration protocol (0x88F5)
  • non-ip - Not Internet Protocol version 4 (not 0x0800)
  • packing-compr - Encapsulated packets with compressed IP packing (0x9001)
  • packing-simple - Encapsulated packets with simple IP packing (0x9000)
  • pppoe - PPPoE Session Stage (0x8864)
  • pppoe-discovery - PPPoE Discovery Stage (0x8863)
  • rarp - Reverse Address Resolution Protocol (0x8035)
  • romon - Router Management Overlay Network RoMON (0x88BF)
  • service-vlan - Provider Bridging IEEE 802.1ad and Shortest Path Bridging IEEE 802.1aq (0x88A8)
  • vlan - VLAN-tagged frame IEEE 802.1Q and Shortest Path Bridging IEEE 802.1aq with NNI compatibility (0x8100)
lookup-vidnumVLAN ID used in lookup. It can be changed before reaching the egress table.
ip-protocolenum (tcp | udp | udp-lite | other) { tcp:0, udp:1, udp-lite:2, other:3 }IP protocol type.
fragmentedboolWhether to match fragmented packets.
first-fragmentboolYES matches not fragmented and the first fragments, NO matches other fragments.
ttlenum (0 | 1 | max | other) { 0:0, 1:1, max:2, other:3 }Matching TTL field of the packet.
ip-dstcomposite { address: ipAddr , netmask: [ num [ .. 32]] }Matching destination IPv4 address.
ip-srccomposite { address: ipAddr , netmask: [ num [ .. 32]] }Matching source IPv4 address.
dscpnumMatching DSCP field of the packet.
ecnnumMatching ECN field of the packet.
ipv6-dstip6PrefixMatching destination IPv6 address.
ipv6-srcip6PrefixMatching source IPv6 address.
mac-isolation-profileenum (promiscuous | isolated | community1 | community2) { promiscuous:0, isolated:1, community1:2, community2:3 }Matches isolation profile based on UFDB. Valid only in the egress policy table.
src-mac-addr-stateenum (sa-found | sa-not-found | dynamic-station-move | static-station-move) { sa-found:0, sa-not-found:1, dynamic-station-move:2, static-station-move:3 }Defines whether to match packets with registered state - packets whose destination MAC address is in UFDB/MFDB/RFDB. Valid only in the egress policy table.
flow-idnum
actionenum (forward | redirect-to-cpu | copy-to-cpu | send-to-new-dst-ports | drop) { forward:0, redirect-to-cpu:1, copy-to-cpu:2, send-to-new-dst-ports:3, drop:7 }

Action for matching ACL packets.

  • copy-to-cpu - packets are copied to the CPU.
  • drop - packets are dropped.
  • forward - packets are forwarded.
  • redirect-to-cpu - packets are redirected to the CPU.
  • send-to-new-dst-ports - packets are sent to new destination ports.
new-dst-portsmulti { array-id }If the action is send-to-new-dst-ports, then this property sets which ports/trunks are the new destinations.
new-flow-idnum
attack-filter-bypassbool
ingress-vlan-filter-bypassboolAllows bypassing ingress VLAN filtering in the VLAN table for matching packets. This applies only to the ingress policy table.
egress-vlan-filter-bypassboolAllows bypassing egress VLAN filtering in the VLAN table for matching packets. This applies only to the ingress policy table.
isolation-filter-bypassboolAllows bypassing the Isolation table for matching packets. This applies only to the ingress policy table.
new-registered-stateboolWhether to modify packet status. YES sets packet status to registered, NO - unregistered. Valid only in the ingress policy table.
src-mac-learnboolWhether to learn the source MAC of the matched ACL packets. Valid only in the ingress policy table.
mirror-toenum (mirror0 | mirror1) { mirror0:0, mirror1:1 }Mirroring destination for ACL packets.
new-service-vidnumNew service VLAN ID for ACL packets.
new-customer-vidnumNew customer VLAN ID for ACL packets. If set to 4095, then traffic is dropped.
egress-vlan-translate-bypassboolAllows bypassing the egress VLAN translation table for matching packets.
new-service-pcpnumNew service PCP for ACL packets.
new-service-deinumNew service DEI for ACL packets.
new-customer-pcpnumNew customer PCP for ACL packets.
new-customer-deinumNew customer DEI for ACL packets.
new-dscpnumNew DSCP for ACL packets.
new-prioritynumNew internal priority for ACL packets.
new-drop-precedenceenum (green | yellow | red | drop)New internal drop precedence for ACL packets.
policerenumApplied ACL Policer for ACL packets.