I'm trying to get via snmp the next-hop address of the default route or the interface via it's known.
Before It got deprecated, I used .126.96.36.199.188.8.131.52.184.108.40.206.0.0 (ipRouteNextHop). It returned the next-hop address of the 0.0.0.0, in this case.
Now, I use the new MIB (ipCidrRouteNextHop or inetCidrRouteNextHop). The issue is that I muss attach to the snmp string the mask and the next-hop address of the default route to the snmp string:
And the fact it that I don't previously know the next-hop address. So, is there any way to ask the router which is the protocol next-hop or the next-hop address only attaching the 0.0.0.0 to the snmp string?
Thanks in advance,
Well, I answer myself.
Instead of using snmpget, use snmpgetnext like following:
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: