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.
Network Engineering Stack Exchange is a question and answer site for network engineers. It only takes a minute to sign up.Sign up to join this community
The best you'll be able to get is
IP-FORWARD-MIB - this will give you all routes, regardless of protocol.
The OID is
.18.104.22.168.22.214.171.124.7 and if you walk it, you'll see a table of entries.
The format of entries is:
IP-MIB::ip.126.96.36.199.188.8.131.52.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.