top of page

JunOS | Find SNMP OID

Writer's picture: Diniz MartinsDiniz Martins

Updated: Apr 13, 2020

Simple Network Management Protocol (SNMP) is an application–layer protocol for exchanging management information between network devices. It is a part of Transmission Control Protocol⁄Internet Protocol (TCP⁄IP) protocol suite

Now the real question…how to find the SNMP OID corresponds to SNMP Object name in Junos?


Let's say we have to check the OID corresponding to BGP AS, just type:


If you want to see all of them, type:

...there will be close to 60,000 entries:


Let's focus back on BGP AS:


I can see one of the output is "bgpLocalAs.0" which is I am after, so lets see how we can get the OID corresponding to it:


Here it is , so we got the OID and you can use this OID in NMS systems to poll this specific object.


=== Another example - TCP Connection ===


Let’s find OID related to TCP connection:


To find the decimal OID number for TCP connection state:


We have found the MIB number for TCP connection state which is1.3.6.1.2.1.6.13.1.1. Now if you walk it, you’ll get the same results:


Let’s analyse:

tcpConnState.0.0.0.0.22.0.0.0.0.0 is ascii representation for 1.3.6.1.2.1.6.13.1.1.0.0.0.0.22.0.0.0.0.0

1.3.6.1.2.1.6.13.1.1.0.0.0.0.22.0.0.0.0.0 equals to 2 as per tcpConnState.0.0.0.0.22.0.0.0.0.0 = 2


NOTE:

Enumeration: 1-closed, 2-listen, 3-synSent, 4-synReceived, 5-established, 6-finWait1, 7-finWait2, 8-closeWait, 9-lastAck, 10-closing, 11-timeWait and 12-deleteTCB.


From the note above we can tell that 2 is the state of the connection. This means that the device is listening on port 22 where first 0.0.0.0 is Local Address, last 0.0.0.0 is the RemoteAddress and the last 0 is the port for Remote Address.


212 views0 comments

Recent Posts

See All

Juniper | Recovery Root Password

Recovering Root Password for Juniper Devices can be done in few simple steps. ➪ This procedure is applicable for Juniper MX, M, EX, SRX,...

Managing Junos using Rest API

The Managing Junos Devices using REST API learning byte demonstrates how to manage Junos devices using REST API. Since most programming...

Junos-PythonEZ | XcvrTable & Counter

The following script show how to using Junos PyEZ "XcvrTable" and "Counter" widget to get the number of transceivers on the Junos router...

Comments


Programming and IT solutions guide on STENGE.info blog
Cybersecurity and Networking tutorials on STENGE.info
IT infrastructure solutions and technology tutorials
STENGE.info logo - Tech Blog for IT Solutions and Tutorials
bottom of page