Hi there,
The previous topic was quite a mess, due to multiple sequential failing plans and a lot of confusion caused by this. Let’s have a fresh start.
Situation:
A fresh try for my home network. I moved from a Ubiquiti Unifi network, having 4 VLANs
- VLAN1 : default (trusted network for all clients),
- guest: unknown VLAN-id
- VLAN3: iot
- VLAN4: camera
To a new partially Mikrotik infrastructure. As you can see I don't know the VLAN-id for the Ubiquiti guest wifi. I don't think it's reelevant since we're redesigning everything.
The migration was started a bit too fast since my Ubiquiti switch broke and I decided not to invest into Ubiquiti anymore, instead buying MT.
Current situation:
Currently the network is functioning without VLANs on both MT and Ubiquiti hardware:
My current infrastructure:
- CCR2004-16G-2S+ (hostname: r1): It's my main router, between my ISP and my network. It's working fine and currently doing:
- Routing and NAT
- Wireguard incoming connections
- DHCP
- Note: My ISP requires me to have VLAN300 configured on the WAN-side.
- CRS32CRS328-24P-4S+ (sw-zolder):
- Main switch: It's the hub in the hub-and-spoke network. Both the router and all other switches are connected to this one. Also some servers and client devices connected directly.
- hap ac2 (sw-bureau):
- On my personal desk. Being misued as a switch (currently all ports except for ether5 in a bridge), if I misconfigure it it's not much of a problem, only my wired desktops/laptops are connected.
- Wifi is turned off.
- hEXPoE (sw-schuur)
- It provides switching and PoE to a bunch of outside PoE devices. The hEXPoE itself is inside btw. Also being used as just a switch.
- No wifi either.
- 2 Ubiquiti switches
- (sw-mk-links and sw-mk-rechts). I’ll get MT when these break down.
- 6 Ubiquiti AP-AC-Pro's.
- They are serving 4 SSIDs, each for a different Ubiquiti VLAN.
Since there are no VLANs configured everything is on the default VLAN.
I don't mind buying more/new hardware but if I can make thing work with the current set, it would be great.
On all MT devices I've created an OffBridge Port, on the highest port available. Except for "sw-schuur" since I need all available ports.
Current IP plan:
- r1: 192.168.1.1
- sw-bureau: 192.168.1.11
- sw-mk-rechts: 192.168.1.12
- sw-mk-links: 192.168.1.31
- sw-schuur: 192.168.1.14
(everything on a /24)
192.168.1.2-25 are reserved for infrastructure/servers/NAS. 192.168.1.100 and above is for regular clients.
All ports on all switches are in 1 bridge. On r1 ether1 is in a bridge (on it’s own, which is a bit silly, I just saw ….) and sfp-sfpplus1+ether14-16 are in their own bridge (bridge_LAN).
New design:
VLANs/IP-ranges:
For now I envision the following VLANs:
- VLAN10, 192.168.10.0/24 : Standard clients
- VLAN20, 192.168.20.0/24 : IOT stuff.
- VLAN30, 192.168.10.0/24 : Camera's. I'd like to have those separated.
- VLAN40, 192.168.40.0/24 : Guest network
- VLAN99, 192.168.99.0/24 : Management VLAN. Only for wired access.
On all networks x.x.x.1 should be the router (r1). Since I’m a bit lazy I decided to use /24 for all networks, despite not having 254 hosts on any network at all.
In some future I might add some networks for tinkering et cetera, but for now I'd be very very very happy to get this up and running. My main priorities would be VLANs 10, 20, 30 and 99. Currently, I’ve got a nice hotspot for Ubiquiti’s guest network. Creating a new one has no priority for now.
DHCP functionality will be provided by r1, r1 will also act as a DNS-recursor; requests will be forwarded to an internal pi-hole (192.168.1.2).
Access points should serve VLAN10, VLAN20, VLAN30 and VLAN40, each having it’s own SSID. I prefer to keep VLAN99 wired.
Regarding inter-VLAN communication:
I think there should be no inter-VLAN communication except for communication via my router. I see people creating multiple (virtual) interfaces on devices to make sure these devices are in multiple VLANs, which might be useful for Home-Assistant (being in the standard client vlan, and the iot vlan at the same time). To me it feels more secure to have my Home assistant box on VLAN10, and adding an fw rule (in the router) to allow certain devices in VLAN20 to communicate on certain ports with it. The router should be able to handle this easily.
Topology/connections:
All connections between router/switches/APs should be trunks, since all of these devices will serve multiple VLANs.
Okay that’s the global overview, but how about the combination of ports and VLANs?
There you go:
Ports & VLANs
r1: (192.168.99.1)
- ether1: Uplink to ISP. Forced to be VLAN300. DHCP
- sfp-sfpplus1: downlink to sw-zolder: Trunk.
- (this is a 1 meter DAC-cable)
- ether16: Offbridge.
sw-zolder: (192.168.99.5)
- sfp-sfpplus1: uplink to r1: Trunk.
- ether1: sw-mk-links: Trunk
- ether2: sw-mk-rechts : Trunk
- ether3: Reserved for future use: Trunk
- ether4: AP : Trunk
- ether6: sw-bureau: Trunk
- ether9-ether16: Trusted machines: VLAN10
- Ports 11+12 are an 802.3ad bonding to my NAS
- ether17: camera: VLAN30
- ether18: camera: VLAN30
- ether20: iot: VLAN20
- ether24: Offbridge.
The rest of the ports are unused. Since the switch is in a trusted location I think having the other ports in VLAN10 is fine.
sw-schuur: (192.168.99.14)
- uplink to sw-mk-links: trunk
- camera: VLAN30
- camera: VLAN30
- access point: trunk
- iot: VLAN20
sw-bureau: (192.168.99.11)
- uplink to sw-zolder: trunk
- pc: VLAN10
- pc: VLAN10
- management: VLAN99
- Offbridge port: (also VLAN99?)
sw-mk-links (ubiquiti, 192.168.99.12):
- iot: VLAN20
- access point: trunk
- access point: trunk
- downlink to sw-schuur: trunk
- empty
- empty
- empty
- uplink to sw-zolder: trunk
sw-mk-rechts(ubiquiti, 192.168.99.13):
- uplink to sw-zolder: trunk
- empty
- access point: trunk
- empty
- empty
- access point: trunk
- empty
- empty
All devices have the Offbridge port their highest port (except for sw-schuur and the ubiquiti’s).
All trunks will serve all VLANs, since there’s cameras and iot stuff on all APs. The APs will not create an SSID for the management-vlan.
All current configs have been attached to this post (serials are removed, as well as private stuff such as wireguard peers) . I understand having a non-existing gateway on the Offport-network is not going to work, but I just need to be able to connect to the directly-attached machine.
For now I think I’ve done my homework properly and I’ll start writing scripts for creating the proper VLANs on all devices after this (and some coffee
) .
Tables as suggest by @Buckeye in my previous topic.
Despite this I’m not to sure what to do with the bridge on the devices. If I look at @Buckeye’s examples, he makes the bridge untagged for a VLAN if there’s only untagged ports on that VLAN, and tagged if there’s tagged ports for that VLAN.
I’ll change that in my spreadsheet.
Configs before implementing VLANs
sw-zolder-config.rsc (2.4 KB)
sw-schuur-config.rsc (1.1 KB)
r1-config.rsc (2.4 KB)
sw-bureau-config.rsc (1.4 KB)
Open questions:
-
How should I treat the bridge in my spreadsheet-overview? Just make it untagged if there are no tagged ports for this specific VLAN in the bridge, and otherwise tagged?
-
My Ubiquiti APs and use VLAN1 as default VLAN. I think I can’t change this. I’ll keep it for now. Will that become a problem with my current setup?
Todo:
Tonight I’ll create appropriate configs for all devices.







