Hi, im rookie in snmp, so imagine programming this. I've been looking into the documentation searching for an example to get the table of one of the router that the pc is connected, but no luck.
I know the IP of the Router, the subbnet,
this is my code
Dim ipRouter As SnmpSharpNet.IpAddress = New SnmpSharpNet.IpAddress(IPRouter)
Dim submask As SnmpSharpNet.IpAddress = New SnmpSharpNet.IpAddress(ipRouter.NetworkMask)
Dim subAddr As SnmpSharpNet.IpAddress = ipaddr.GetSubnetAddress(submask)
Dim bcastAddr As SnmpSharpNet.IpAddress = ipaddr.GetBroadcastAddress(submask)
Now how do i get the table or the ip address of the router?
I'm not sure if I understand your question. If you are looking to find your default gateway (router) address then you could do something like this: http://stackoverflow.com/questions/3840195/how-do-i-use-system-net-networkinformation-gatewayipaddressinformation-class
This operation has nothing to do with SNMP so getting the address can be done without this library.
If you want to get a table of information from the router, then you could following this tutorial for a simple version of SNMP table retrieval: http://snmpsharpnet.com/node/19 (see the SimpleSnmp.Walk method).
Hope this helps…
Thanks i was trying to get the table from the router.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.