Skip to content

Switch Chip Features

MikroTik RouterBOARD devices contain various built-in switch chips that provide hardware-accelerated Layer 2 forwarding. These switch chips enable efficient packet switching without CPU intervention, significantly improving network performance for VLANs, QoS, and access control lists.

This documentation covers switch chip features available on non-CRS series RouterBOARD devices. For CRS series switches, refer to the dedicated CRS3xx/CRS5xx and CCR2116/CCR2216 switch chip documentation.

RouterBOARD devices feature different switch chip models with varying capabilities. Understanding your device’s switch chip is essential for proper configuration and feature utilization.

FeatureQCA8337Atheros8327Atheros8316Atheros8227Atheros7240MT7621MT753188E6393X88E6191X
Port SwitchingYesYesYesYesYesYesYesYesYes
Port MirroringYesYesYesYesYesYesYesYesYes
TX Rate LimitYesYesYesYesNoNoYesYesYes
RX Rate LimitYesYesNoNoNoNoYesYesYes
Host Table204820482048102420482048204816K16K
VLAN Table4096409640964096164096409640964096
Rule Table929232NoNoNoNo256No
Device SeriesSwitch ChipPorts
RB3011 seriesQCA8337ether1-ether5, ether6-ether10
RB750Gr3 (hEX)MT7621ether1-ether5
RB4011iGS+RTL8367ether1-ether5, ether6-ether10
RB5009 series88E6393Xether1-ether8, sfp-sfpplus1
L009 series88E6190ether2-ether8, sfp1
CCR2004-16G-2S+88E6191Xether1-ether8, ether9-ether16
RB1100AHx4RTL8367ether1-ether5, ether6-ether10, ether11-ether13
RB2011 seriesAtheros8327ether1-ether5+sfp1, ether6-ether10

For QCA8337 and Atheros8327 switch chips, TX/RX rate limits are configured using the bandwidth property under /interface ethernet. For RTL8367, 88E6393X, 88E6191X, MT7621, MT7531, and EN7523 chips, rate limits use egress-rate and ingress-rate properties under /interface ethernet switch port.

Devices with MT7621, MT7531, EN7523, and RTL8367 switch chips support hardware-offloaded VLAN filtering starting from RouterOS v7. These chips only support EtherType 0x8100 and do not support 0x88a8 or 0x9100, nor tag-stacking features. Enabling these features will disable hardware offload.

Some MikroTik devices have multiple independent switch chips, each managing a different group of ports. For example, the RB3011 has two QCA8337 chips:

  • Switch 1: ether1 through ether5
  • Switch 2: ether6 through ether10

By default, traffic between ports on different switch chips must go through the CPU. However, with proper configuration, VLAN traffic can be forwarded between switch chips using hardware offloading.

Configuration for VLAN forwarding across switch chips:

Terminal window
# Create a single bridge spanning all ports
/interface bridge
add name=bridge1 vlan-filtering=yes
# Add ports from both switch chips to the bridge
/interface bridge port
add bridge=bridge1 interface=ether2 hw=yes
add bridge=bridge1 interface=ether3 hw=yes
add bridge=bridge1 interface=ether6 hw=yes
add bridge=bridge1 interface=ether7 hw=yes

Important considerations:

  1. Both switch chips must be connected through the bridge
  2. VLAN filtering must be enabled on the bridge
  3. The bridge VLAN table must include ports from both switch chips for each VLAN
/interface bridge vlan
add bridge=bridge1 tagged=ether2,ether3,ether6,ether7 vlan-ids=10

Without proper bridge VLAN configuration, traffic between ports on different switch chips will be forwarded by the CPU rather than hardware-accelerated.

Devices with multiple switch chips:

  • RB3011 series: ether1-5 (switch1), ether6-10 (switch2)
  • RB4011iGS+: ether1-5 (switch1), ether6-10 (switch2)
  • RB1100AHx4: ether1-5 (switch1), ether6-10 (switch2), ether11-13 (switch3)

Port switching combines multiple physical ports into a single switching domain, enabling hardware-accelerated Layer 2 forwarding between ports. This feature is fundamental to all switch chip operations.

Port switching in RouterOS v6.41 and later is configured using bridge interfaces with hardware offloading enabled:

/interface bridge
add name=bridge1 vlan-filtering=yes
/interface bridge port
add bridge=bridge1 interface=ether2 hw=yes
add bridge=bridge1 interface=ether3 hw=yes
add bridge=bridge1 interface=ether4 hw=yes

The hw=yes parameter enables hardware offloading for the specified bridge port. Before RouterOS v6.41, port switching used the deprecated master-port property.

On RB450G, RB435G, and RB850Gx2 devices, ether1 has a special feature allowing it to be optionally included or excluded from the default switch group:

/interface ethernet switch
set switch1 switch-all-ports=yes
PropertyValueDescription
switch-all-portsyes (default)Ether1 is part of the switch and supports all advanced features including extended statistics
switch-all-portsnoEther1 operates as a standalone port, increasing throughput to other ports but removing switching capability

Setting switch-all-ports=no removes ether1 from the switching domain, allowing it to function as an independent port with full bandwidth for routing and bridging operations.

Port mirroring copies traffic from a source port to a target port for monitoring and analysis purposes. This feature is useful for troubleshooting, security analysis, and network monitoring.

Basic port mirroring configuration:

/interface ethernet switch
set switch1 mirror-source=ether2 mirror-target=ether3
PropertyDescription
mirror-sourceSelects the source port for mirroring. Ingress and egress traffic is copied to the mirror-target
mirror-targetSelects the target port for mirrored traffic. Can be set to “cpu” to send mirrored packets to the switch CPU
mirror-egress-targetSelects egress mirror target port (88E6393X, 88E6191X, 88E6190 only)

For 88E6393X switch chips, multiple mirroring target ports can be configured:

/interface ethernet switch rule
add mirror=yes mirror-ports=ether3,ether4 ports=ether2 switch=switch1

The mirror-source and mirror-target ports must belong to the same switch chip. Configuring mirror-source on ports from different switch chips with both targets set to CPU will create a loop that can make the device inaccessible.

Port settings configure VLAN switching and filtering options for switch chips with VLAN table support.

ModeDescription
disabledDisables VLAN table checking entirely. No traffic is dropped
fallbackChecks tagged traffic against VLAN Table. Forwards untagged traffic. Drops tagged traffic if egress port not found in VLAN table
checkChecks tagged traffic and drops untagged. Drops tagged traffic if egress port not found
secureStrictest mode. Both ingress and egress ports must be in VLAN Table. Drops untagged traffic
ActionDescription
add-if-missingAdds VLAN tag on egress using default-vlan-id. Use for trunk ports
always-stripRemoves VLAN tag on egress. Use for access ports
leave-as-isDoes not modify VLAN tag. Use for hybrid ports

The default-vlan-id property assigns a VLAN tag to all untagged ingress traffic:

/interface ethernet switch port
set ether2 default-vlan-id=200 vlan-header=always-strip vlan-mode=secure

On QCA8337 and Atheros8327 chips, use vlan-header=leave-as-is. The switch chip determines access ports using the default-vlan-id property.

The VLAN table specifies forwarding rules for 802.1Q tagged packets. VLAN table entries take precedence over bridge hardware offloading configuration.

/interface ethernet switch vlan
add ports=ether2,ether3 switch=switch1 vlan-id=200
add ports=ether2,ether4 switch=switch1 vlan-id=300
PropertyDescription
disabledEnables or disables the VLAN entry
independent-learningEnables Independent VLAN Learning (IVL) instead of Shared VLAN Learning (SVL)
portsComma-separated list of interface members for this VLAN
switchName of the switch this VLAN applies to
vlan-idVLAN ID (0-4095)

The following matrix shows traffic behavior based on VLAN mode and header settings:

VLAN ModeEgress PortUntaggedTagged VID MatchTagged No VID Match
disabledPresentForwardForwardForward
fallbackPresentForwardForwardDrop
checkPresentDropForwardDrop
securePresentDropForwardDrop

The host table maintains the switch chip’s MAC address to port mapping for Layer 2 forwarding.

Switch chips automatically learn MAC addresses from incoming packet source addresses. Dynamic entries timeout after approximately 5 minutes. Learning only occurs on ports configured as part of a hardware-offloaded bridge.

Static entries provide additional control over traffic handling:

/interface ethernet switch host
add mac-address=00:11:22:33:44:55 ports=ether2 switch=switch1
PropertyDescription
copy-to-cpuSend frame copy to CPU for matching MAC destination
dropDrop frames from matching MAC source address
mac-addressHost MAC address
mirrorSend frame copy to mirror-target port
portsInterface(s) the MAC address maps to
redirect-to-cpuRedirect frame to CPU
vlan-idVLAN ID for the static entry

When the host table is full, switch chips use different strategies: QCA8337 and Atheros8327 remove older entries to make space; Atheros8316, Atheros8227, Atheros7240, and ICPlus175D ignore new MACs until timeout; MT7621, MT7531, and EN7523 use a hybrid approach.

QCA8337 and Atheros8327 chips automatically add reserved multicast MAC addresses (01:80:C2:00:00:0x) when a hardware-offloaded bridge is created with forward-reserved-addresses=no and STP enabled.

The rule table provides wire-speed packet filtering, forwarding, and VLAN tagging based on L2, L3, and L4 header conditions.

/interface ethernet switch rule
add disabled=no ports=ether2 switch=switch1
PropertyDescription
copy-to-cpuSend packet copy to switch CPU
mirrorSend packet copy to mirror-target port
new-dst-portsChange destination port(s). Empty value drops packet
new-vlan-idChange VLAN ID (Atheros8316, 88E6393X only)
new-vlan-priorityChange VLAN priority (Atheros8327, QCA8337, Atheros8316)
rateIngress rate limit in bps (first 32 rules, Atheros8327/QCA8337)
redirect-to-cpuRedirect packet to CPU
PropertyDescription
dscpMatch DSCP field (0-63)
dst-addressMatch destination IPv4 address/mask
dst-address6Match destination IPv6 address/mask
dst-mac-addressMatch destination MAC address/mask
dst-portMatch destination port number/range
mac-protocolMatch MAC protocol (ip, arp, ipv6, tcp, udp, etc.)
portsMatch interface(s). Empty matches all switch interfaces
protocolMatch IP protocol
src-addressMatch source IPv4 address/mask
src-address6Match source IPv6 address/mask
src-mac-addressMatch source MAC address/mask
src-portMatch source port number/range
vlan-idMatch VLAN ID
vlan-headerMatch VLAN header presence
vlan-priorityMatch VLAN priority (0-7)

Atheros8316 supports 8-32 rules depending on conditions used; Atheros8327/QCA8337 supports 8-16 rules; 88E6393X supports 42-256 rules. IPv4 and IPv6 conditions cannot be combined in the same rule.

Port isolation divides network segments to prevent communication between specific ports while allowing uplink access.

/interface ethernet switch port-isolation
set ether1 forwarding-override=sfp1
set ether2 forwarding-override=sfp1
set ether3 forwarding-override=sfp1

Private VLAN configuration forwards all traffic to an uplink port while isolating downstream ports from each other:

/interface bridge
add name=bridge1
/interface bridge port
add interface=sfp1 bridge=bridge1 hw=yes
add interface=ether1 bridge=bridge1 hw=yes
add interface=ether2 bridge=bridge1 hw=yes
add interface=ether3 bridge=bridge1 hw=yes
/interface ethernet switch port-isolation
set ether1 forwarding-override=sfp1
set ether2 forwarding-override=sfp1
set ether3 forwarding-override=sfp1

Multiple uplink ports can be specified by separating them with commas.

Isolated switch groups prevent communication between different port groups:

/interface bridge
add name=bridge1
/interface bridge port
add bridge=bridge1 interface=ether1 hw=yes
add bridge=bridge1 interface=ether2 hw=yes
add bridge=bridge1 interface=ether3 hw=yes
add bridge=bridge1 interface=ether4 hw=yes
add bridge=bridge1 interface=ether5 hw=yes
/interface ethernet switch port-isolation
set ether1 forwarding-override=ether2,ether3
set ether2 forwarding-override=ether1,ether3
set ether3 forwarding-override=ether1,ether2
set ether4 forwarding-override=ether5
set ether5 forwarding-override=ether4

Switch chips with VLAN table support (QCA8337, Atheros8327, Atheros8316, Atheros8227, Atheros7240) can override port isolation when VLAN lookup is enabled. For additional isolation between ports on the same VLAN, use switch rules with new-dst-ports.

CPU flow control prevents CPU port congestion by sending pause frames when link capacity is exceeded.

/interface ethernet switch set switch1 cpu-flow-control=no

Disabling CPU flow control is available on QCA8337, Atheros8227, Atheros8327, Atheros7240, Atheros8316, 88E6191X, and 88E6393X switch chips. Other chips have CPU flow control enabled by default and cannot be changed.

Switch chips can report detailed statistics for monitoring and troubleshooting.

/interface ethernet switch print stats
StatisticDescription
rx-bytesTotal bytes received
rx-packetTotal packets received
rx-broadcastBroadcast packets received
rx-multicastMulticast packets received
rx-fcs-errorFrames with checksum errors
rx-dropDropped packets
tx-bytesTotal bytes transmitted
tx-packetTotal packets transmitted
tx-broadcastBroadcast packets transmitted
tx-multicastMulticast packets transmitted
tx-dropDropped transmit packets

Devices with multiple CPU cores connected to the switch chip report statistics per data lane.

/interface bridge
add name=bridge1
/interface bridge port
add bridge=bridge1 interface=ether2 hw=yes
add bridge=bridge1 interface=ether3 hw=yes
add bridge=bridge1 interface=ether4 hw=yes
add bridge=bridge1 interface=ether5 hw=yes
/interface ethernet switch vlan
add ports=ether2,ether3 switch=switch1 vlan-id=200
add ports=ether2,ether4 switch=switch1 vlan-id=300
add ports=ether2,ether5 switch=switch1 vlan-id=400
/interface ethernet switch port
set ether2 vlan-mode=secure vlan-header=add-if-missing
set ether3 vlan-mode=secure vlan-header=always-strip default-vlan-id=200
set ether4 vlan-mode=secure vlan-header=always-strip default-vlan-id=300
set ether5 vlan-mode=secure vlan-header=always-strip default-vlan-id=400
/interface bridge
add name=bridge1
/interface bridge port
add bridge=bridge1 interface=ether2 hw=yes
add bridge=bridge1 interface=ether3 hw=yes
add bridge=bridge1 interface=ether4 hw=yes
add bridge=bridge1 interface=ether5 hw=yes
/interface ethernet switch vlan
add ports=ether2,ether3,ether4,ether5 switch=switch1 vlan-id=200
add ports=ether2,ether3,ether4,ether5 switch=switch1 vlan-id=300
add ports=ether2,ether3,ether4,ether5 switch=switch1 vlan-id=400
/interface ethernet switch port
set ether2 vlan-mode=secure vlan-header=leave-as-is
set ether3 vlan-mode=secure vlan-header=leave-as-is default-vlan-id=200
set ether4 vlan-mode=secure vlan-header=leave-as-is default-vlan-id=300
set ether5 vlan-mode=secure vlan-header=leave-as-is default-vlan-id=400
/interface vlan
add name=MGMT vlan-id=99 interface=bridge1
/ip address
add address=192.168.99.1/24 interface=MGMT
/interface ethernet switch vlan
add ports=ether1,switch1-cpu switch=switch1 vlan-id=99
/interface ethernet switch port
set ether1 vlan-header=add-if-missing vlan-mode=secure
set ether2 default-vlan-id=100 vlan-header=always-strip vlan-mode=secure
set switch1-cpu vlan-header=leave-as-is vlan-mode=secure
/interface vlan
add name=MGMT vlan-id=100 interface=bridge1
/ip address
add address=192.168.100.1/24 interface=MGMT
/interface ethernet switch vlan
add ports=ether2,switch1-cpu switch=switch1 vlan-id=100
/interface ethernet switch port
set ether1 vlan-header=add-if-missing vlan-mode=secure
set ether2 default-vlan-id=100 vlan-header=always-strip vlan-mode=secure
set switch1-cpu vlan-header=leave-as-is vlan-mode=secure
/interface bridge
add name=bridge1
/interface bridge port
add bridge=bridge1 interface=ether2 hw=yes
add bridge=bridge1 interface=ether3 hw=yes
/interface ethernet switch vlan
add ports=ether2,ether3,switch1-cpu switch=switch1 vlan-id=10
add ports=ether2,ether3,switch1-cpu switch=switch1 vlan-id=20
/interface vlan
add interface=bridge1 vlan-id=10 name=VLAN10
add interface=bridge1 vlan-id=20 name=VLAN20
/ip address
add address=192.168.10.1/24 interface=VLAN10
add address=192.168.20.1/24 interface=VLAN20