I just figured that out (in linux) based on Tom Haynes most recent SNMP post 
(Thanks Tom - you're a guru!!)

snmpset -v 1 -0v -c password aaa.bbb.ccc.ddd 1.2.6.1.4.1.410.2.5.2 i N

where  aaa.bbb.ccc.ddd is the IP address of  one of your access points
and N is (n-1) total number of associated clients.

From Tom's Post:
  
You "GET" ...2.5.1 for the total number of associated stations. You "SET" 
...2.5.2 to the station number that you want the information for. The 
response is the 24 octet string.
 
01 02 = station 1
03 04 05 06 07 08 = MAC Address
09 = status (don't know meaning)
10 = port (don't know meaning)
11 12 13 14 15 16 = ParentMacAddress
17 = RSSI (Ox00-Ox28 / 0-40 I can't remember if 0 or 40 is MAX)
18 = LQ (Ox00-Ox28 / 0-40 I can't remember if 0 or 40 is MAX)
19 20 21 22 = IP Address (Will not be what you expect)
23 24 = Reserved
 
This all assumes you retrieved the informatio correctly and it is right.

 
I wrote the world's worst perl script to just print out the mac addresses of 
the client that are associated to the ap. Call it by using 

./getassoc.pl 172.26.0.x password

Good luck 

Erik


#!/usr/bin/perl -s

use Net::SNMP;

($session,$errror) = Net::SNMP->session(Hostname=> $ARGV[0],Community => 
$ARGV[1]);

die "session error: $error" unless ($session);

my $sysNumberAssociated = '1.3.6.1.4.1.410.1.2.5.1.0';
my $sysNumber = '1.3.6.1.4.1.410.1.2.5.2.0';

$result = $session->get_request($sysNumberAssociated);
die "request error: ".$session->error unless (defined $result);
my $NumberAssociated = $result->{$sysNumberAssociated};
# print "Number of associated clients: ".$NumberAssociated."\n";

my $current = $NumberAssociated;

while ($current > 0 ) {
$result2 = $session->set_request(
        -varbindlist => [$sysNumber, INTEGER, $current]);
die "request2 error: ".$session->error unless (defined $result2);
# print "@{[%$result2]}"."\n";
printf(" %s\n",substr($result2->{$sysNumber},6,12));
$current = $current - 1;
}

$session->close;

On September 6, 2003 04:18 am, Marcin wrote:
> Hello
> How get client ip address from AP using snmp???
>
> Martinez

----------ANNOUNCEMENT----------
Don't forget to register for WISPCON IV
http://www.wispcon.info/us/wispcon-iv/wispcon-iv.htm

The PART-15.ORG smartBridges Discussion List
To Join: mailto:[EMAIL PROTECTED] (in the body type subscribe smartBridges 
<yournickname>
To Remove: mailto:[EMAIL PROTECTED] (in the body type unsubscribe smartBridges)
Archives: http://archives.part-15.org

Reply via email to