(RADIATOR) In Accounting Trace Log there is no Update radpool command.

Hugh Irvine hugh at open.com.au
Mon Feb 12 04:51:04 CST 2007


Hello Nayeem -

The trace 4 debug below does not show an accounting stop, which is  
probably your problem. It is the accounting stop which causes the IP  
address to be deallocated (state=0).

You will need to find out why you are not receiving the accounting  
stops.

regards

Hugh


On 12 Feb 2007, at 21:19, Nayeem wrote:

> Dear All,
>
>
>
> Presently we are facing problem about allocate and deallocate IP  
> address and when we do trace 4 debug then we find that there is no  
> update radpool set state=0 command and below config and trace info.
>
>
>
> <Client 172.16.1.5>
>
>             Identifier NAS1
>
>             Secret   secret
>
>             DupInterval 2
>
> </Client>
>
>
>
> <AddressAllocator SQL>
>
>             Identifier AllocateFromSQL1
>
>
>
>             DefaultLeasePeriod 2592000
>
>
>
>             DBSource         dbi:ODBC:dsn
>
>             DBUsername     user
>
>             DBAuth             pass
>
>
>
>             AddAddressQuery insert into RADPOOL (STATE, TIME_STAMP,  
> POOL, \
>
>                          YIADDR, SUBNETMASK, DNSSERVER, USERNAME,  
> NAS, IspID ) values (0, %t, '%0', '%1', \
>
>                          '%2', '%3', '%n', '%{Calling-Station-Id}', 1)
>
>
>
>             FindQuery select TIME_STAMP, YIADDR, SUBNETMASK,  
> DNSSERVER from RADPOOL where POOL='%0' and STATE=0 order by TIME_STAMP
>
>
>
>             AllocateQuery update RADPOOL set STATE=1,TIME_STAMP=%0,  
> EXPIRY=%1, USERNAME=%2 where YIADDR='%3' and TIME_STAMP%4
>
>
>
>             DeallocateQuery update RADPOOL set STATE=0,TIME_STAMP=% 
> t where YIADDR='%0'
>
>
>
> <AddressPool 128.salwavillage.com>
>
>                         Subnetmask      255.255.255.0
>
>                         DNSServer        212.24.224.35
>
>                         Range               85.194.124.2 85.194.124.63
>
>             </AddressPool>
>
>
>
>         <AddressPool 256.salwavillage.com>
>
>                         Subnetmask      255.255.255.0
>
>                         DNSServer        172.16.1.35
>
>                         Range               85.194.124.64  
> 85.194.124.127
>
>             </AddressPool>
>
>
>
>         <AddressPool 512.salwavillage.com>
>
>                         Subnetmask      255.255.255.0
>
>                         DNSServer        212.24.224.35
>
>                         Range               85.194.124.128  
> 85.194.124.159
>
>             </AddressPool>
>
>
>
>         <AddressPool a.128.salwavillage.com>
>
>                         Subnetmask      255.255.255.0
>
>                         DNSServer        212.24.224.35
>
>                         Range               85.194.124.160  
> 85.194.124.191
>
>             </AddressPool>
>
>
>
> </AddressAllocator>
>
>
>
> <AuthBy DYNADDRESS>
>
>             Identifier AllocateIPAddressDSL
>
>             Allocator AllocateFromSQL1
>
>             PoolHint %{Reply:PoolHint}
>
>             StripFromReply Framed-IP-Netmask, Framed-Routing,  
> Framed-Compression
>
> </AuthBy>
>
>
>
> <AuthBy SQL>
>
>             NoDefault
>
>             Identifier Check_DSLSALWA_SQL
>
>
>
>             DBSource         dbi:ODBC:dsn
>
>             DBUsername     user
>
>             DBAuth             pass
>
>
>
>         AuthSelect select password,classify,isnull(timeleft,0),  
> Session from UsersForAuth_DSL \
>
>                         where status = 'A' \
>
>                         and (case when charindex('.',classify)>0  
> then  Eusername +'@'+ \
>
>                         substring(classify,charindex('.',classify) 
> +1,len(classify)) else \
>
>                         eusername end) like (case when charindex 
> ('.',classify)>0 then  '%w' +'@'+ substring('%W',charindex('.','%W') 
> +1,len('%W'))\
>
>                         else '%w' end) and isdsl='Y' and ispid=33
>
>
>
>
>
>             AuthColumnDef 0, User-Password, check
>
>             AuthColumnDef 1, PoolHint, reply
>
>             AuthColumnDef 2, Session-Timeout,reply
>
>
>
>             AddToReplyIfNotExist PoolHint = 'a.128.salwavillage.com'
>
>
>
>             AccountingStopsOnly
>
>
>
>             AcctSQLStatement exec IEmailUsageDSL '%n','%{NAS- 
> Port}', 0%{Acct-Input-Octets},\
>
>                         0%{Acct-Output-Octets},'%{Acct-Session- 
> Id}', %{Acct-Session-Time}, \
>
>                         '%m/%d/%Y %H:%M:%S','%{Calling-Station- 
> Id}', '%{Framed-IP-Address}', '%{Acct-Terminate-Cause}'
>
>
>
>
>
>             AddToReply Service-Type = Framed-User, \
>
>             Framed-Protocol = PPP, \
>
>             Framed-Compression = Van-Jacobson-TCP-IP
>
>
>
> </AuthBy>
>
>
>
> <Handler  Request-Type = Accounting-Request, NAS-IP-Address=  
> 212.24.236.5>
>
>
>
>             UsernameCharset a-zA-Z0-9\._ at -
>
>
>
>             AuthByPolicy ContinueAlways
>
>             AuthBy Check_DSLLiveUsage_SQL
>
>             AuthBy AllocateIPAddressDSL
>
>             AcctLogFileName %L/email/detail
>
>             SessionDatabase SDB1
>
>
>
>             StripFromReply PoolHint
>
> </Handler>
>
>
>
> <Handler NAS-IP-Address= 212.24.236.5>
>
>
>
>             MaxSessions 1
>
>
>
>             UsernameCharset a-zA-Z0-9\._ at -
>
>
>
>             <AuthLog SQL>
>
>
>
>             DBSource         dbi:ODBC:cfgdsn
>
>             DBUsername     cfguser
>
>             DBAuth roman483
>
>
>
>             Table Logcalls
>
>             SuccessQuery Insert into Logcalls (username, priority,  
> Message, Phonenumber, Password, NAS) \
>
>                                     values ('%n', %0, %1, '% 
> {Calling-Station-Id}', '%P', '%N')
>
>
>
>             FailureQuery  Insert into Logcalls (username, priority,  
> Message, Phonenumber, Password, NAS) \
>
>                                     values ('%n', %0, %1, '% 
> {Calling-Station-Id}', '%P', '%N')
>
>
>
> #                      LogSuccess 1
>
>                         LogFailure 1
>
>
>
>             </AuthLog>
>
>
>
>             AuthByPolicy ContinueWhileAccept
>
>             <AuthBy GROUP>
>
>                         AuthByPolicy ContinueUntilAccept
>
>                         AuthBy Check_DSLSALWA_SQL
>
>             </AuthBy>
>
>
>
>             AuthBy AllocateIPAddressDSL
>
>             SessionDatabase SDB1
>
>
>
>             StripFromReply PoolHint
>
> </Handler>
>
>
>
> Debug Information
>
>
>
> *** Received from 212.24.236.5 port 1646 ....
>
> Code:       Accounting-Request
>
> Identifier: 219
>
> Authentic:   
> <136><187><202><163><190><208><139><196><20><222>4<18><172><170>[<163>
>
> Attributes:
>
>             Acct-Session-Id = "00000132"
>
>             cisco-avpair = "client-mac-address=2a17.3134.5bd7"
>
>             Framed-Protocol = PPP
>
>             Framed-IP-Address = 85.194.124.138
>
>             User-Name = "scates at 512.salwavillage.com"
>
>             cisco-avpair = "connect-progress=LAN Ses Up"
>
>             cisco-avpair = "nas-tx-speed=100000000"
>
>             cisco-avpair = "nas-rx-speed=100000000"
>
>             Acct-Session-Time = 63839
>
>             Acct-Input-Octets = 2683015
>
>             Acct-Output-Octets = 30640200
>
>             Acct-Input-Packets = 32012
>
>             Acct-Output-Packets = 42917
>
>             Acct-Authentic = RADIUS
>
>             Acct-Status-Type = Alive
>
>             NAS-Port-Type = Virtual
>
>             NAS-Port = 0
>
>             NAS-Port-Id = "0/0/1/0"
>
>             Service-Type = Framed-User
>
>             NAS-IP-Address = 212.24.236.5
>
>             Acct-Delay-Time = 0
>
>
>
> Mon Feb 12 13:01:52 2007: DEBUG: Handling request with Handler  
> 'Request-Type = Accounting-Request, NAS-IP-Address= 212.24.236.5'
>
> Mon Feb 12 13:01:52 2007: DEBUG: SDB1 Adding session for  
> scates at 512.salwavillage.com, 212.24.236.5, 0
>
> Mon Feb 12 13:01:52 2007: DEBUG: do query is: 'DELETE FROM  
> RADONLINE WHERE NASIDENTIFIER='212.24.236.5' AND ACCTSESSIONID like  
> '00000132'':
>
> Mon Feb 12 13:01:52 2007: DEBUG: do query is: 'insert into  
> RADONLINE (USERNAME, NASIDENTIFIER, NASPORT, ACCTSESSIONID,  
> TIME_STAMP, FRAMEDIPADDRESS, NASPORTTYPE, SERVICETYPE, datetime,  
> PhoneNumber,StationID) values ('scates at 512.salwavillage.com',  
> '212.24.236.5', 0, '00000132', 1171274512, '85.194.124.138', '',  
> 'Framed-User', getdate(), '', '')':
>
> Mon Feb 12 13:01:52 2007: DEBUG: Handling with Radius::AuthGROUP:
>
> Mon Feb 12 13:01:52 2007: DEBUG: Handling with Radius::AuthSQL
>
> Mon Feb 12 13:01:52 2007: DEBUG: Handling accounting with  
> Radius::AuthSQL
>
> Mon Feb 12 13:01:52 2007: DEBUG: Handling with Radius::AuthSQL
>
> Mon Feb 12 13:01:52 2007: DEBUG: Handling accounting with  
> Radius::AuthSQL
>
> Mon Feb 12 13:01:52 2007: DEBUG: do query is: 'exec AliveUsageDSl  
> 'scates at 512.salwavillage.com','Alive',  
> 02683015,030640200,'00000132', 063839, '02/12/2007 13:01:52','',  
> '85.194.124.138', '', 'salwaNAS'':
>
> Mon Feb 12 13:01:52 2007: DEBUG: AuthBy GROUP result: ACCEPT,
>
> Mon Feb 12 13:01:52 2007: DEBUG: Accounting accepted
>
> Mon Feb 12 13:01:52 2007: DEBUG: Packet dump:
>
> *** Sending to 212.24.236.5 port 1646 ....
>
> Code:       Accounting-Response
>
> Identifier: 219
>
> Authentic:   
> <136><187><202><163><190><208><139><196><20><222>4<18><172><170>[<163>
>
> Attributes:
>
>
>
> Mon Feb 12 13:01:52 2007: DEBUG: Packet dump:
>
>
>
> Regards,
>
> Nayeem.
>
>



NB:

Have you read the reference manual ("doc/ref.html")?
Have you searched the mailing list archive (www.open.com.au/archives/ 
radiator)?
Have you had a quick look on Google (www.google.com)?
Have you included a copy of your configuration file (no secrets),
together with a trace 4 debug showing what is happening?

-- 
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. Available on *NIX, *BSD, Windows, MacOS X.
Includes support for reliable RADIUS transport (RadSec),
and DIAMETER translation agent.
-
Nets: internetwork inventory and management - graphical, extensible,
flexible with hardware, software, platform and database independence.
-
CATool: Private Certificate Authority for Unix and Unix-like systems.


--
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.


More information about the radiator mailing list