<div dir="ltr"><div><div>Ok, so the problem lies somewhere in the originate-coa file.<br><br></div>If I remove that file from the sites-enable accounting-messages are handled fine. But if I don't have that defined I get this error when trying to send CoA<br>
<br>Wed May 1 12:39:03 2013 : Info: WARNING: Unknown destination <a href="http://172.16.255.35:3799">172.16.255.35:3799</a> for CoA request.<br><br></div>Can anyone tell me how I can both send a CoA to a NAS and process the accounting-start/accounting-stop packet?<br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, May 1, 2013 at 10:10 AM, Tyller D <span dir="ltr"><<a href="mailto:tyllerd@gmail.com" target="_blank">tyllerd@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><div>Hi All,<br><br></div>I'm having a problem that I can't find a solution to.<br><br></div>The process I'm using is as follows. User connects to landing page, landing page sends access-request to server with users details. FreeRADIUS then sends a COA to the NAS to change the state and apply attributes. However when FreeRADIUS gets the accounting-start packet, it does nothing with it. Can someone please tell me how I can log this normally in radacct table? In my accounting section i have accounting { sql }<br>
<br>sql_xlat finished<br>rlm_sql (sql): Released sql socket id: 4<br> expand: %{sql:SELECT IFNULL((SELECT IF(ims.vouchers.`data`= 0, 0,IF((ims.vouchers.`data` - (SUM(radius.radacct.acctinputoctets)+SUM(radius.radacct.acctoutputoctets))) < 0,-1, ims.vouchers.`data` - (SUM(radius.radacct.acctinputoctets)+SUM(radius.radacct.acctoutputoctets)))) AS voucherdata FROM radius.radacct,ims.vouchers WHERE radius.radacct.username='%{request:User-Name}' AND radius.radacct.username = ims.vouchers.voucher AND radius.radacct.acctterminatecause<>'Hotspot Restart'),(SELECT ims.vouchers.`data` FROM ims.vouchers WHERE ims.vouchers.voucher='%{request:User-Name}')) as voucherdata} -> 1048576<br>
++[control] returns noop<br>sql_xlat<br> expand: %{User-Name} -> 10269783<br>sql_set_user escaped user --> '10269783'<br> expand: SELECT IFNULL((SELECT IF(ims.user_account.`data`= 0, 0,IF((ims.user_account.`data` - (SUM(radius.radacct.acctinputoctets)+SUM(radius.radacct.acctoutputoctets))) < 0,-1, ims.user_account.`data` - (SUM(radius.radacct.acctinputoctets)+SUM(radius.radacct.acctoutputoctets)))) AS voucherdata FROM radius.radacct,ims.user_account WHERE radius.radacct.username='%{request:User-Name}' AND radius.radacct.username = ims.user_account.username AND radius.radacct.acctterminatecause<>'Hotspot Restart'),(SELECT ims.user_account.`data` FROM ims.user_account WHERE ims.user_account.username='%{request:User-Name}')) as voucherdata -> SELECT IFNULL((SELECT IF(ims.user_account.`data`= 0, 0,IF((ims.user_account.`data` - (SUM(radius.radacct.acctinputoctets)+SUM(radius.radacct.acctoutputoctets))) < 0,-1, ims.user_account.`data` - (SUM(radius.radacct.acctinputoctets)+SUM(radius.radacct.acctoutputoctets)))) AS voucherdata FROM radius.radacct,ims.user_account WHERE radius.radacct.username='10269783' AND radius.radacct.username =<br>
rlm_sql (sql): Reserving sql socket id: 3<br>row[0] returned NULL<br>rlm_sql (sql): Released sql socket id: 3<br> expand: %{sql:SELECT IFNULL((SELECT IF(ims.user_account.`data`= 0, 0,IF((ims.user_account.`data` - (SUM(radius.radacct.acctinputoctets)+SUM(radius.radacct.acctoutputoctets))) < 0,-1, ims.user_account.`data` - (SUM(radius.radacct.acctinputoctets)+SUM(radius.radacct.acctoutputoctets)))) AS voucherdata FROM radius.radacct,ims.user_account WHERE radius.radacct.username='%{request:User-Name}' AND radius.radacct.username = ims.user_account.username AND radius.radacct.acctterminatecause<>'Hotspot Restart'),(SELECT ims.user_account.`data` FROM ims.user_account WHERE ims.user_account.username='%{request:User-Name}')) as voucherdata} -><br>
++[control] returns noop<br>++? if (control:IMS-ActiveDirectory == 0)<br>? Evaluating (control:IMS-ActiveDirectory == 0) -> FALSE<br>++? if (control:IMS-ActiveDirectory == 0) -> FALSE<br>++? if (control:IMS-Timeout < 0)<br>
? Evaluating (control:IMS-Timeout < 0) -> FALSE<br>++? if (control:IMS-Timeout < 0) -> FALSE<br>++? elsif (control:IMS-Timeout > 0)<br>? Evaluating (control:IMS-Timeout > 0) -> FALSE<br>++? elsif (control:IMS-Timeout > 0) -> FALSE<br>
++? if (control:IMS-Data < 0)<br>? Evaluating (control:IMS-Data < 0) -> FALSE<br>++? if (control:IMS-Data < 0) -> FALSE<br>++? if (control:IMS-Data > 0)<br>? Evaluating (control:IMS-Data > 0) -> TRUE<br>
++? if (control:IMS-Data > 0) -> TRUE<br>++- entering if (control:IMS-Data > 0) {...}<br> expand: %{control:IMS-Data} -> 1048576<br>+++[reply] returns noop<br>++- if (control:IMS-Data > 0) returns noop<br>
++? if (control:IMS-UserData < 0)<br>? Evaluating (control:IMS-UserData < 0) -> FALSE<br>++? if (control:IMS-UserData < 0) -> FALSE<br>++? if (control:IMS-UserData > 0)<br>? Evaluating (control:IMS-UserData > 0) -> FALSE<br>
++? if (control:IMS-UserData > 0) -> FALSE<br>++[reply] returns noop<br>} # server ims<br>Sending Access-Accept of id 79 to 127.0.0.1 port 51340<br> Trapeze-Qos-Profile = "MB100"<br> Mikrotik-Total-Limit = 1048576<br>
Acct-Interim-Interval = 120<br># Executing section pre-proxy from file /etc/freeradius/sites-enabled/ims<br>+- entering group pre-proxy {...}<br>[detail] expand: /var/log/freeradius/radacct/%{Client-IP-Address}/detail-%Y%m%d -> /var/log/freeradius/radacct/<a href="http://127.0.0.1/detail-20130501" target="_blank">127.0.0.1/detail-20130501</a><br>
[detail] /var/log/freeradius/radacct/%{Client-IP-Address}/detail-%Y%m%d expands to /var/log/freeradius/radacct/<a href="http://127.0.0.1/detail-20130501" target="_blank">127.0.0.1/detail-20130501</a><br>[detail] expand: %t -> Wed May 1 09:58:20 2013<br>
++[detail] returns ok<br>Sending CoA-Request of id 91 to 172.16.255.35 port 3799<br> Calling-Station-Id = "04:54:53:85:ca:82"<br> NAS-IP-Address = 172.16.255.35<br> Trapeze-COA-Replace-Username = "10269783"<br>
Filter-Id = "MB100"<br>Finished request 3.<br>Going to the next request<br>Waking up in 2.4 seconds.<br>rad_recv: CoA-ACK packet from host 172.16.255.35 port 3799, id=91, length=26<br> Event-Timestamp = "May 1 2013 09:58:34 SAST"<br>
# Executing section post-proxy from file /etc/freeradius/sites-enabled/ims<br>+- entering group post-proxy {...}<br>[detail] expand: /var/log/freeradius/radacct/%{Client-IP-Address}/detail-%Y%m%d -> /var/log/freeradius/radacct/<a href="http://127.0.0.1/detail-20130501" target="_blank">127.0.0.1/detail-20130501</a><br>
[detail] /var/log/freeradius/radacct/%{Client-IP-Address}/detail-%Y%m%d expands to /var/log/freeradius/radacct/<a href="http://127.0.0.1/detail-20130501" target="_blank">127.0.0.1/detail-20130501</a><br>[detail] expand: %t -> Wed May 1 09:58:20 2013<br>
++[detail] returns ok<br>server ims {<br>} # server ims<br>Finished request 3.<br>Going to the next request<br>Waking up in 4.9 seconds.<br>rad_recv: Accounting-Request packet from host 172.16.255.35 port 20000, id=200, length=244<br>
Acct-Status-Type = Start<br> Acct-Multi-Session-Id = "SESS-464-72c952-395089-4201e"<br> Acct-Session-Id = "SESS-464-72c952-395089-4201e"<br> User-Name = "10269783"<br>
Event-Timestamp = "May 1 2013 09:58:34 SAST"<br> Trapeze-VLAN-Name = "DataA"<br> Calling-Station-Id = "04-54-53-85-CA-82"<br> NAS-Port-Id = "AP13/2"<br>
Called-Station-Id = "AC-4B-C8-02-23-41:BTC HOTSPOT - FAIRGROUND"<br> Trapeze-Attr-19 = 0x69706164<br> Trapeze-Attr-21 = 0x696f73<br> NAS-Port = 464<br> Framed-IP-Address = 172.16.100.18<br>
NAS-Port-Type = Wireless-802.11<br> NAS-IP-Address = 172.16.255.35<br> NAS-Identifier = "XON"<br> Acct-Delay-Time = 0<br> WARNING: Empty preacct section. Using default return values.<br>
WARNING: Empty accounting section. Using default return values.<br>Finished request 4.<br>Cleaning up request 4 ID 200 with timestamp +47<br>Going to the next request<br>Waking up in 4.9 seconds.<br>Cleaning up request 3 ID 79 with timestamp +47<br>
rad_recv: Accounting-Request packet from host 172.16.255.35 port 20000, id=201, length=244<br> Acct-Status-Type = Start<br> Acct-Multi-Session-Id = "SESS-464-72c952-395089-4201e"<br> Acct-Session-Id = "SESS-464-72c952-395089-4201e"<br>
User-Name = "10269783"<br> Event-Timestamp = "May 1 2013 09:58:34 SAST"<br> Trapeze-VLAN-Name = "DataA"<br> Calling-Station-Id = "04-54-53-85-CA-82"<br>
NAS-Port-Id = "AP13/2"<br> Called-Station-Id = "AC-4B-C8-02-23-41:BTC HOTSPOT - FAIRGROUND"<br> Trapeze-Attr-19 = 0x69706164<br> Trapeze-Attr-21 = 0x696f73<br> NAS-Port = 464<br>
Framed-IP-Address = 172.16.100.18<br> NAS-Port-Type = Wireless-802.11<br> NAS-IP-Address = 172.16.255.35<br> NAS-Identifier = "XON"<br> Acct-Delay-Time = 5<br> WARNING: Empty preacct section. Using default return values.<br>
WARNING: Empty accounting section. Using default return values.<br>Finished request 5.<br>Cleaning up request 5 ID 201 with timestamp +52<br>Going to the next request<br>Ready to process requests.<br>rad_recv: Accounting-Request packet from host 172.16.255.35 port 20000, id=202, length=244<br>
Acct-Status-Type = Start<br> Acct-Multi-Session-Id = "SESS-464-72c952-395089-4201e"<br> Acct-Session-Id = "SESS-464-72c952-395089-4201e"<br> User-Name = "10269783"<br>
Event-Timestamp = "May 1 2013 09:58:34 SAST"<br> Trapeze-VLAN-Name = "DataA"<br> Calling-Station-Id = "04-54-53-85-CA-82"<br> NAS-Port-Id = "AP13/2"<br>
Called-Station-Id = "AC-4B-C8-02-23-41:BTC HOTSPOT - FAIRGROUND"<br> Trapeze-Attr-19 = 0x69706164<br> Trapeze-Attr-21 = 0x696f73<br> NAS-Port = 464<br> Framed-IP-Address = 172.16.100.18<br>
NAS-Port-Type = Wireless-802.11<br> NAS-IP-Address = 172.16.255.35<br> NAS-Identifier = "XON"<br> Acct-Delay-Time = 10<br> WARNING: Empty preacct section. Using default return values.<br>
WARNING: Empty accounting section. Using default return values.<br>Finished request 6.<br>Cleaning up request 6 ID 202 with timestamp +57<br>Going to the next request<br>Ready to process requests.<br>rad_recv: Accounting-Request packet from host 172.16.255.35 port 20000, id=203, length=274<br>
Acct-Status-Type = Stop<br> Acct-Multi-Session-Id = "SESS-464-72c952-395089-4201e"<br> Acct-Session-Id = "SESS-464-72c952-395089-4201e"<br> User-Name = "10269783"<br>
Event-Timestamp = "May 1 2013 10:03:16 SAST"<br> Trapeze-VLAN-Name = "DataA"<br> Calling-Station-Id = "04-54-53-85-CA-82"<br> NAS-Port-Id = "AP13/2"<br>
Called-Station-Id = "AC-4B-C8-02-23-41:BTC HOTSPOT - FAIRGROUND"<br> Trapeze-Attr-19 = 0x69706164<br> Trapeze-Attr-21 = 0x696f73<br> NAS-Port = 464<br> Framed-IP-Address = 172.16.100.18<br>
NAS-Identifier = "XON"<br> Acct-Session-Time = 282<br> Acct-Output-Octets = 58993<br> Acct-Input-Octets = 35737<br> Acct-Output-Packets = 177<br> Acct-Input-Packets = 393<br>
NAS-Port-Type = Wireless-802.11<br> NAS-IP-Address = 172.16.255.35<br> Acct-Delay-Time = 0<br> WARNING: Empty preacct section. Using default return values.<br> WARNING: Empty accounting section. Using default return values.<br>
Finished request 7.<br>Cleaning up request 7 ID 203 with timestamp +329<br>Going to the next request<br>Ready to process requests.<br>rad_recv: Accounting-Request packet from host 172.16.255.35 port 20000, id=204, length=274<br>
Acct-Status-Type = Stop<br> Acct-Multi-Session-Id = "SESS-464-72c952-395089-4201e"<br> Acct-Session-Id = "SESS-464-72c952-395089-4201e"<br> User-Name = "10269783"<br>
Event-Timestamp = "May 1 2013 10:03:16 SAST"<br> Trapeze-VLAN-Name = "DataA"<br> Calling-Station-Id = "04-54-53-85-CA-82"<br> NAS-Port-Id = "AP13/2"<br>
Called-Station-Id = "AC-4B-C8-02-23-41:BTC HOTSPOT - FAIRGROUND"<br> Trapeze-Attr-19 = 0x69706164<br> Trapeze-Attr-21 = 0x696f73<br> NAS-Port = 464<br> Framed-IP-Address = 172.16.100.18<br>
NAS-Identifier = "XON"<br> Acct-Session-Time = 282<br> Acct-Output-Octets = 58993<br> Acct-Input-Octets = 35737<br> Acct-Output-Packets = 177<br> Acct-Input-Packets = 393<br>
NAS-Port-Type = Wireless-802.11<br> NAS-IP-Address = 172.16.255.35<br> Acct-Delay-Time = 5<br> WARNING: Empty preacct section. Using default return values.<br> WARNING: Empty accounting section. Using default return values.<br>
Finished request 8.<br>Cleaning up request 8 ID 204 with timestamp +334<br>Going to the next request<br>Ready to process requests.<br>rad_recv: Accounting-Request packet from host 172.16.255.35 port 20000, id=205, length=274<br>
Acct-Status-Type = Stop<br> Acct-Multi-Session-Id = "SESS-464-72c952-395089-4201e"<br> Acct-Session-Id = "SESS-464-72c952-395089-4201e"<br> User-Name = "10269783"<br>
Event-Timestamp = "May 1 2013 10:03:16 SAST"<br> Trapeze-VLAN-Name = "DataA"<br> Calling-Station-Id = "04-54-53-85-CA-82"<br> NAS-Port-Id = "AP13/2"<br>
Called-Station-Id = "AC-4B-C8-02-23-41:BTC HOTSPOT - FAIRGROUND"<br> Trapeze-Attr-19 = 0x69706164<br> Trapeze-Attr-21 = 0x696f73<br> NAS-Port = 464<br> Framed-IP-Address = 172.16.100.18<br>
NAS-Identifier = "XON"<br> Acct-Session-Time = 282<br> Acct-Output-Octets = 58993<br> Acct-Input-Octets = 35737<br> Acct-Output-Packets = 177<br> Acct-Input-Packets = 393<br>
NAS-Port-Type = Wireless-802.11<br> NAS-IP-Address = 172.16.255.35<br> Acct-Delay-Time = 10<br> WARNING: Empty preacct section. Using default return values.<br> WARNING: Empty accounting section. Using default return values.<br>
Finished request 9.<br>Cleaning up request 9 ID 205 with timestamp +339<br>Going to the next request<br>Ready to process requests.<br><br></div>
</blockquote></div><br></div>