If you are trying to avoid one username logging in multiple times (-1,-2 interfaces) then you can use 'One Session Per Host' option in PPPoE Server, so if there is an active user with that username logged in already (or still timing out) then they will be refused login.
Alternatively on the ppp profiles you can use up/down scripts - if they are all managed by your secrets in the router rather than external service you could potentially disable the secret sleep for 20s then enable it again - im not sure on the performance hit on this if you are dropping/authing users on a fairly regular basis.
If they ARE an external RADIUS user, then best bet is to look into scripting this in the RADIUS to not send an Accept until x time after last session logout.
High CPU is a common issue, have you ruled out usual suspects e.g. NAT (masquerade) and connection tracking?
There are quite a few topics on this issue (search for pppoe cpu in forum).
The problem is that many ont's restart up to 10 times in 1 minute filling the mikrotik with pppoe requests, I would like to make the secret of the user when detected in DOWN state is disabled for 10 to 20 seconds until it is valid again. I mean a script on the pppoe server. But I do not know how to do it
/ppp secret disable [ find name=$user ]
:delay 30s // This might need to be in ms
/ppp secret enable [ find name=$user ]
/ppp secret disable ; Timeout 20s ; / ppp secret enable
The best way to fix this is for MikroTik to implement what is called "PADI Per-MAC Rate Limiting", similar in idea to ICMP rate limiting, which would ignore additional PPPoE PADI packets if they are received within too short of a timeframe from the same MAC Address. I have wanted such a feature as well, but it wasn't problematic enough for me to request before.
What I need is that in On down the secret of the user is disabled for 20 seconds. Something like:. But I don't know how to do it so that it applies only to the user who logged out.Code: Select all/ppp secret disable ; Timeout 20s ; / ppp secret enable
/ppp secret disable [ find name=$user ]
:delay 30s // This might need to be in ms
/ppp secret enable [ find name=$user ]
What I need is that in On down the secret of the user is disabled for 20 seconds. Something like:. But I don't know how to do it so that it applies only to the user who logged out.Code: Select all/ppp secret disable ; Timeout 20s ; / ppp secret enable
I gave you that script (just without testing) in my post above for your On Down script:
($user is a passed through variable and matches the user login of the interface going up/down)
/ppp secret disable [ find name=$user ]
:delay 30s // This might need to be in ms
/ppp secret enable [ find name=$user ]