graph LR
WAN1[Fiber ONT] ---|DHCP,EAP| Router(Router<br />RB5009UPr+S+IN)
WAN2[WISP] ---|DHCP| Router
Router ---|Trunk| WAP2((WAP2<br />cap ac))
Router ---|Trunk| WAP3((WAP3<br />cap ac))
Router ---|Trunk| SW1(SW1<br />crs109)
Router ---|VLAN200| Server
Router ---|VLAN400| ATA
SW1 ---|Trunk| WAP1((WAP1<br />cap ac))
Router ---|Trunk| SW2(SW2<br />crs109)
SW2 ---|VLAN300| Backup{Backup<br />SSID}
WAP1 ---|VLAN100| Admin{Admin<br />SSID}
WAP1 ---|VLAN200| LAN{LAN<br />SSID}
WAP1 ---|VLAN300| Guest{Guest<br />SSID}
This repo is to hold my configuration files for a complex home network based on
Mikrotik networking gear. Thank you to all the mikrotik forum posters for all
this knowledge and hard work, especially pcunite
!
To discuss this please join us here : https://forum.mikrotik.com/viewtopic.php?f=13&t=166330
- Dual ISPs with auto-failover
- Complete removal of AT&T router ("residential gateway") from the picture
- Disaggregation of routing and wifi into separate solutions
- Switched managed Ethernet
- Redundancy
- Power over Ethernet to allow centralized UPS
- VLAN separation of Guest, Primary, IOT, Neighbor, and VOIP networks
- Centrally managed access points
- Roaming / Hand-off imrovements
- Higher overlapping coverage at lower radio power rates
- Port Forwarding over VLAN
- Secure DNS
These are notes to go along with the config files
- 1 x Mikrotik RB5009UPr+s+IN router using RouterOS 7.15beta8
- 2 x Mikrotik CRS109-8G-1S-2HnD Router/Switch/APs running RouterOS 7.15beta8
- 3 x Mikrotik cAP AC (RBcAPGi-5acD2nD) using RouterOS 7.15beta8 and wifi-qcom-ac WiFi 5 Wave2 Driver
VLAN | IP | Usage |
---|---|---|
100 | 192.168.100.0/24 | Base / Management |
200 | 192.168.120.0/24 | Normal LAN / Chromecasts / Printer |
300 | 192.168.130.0/24 | Guest / IOT |
400 | 192.168.140.0/24 | VOIP |
500 | 192.168.150.0/24 | Neighbor |
- For each subnet addresses
.1
through.39
are reserved for static IP assignment..1
is the router. - The WAN ports are not on VLANs
- Once configured, you will need to make a port be on
VLAN 100
to use WinBox.
- ZeroConf / mDNS / Apple Bonjour (AirPrint) cannot be forwarded across subnets / VLANs.
- You will only get to auto-discover the printer from one VLAN, I chose guest where the school tablets will be
- The printer ports for a Lexmark Laser printer are forwarded from the main VLAN to the guest VLAN where the printer is
-
192.168.100.1
-
The EAP Authentication protocol requires a set system clock. DHCP requires EAP. NTP requies DHCP. This means you can't set the clock over the internet because of a chicken-n-egg problem. Make sure
mikro1.rsc
is modified with the current time before programming it. Or, if you have a local NTP server, use that. -
You will need to coax your authentication keys out of your AT&T gateway so you can run in
supplicant mode
. -
DNS is setup to use DNS over HTTP (DOH) which requires some certificates and hurdles.
I was really only interested in an 8-port managed GigE switch, but for the same price these units include a 2G WiFi radio.
-
192.168.100.2
-
192.168.100.3
(config not included) -
The radio in the switches are not part of CapsMAN
-
I create a "backup" SSID out of these that should work if I need to hookup the old router, or if for some other reason CapsMAN fails.
-
One of the APs is chained off of
sw1
due to physical topology
192.168.100.11
wap1192.168.100.12
wap2192.168.100.13
wap3
Despite what the Mikrotik documentation says, you cannot fully remotely provision these. You will need to create a config file and add it to the AP. After that, the wireless definitions will be automatic, but not the base config and security!
/system reset-configuration run-after-reset=wap.rsc
does not always work. I still had to manually load the file after reset- Resetting into CAP mode (hold reset button till it gets to it's second mode after blinking) is a better starting point
- Certificates will be auto-provisioned by CapsMAN
- I scripted the mode button so that it will toggle the LEDs between "always on" and "turn off after 1h"
Here is a diagram I put together to understand the 802.11ac channel assignment
- DFS is the middle part of the spectral sandwich which requires fancy driver support and regulatory signoff. This is now supported with the wifi-qcom-ac drivers.
- 802.11ac requires 80MHz channels, made up of 4 x 20MHz channels
- For any given 80 MHz chunk, there are 4 possible assignments, depending on which one you make the control channel
- This is what gives you the
Ceee
eCee
eeCe
eeeC
"walking ones" pattern. I tried to depict this above - I only defined the channels that worked for my region
- This is what gives you the
- I use WiFi analyzer (Windows, Android) to do a survey of least-busy bands at each AP physical location
cAP (and other Mikrotik Qualcomm-based 802.11ac products) recently (as of 2024) got full support for
WiFi 5 Wave 2! YOU ROCK MIKROTIK! Thanks for improving an existing product instead of just
moving on. They now support software-based features like MIMO, DFS, Beam Forming,
Handoff Protocols, Spectral Scan etc. However in order to use these features, and to make them
compatible with 802.1ax devices, you need to run a new driver, and a new capsman. The new driver
is called wifi-qcom-ac
and the new capsman is in /interface wifi capsman
and /interface wifi
.
One hiccup I did find is that the new CapsMAN does not play nice with the older capAC devices when it comes to VLANs. You have to statically config some things, and it's all a bit kludgy. I could not get three SSIDs on three VLANs working like I had in RouterOS 6.x. So instead I removed one and settled for two with the work-arounds.
Please see router-os-6/ for scripts using the older driver.
This install required 3 versions of RouterOS:
arm64
-RB5009
Router. No wireless driverarm
-capAC
WAP.wifi-qcom-ac
drivermips
-crs109
.wireless
driver
I like this way of using / installing it better than the suggested:
brew tap homebrew/cask-versions
brew install --cask --no-quarantine wine-devel
killall wineserver
wine64 winbox64.exe
These are not in any particular order, but all my knowledge came from these, so Thank You!!
- https://wiki.mikrotik.com/wiki/Manual:Configuration_Management
- https://help.mikrotik.com/docs/display/ROS/First+Time+Configuration
- https://www.youtube.com/watch?v=37aff6d14Xk
- https://www.youtube.com/watch?v=vkWPlsuyuKE
- https://www.reddit.com/r/mikrotik/comments/18m9nr4/dude_im_barrelled_by_the_wifi_wave_2/
- https://forum.mikrotik.com/viewtopic.php?t=202578
- https://forum.mikrotik.com/viewtopic.php?t=205552
- https://forum.mikrotik.com/viewtopic.php?t=202476
- https://forum.mikrotik.com/viewtopic.php?t=202565
- https://wiki.mikrotik.com/wiki/Manual:CAPsMAN_with_VLANs
- https://wiki.mikrotik.com/wiki/Manual:Simple_CAPsMAN_setup
- https://forum.mikrotik.com/viewtopic.php?t=152188
- https://wiki.mikrotik.com/wiki/Manual:CAPsMAN_tips
- https://mum.mikrotik.com/presentations/BR14/Uldis.pdf
- https://forum.mikrotik.com/viewtopic.php?t=158379
- https://www.reddit.com/r/mikrotik/comments/cltszm/trouble_getting_vlan_working_on_cap_man/
- https://forum.mikrotik.com/viewtopic.php?t=155429
- https://www.gonscak.sk/?p=575
- https://forum.mikrotik.com/viewtopic.php?t=136476
- https://forum.mikrotik.com/viewtopic.php?t=125026
- https://wiki.mikrotik.com/wiki/Manual:Spectral_scan
- https://forum.mikrotik.com/viewtopic.php?t=150463
- https://forum.mikrotik.com/viewtopic.php?f=7&t=149815&p=737784#p737784
- http://www.revolutionwifi.net/revolutionwifi/2013/03/80211ac-channel-planning.html
- https://netbeez.net/blog/dfs-channels-wifi/
- https://en.wikipedia.org/wiki/IEEE_802.11ac
- https://en.wikipedia.org/wiki/List_of_WLAN_channels#5_GHz_or_5.9_GHz_(802.11a/h/j/n/ac/ax)
- http://www.revolutionwifi.net/revolutionwifi/2013/03/safely-using-80-mhz-channels-with.html
- https://systemzone.net/mikrotik-wifi-frequency-band-and-channel-width-explanation/
- https://forum.mikrotik.com/viewtopic.php?t=127742
- https://forum.mikrotik.com/viewtopic.php?t=132817
- https://forum.openwrt.org/t/mikrotik-cap-ac-support/57828/28
- openwrt/openwrt#3037
- https://forum.mikrotik.com/viewtopic.php?t=143620
- https://forum.mikrotik.com/viewtopic.php?t=155266
- https://forum.mikrotik.com/viewtopic.php?t=163650
- https://forum.mikrotik.com/viewtopic.php?t=160224
- https://wiki.mikrotik.com/wiki/Load_Balancing
- https://forum.mikrotik.com/viewtopic.php?t=93222
- https://forum.mikrotik.com/viewtopic.php?f=23&t=157048