D
D
deGoyan2018-08-13 11:57:35
Mikrotik
deGoyan, 2018-08-13 11:57:35

How to correctly configure VLAN on Mikrotik (6.41+)?

There is CRS328-24P-4S +, the task is to divide the network into 2 VLANs, raise the DHCP server.
The task seems to be elementary, but there was no experience with mikrotik and I stumbled over vlan. Set up according to manual

CRS328-24P-4S+ config, RouterOS 6.42.6
/interface bridge
add name=bridge1 vlan-filtering=yes
/interface vlan
add interface=bridge1 name=vlan101 vlan-id=101
add interface=bridge1 name=vlan102 vlan-id=102
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip hotspot profile
set [ find default=yes ] html-directory=flash/hotspot
/ip pool
add name=pool101 ranges=10.200.9.3-10.200.9.126
add name=pool102 ranges=10.200.9.131-10.200.9.254
/ip dhcp-server
add address-pool=pool101 disabled=no interface=vlan101 name=server101
add address-pool=pool102 disabled=no interface=vlan102 name=server102
/interface bridge port
add bridge=bridge1 interface=ether3
add bridge=bridge1 interface=ether4
add bridge=bridge1 interface=ether5
add bridge=bridge1 interface=ether6
add bridge=bridge1 interface=ether7
add bridge=bridge1 interface=ether8
add bridge=bridge1 interface=ether9 pvid=101
/interface bridge vlan
add bridge=bridge1 tagged=ether2,ether3,ether4,ether5,ether6,ether7,ether8 untagged=ether9 vlan-ids=101
add bridge=bridge1 tagged=ether2,ether3,ether4,ether5,ether6,ether7,ether8 vlan-ids=102
/ip address
add address=10.200.9.2/25 interface=vlan101 network=10.200.9.0
add address=10.200.9.130/25 interface=vlan102 network=10.200.9.128
/ip dhcp-server network
add address=10.200.9.0/25 dns-server=8.8.8.8 gateway=10.200.9.1
add address=10.200.9.128/25 dns-server=8.8.8.8 gateway=10.200.9.129
/system identity
set name=main-switch
/system routerboard settings
set boot-os=router-os silent-boot=no
  • on ether9 the laptop does not receive an ip address via DHCP
  • on trunk ports (3-8) the hAP ac2 neighbor with similar settings is not visible (no ping).

What am I doing wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
deGoyan, 2018-08-15
@goyan

As a result, everything turned out to be elementary - in the tagged ports of each vlan, except for the first one, you need to add a bridge.

Example from my config:
add bridge=bridge1 tagged=ether2,ether3,ether4,ether5,ether6,ether7,ether8,bridge1 untagged=ether9 vlan-ids=101
add bridge=bridge1 tagged=ether2,ether3,ether4,ether5,ether6,ether7,ether8,bridge1 vlan-ids=102

Why is this, and where is it in the Mikrotik documentation, I did not find. But this does not mean that it is not there, and I will be very grateful if someone points out why this is so and where it is documented.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question