Community discussions

MikroTik App
 
User avatar
netravnen
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 78
Joined: Sun Dec 31, 2017 2:48 am

Multiple bridge with only one bridge hardware offloaded possible?

Thu Aug 03, 2023 11:30 pm

According to this page ⟶ https://help.mikrotik.com/docs/display/ ... eriesonly)
Creating multiple bridges

The devices support only one hardware bridge. If there are multiple bridges created, only one gets hardware offloading. While for L2 that means software forwarding for other bridges, in the case of L3HW, multiple bridges may lead to undefined behavior.
My question stems from wanting to have a "loopback" interface on my CCR + CRS devices. A loopback interface is created in RouterOS by creating a bridge interface without any "member" ports in the bridge itself. The documentation will usually call this loopback interface "lobridge".
/interface/bridge/add name=lobridge protocol-mode=none
The documentation mentions undefined behavior. Can this "undefined behavior" be avoided by only hardware offloading ports that is member if a select bridge (e.g. bridge1)?

Scripting example,
# Disable hardware offloading before making changes on the switch chip
/interface/ethernet/switch/set switch1 l3-hw-offloading=no 

# Disable full hardware routing on all ports
/interface/ethernet/switch/port set [ find ] l3-hw-offloading=no

# Enable full hardware routing on interfaces in bridge1
:foreach i in=[ /interface/bridge/port/find where bridge=bridge1 ] do={
    /interface/ethernet/switch/port set [ /interface/bridge/port/get $i interface ] l3-hw-offloading=yes
}

# Enable hardware offloading after making changes on the switch chip
/interface/ethernet/switch/set switch1 l3-hw-offloading=no
Then verify which ports are hardware offloaded using
# Verify the ports with hardware offloading enabled
/interface/ethernet/switch/port/print where l3-hw-offloading=yes

# Verify the ports with hardware offloading disabled
/interface/ethernet/switch/port/print where l3-hw-offloading=no

# Verify hardware offloading was reenabled on the switch chip
/interface/ethernet/switch/print
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 23358
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Multiple bridge with only one bridge hardware offloaded possible?

Fri Aug 04, 2023 1:45 am

Not sure why you posted?? Multiple bridge is rarely recommended use instead vlans to separate traffic, ONE BRIDGE
 
User avatar
sirbryan
Member
Member
Posts: 456
Joined: Fri May 29, 2020 6:40 pm
Location: Utah
Contact:

Re: Multiple bridge with only one bridge hardware offloaded possible?

Fri Aug 04, 2023 6:26 am

I have a second bridge used as "loopback0" on all of my CRS300 switches and CCR2116's. All switch ports belong to "bridge", meaning no ports belong to "loopback0". L2 switching, CPU routing, and L3HW offload all work fine on all of them.

I think the undefined behavior comes when assigning a number of ports to bridge1 and a number of ports to bridge2+.
 
DarkNate
Forum Guru
Forum Guru
Posts: 1065
Joined: Fri Jun 26, 2020 4:37 pm

Re: Multiple bridge with only one bridge hardware offloaded possible?

Fri Aug 04, 2023 11:01 am

What are you talking about?

Loopback bridge is harmless, recommended and a good idea. Why tf do you need “hardware offloading” for loopback bridge?

You require SINGLE bridge for physical ports/LACP bonding etc, follow the official MikroTik docs on how to configure bridge VLAN filtering.

If you are deploying multiple bridges for non-loopback purposes, you should quit your job and move to farming.

I do not understand people who:
1. Scared of single bridge config for physical ports/interfaces
2. Scared of bridge config in general and scared of hardware offloading, so they use classic-config of L3 VLAN per physical port like a fool.