Michał Gacek pisze:
no dokladnie uzycie accounting_query_update zamiast post-autha załatwiło sprawę, jeszcze w lmsie zminiłem sobie zeby zmieniał lastonline co 120 sek, tyle co ile mam interim-update miedzy koncentratorami a serwerem. I już wszystko ładnie pokazuje. Kocham radiusa ;]
Pozdrawiam i dzięki za naprowadzenie :)
Skoro lubisz dłubać i kochasz radiusa :)
sql sql_pppoe_auth_w_assigned_nets { driver = "rlm_sql_mysql"
server = "localhost" login = "lms" password = "lms"
radius_db = "lms_dev"
deletestalesessions = yes
sqltrace = yes sqltracefile = ${logdir}/sqltrace.sql
num_sql_socks = 10
connect_failure_retry_delay = 60
sql_user_name = "%{User-Name}" sql_set_password = ""
authorize_check_query = "SELECT nodes.id id, username UserName, 'User-Password' Attribute, passwd Value, '==' op FROM netdevices devs JOIN netdevices_assigned_networks nas ON devs.id = nas.device_id JOIN networks nets ON nas.network_id = nets.id JOIN nodes ON (ipaddr & inet_aton(mask) = address) AND upper(mac) = '%{Calling-Station-Id}' AND devs.name = '%{NAS-Identifier}' AND username = '%{SQL-User-Name}' AND access=1 ORDER BY id"
authorize_reply_query = "SELECT nodes.id id, username UserName, 'Framed-IP-Address' Attribute, inet_ntoa(ipaddr) Value, '==' op FROM assignments LEFT JOIN tariffs ON (tariffid = tariffs.id) LEFT JOIN nodes ON (customerid = ownerid) JOIN networks on (ipaddr & inet_aton(mask)) = address WHERE access = 1 AND (datefrom <= now() OR datefrom = 0) AND (dateto >= now() OR dateto = 0) AND username = '%{User-Name}' \ UNION \ SELECT nodes.id id, username UserName, 'Mikrotik-Rate-Limit' Attribute, concat(upceil,'/',downceil) Value, '==' op FROM assignments LEFT JOIN tariffs ON (tariffid = tariffs.id) LEFT JOIN nodes ON (customerid = ownerid) JOIN networks on (ipaddr & inet_aton(mask)) = address WHERE access = 1 AND (datefrom <= now() OR datefrom = 0) AND (dateto >= now() OR dateto = 0) AND username = '%{User-Name}'" }
authorize_reply_query zwraca mikrotikowi info na temat user rate i user ceil , dzieki temu na dzieńdobry zakłada kolejkę na interfejsie ppp. Zamiast pola userneme uzyj tego , którego użuwasz do przypisywania loginu PPPoE.
!DSPAM:47a1a463285575962586004!