(RADIATOR) New Cisco SNMP query

Hugh Irvine hugh at open.com.au
Tue Nov 11 19:08:09 CST 2003


Hello Vangelis -

Many thanks for this contribution.

We have decided to add a new seperate "NasType CiscoSessionMIB" to 
support this, and the code will do the hexadecimal to decimal 
conversion directly so nothing has to change in the session database.

We will let you know when the new module is available in the patches 
area, and we would appreciate it if you could test it and let us know 
how it works.

regards

Hugh


On 11/11/2003, at 9:49 PM, Vangelis Kyriakakis wrote:

> Hello,
>
>      With Cisco IOS 12.2.15T there is a new SNMP OID that gives the 
> users that are connected  according to the Decimal  Acct-Session-Id. 
> So with this OID you can always use snmpget to check if a user is 
> still online. This works for Async, ISDN and ADSL users. You need to 
> use the Decimal form of the Acct-Session-Id not the Hexadecimal. We 
> use an SQL Session database and we do the conversion there. I don't 
> know if there is a Hextoint function in Perl
>
>          Regards
>               Vangelis
>
>
> package Radius::Nas::Cisco;
> use Radius::SNMP;
> use strict;
>
> # The Cisco SNMP MIB
> $Radius::Nas::CiscoMIB = '.iso.org.dod.internet.private.enterprises.9';
>
> sub isOnline
> {
>    my ($name, $nas_id, $nas_port, $session_id, $client) = @_;
>
>    return 1 unless &Radius::SNMP::snmpgetprogExists();
>
>        &main::log($main::LOG_DEBUG, "Cisco: Checking $session_id-> 
> $nas_id:$nas_port:$name" );
>
>        my $result = &Radius::SNMP::snmpget
>            ($nas_id,
>             $client->{SNMPCommunity},
>             "$Radius::Nas::CiscoMIB.9.150.1.1.3.1.2.$session_id");
>
>        return 1 if (!$result || $result =~ /no response/i); # Could 
> not SNMP. Assume still there
>        return uc($1) eq uc($name)
>            if ($result =~ /^.*\"([^"]+)".*$/);
>
>    return 0; # not there
> }
>
> 1;
>
>
> ===
> 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.
>
>

NB: 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.
-
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