The following guide is intended for advanced operators, understanding Mikrotik routers is required or you may break your current/working configuration! Also please note that all network traffic usage (accounting) will be registered for the same NASId in Control Center (that is the first location, registered on the "Identity" of the Mikrotik device) – even those ones which happened/actioned on the second location.

In this example we configure both hotspots to a bridge called "HS-bridge", and the second one will rest at VLAN10. (VLAN will be created by script as well).

  1. We start with creating the VLAN. Go to Winbox / Interfaces. Click on new (+) icon and set the ID for 10 and the interface to ether 3.
  2. Create your first location in Control Center and set the router up following our Mikrotik Gateway Install Guide and verify if it works.
  3. Create your second location in Control Center and change the "Internal Login" and "Logout URL’s" at Modify Hotspot Data / Splash page settings to "Custom" and with the following values: and respectively
  4. Find the folder called "hotspot" on the Mikrotik router's directory and copy it to your computer. Edit the login.html and alogin.html files: change the value=”$(identity)” to value=OPERATORUSERNAME_LOCATIONIDNUMBER of the second location. (so if your operatorname is "hotspot" and this is the 3rd in Control center , it will be value="hotspot_3".
  5. Save, then rename the hotspot folder on your computer to hotspot2, and copy the whole hotspot2 folder to the root of your Mikrotik or to the /flash/ folder if it’s present in your device.
  6. Copy the following commands to a simple text editor and change the parameters to yours – in the first row depending on if you don’t have a flash folder on your Mikrotik you need to modify it to directory=/hotspot2. In the last row the OPERATORUSERNAME_LOCATIONIDNUMBER must be the set for the second location (hotspot_3 as of our example):
/ip hotspot profile add hotspot-address= name=hsprof2 html-directory=/flash/hotspot2
/ip pool add name=hs-pool-4 ranges=
/interface vlan add name=vlan-10 vlan-id=10 interface=HS_bridge disabled=no
/ip dhcp-server add address-pool=hs-pool-4 disabled=no interface=vlan-10 lease-time=1h name=dhcp2
/ip hotspot add address-pool=hs-pool-4 disabled=no interface=vlan-10 name=hotspot2 profile=hsprof2
/ip address add address= comment="HotspotSystem network 2" interface=vlan-10 network=
/ip dhcp-server network add address= comment="hotspot network 2" gateway=
/ip firewall nat add action=masquerade chain=srcnat comment="masquerade hotspot network 2" src-address=
/ip hotspot profile set hsprof2 use-radius=yes
/ip hotspot profile set hsprof2 login-by=http-pap,http-chap,https
/system scheduler add interval=1h name=up2 on-event="/tool fetch keep-result=no mode=http address=tech.hotspotsystem.com host=tech.hotspotsystem.com src-path=(\"up.php\\\?mac=\".[/interface ethernet get 0 mac-address].\"&nasid=\"OPERATORUSERNAME_LOCATIONIDNUMBER"&os_date=Mikrotik&uptime=\".[/system clock get time].\"%20up%20\".[/system resource get uptime].\",%20load%20average:%20\".[/system resource get cpu-load].\"%\")" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive start-date=jan/01/1970 start-time=01:00:00

And that’s it! If you check VLAN 10, you will see your second hotspot network, if you switch to your untagged network, it will be the first one.

Did this answer your question?