Hi everyone,
I'm converting my Ubiquiti network to a Mikrotik network and having a look at the first VLANs to get sorted out. However, I'm really struggling with it. I generally understand how VLANs work, but I'm completely lost; should the VLAN be on the interface or the bridge? Etc. I'm fairly new to this type of network hardware, but despite an having a MTCNA and MTCRE certificate, I can't figure this out straight away.
Situation
The current setup is as follows:
- A CR328-24P-4S+, hereinafter referred to as the CR328. This has a bridge, bridge_LAN, with ports 3 through 24. (I want to use ports 1 and 2 for the WAN side later.)
- A hAP AC3, hereinafter referred to as the hAP. This has all its ports in a single bridge, also called bridge_LAN. - Port 1 of the hAP is connected to port 24 on the CR328
- Default VLAN 1: 192.168.1.0/24
- VLAN 3: 192.168.3.0/24, this will be my test network.
Everything is currently connected on the CR328 without VLANs, and that works (of course) fine. Everything is in the default VLAN, and that works fine as well, of course.
The CR328 handles DHCP and is connected to the router to the internet. I want to do the routing between the subnets on the CR328, because it will soon take over as a router (for home use, it will probably be able to route well enough as an L3 switch).
Objective:
I have some satellite switches around the CR328, like the hAP currently is. I want to connect several ports to a VLAN and have these ports communicate with each other within a single VLAN, and do some routing on the CR328. In the end, my IoT equipment will be on that, for example.
How do I do this?
Now, I want to create a tagged port on port 5 of the hAP with VLAN 3 and advertise it via a trunk on port 1 (of the hAP) to (port 24 of the) CR328. The CR328 should then have a virtual interface (?) and offer DHCP on it.
I'd like the other ports on the hAP to use the default VLAN.
I read this page:
My current config of the hAP:
```
/interface bridgeadd name=bridge_LAN vlan-filtering=yes
/interface vlan
add interface=ether5 name="iot vlan" vlan-id=3
/interface ethernet switch port
set 0 vlan-mode=secureset 4 default-vlan-id=3 vlan-header=add-if-missing vlan-mode=secure
set 5 vlan-mode=secure
/interface bridge portadd bridge=bridge_LAN interface=ether1
add bridge=bridge_LAN interface=ether2
add bridge=bridge_LAN interface=ether3
add bridge=bridge_LAN interface=ether4
add bridge=bridge_LAN interface=ether5
/ip neighbor discovery-settings
set discover-interface-list=!dynamic/ipv6 settings
set disable-ipv6=yes/interface ethernet switch vlan
add independent-learning=no ports=ether5,ether1 switch=switch1 vlan-id=3
add independent-learning=yes ports=ether1,ether2,ether3,ether4,ether5,switch1-cpu switch=switch1 vlan-id=1
/ip address
add address=192.168.3.11/24 interface=*C network=192.168.3.0
add address=192.168.4.11/24 interface=*D network=192.168.4.0
/ip dhcp-client
add interface=bridge_LAN
```
If I do this now, I no longer have a connection on the hAP, I suspect because of the
[code]set 0 vlan-mode=secure[/] rule.
Of course, I still have nothing on the CR328 either.
What should I do next?
- I suspect I need to create a virtual interface on the CR328 to run the DHCP server on.
- Should it be connected to a port or to the bridge?
- How do I properly connect the trunk between the two devices?
Can someone please help me get onto the right track with this?
Thanks!
Here's a quick sketch of the network (sketch is in dutch, āpoortā means āportā, surprise
)
:no_upscale():strip_icc():strip_exif()/f/image/zfaQ9Oa5PeaZXVhxEdCJ9fHW.jpg?f=user_large)



