Community discussions

MikroTik App
 
jamesw
newbie
Topic Author
Posts: 47
Joined: Tue Jul 04, 2017 2:52 pm

Simple Hotspot with VRRP setup - help!

Mon Jan 18, 2021 11:36 pm

I am trying to get a simple hotspot with VRRP with two CHR Virtualbox VM's

The plan is to run a two routers as master/slave, both with hotspot running for guest users. I've configured it as I thought it should be, however when I create a hotspot and set it to run on the vrrp interface, although the client connects and receives an IP address, the device does not show up in the hotspot and the user cannot reach anything or the splash page. If I set the hotspot to run the ethernet interface then this shows up correctly, but I don't know how that will work with vrrp. It's like hotspot cannot be enabled on a vrrp interface at the same time?

Note that the hotspot address is set to the vrrp address because I want the default gateway/dns for clients to be the vrrp interface in case we need to fail over to the slave...

Config below:

ether2 - uplink to WAN (dhcp)
ether3 - vrrp and hotspot


/interface vrrp
add interface=ether3 name=vrrp-standard vrid=16

/ip hotspot profile
add hotspot-address=192.168.23.254 login-by=http-pap name=hs-profile-standard

/ip pool
add name=hs-pool-standard ranges=192.168.16.20-192.168.19.254

/ip dhcp-server
add address-pool=hs-pool-standard disabled=no interface=vrrp-standard lease-time=15m name=dhcp-standard

/ip hotspot
add address-pool=hs-pool-standard addresses-per-mac=unlimited disabled=no idle-timeout=none interface=vrrp-standard name=standard profile=hs-profile-standard

/ip address
add address=192.168.16.11 interface=ether3 network=255.255.248.0
add address=192.168.23.254 interface=vrrp-standard network=255.255.255.255

/ip dhcp-client
add disabled=no interface=ether2

/ip dhcp-server network
add address=192.168.16.0/21 comment="hotspot network - standard" dns-server=192.168.23.254 gateway=192.168.23.254

/ip firewall filter
add action=passthrough chain=unused-hs-chain comment="place hotspot rules here" disabled=yes

/ip firewall nat
add action=passthrough chain=unused-hs-chain comment="place hotspot rules here" disabled=yes
add action=masquerade chain=srcnat comment="masquerade hotspot network" src-address=192.168.16.0/21

/ip hotspot user
add name=admin

Code on the second router is the same apart from a different IP address for ether3 and a different dhcp pool to avoid ip conflicts/confusion if it fails over.

Any help would be appreciated.

Thanks

James
 
jamesw
newbie
Topic Author
Posts: 47
Joined: Tue Jul 04, 2017 2:52 pm

Re: Simple Hotspot with VRRP setup - help!

Tue Jan 19, 2021 11:30 am

Further to this, it appears when the VRRP and the hotspot are on the same interface (ether3) the VRRP doesn't work or auto-switch master/backup, probably because the hotspot is running or blocking the traffic. As soon as the hotspot server is disabled, VRRP immediately works again. Any thoughts?

Thanks,

James
 
toto4ds
just joined
Posts: 15
Joined: Fri Dec 03, 2021 10:39 pm

Re: Simple Hotspot with VRRP setup - help!

Sun Jan 02, 2022 7:44 pm

Hm, the same for me =/
I have two masters at the same time if hotspot enabled on both
But I found a solution: set v3 protocol to IPv6 in VRRP
IP address for IPv6 is not configurable
In hotspot -> server profiles -> "your.profile": set hotspot address as vrrp ip
DHCP and Hotspot use main interface, not VRRP interface
DHCP and Hotspot can turn it on or off at will in the settings of the VRRP through scripts, like:
/ip hotspot enable [find name="hotspot.your.name"];

Who is online

Users browsing this forum: electronicparadise, Google [Bot], GoogleOther [Bot] and 35 guests