Community discussions

MikroTik App
 
redskyline
just joined
Topic Author
Posts: 5
Joined: Sun Nov 13, 2022 10:46 pm

CRS326-24S+2Q+RM with routeros 7.6 as Switch

Wed Nov 16, 2022 10:34 am

Hello there!

i would like to ask for some tipps/help on my routeros config. As im stuck with most google results tried. Current config:
/interface bridge
add ingress-filtering=no name=bridge vlan-filtering=yes
/interface vlan
add interface=bridge name=Management vlan-id=200
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip hotspot profile
set [ find default=yes ] html-directory=hotspot
/port
set 0 name=serial0
/interface bridge port
add bridge=bridge interface=all
/interface bridge vlan
add bridge=bridge tagged="ether1,qsfpplus1-1,qsfpplus1-2,qsfpplus1-3,qsfpplus1-4,qsfpplus2-1,qsfpplus2-2,qsfpplus2-3,qsfpplus2-4,sfp-sfpplus1,sfp-sfpplus2,sfp-sfpplus3,sfp-sfpplus4,sfp-sfpplus5,sfp-sfpplus6,sfp-sfpplus7,sfp-sfpplus8,sfp-sfpplus9,sfp-sfpplus10,sfp-sfpplus12,sfp-sfpplus13,sfp-sfpplus14,sfp-sfpplus15,sfp-sfpplus16,sfp-sfpplus\
    17,sfp-sfpplus18,sfp-sfpplus19,sfp-sfpplus20,sfp-sfpplus21,sfp-sfpplus22,sfp-sfpplus23,sfp-sfpplus24" vlan-ids=200
add bridge=bridge tagged="ether1,qsfpplus1-1,qsfpplus1-2,qsfpplus1-3,qsfpplus1-4,qsfpplus2-1,qsfpplus2-2,qsfpplus2-3,qsfpplus2-4,sfp-sfpplus1,sfp-sfpplus2,sfp-sfpplus3,sfp-sfpplus4,sfp-sfpplus5,sfp-sfpplus6,sfp-sfpplus7,sfp-sfpplus8,sfp-sfpplus9,sfp-sfpplus10,sfp-sfpplus12,sfp-sfpplus13,sfp-sfpplus14,sfp-sfpplus15,sfp-sfpplus16,sfp-sfpplus\
    17,sfp-sfpplus18,sfp-sfpplus19,sfp-sfpplus20,sfp-sfpplus21,sfp-sfpplus22,sfp-sfpplus23,sfp-sfpplus24" vlan-ids=300
add bridge=bridge tagged="ether1,qsfpplus1-1,qsfpplus1-2,qsfpplus1-3,qsfpplus1-4,qsfpplus2-1,qsfpplus2-2,qsfpplus2-3,qsfpplus2-4,sfp-sfpplus1,sfp-sfpplus2,sfp-sfpplus3,sfp-sfpplus4,sfp-sfpplus5,sfp-sfpplus6,sfp-sfpplus7,sfp-sfpplus8,sfp-sfpplus9,sfp-sfpplus10,sfp-sfpplus12,sfp-sfpplus13,sfp-sfpplus14,sfp-sfpplus15,sfp-sfpplus16,sfp-sfpplus\
    17,sfp-sfpplus18,sfp-sfpplus19,sfp-sfpplus20,sfp-sfpplus21,sfp-sfpplus22,sfp-sfpplus23,sfp-sfpplus24" vlan-ids=400
/ip address
add address=10.100.30.1/16 interface=Management network=10.100.0.0
/ip dns
set servers=10.100.0.1
/ip route
add disabled=no dst-address=0.0.0.0/0 gateway=10.100.0.1 routing-table=main suppress-hw-offload=no
/system clock
set time-zone-name=Europe/Berlin
/system identity
set name=Test-Switch
/system routerboard settings
set boot-os=router-os
Use case for my CRS326-24S+2Q+RM with routeros 7.6:
- one default network untagged default VLAN, all ports tagged with Vlan200,300,400
- management via VLAN 200
All should go through the switching chip but it seems i got some misconfigs would be glad if someone can take me back on the road for mikrotik fun :D

Edit: corrected the Model
Last edited by redskyline on Wed Nov 16, 2022 7:48 pm, edited 1 time in total.
 
mkx
Forum Guru
Forum Guru
Posts: 8936
Joined: Thu Mar 03, 2016 10:23 pm

Re: CRS354-48P-4S+2Q+RM with routeros 7.6 as Switch

Wed Nov 16, 2022 11:59 am

Two things:
  1. error/omission in config: you have to add bridge interfce as tagged member to management vlan (in your case it's VID 200) ... or else switch CPU won't be able to interact with the said VLAN
  2. odd config: adding interfaces as bridge pots using interface=all ... this might work well after all interfaces are initialized ... but might fail in random ways if interfaces don't initialize by the time switch applies this rule (e.g. after cold boot). It's customary to explicitly enumerate all bridge ports, one add interface= bridge= line per interface.

Other than that, what seems to not work for you? The management (it's the item #1 above) or the traffic doesn't flow through switch ports?
 
redskyline
just joined
Topic Author
Posts: 5
Joined: Sun Nov 13, 2022 10:46 pm

Re: CRS326-24S+2Q+RM with routeros 7.6 as Switch

Wed Nov 16, 2022 7:58 pm

Thanks for the reply!

For 1. i did this:
add bridge=bridge tagged="ether1,qsfpplus1-1,qsfpplus1-2,qsfpplus1-3,qsfpplus1-4,qsfpplus2-1,qsfpplus2-2,qsfpplus2-3,qsfpplus2-4,sfp-sfpplus1,sfp-sfpplus2,sfp-sfpplus3,sfp-sfpplus4,sfp-sfpplus5,sfp-sfpplus6,sfp-sfpplus7,sfp-sfpplus8,sfp-sfpplus9,sfp-sfpplus10,sfp-sfpplus12,sfp-sfpplus13,sfp-sfpplus14,sfp-sfpplus15,sfp-sfpplus16,sfp-sfpplus\
    17,sfp-sfpplus18,sfp-sfpplus19,sfp-sfpplus20,sfp-sfpplus21,sfp-sfpplus22,sfp-sfpplus23,sfp-sfpplus24,bridge" vlan-ids=200
    
For 2 i dont know if thats what you meant?:
add bridge=bridge interface=ether1
add bridge=bridge interface=qsfpplus1-1
add bridge=bridge interface=qsfpplus1-2
add bridge=bridge interface=qsfpplus1-3
add bridge=bridge interface=qsfpplus1-4
add bridge=bridge interface=qsfpplus2-1
add bridge=bridge interface=qsfpplus2-2
add bridge=bridge interface=qsfpplus2-3
add bridge=bridge interface=qsfpplus2-4
add bridge=bridge interface=sfp-sfpplus1
add bridge=bridge interface=sfp-sfpplus2
add bridge=bridge interface=sfp-sfpplus3
add bridge=bridge interface=sfp-sfpplus4
add bridge=bridge interface=sfp-sfpplus5
add bridge=bridge interface=sfp-sfpplus6
add bridge=bridge interface=sfp-sfpplus7
add bridge=bridge interface=sfp-sfpplus8
add bridge=bridge interface=sfp-sfpplus9
add bridge=bridge interface=sfp-sfpplus10
add bridge=bridge interface=sfp-sfpplus12
add bridge=bridge interface=sfp-sfpplus13
add bridge=bridge interface=sfp-sfpplus14
add bridge=bridge interface=sfp-sfpplus15
add bridge=bridge interface=sfp-sfpplus16
add bridge=bridge interface=sfp-sfpplus17
add bridge=bridge interface=sfp-sfpplus18
add bridge=bridge interface=sfp-sfpplus19
add bridge=bridge interface=sfp-sfpplus20
add bridge=bridge interface=sfp-sfpplus21
add bridge=bridge interface=sfp-sfpplus22
add bridge=bridge interface=sfp-sfpplus23
add bridge=bridge interface=sfp-sfpplus24


The problem at 1.(The management interface is not reachable persists) and my second problem would be that it seems i cant get good throughput at the qsp+ ports as it gives ~150-200Mbits max with the integrated Bandwith tester.
 
mkx
Forum Guru
Forum Guru
Posts: 8936
Joined: Thu Mar 03, 2016 10:23 pm

Re: CRS326-24S+2Q+RM with routeros 7.6 as Switch  [SOLVED]

Wed Nov 16, 2022 8:52 pm

Problem #1: the device is not router. So make sure there's a router in your network which is configured with VLAN 200 inteface and that conectivity between router and CRS works.

Problem #2: never ever use ROS' own bandwidth test on the device itself. The tool is very heavy on CPU while your CRS has pretty weak CPU. So proper testing is through the switch and make sure the test devices (e.g. two computers running iperf3) are capable of high bandwidth ... QSFP+ in theory can pass 40Gbps and generating that kind of traffic is not a trivial task.
 
User avatar
chechito
Forum Guru
Forum Guru
Posts: 2546
Joined: Sun Aug 24, 2014 3:14 am
Location: Bogota Colombia
Contact:

Re: CRS326-24S+2Q+RM with routeros 7.6 as Switch

Wed Nov 16, 2022 9:05 pm

i think in this case a better starting point will be the switch default configuration included with the switch

then using that base config, start to modify some things keeping the base structure of the config
 
redskyline
just joined
Topic Author
Posts: 5
Joined: Sun Nov 13, 2022 10:46 pm

Re: CRS326-24S+2Q+RM with routeros 7.6 as Switch

Wed Nov 16, 2022 9:16 pm

Problem #1: the device is not router. So make sure there's a router in your network which is configured with VLAN 200 inteface and that conectivity between router and CRS works.

Problem #2: never ever use ROS' own bandwidth test on the device itself. The tool is very heavy on CPU while your CRS has pretty weak CPU. So proper testing is through the switch and make sure the test devices (e.g. two computers running iperf3) are capable of high bandwidth ... QSFP+ in theory can pass 40Gbps and generating that kind of traffic is not a trivial task.
Thanks a lot!
 
User avatar
sirbryan
Member Candidate
Member Candidate
Posts: 134
Joined: Fri May 29, 2020 6:40 pm

Re: CRS326-24S+2Q+RM with routeros 7.6 as Switch

Wed Nov 16, 2022 11:20 pm

Just a side note.

The CRS326 is a Layer 3 switch, which means, if properly configured, it can route at wire speed between the VLANs if L3HW offloading is enabled.

If all ports are part of the bridge and VLANs 200, 300, and 400 are tagged to all ports, then you can an assign an IP address to all VLAN interfaces (and the bridge, too, if you like) and, as long as it is the gateway for devices in those VLANs, it will route between them just fine. Without hardware assistance, you'll max out around 400-800Mbps, maybe more, depending on the CPU and Fasttrack/Fastpath optimizations. (My CRS310's can do almost 1Gbps with L3HW offloading disabled.)

Once L3HW offloading is enabled for the switch (/interface/ethernet/switch/set l3-hw-offloading=yes 0) as well as for the ports themselves (/interface/ethernet/switch/port/set l3-hw-offloading=yes [ find ] for all the ports), it will route between all the ports at wire speed with 0-1% CPU.

Then you have a separate router talking to the switch with an IP on VLAN 200 that carries its traffic to the Internet. Or wherever.
 
redskyline
just joined
Topic Author
Posts: 5
Joined: Sun Nov 13, 2022 10:46 pm

Re: CRS326-24S+2Q+RM with routeros 7.6 as Switch

Sat Nov 19, 2022 12:09 am

Just a side note.

The CRS326 is a Layer 3 switch, which means, if properly configured, it can route at wire speed between the VLANs if L3HW offloading is enabled.

If all ports are part of the bridge and VLANs 200, 300, and 400 are tagged to all ports, then you can an assign an IP address to all VLAN interfaces (and the bridge, too, if you like) and, as long as it is the gateway for devices in those VLANs, it will route between them just fine. Without hardware assistance, you'll max out around 400-800Mbps, maybe more, depending on the CPU and Fasttrack/Fastpath optimizations. (My CRS310's can do almost 1Gbps with L3HW offloading disabled.)

Once L3HW offloading is enabled for the switch (/interface/ethernet/switch/set l3-hw-offloading=yes 0) as well as for the ports themselves (/interface/ethernet/switch/port/set l3-hw-offloading=yes [ find ] for all the ports), it will route between all the ports at wire speed with 0-1% CPU.

Then you have a separate router talking to the switch with an IP on VLAN 200 that carries its traffic to the Internet. Or wherever.
so i gotta enable l3 hw offloading if u want to have good speed over vlans?
 
User avatar
sirbryan
Member Candidate
Member Candidate
Posts: 134
Joined: Fri May 29, 2020 6:40 pm

Re: CRS326-24S+2Q+RM with routeros 7.6 as Switch

Sat Nov 19, 2022 1:22 am

The CRS326 is a Layer 3 switch, which means, if properly configured, it can route at wire speed between the VLANs if L3HW offloading is enabled.

If all ports are part of the bridge and VLANs 200, 300, and 400 are tagged to all ports, then you can an assign an IP address to all VLAN interfaces (and the bridge, too, if you like) and, as long as it is the gateway for devices in those VLANs, it will route between them just fine. Without hardware assistance, you'll max out around 400-800Mbps, maybe more, depending on the CPU and Fasttrack/Fastpath optimizations. (My CRS310's can do almost 1Gbps with L3HW offloading disabled.)
so i gotta enable l3 hw offloading if u want to have good speed over vlans?
If good means line-rate/wire-speed, then yes. Look in the docs under switching and L3 hardware offload (https://help.mikrotik.com/docs/display/ ... Offloading).

Who is online

Users browsing this forum: Ahrefs [Bot] and 14 guests