Just a few days ago, we bought the CCR2216 and I am trying some configurations, but some things are not really clear to me.
We are trying to configure the router for full L3HW for some inter-VLAN routing and routing for our public IP pools (servers, special clients etc.) out to BGP peers. Besides that, we would like to have some VLANs that have some private IPs, and need to get NATed and then fasttracked to also use the L3HW
According to the documentation on the link:
https://help.mikrotik.com/docs/spaces/R ... onExamples
There are 2 lines in this documentation that say:
Traffic from/to the WAN port gets processed by the CPU/Firewall first. Then Fasttrack connections get offloaded to the hardware (Hardware-Accelerated L4 Stateful Firewall). NAT applies both on CPU- and HW-processed packets.
Packets get routed by the hardware only if both source and destination ports have l3-hw-offloading=yes. If at least one of them has l3-hw-offloading=no, packets will go through the CPU/Firewall while offloading only the Fasttrack connections.
So intuitively instead of switching off the L3HW on the WAN port (sfp28-1), i tried switching it off just on that specific LAN port (sfp28-8 - that carries that vlans with private IPs). Based on the text, the packets that go from/to that LAN port should go through the CPU, but that doesn't seem to be the case, as it doesn't work.
So then i played with the configuration a little bit more, and it seems the only configuration that works for the abovementioned use case is that the port that will be used for L3HW offloaded fasttracked NAT (sfp28-11), NEEDS to be removed completely from the bridge, and NEEDS to have its l3hw setting disabled in the switch->port menu.
The LAN port that is used for basic L3 inter-VLAN routing (sfp28-6) works as intended.
Here is the complete test config:
Code: Select all
# 2025-03-25 12:31:58 by RouterOS 7.18.2
# model = CCR2216-1G-12XS-2XQ
/interface bridge
add name=mainBridge protocol-mode=mstp region-name=main vlan-filtering=yes
/interface ethernet
set [ find default-name=sfp28-1 ] comment="WAN port"
set [ find default-name=sfp28-6 ] comment="inter-VLAN routing - works"
set [ find default-name=sfp28-8 ] comment=\
"is in swtich- fasttrack does NOT work"
set [ find default-name=sfp28-11 ] comment=\
"is NOT in switch - fasttrack works"
/interface vlan
add interface=mainBridge name=vlan240WAN vlan-id=240
add interface=mainBridge name="vlan1000LAN-intraVLAN routing" vlan-id=1000
add interface=mainBridge name="vlan2000-doesn't work fasttrack" vlan-id=2000
#ports sfp28-8 and sfp28-11 have disabled L3HW
/interface ethernet switch port
set 15 l3-hw-offloading=no
set 18 l3-hw-offloading=no
/ip pool
add name=dhcp_pool0 ranges=192.168.213.2-192.168.213.254
add name=dhcp_pool1 ranges=192.168.216.2-192.168.216.254
add name=dhcp_pool2 ranges=192.168.200.2-192.168.200.254
/ip dhcp-server
add address-pool=dhcp_pool0 interface=sfp28-11 name=dhcp1
add address-pool=dhcp_pool1 interface="vlan1000LAN-intraVLAN routing" name=\
dhcp2
add address-pool=dhcp_pool2 interface="vlan2000-doesn't work fasttrack" name=\
dhcp3
/interface bridge port
add bridge=mainBridge interface=qsfp28-1-1
add bridge=mainBridge interface=qsfp28-2-1
add bridge=mainBridge interface=sfp28-1 pvid=240
add bridge=mainBridge interface=sfp28-2
add bridge=mainBridge interface=sfp28-3
add bridge=mainBridge interface=sfp28-4
add bridge=mainBridge interface=sfp28-5
add bridge=mainBridge interface=sfp28-6 pvid=1000
add bridge=mainBridge interface=sfp28-7
add bridge=mainBridge interface=sfp28-8 pvid=2000
add bridge=mainBridge interface=sfp28-9
add bridge=mainBridge interface=sfp28-10
add bridge=mainBridge disabled=yes interface=sfp28-11
add bridge=mainBridge interface=sfp28-12
/interface ethernet switch l3hw-settings
set autorestart=yes
/interface bridge vlan
add bridge=mainBridge tagged=mainBridge untagged=sfp28-1 vlan-ids=240
add bridge=mainBridge tagged=mainBridge untagged=sfp28-6 vlan-ids=1000
add bridge=mainBridge tagged=mainBridge untagged=sfp28-8 vlan-ids=2000
/interface ethernet switch
set 0 l3-hw-offloading=yes
/ip address
add address=10.0.240.85/24 interface=vlan240WAN network=10.0.240.0
add address=192.168.213.1/24 interface=sfp28-11 network=192.168.213.0
add address=192.168.216.1/24 interface="vlan1000LAN-intraVLAN routing" \
network=192.168.216.0
add address=192.168.200.1/24 interface="vlan2000-doesn't work fasttrack" \
network=192.168.200.0
/ip dhcp-server network
add address=192.168.200.0/24 dns-server=1.1.1.1,8.8.8.8 gateway=192.168.200.1
add address=192.168.213.0/24 dns-server=1.1.1.1,8.8.8.8 gateway=192.168.213.1
add address=192.168.216.0/24 dns-server=1.1.1.1,8.8.8.8 gateway=192.168.216.1
/ip dns
set servers=1.1.1.1,8.8.8.8
/ip firewall filter
add action=fasttrack-connection chain=forward hw-offload=yes out-interface=\
vlan240WAN src-address=192.168.213.0/24
add action=fasttrack-connection chain=forward hw-offload=yes out-interface=\
vlan240WAN src-address=192.168.200.0/24
/ip firewall nat
add action=src-nat chain=srcnat src-address=192.168.213.0/24 to-addresses=\
10.0.240.85
add action=src-nat chain=srcnat src-address=192.168.200.0/24 to-addresses=\
10.0.240.85
/ip route
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=10.0.240.1 \
routing-table=main scope=30 suppress-hw-offload=no target-scope=10
Is this all there is to it? Or am I missing something important here, and there is some other way to do this configuration?
EDIT:
It seems that it is possible to remove WAN port (sfp28-1) from the bridge (and set the IP on the interface itself, not the VLAN), and the basic L3HW offloaded routing still works, and fasttracked connections that go out of WAN port still work. It seems the more important setting is l3hw checkbox on the port iself.