Page 1 of 1

Routeros as switch

Posted: Thu Jan 13, 2022 3:42 pm
by DejanAgain
Hi,

I have expirience with both routerOS and swos but now I have piece of hardware which don't have swos installed and I want to use this as switch (CRS112-8P-4S).

- Is there is any manual how exactly to handle vlan in routeros ?
- if not, someone can help me to understand what is optimal configuration ?

I have generated one bridge and put all ports into it, but can't find how to force specific port to desired vlan.

BTW.
This router doesn't support 10Gb SFP, correct ?

Re: Routeros as switch

Posted: Thu Jan 13, 2022 4:07 pm
by anav
Read through this post and then find the switch example.
viewtopic.php?t=143620

Re: Routeros as switch

Posted: Thu Jan 13, 2022 4:17 pm
by andkar
Hi,

HW offload VLAN switching on CRS1xx/2xx must be done under switch meny (not bridge).
Se here for examples: https://wiki.mikrotik.com/wiki/Manual:C ... ith_Trunks

Re: Routeros as switch

Posted: Thu Jan 13, 2022 4:21 pm
by anav
I only know bridge vlan filtering method, someone else will have to help with switching method described...............

Re: Routeros as switch

Posted: Thu Jan 13, 2022 4:26 pm
by andkar
Se this (quite good) YouTube clip for inspiration: https://www.youtube.com/watch?v=swXS4sO8smE

Example config:

Trunk port: SFP12 with tagged VLAN 4,7,1010(managment)
Access Ports: VLAN 7 port 3,4 VLAN 4 port 8
# model = CRS112-8G-4S

/interface bridge
add admin-mac=MA:CA:DD:RE:SS:XX auto-mac=no name=bridge
/interface ethernet
set [ find default-name=ether1 ] disabled=yes
set [ find default-name=ether2 ] disabled=yes
set [ find default-name=ether3 ] advertise=10M-half,10M-full,100M-half,100M-full disabled=yes
set [ find default-name=ether4 ] advertise=10M-half,10M-full,100M-half,100M-full
set [ find default-name=ether5 ] disabled=yes
set [ find default-name=ether6 ] disabled=yes
set [ find default-name=ether7 ] disabled=yes
set [ find default-name=ether8 ] disabled=yes
set [ find default-name=sfp9 ] disabled=yes
set [ find default-name=sfp10 ] disabled=yes
set [ find default-name=sfp11 ] disabled=yes
set [ find default-name=sfp12 ]
/interface vlan
add interface=bridge name=Management vlan-id=1010
/interface ethernet switch
set forward-unknown-vlan=no
/interface list
add name=Mgmt
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/user group
set full policy="local,telnet,ssh,ftp,reboot,read,write,policy,test,winbox,password,web,sniff,sensitive,a\
    pi,romon,dude,tikapp"
/interface bridge port
add bridge=bridge interface=ether1
add bridge=bridge interface=ether2
add bridge=bridge interface=ether3
add bridge=bridge interface=ether4
add bridge=bridge interface=ether5
add bridge=bridge interface=ether6
add bridge=bridge interface=ether7
add bridge=bridge interface=ether8
add bridge=bridge interface=sfp9
add bridge=bridge interface=sfp10
add bridge=bridge interface=sfp11
add bridge=bridge interface=sfp12
/ip neighbor discovery-settings
set discover-interface-list=Mgmt protocol=lldp
/interface ethernet switch egress-vlan-tag
add tagged-ports=sfp12 vlan-id=7
add tagged-ports=switch1-cpu,sfp12 vlan-id=1010
/interface ethernet switch ingress-vlan-translation
add customer-vid=0 new-customer-vid=7 ports=ether3,ether4
/interface ethernet switch vlan
add ports=ether3,ether4,sfp12 vlan-id=7
add ports=switch1-cpu,sfp12 vlan-id=1010
/interface list member
add interface=Management list=Mgmt
/ip address
add address=172.29.30.212/24 interface=Management network=172.29.30.0
/ip cloud
set update-time=no
/ip dns
set servers=172.29.30.254
/ip route
add distance=1 gateway=172.29.30.254
/ip smb
set allow-guests=no
/snmp
set enabled=yes
/system clock
set time-zone-name=Europe
/system identity
set name=SW0212
/system ntp client
set enabled=yes primary-ntp=192.168.1.10
/tool bandwidth-server
set enabled=no
/tool mac-server
set allowed-interface-list=none
/tool mac-server ping
set enabled=no
[someone@SW0212] > /code]

Re: Routeros as switch

Posted: Thu Jan 13, 2022 5:55 pm
by anav

Re: Routeros as switch

Posted: Fri Jan 14, 2022 6:49 am
by Amm0
HW offload VLAN switching on CRS1xx/2xx must be done under switch meny (not bridge).
Se here for examples: https://wiki.mikrotik.com/wiki/Manual:C ... ith_Trunks
That's true, but on this topic, the newer "help.mikrotik.com" site is actually much clearer writeup:
https://help.mikrotik.com/docs/display/ ... upExamples

Re: Routeros as switch

Posted: Fri Jan 14, 2022 9:16 am
by andkar
Yes, new documentation is improved. But note that CRS1xx/2xx specifics is not there (the reason for link to old documentation).

Re: Routeros as switch

Posted: Sat Jan 22, 2022 9:08 am
by Amm0
Yes, new documentation is improved. But note that CRS1xx/2xx specifics is not there (the reason for link to old documentation).
They might have added them:
https://help.mikrotik.com/docs/pages/vi ... =103841836

Re: Routeros as switch

Posted: Mon Jan 24, 2022 3:40 pm
by andkar
Yes, great that more documentation is transferred to the new location. Btw, CRS1xx/2xx documentation was added same date as my post.