For a lab I'm doing with my students I want to create 30 virtual wlan interfaces with as many SSIDs and security profiles using:
Code: Select all
for i from=1 to=30 do={
/interface/wireless/security-profiles/add name=("Prof".$i) mode=dynamic-keys authentication-types=wpa2-psk group-ciphers=aes-ccm wpa2-pre-shared-key=("ITSI_ITSI_ITSI_".$i)
/interface/wireless/add master-interface=wlan1 security-profile=("Prof".$i) disabled=no ssid=("ITSI".$i) name=("Int".$i)
/ip/pool/add name=("Pool".$i) ranges=("192.168.".$i.".10-192.168.".$i.".20")
/ip/dhcp-server/network/add address=("192.168.".$i.".0/24") gateway=("192.168.".$i.".1") dns-server=("192.168.".$i.".1")
/ip/dhcp-server/add interface=("Int".$i) address-pool=("Pool".$i)
/ip/address/add address=("192.168.".$i.".1/24") interface=("Int".$i)
}
Code: Select all
Flags: X - disabled; R - running
0 name="wlan1" mtu=1500 l2mtu=1600
mac-address=08:55:31:90:AA:37 arp=enabled
interface-type=IPQ4019 mode=ap-bridge ssid="MikroTik"
frequency=2472 band=2ghz-g/n channel-width=20mhz
secondary-frequency="" scan-list=default
wireless-protocol=802.11 vlan-mode=no-tag vlan-id=1
wds-mode=disabled wds-default-bridge=none
wds-ignore-ssid=no bridge-mode=enabled
default-authentication=yes default-forwarding=yes
default-ap-tx-limit=0 default-client-tx-limit=0
hide-ssid=no security-profile=default compression=no
Code: Select all
mfischer@carbon:~$ for i in {1..30}; do nmcli dev wifi connect ITSI$i password ITSI_ITSI_ITSI_$i; sleep 2; done
Error: No network with SSID 'ITSI1' found.
Error: No network with SSID 'ITSI2' found.
Error: No network with SSID 'ITSI3' found.
Error: No network with SSID 'ITSI4' found.
Device 'wlp3s0' successfully activated with '5d78fdc6-3f6f-4704-a8fa-5e050c176f55'.
Error: Connection activation failed: (53) The Wi-Fi network could not be found.
Error: Connection activation failed: (53) The Wi-Fi network could not be found.
Device 'wlp3s0' successfully activated with 'ec46a181-b730-476e-bf65-766adb04e423'.
Error: Connection activation failed: (53) The Wi-Fi network could not be found.
Error: Connection activation failed: (53) The Wi-Fi network could not be found.
Error: Connection activation failed: (53) The Wi-Fi network could not be found.
Device 'wlp3s0' successfully activated with 'd695cfe4-707a-465c-b06c-11062fc79514'.
Error: Connection activation failed: (53) The Wi-Fi network could not be found.
Error: Connection activation failed: (53) The Wi-Fi network could not be found.
Device 'wlp3s0' successfully activated with 'e6a0aa7b-b4b6-473c-9263-f3a5240ba411'.
Device 'wlp3s0' successfully activated with '79b34805-8d41-4dcd-b574-01427894eee4'.
Device 'wlp3s0' successfully activated with '202c4daa-105e-41e0-b129-3a0ca7ff43f8'.
Device 'wlp3s0' successfully activated with '2ebfa33c-dae2-40c9-adc4-5098b0742d91'.
Device 'wlp3s0' successfully activated with 'a22b4694-fb45-4100-9525-2735a44c8a42'.
Device 'wlp3s0' successfully activated with 'a360c7d7-d229-44e4-8948-16c4a33fab93'.
Device 'wlp3s0' successfully activated with '192e20ba-0a65-4dc5-b6c6-9b1f8cde8ba2'.
Error: Connection activation failed: (53) The Wi-Fi network could not be found.
Device 'wlp3s0' successfully activated with 'cd9e064f-e181-4929-ae73-789e782e3bbc'.
Device 'wlp3s0' successfully activated with '5a6c7707-a52d-4a4f-856c-2b2cb78ee240'.
Device 'wlp3s0' successfully activated with 'f2e9cf16-71b1-4e2b-8917-f912da059bc8'.
Device 'wlp3s0' successfully activated with '2323c047-acbd-467d-9792-005f9dd59034'.
Device 'wlp3s0' successfully activated with 'd1a9bc6f-bd73-407e-874c-bd2c84348353'.
Device 'wlp3s0' successfully activated with '9909c718-4c22-4eec-ba69-ee6791ce9f06'.
Device 'wlp3s0' successfully activated with 'dd2b8e2a-2d6c-443c-95cd-860f031f7c03'.
Error: Connection activation failed: (53) The Wi-Fi network could not be found.
The "successfully activated" explain themselves. The "Error: No network with SSID 'ITSIx" found." lines mean that the SSID is not in the scanned list. The "Error: Connection activation failed:..." lines mean that the SSID was there when the connection was initiated but disappeard during the connection process.
Which SSIDs work and which won't varies on each attempt.
Any ideas? Is 30 just too much? The documentation warns about performance decreases with 30+ VAPs... Is there some sort of timing issue?
Thanks, Mike