4

Hoping someone has an oid to poll (get/walk) an MX router to retrieve configured static route information and next-hop? Searched MIBs and mib walks on router to no avail.

Thanks!

  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer. – Ron Maupin Aug 15 '17 at 18:00
6

The best you'll be able to get is inetCidrRouteTable from IP-FORWARD-MIB - this will give you all routes, regardless of protocol.

The OID is .1.3.6.1.2.1.4.24.7 and if you walk it, you'll see a table of entries.

The format of entries is:

IP-MIB::ip.24.7.1.7.1.4.0.0.0.0.0.2.0.0.1.4.10.0.0.254 = INTEGER: 13
                        |     | |           |        |
                Prefix (0.0.0.0)| Next Hop (10.0.0.254)
                 CIDR Mask (/0)-+

If you're specifically after static routes, I would recommend ditching SNMP, and instead use the Junos REST API (available from Junos 15.1 onwards), or NETCONF calls via PyEZ.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.