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!

1
  • 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 post and accept your own answer.
    – Ron Maupin
    Jan 6, 2021 at 1:49

1 Answer 1

5

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 agree to our terms of service and acknowledge you have read our privacy policy.

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