Hi, Mike
Can you give me an example on how to use get-next method to get the
indexes?
I found that I can use snmpwalk to get the the host's ip addresses, but
I don't know how it is done(I paste the snmpwalk command below)
$ snmpwalk -v 2c -c public 127.0.0.1 .1.3.6.1.2.1.4.20.1.1
IP-MIB::ipAdEntAddr.127.0.0.1 = IpAddress: 127.0.0.1
IP-MIB::ipAdEntAddr.192.168.132.128 = IpAddress: 192.168.132.128
------------------
Ren
2008-08-01
-------------------------------------------------------------
发件人:Mike Ayers
发送日期:2008-08-01 01:55:17
收件人:xiao ren; Net-snmp-users
抄送:
主题:RE: How to get host's ip address?
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of xiao ren
> Sent: Thursday, July 31, 2008 10:09 AM
> But why must I use ip address as the index of the OID to
> query it's own ip address?
You don't - you can use get-next from the top of the table and discover the
indexes.
> I think it's ironic, since if I've
> already known the ip address, I don't have to query it by snmp, right?
SNMP can run over many different transports. Also, there are purely IP
elements, such as NAT, that may cause you to communicate with a host using an
IP address which is
not on that host.
HTH,
Mike
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users