Community discussions

MikroTik App
 
oe5nip
just joined
Topic Author
Posts: 5
Joined: Fri Dec 27, 2019 9:00 pm
Location: Kronstorf

Simple Way to make Router a VLAN Switch

Mon Mar 23, 2020 5:08 pm

Hi!

I have spent a lot of time to find a way to make the router CRS112 to a VLAN Swtich only.

I have no idea.

My Network is CRS125 which make all (Internet-Acess-VLAN-DHCP-DNS)

I need on the CRS112 Router 1 Trunk in - 3 Trunk Port out, the Rest only VLAN.

Any simple idea or tip....

Thx for Help..
Mikrotik HEX S (RB760iGS), CRS109-8G-1S-2HnD-IN, hAP RBD52G-5HacD2HnD-TC, cAP ac RBcAPGi-5acD2nD.
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 5096
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Simple Way to make Router a VLAN Switch

Mon Mar 23, 2020 6:01 pm

Two methods,
(1) vlans single bridge CPU intensive approach (simplest).
(2) vlans not-cpu intensive a bit more complex

For the latter (2) check out the last code block here for a few ideas...........
viewtopic.php?f=2&t=158824&p=780499#p780499
I'd rather manage rats than software. Follow my advice at your own risk! (Sob & mkx forced me to write that!)
MTUNA Certified, by the Ascerbic Llama!
 
oe5nip
just joined
Topic Author
Posts: 5
Joined: Fri Dec 27, 2019 9:00 pm
Location: Kronstorf

Re: Simple Way to make Router a VLAN Switch

Sat Apr 04, 2020 11:45 am

hmm.

I have make a lot of Tests.

I have not found my solution......

Are there other infos outside....?
Mikrotik HEX S (RB760iGS), CRS109-8G-1S-2HnD-IN, hAP RBD52G-5HacD2HnD-TC, cAP ac RBcAPGi-5acD2nD.
 
mszru
newbie
Posts: 39
Joined: Wed Aug 10, 2016 10:42 am

Re: Simple Way to make Router a VLAN Switch

Sat Apr 04, 2020 4:02 pm

Hi,

Assuming you have 2 vlans (100, 200), 4 trunk ports (ether1 - ether4) and 4 access ports (ether5 - ether8), the configuration steps could be the following:

1) Reset CRS112, no default configuration.
2) Create a bridge and add all ether interfaces to the bridge. Set pvid on access ports equal to corresponding vlan id.
/interface bridge add name=bridge
/interface bridge port
add bridge=bridge comment="trunk-uplink" interface=ether1
add bridge=bridge comment="trunk" interface=ether2
add bridge=bridge comment="trunk" interface=ether3
add bridge=bridge comment="trunk" interface=ether4

add bridge=bridge comment="access-100" frame-types=\
    admit-only-untagged-and-priority-tagged interface=ether5 pvid=100
add bridge=bridge comment="access-100" frame-types=\
    admit-only-untagged-and-priority-tagged interface=ether6 pvid=100
add bridge=bridge comment="access-200" frame-types=\
    admit-only-untagged-and-priority-tagged interface=ether7 pvid=200
add bridge=bridge comment="access-200" frame-types=\
    admit-only-untagged-and-priority-tagged interface=ether8 pvid=200

3) Create vlans on the bridge and add trunk ports as "tagged" and access ports as "untagged".
/interface bridge vlan
add bridge=bridge vlan-ids=100 \
    tagged=ether1,ether2,ether3,ether4,bridge untagged=ether5,ether6 
add bridge=bridge vlan-ids=200 \
    tagged=ether1,ether2,ether3,ether4 untagged=ether7,ether8

4) To be able to manage the switch from one of the vlans create vlan interface on the bridge, assign IP address to the vlan interface, add the bridge interface to the vlan as tagged port (already done in #3).
/interface vlan add interface=bridge name=vlan100 vlan-id=100
/ip address add address=192.168.100.2/24 interface=vlan100

5) Enable vlan filtering on the bridge.
/interface bridge set 0 vlan-filtering=yes

This method uses the new VLAN implementation in RouterOS and for CRS112 the switching will not be hardware accelerated. See Bridge Hardware Offloading.

Who is online

Users browsing this forum: AndyGs and 33 guests