How to get DHCP IP in Freeradius, Radacct

How to get dhcp ip in freeradius ? In freeradius there is radacct table which contains public ip address, mac address. We are running DHCP address and after dialing pppoe customers get public ip, we want to get local ip/private ip which dhcp server is providing.

I dont have deep level of FR experience, but IMHO, its not possible because getting DHCP IP for particular user is on NAS part. when authentication request arrives on Freeradius, it will see the calling station MAC , NAS IP , & once the user is authenticated , its ppp IP will be logged as framed-ip-address in radacct table.

Using your PHP code as frontend, what you can do is something like creating a VIEW DHCP IP BUTTON for each user
when the OP wants to view the DHCP IP of any particular user, he click on View DHCP button, & following action should be executed

  • select macaddress,nasipaddress from radacct where username is ZAIB where acctstoptime is NULL;

now using passwordless SSH, or preferably the API, extract the IP ADDRESS against the macaddress from NAS DHCP/LEASE section.

This is the possibility I can think of. If you are using Cisco switch as DHCP , things will go further complex. However if you will use any Linux base DHCP server, your life can become easy as we can do all sort of inbuilt & scripting base solution to acquire our customized result.