Community discussions

MikroTik App
 
User avatar
azoo32
just joined
Topic Author
Posts: 18
Joined: Mon Mar 19, 2018 10:26 pm

hotspot double ip issue

Sat May 05, 2018 9:31 pm

hi guys
i am using hotspot as you can see and i am wondering if this is a problem or this is how hot spot works.
as you can tel from the pictures i am having 2 ip's per device i from DHCP and other from hotspot.
i wil be good if there a script that can fix it, i tried to change on login by mac script to fix this but still have the same issue
original script
###################################################################################
:global a $user
:global m [/ip hotspot active get [find user=$a] mac-address]
:global i [/ip hotspot active get [find user=$a] address]
:global in [/ip hotspot active get [find user=$a] server]
:global inn [/ip h get $in interface]
:if ($a != $m) do={/ip hotspot user set $a name=$m password="" address=$i
/ip arp remove [find address=$i]
/ip arp add interface=$inn address=$i mac=$m
/ip dhcp-server lease make-static [find active-address=$i]
/ip hotspot host remove [find mac-address=$m]} else={:log info "user is already added to log by
mac :)"}
###################################################################################
edieted
###################################################################################
:global a $user
:global m [/ip hotspot active get [find user=$a] mac-address]
:global i [/ip dhcp-server lease get [find active-mac-address=$m] address]
:global in [/ip hotspot active get [find user=$a] server]
:global inn [/ip h get $in interface]
:if ($a != $m) do={/ip hotspot user set $a address=$i
/ip arp remove [find address=$i]
/ip arp add interface=$inn address=$i mac=$m
/ip dhcp-server lease make-static [find active-address=$i]} else={:log info "user is already added to log by
mac :)"}
###################################################################################
You do not have the required permissions to view the files attached to this post.
 
solar77
Long time Member
Long time Member
Posts: 586
Joined: Thu Feb 04, 2016 11:42 am
Location: Scotland

Re: hotspot double ip issue

Sat May 05, 2018 9:54 pm

it's not really an issue. the hotspot is doing what you tell it to do.
if you only want the DHCP adress, change the Address Pool to None, Hotspot -> Server and also User Profile
you will have one address.
 
User avatar
azoo32
just joined
Topic Author
Posts: 18
Joined: Mon Mar 19, 2018 10:26 pm

Re: hotspot double ip issue

Sat May 05, 2018 10:22 pm

ok that's good bro i will try and see
thanks so much bro

Who is online

Users browsing this forum: No registered users and 121 guests