Virtual CHR as CAPsMAN for cAP ax with multiple SSIDs/VLANs and third party router/switch
Hello everyone,
I am pretty new to Mikrotik so I’ll try to be as clear as possible with my issue. My main purpose is to install a Wireless AP (precisely the cAP ax) and let it expose N SSIDs, each of them taking the traffic from a specific VLAN coming into the wired interface. The traffic will be delivered by a L2 switch and everything managed by a NGFW firewall, both of them not being Mikrotik.
I first tried with manually configuring everything, then I decided to go with CAPsMAN since after the first AP some others will follow suit and I didn’t want to do the same work all over again. The CAPsMAN is a VM on a server connected on the same switch.
This is the basic idea. VLAN 1000 is the management, VLAN 2000 is the first traffic (let’s call it PRIVATE), VLAN 3000 is the second traffic (let’s call it GUEST).
VLAN 1000 subnet is 10.1.1.0/24
VLAN 2000 subnet is 10.2.2.0/24
VLAN 3000 subnet is 10.3.3.0/24
The virtual appliance that will be the CAPsMAN will have the address 10.1.1.10 while the first cAP will have 10.1.1.20.
I started configuring the CHR VM and this is what I did. Everything from the “physical” console of the VM at first, then SSH.
- Configure the management IP
/ip address add address=10.1.1.10/24 interface=ether1 network=10.1.1.0
From a laptop on a port on the switch (set as access for VLAN 1000) I can ping the interface.
2. Enable the CAPsMAN
/interface wifi capsman set ca-certificate=auto enabled=yes interfaces=vlan1000-mgmt package-path="" require-peer-certificate=no upgrade-policy=none
I can see it generated a CA and a certificate for the manager
3. Create two security profiles
/interface/wifi/security add authentication-types=wpa2-psk,wpa3-psk disabled=no name=security_private passphrase=Private123
/interface/wifi/security add authentication-types=wpa2-psk,wpa3-psk disabled=no name=security_guest passphrase=Guest123
- Configure the SSIDs
/interface wifi configuration add country=Latvia disabled=no mode=ap name=configuration_private security=security_private ssid=ssid_private
/interface wifi configuration add country=Latvia disabled=no mode=ap name=configuration_guest security=security_guest ssid=ssid_guest
Then I configured the cAP. I connected to ether2 and logged through WinBox using the MAC address.
- Add a bridge with the three VLAN
/interface/bridge add name=bridge vlan-filtering=no
/interface/vlan add disabled=no name=vlan_1000 vlan-id=1000 interface=bridge
/interface/vlan add disabled=no name=vlan_2000 vlan-id=2000 interface=bridge
/interface/vlan add disabled=no name=vlan_3000 vlan-id=3000 interface=bridge
/interface/bridge/port add bridge=bridge interface=ether1 pvid=1000
/interface/bridge/port add bridge=bridge interface=vlan_1000 pvid=1000
/interface/bridge/port add bridge=bridge interface=vlan_2000 pvid=2000
/interface/bridge/port add bridge=bridge interface=vlan_3000 pvid=3000
/interface/bridge/port add bridge=bridge interface=ether2 pvid=1000
Here it kicks me out because I’m connected to ether2 but I can get back in via the connection on the MAC address.
2. Now I add the VLANs to the bridge
/interface/bridge/vlan add bridge=bridge vlan-ids=1000 tagged=bridge,ether1 untagged=vlan_1000,ether2
/interface/bridge/vlan add bridge=bridge vlan-ids=2000 tagged=bridge,ether1,vlan_2000
/interface/bridge/vlan add bridge=bridge vlan-ids=3000 tagged=bridge,ether1,vlan_3000
- Configure the management IP
/ip address add address=10.1.1.20/24 interface=vlan_1000 network=10.1.1.0
- Enable the filtering
/interface/bridge set [ find name=bridge ] vlan-filtering=yes pvid=1000
From the same laptop on the port on the switch (set as access for VLAN 1000) I should be able to ping the interface. I should be kicked out from WinBox but then I could get back in connecting to the IP address. And obviously it should be able to ping the CAPsMAN VM.
Up until now everything should be correct, right? I can then enable the CHR machine to be a CAPsMAN and the AP to be controlled. I know it’s not complete yet but if everything until now is wrong I need to fix it before involving the other part.
