pppoe & dynamically created queue tree ?

I have next scenario :

…clients
…|
…|
clients—MT1(with pppoe server) <—> MT2(with pppoe server) <—>…<—> MT3 <—> Internet
…|
…|
…RadiusServer

All clients gets IP from pppoe-pool and I want to make queue tree on MT3 , for clients who are loging with pppoe on MT1 and MT2, but because IP is dynamically, can queue tree make dynamically rule for clients ?

Can I do something like this with script, or any other way?