Community discussions

MikroTik App
 
dragonauta
newbie
Topic Author
Posts: 28
Joined: Thu Feb 02, 2017 12:50 am

Need help for CAPsMAN - 2 SSID + VLAN

Sat Aug 17, 2019 10:55 pm

Hi everyone.
I got running CAPsMAN on a RB2011UiAS-2HnD, there're three CAPs RB951Ui-2HnD.
All four devices have latest firmware 6.45.3
Initially I have a single SSID, it's a corporative network.

On the RB2011:
/interface wireless
# managed by CAPsMAN
# channel: 2412/20-Ce/gn(20dBm), SSID: DL, CAPsMAN forwarding
set [ find default-name=wlan1 ] band=2ghz-b/g/n channel-width=20/40mhz-XX country=argentina distance=indoors frequency=auto installation=indoor mode=ap-bridge ssid=DL wireless-protocol=802.11
/caps-man configuration
add country=argentina datapath.bridge=bridge name=cfg_general security.authentication-types=wpa-psk,wpa2-psk security.encryption=aes-ccm,tkip security.passphrase=xxxxxxxxxxx ssid=DL
I have two ISP on ether1 and ether2 (failover). DHCP (10.0.0.0/24) is assigned to bridge interface.
I want to add a second SSID with its own DHCP (10.10.0.0/24) for cellphones and guests, so they wont connect to corporative network.

So I made a vlan10 interface on the bridge, created a pool and a dhcp server and assigned to the vlan10 interface (VLAN ID=10).
I assigned 10.10.0.1 to the vlan10 interface.

I added the second configuration to CAPsMAN, and assigned it as slave configuration in provisioning (VLAN MODE=use tag and VLAN ID=10)
I see the second SSID, it accepts the passphrase but got no IP, and obvious, no internet.
Also no internet on primary SSID, so I freaked out and rolled back to the working configuration.

Hopefully, someone can point me in the right direction.


I'm posting what is working right now on RB2011:
[admin@DL0] > export compact 
# aug/17/2019 16:41:02 by RouterOS 6.45.3
# software id = RUXP-CVQF
#
# model = 2011UiAS-2HnD
# serial number = 731606E9B648
/interface bridge
add admin-mac=6C:3B:6B:7B:79:88 auto-mac=no comment=defconf name=bridge
/interface wireless
# managed by CAPsMAN
# channel: 2412/20-Ce/gn(20dBm), SSID: DL, CAPsMAN forwarding
set [ find default-name=wlan1 ] band=2ghz-b/g/n channel-width=20/40mhz-XX country=argentina distance=indoors frequency=auto installation=indoor mode=ap-bridge ssid=DL wireless-protocol=802.11
/caps-man configuration
add country=argentina datapath.bridge=bridge name=cfg_general security.authentication-types=wpa-psk,wpa2-psk security.encryption=aes-ccm,tkip security.passphrase=xxxxxxxx ssid=DL
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/ip pool
add name=dhcp ranges=10.0.0.100-10.0.0.199
/ip dhcp-server
add address-pool=dhcp disabled=no interface=bridge lease-time=1d name=dhcp1
/caps-man manager
set enabled=yes
/caps-man manager interface
add disabled=no interface=bridge
/caps-man provisioning
add action=create-dynamic-enabled master-configuration=cfg_general name-format=identity
/interface bridge port
add bridge=bridge comment=defconf interface=ether3
add bridge=bridge comment=defconf interface=ether4
add bridge=bridge comment=defconf interface=ether5
add bridge=bridge comment=defconf interface=ether6
add bridge=bridge comment=defconf interface=ether7
add bridge=bridge comment=defconf interface=ether8
add bridge=bridge comment=defconf interface=ether9
add bridge=bridge comment=defconf interface=ether10
add bridge=bridge comment=defconf interface=sfp1
add bridge=bridge interface=wlan1
/ip neighbor discovery-settings
set discover-interface-list=LAN
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=INTERNET interface=ether1 list=WAN
add comment=INTERNET interface=ether2 list=WAN
/interface wireless cap
# 
set bridge=bridge caps-man-addresses=127.0.0.1 discovery-interfaces=bridge enabled=yes interfaces=wlan1
/ip address
add address=10.0.0.2/24 interface=bridge network=10.0.0.0
/ip dhcp-client
add comment=defconf dhcp-options=hostname,clientid disabled=no interface=ether1
add default-route-distance=10 dhcp-options=hostname,clientid disabled=no interface=ether2
/ip dhcp-server network
add address=10.0.0.0/24 dns-server=10.0.0.2 gateway=10.0.0.2
/ip dns
set allow-remote-requests=yes
/ip dns static
add address=10.0.0.2 comment=defconf name=router.lan
/ip firewall filter
add action=accept chain=input comment="defconf: accept established,related,untracked" connection-state=established,related,untracked
add action=drop chain=input comment="defconf: drop invalid" connection-state=invalid
add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
add action=accept chain=input comment="defconf: accept to local loopback (for CAPsMAN)" dst-address=127.0.0.1
add action=accept chain=output dst-address=127.0.0.1 port=5246,5247 protocol=udp src-address=127.0.0.1
add action=accept chain=input dst-address=127.0.0.1 port=5246,5247 protocol=udp src-address=127.0.0.1
add action=drop chain=input comment="defconf: drop all not coming from LAN" in-interface-list=!LAN
add action=accept chain=forward comment="defconf: accept in ipsec policy" ipsec-policy=in,ipsec
add action=accept chain=forward comment="defconf: accept out ipsec policy" ipsec-policy=out,ipsec
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" connection-state=established,related
add action=accept chain=forward comment="defconf: accept established,related, untracked" connection-state=established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid" connection-state=invalid
add action=drop chain=forward comment="defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat connection-state=new in-interface-list=WAN
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" ipsec-policy=out,none out-interface=ether1
add action=masquerade chain=srcnat comment="defconf: masquerade" ipsec-policy=out,none out-interface=ether2
/ip route
add check-gateway=ping distance=1 dst-address=XX.XX.XX.XX gateway=ether1 pref-src=XX.XX.XX.XX routing-mark=Gigared scope=10
add check-gateway=ping distance=2 dst-address=XX.XX.XX.XX gateway=ether2 pref-src=XX.XX.XX.XX routing-mark=ARNET scope=10
/ip service
set telnet disabled=yes
/system clock
set time-zone-name=America/Argentina/Cordoba
/system identity
set name=DL0
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN

NOTE: I already have a second SSID on my home router (also a RB951) and got it working: wlan1 -> bridge_vlan -> vlan10
so my guests can connect, but with CAPsMAN I think it's a different approach but can't see how.
 
dragonauta
newbie
Topic Author
Posts: 28
Joined: Thu Feb 02, 2017 12:50 am

Re: Need help for CAPsMAN - 2 SSID + VLAN  [SOLVED]

Tue Aug 20, 2019 12:25 am

Ok, I got it working.
As I don't need vlan for the corporative network (just for the guest WiFi) I added a bridge_vlan, assigned an IP, DHCP server and select that bridge for the slave configuration on CAPsMAN.

Posting my config:
export hide-sensitive 
# aug/19/2019 18:16:30 by RouterOS 6.45.3
# software id = RUXP-CVQF
#
# model = 2011UiAS-2HnD
# serial number = 731606E9B648
/interface bridge
add admin-mac=6C:3B:6B:7B:79:88 auto-mac=no comment=defconf name=bridge
add name=bridge_vlan10 pvid=10 vlan-filtering=yes
/interface wireless
# managed by CAPsMAN
# channel: 2412/20-Ce/gn(20dBm), SSID: DL, CAPsMAN forwarding
set [ find default-name=wlan1 ] band=2ghz-b/g/n channel-width=20/40mhz-XX country=argentina distance=indoors frequency=auto installation=indoor mode=ap-bridge ssid=DL wireless-protocol=802.11
/caps-man configuration
add country=argentina datapath.bridge=bridge datapath.client-to-client-forwarding=yes name=cfg_general security.authentication-types=wpa-psk,wpa2-psk security.encryption=aes-ccm,tkip ssid=DL
add country=argentina datapath.bridge=bridge_vlan10 datapath.vlan-id=10 datapath.vlan-mode=use-tag name=cfg_celulares security.authentication-types=wpa-psk,wpa2-psk security.encryption=aes-ccm,tkip ssid=CELULARES
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface wireless security-profiles
set [ find default=yes ] authentication-types=wpa-psk,wpa2-psk group-ciphers=tkip,aes-ccm mode=dynamic-keys supplicant-identity=MikroTik unicast-ciphers=tkip,aes-ccm
/ip pool
add name=default-dhcp ranges=192.168.88.10-192.168.88.254
add name=dhcp ranges=10.0.0.100-10.0.0.199
add name=dhcp_celulares ranges=192.168.10.3-192.168.10.254
/ip dhcp-server
add address-pool=dhcp disabled=no interface=bridge name=dhcp1
add address-pool=dhcp_celulares disabled=no interface=bridge_vlan10 name=dhcp2
/caps-man manager
set enabled=yes
/caps-man manager interface
add disabled=no interface=bridge
/caps-man provisioning
add action=create-dynamic-enabled master-configuration=cfg_general name-format=identity slave-configurations=cfg_celulares
/interface bridge port
add bridge=bridge comment=defconf interface=ether3
add bridge=bridge comment=defconf interface=ether4
add bridge=bridge comment=defconf interface=ether5
add bridge=bridge comment=defconf interface=ether6
add bridge=bridge comment=defconf interface=ether7
add bridge=bridge comment=defconf interface=ether8
add bridge=bridge comment=defconf interface=ether9
add bridge=bridge comment=defconf interface=ether10
add bridge=bridge comment=defconf interface=sfp1
add bridge=bridge interface=wlan1
/ip neighbor discovery-settings
set discover-interface-list=LAN
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=INTERNET interface=ether1 list=WAN
add comment=INTERNET interface=ether2 list=WAN
/interface wireless cap
# 
set bridge=bridge caps-man-addresses=127.0.0.1 discovery-interfaces=bridge enabled=yes interfaces=wlan1
/ip address
add address=10.0.0.2/24 interface=bridge network=10.0.0.0
add address=192.168.10.2/24 interface=bridge_vlan10 network=192.168.10.0
/ip dhcp-client
add comment=defconf dhcp-options=hostname,clientid disabled=no interface=ether1
add default-route-distance=10 dhcp-options=hostname,clientid disabled=no interface=ether2
/ip dhcp-server network
add address=10.0.0.0/24 dns-server=10.0.0.2 gateway=10.0.0.2
add address=192.168.10.0/24 dns-server=192.168.10.2,8.8.8.8 gateway=192.168.10.2
/ip dns
set allow-remote-requests=yes
/ip dns static
add address=10.0.0.2 comment=defconf name=router.lan
/ip firewall filter
add action=accept chain=input comment="defconf: accept established,related,untracked" connection-state=established,related,untracked
add action=drop chain=input comment="defconf: drop invalid" connection-state=invalid
add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
add action=accept chain=input comment="defconf: accept to local loopback (for CAPsMAN)" dst-address=127.0.0.1
add action=accept chain=output dst-address=127.0.0.1 port=5246,5247 protocol=udp src-address=127.0.0.1
add action=accept chain=input dst-address=127.0.0.1 port=5246,5247 protocol=udp src-address=127.0.0.1
add action=drop chain=input comment="defconf: drop all not coming from LAN" in-interface-list=!LAN
add action=accept chain=forward comment="defconf: accept in ipsec policy" ipsec-policy=in,ipsec
add action=accept chain=forward comment="defconf: accept out ipsec policy" ipsec-policy=out,ipsec
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" connection-state=established,related
add action=accept chain=forward comment="defconf: accept established,related, untracked" connection-state=established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid" connection-state=invalid
add action=drop chain=forward comment="defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat connection-state=new in-interface-list=WAN
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" ipsec-policy=out,none out-interface=ether1
add action=masquerade chain=srcnat comment="defconf: masquerade" ipsec-policy=out,none out-interface=ether2
/ip route
add check-gateway=ping distance=1 dst-address=190.183.210.0/23 gateway=ether1 pref-src=190.183.210.64 routing-mark=Gigared scope=10
add check-gateway=ping distance=2 dst-address=192.168.1.0/24 gateway=ether2 pref-src=192.168.1.2 routing-mark=ARNET scope=10
/ip service
set telnet disabled=yes
/lcd interface pages
set 0 interfaces=wlan1
/system clock
set time-zone-name=America/Argentina/Cordoba
/system identity
set name=DL0
/system routerboard settings
set auto-upgrade=yes force-backup-booter=yes silent-boot=yes

Who is online

Users browsing this forum: HBG570 and 33 guests