acct_users
Юрий Колесник
cement3000 at mail.ru
Mon Jul 8 13:01:22 CEST 2013
Тема: acct_users
Hi
Have some proublem with accounting files on version 2.2.0 . I use standard dictionary
3GPP2, but attribut 3GPP2-PCF-IP-Address was ignored in acct_users file.
etc/acct_users
DEFAULT Acct-Session-Time == "0", Acct-Type := TEST0
DEFAULT Framed-IP-Address =~ "172.16", Acct-Type := BLOCKED
DEFAULT 3GPP2-PCF-IP-Address =~ "10.223.[45]", NAS-IP-Address =~ "10.123.66.5", Acct-Type := ASREVDO
DEFAULT 3GPP2-PCF-IP-Address =~ "10.123.65", NAS-IP-Address =~ "10.123.66", Acct-Type := KUB
DEFAULT Acct-Type := OTHER
etc/modules/detail
detail TEST {
detailfile = ${radacctdir}/files/blocked/blocked.%Y%m
detailperm = 0640
locking = yes
}
detail TEST0 {
detailfile = ${radacctdir}/files/nullsession/nullsession.%Y%m
detailperm = 0640
locking = yes
}
detail KUB {
detailfile = ${radacctdir}/files/onex/kub.aaadb1.onex
detailperm = 0640
locking = yes
}
detail ASREVDO {
detailfile = ${radacctdir}/files/evdoasr/kubasr.aaadb1.evdo
detailperm = 0640
locking = yes
}
detail OTHER {
detailfile = ${radacctdir}/files/other/%{NAS-IP-Address}_other/other.%{NAS-IP-Address}.%Y%m
detailperm = 0640
locking = yes
}
My accounting files was created as OTHER, but there must have been in ASREVDO.
For example, radclient:
[root at aaa-db1 radtest]# ./radtestacct.sh |more
Sending Accounting-Request of id 7 to 127.0.0.1 port 1813
User-Name = "mobile"
Calling-Station-Id = "250091000211350"
NAS-IP-Address = 10.123.66.5
Acct-Status-Type = Interim-Update
Acct-Session-Id = "50D406FD"
3GPP2-Correlation-Id = "o095O8hM"
NAS-Identifier = "asr5k-krd"
SN-Software-Version = "10.0 (36820)"
3GPP2-BSID = "2D0C00010701"
3GPP2-Attr-41 = 0x000b32c1
3GPP2-Service-Option = 59
3GPP2-User-Id = 0
3GPP2-ESN = "0159E33E"
Service-Type = Framed-User
Framed-Protocol = PPP
NAS-Port-Type = Wireless-Other
3GPP2-PCF-IP-Address = 10.223.4.6
Acct-Authentic = RADIUS
SN-Local-IP-Address = 77.243.240.221
SN-Primary-DNS-Server = 77.243.240.230
SN-Secondary-DNS-Server = 77.243.240.231
SN-VPN-Name = "ISP"
SN-Primary-NBNS-Server = 0.0.0.0
SN-Secondary-NBNS-Server = 0.0.0.0
Framed-Compression = None
SN-PPP-Data-Compression = None
SN-VPN-ID = 3
3GPP2-IP-Technology = 1
3GPP2-Compulsory-Tunnel-Indicator = 0
SN-Proxy-MIP = 0
Framed-MTU = 1500
3GPP2-Attr-78 = 0x00000000
SN-PPP-Data-Compression-Mode = Normal
3GPP2-Forward-FCH-Mux-Option = 0
3GPP2-Reverse-FCH-Mux-Option = 0
3GPP2-Forward-Traffic-Type = 0
3GPP2-Reverse-Traffic-Type = 0
3GPP2-FCH-Frame-Size = 0
3GPP2-Forward-FCH-RC = 0
3GPP2-Reverse-FCH-RC = 0
3GPP2-Airlink-Priority = 0
3GPP2-Airlink-Sequence-Number = 5
3GPP2-Airlink-Record-Type = 2
3GPP2-Bad-PPP-Frame-Count = 0
3GPP2-Number-Active-Transitions = 130
3GPP2-Terminating-SDB-Octet-Count = 0
3GPP2-Originating-SDB-OCtet-Count = 0
3GPP2-Terminating-Number-SDBs = 0
3GPP2-Originating-Number-SDBs = 0
3GPP2-Received-HDLC-Octets = 14106
3GPP2-Active-Time = 2040
Acct-Input-Packets = 109
Acct-Output-Packets = 268
3GPP2-Attr-162 = 0x00000000
3GPP2-Attr-163 = 0x00000000
3GPP2-Attr-164 = 0x00000000
3GPP2-Attr-165 = 0x00000000
SNA-PPP-Unfr-data-In-Oct = 11438
SNA-PPP-Unfr-data-Out-Oct = 35850
Acct-Session-Time = 3600
3GPP2-Session-Continue = 1
3GPP2-Last-User-Activity-Time = 1373257676
SNA-PPP-Ctrl-Input-Octets = 23602
SNA-PPP-Ctrl-Output-Octets = 28240
SNA-PPP-Ctrl-Input-Packets = 2346
SNA-PPP-Ctrl-Output-Packets = 2347
SNA-PPP-Framed-Input-Octets = 6446541
SNA-PPP-Framed-Output-Octets = 93404564
SNA-PPP-Discards-Input = 107
SNA-PPP-Errors-Input = 107
SNA-PPP-Bad-FCS = 107
SNA-PPP-Echo-Req-Input = 2335
SNA-PPP-Echo-Rsp-Output = 2335
SNA-RPRRQ-Rcvd-Total = 4448
SNA-RPRRQ-Rcvd-Acc-Reg = 4448
SNA-RPRRQ-Rcvd-Acc-Dereg = 39
SNA-RPRAK-Rcvd-Total = 60
SNA-RPRAK-Rcvd-Acc-Ack = 40
SNA-RPRAK-Rcvd-Mis-ID = 20
SNA-RP-Reg-Reply-Sent-Total = 4448
SNA-RP-Reg-Reply-Sent-Acc-Reg = 4448
SNA-RP-Reg-Reply-Sent-Acc-Dereg = 39
SNA-RP-Reg-Upd-Sent = 60
SNA-RP-Reg-Upd-Re-Sent = 20
Event-Timestamp = "Jul 8 2013 08:28:23 MSK"
3GPP2-Service-Reference-Id = 0x0104000102040001
Framed-IP-Address = 94.77.22.81
Framed-IP-Netmask = 255.255.255.255
Starent-Attr-24 = 0x00000001
Acct-Input-Octets = 11438
Acct-Output-Octets = 35850
NAS-Port = 666631
rad_recv: Accounting-Response packet from host 127.0.0.1 port 1813, id=7, length=20
In radius.log
Waking up in 0.9 seconds.
Thread 3 handling request 0, (1 handled so far)
[<thread>] # Executing section preacct from file /usr/local/etc/raddb/sites-enabled/default
[<thread>] +- entering group preacct {...}
[preprocess] expand: %{NAS-IP-Address} -> 10.123.66.5
[preprocess] expand: %{Calling-Station-Id} -> 250091000211350
[preprocess] WARNING: Unknown module "3GPP2-BSID" in string expansion "%"
[preprocess] WARNING: Unknown module "3GPP2-BSID" in string expansion "%"
[preprocess] expand: %{Calling-Station-Id} -> 250091000211350
[preprocess] expand: %{Calling-Station-Id} -> 250091000211350
[preprocess] expand: %{Calling-Station-Id} -> 250091000211350
++[preprocess] returns ok
[suffix] No '@' in User-Name = "mobile", looking up realm NULL
[suffix] Found realm "NULL"
[suffix] Adding Stripped-User-Name = "mobile"
[suffix] Adding Realm = "NULL"
[suffix] Accounting realm is LOCAL.
++[suffix] returns ok
[files] expand: %{User-Name} -> mobile
[files] expand: %{Framed-IP-Address} -> 94.77.22.81
[files] WARNING: Unknown module "3GPP2-PCF-IP-Address" in string expansion "%"
[files] WARNING: Unknown module "3GPP2-PCF-IP-Address" in string expansion "%"
[files] acct_users: Matched entry DEFAULT at line 42
++[files] returns ok
Found Acct-Type OTHER
# Executing group from file /usr/local/etc/raddb/sites-enabled/default
+- entering group OTHER {...}
[acct_unique] Hashing 'Calling-Station-Id = "250091000211350",3GPP2-Correlation-Id = "o095O8hM",Acct-Session-Id = "50D406FD"'
[acct_unique] Acct-Unique-Session-ID = "327c0b6a3c7b490e".
++[acct_unique] returns ok
++- entering group {...}
[OTHER] expand: /usr/local/var/log/radius/radacct/files/other/%{NAS-IP-Address}_other/other.%{NAS-IP-Address}.%Y%m -> /usr/local/var/log/radius/radacct/files/other/10.123.66.5_other/other.10.123.66.5.201307
[OTHER] /usr/local/var/log/radius/radacct/files/other/%{NAS-IP-Address}_other/other.%{NAS-IP-Address}.%Y%m expands to /usr/local/var/log/radius/radacct/files/other/10.123.66.5_other/other.10.123.66.5.201307
[OTHER] Acquired filelock, tried 1 time(s)
[OTHER] expand: %t -> Mon Jul 8 14:38:43 2013
+++[OTHER] returns ok
++- group returns ok
Finished request 0.
This configuration work normal on my old 2.1.3 version radius, but 2.2.0 don't like number as the first character of an attribute expansion.
Every time see [files] WARNING: Unknown module "3GPP2-PCF-IP-Address" in string expansion "%"
Similar problem in this list :
http://lists.freeradius.org/pipermail/freeradius-users/2012-November/064050.html
This is strange but in 2.2.0 this problem should not be.
I use standard dictionary
----------------------------------------------------------------------
--
Юрий Колесник
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20130708/0d4472cf/attachment-0001.html>
More information about the Freeradius-Users
mailing list