HotSpot and PPPoE in same interface - Check IP script

Hi,
I have a CCR1036 with DMA radius manager. I run hotspot and pppoe (unfortunately with the same interface and I cannot change that). I have many users during the day either hotspot or pppoe. My problem is that when a pppoe user login to my server when hotspot hosts is loaded, then he reserves the same ip with one of the hotspot host and he hasn’t access to internet.
If that happens, I have to find the pppoe ip, then search in ip hosts, remove it from ip hosts and then reconnect pppoe user, MANUALLY :frowning: :frowning: :frowning:

Can anyone suggest a script that will run as scheduled that:

  1. Check the ips of all pppoe users, then,
  2. Check the ips of ip > hotspot > hosts, then,
  3. If an ip of any of pppoe user is found in ip > hotspot > hosts, then,
  4. Remove ip from ip > hotspot > hosts and remove pppoe user (in order to reconnect without ip confict).

Thanks in advanced.

Have you think about using DIFFERENT ip pool on the router?

I have though about that but I have only one link (AP, Station) from my main office to my first main tower, so I have only one ethernet interface with only one DHCP server on in for both hotspot users and ppp users. How could I use different ip pool, one for hotspot users and another for ppp users?

On the radius you can specify pool for each profile, if have the same feature as mikrotik user-manager,

or if you can, use vlans