Junos OS

last person joined: yesterday 

Ask questions and share experiences about Junos OS.
  • 1.  Browsing Juniper MIBs

    Posted 12-12-2010 06:59

    Hi,

    I need to retrieve information about interface queues by SNMP (as by executing "show interfaces queue ge-0/0/3").
    So I've downloaded Juniper MIBs, unzipped it and I try to load them into some smnp mibs browser. My OS is Linux and I have tried already: tkmib, mbrowse, JMibBrowser (all could be found on sourceforge) but none of them could load juniper txt mib files. I've tried also browser from Ireasoning and this one loads them appropriately but personal license allows to load only 10 of them at once. Could you tell me what browsers do you use (which one supports juniper mibs correctly), or just give OIDs of interface queues. (The first solution would be better )

    Thank you in advance.
    Piotr



  • 2.  RE: Browsing Juniper MIBs

     
    Posted 12-12-2010 19:28

    Hi Piotr:

     

    I can give you the OID:

     

    jnxCosQstatTable (1.3.6.1.4.1.2636.3.15.4).

     

    You may try to use MG-Soft MIB Browser, but it is not free as well.

     

     

    Conty



  • 3.  RE: Browsing Juniper MIBs

    Posted 12-13-2010 10:08

    Hi there,

    It works fine with Net-SNMP on my Windows XP machine, Net-SNMP supports SNMP v1, v2c and v3 (OpenSSL required for v3).

    You can get Net-SNMP for free from here http://www.net-snmp.org/download.html

    Example using SNMPv3 here:

     

     

    C:\usr\bin>snmpwalk -v3 -a MD5 -A juniper123 -c 80000a4c046d3130692d65652d77732d726530 -l authNoPriv -u nms -m JUNIPER-COS-MIB  172.30.32.7 jnxCosIfqStatsTable
    JUNIPER-COS-MIB::jnxCosIfqQedPkts.501."best-effort" = Counter64: 65740
    JUNIPER-COS-MIB::jnxCosIfqQedPkts.501."network-control" = Counter64: 142956
    JUNIPER-COS-MIB::jnxCosIfqQedPkts.501."assured-forwarding" = Counter64: 0
    JUNIPER-COS-MIB::jnxCosIfqQedPkts.501."expedited-forwarding" = Counter64: 0
    JUNIPER-COS-MIB::jnxCosIfqQedPkts.502."best-effort" = Counter64: 33953
    JUNIPER-COS-MIB::jnxCosIfqQedPkts.502."network-control" = Counter64: 440673
    JUNIPER-COS-MIB::jnxCosIfqQedPkts.502."assured-forwarding" = Counter64: 0
    JUNIPER-COS-MIB::jnxCosIfqQedPkts.502."expedited-forwarding" = Counter64: 0
    JUNIPER-COS-MIB::jnxCosIfqQedPkts.503."best-effort" = Counter64: 0
    JUNIPER-COS-MIB::jnxCosIfqQedPkts.503."network-control" = Counter64: 0
    JUNIPER-COS-MIB::jnxCosIfqQedPkts.503."assured-forwarding" = Counter64: 0
    JUNIPER-COS-MIB::jnxCosIfqQedPkts.503."expedited-forwarding" = Counter64: 0
    JUNIPER-COS-MIB::jnxCosIfqQedPktRate.501."best-effort" = Counter64: 0
    JUNIPER-COS-MIB::jnxCosIfqQedPktRate.501."network-control" = Counter64: 0
    JUNIPER-COS-MIB::jnxCosIfqQedPktRate.501."assured-forwarding" = Counter64: 0
    JUNIPER-COS-MIB::jnxCosIfqQedPktRate.501."expedited-forwarding" = Counter64: 0
    JUNIPER-COS-MIB::jnxCosIfqQedPktRate.502."best-effort" = Counter64: 0
    JUNIPER-COS-MIB::jnxCosIfqQedPktRate.502."network-control" = Counter64: 0
    JUNIPER-COS-MIB::jnxCosIfqQedPktRate.502."assured-forwarding" = Counter64: 0
    JUNIPER-COS-MIB::jnxCosIfqQedPktRate.502."expedited-forwarding" = Counter64: 0
    JUNIPER-COS-MIB::jnxCosIfqQedPktRate.503."best-effort" = Counter64: 0
    JUNIPER-COS-MIB::jnxCosIfqQedPktRate.503."network-control" = Counter64: 0
    JUNIPER-COS-MIB::jnxCosIfqQedPktRate.503."assured-forwarding" = Counter64: 0
    JUNIPER-COS-MIB::jnxCosIfqQedPktRate.503."expedited-forwarding" = Counter64: 0
    JUNIPER-COS-MIB::jnxCosIfqQedBytes.501."best-effort" = Counter64: 4986107
    JUNIPER-COS-MIB::jnxCosIfqQedBytes.501."network-control" = Counter64: 12598538
    JUNIPER-COS-MIB::jnxCosIfqQedBytes.501."assured-forwarding" = Counter64: 0
    JUNIPER-COS-MIB::jnxCosIfqQedBytes.501."expedited-forwarding" = Counter64: 0
    JUNIPER-COS-MIB::jnxCosIfqQedBytes.502."best-effort" = Counter64: 1926311
    JUNIPER-COS-MIB::jnxCosIfqQedBytes.502."network-control" = Counter64: 14403219
    JUNIPER-COS-MIB::jnxCosIfqQedBytes.502."assured-forwarding" = Counter64: 0
    JUNIPER-COS-MIB::jnxCosIfqQedBytes.502."expedited-forwarding" = Counter64: 0
    JUNIPER-COS-MIB::jnxCosIfqQedBytes.503."best-effort" = Counter64: 0
    JUNIPER-COS-MIB::jnxCosIfqQedBytes.503."network-control" = Counter64: 0
    JUNIPER-COS-MIB::jnxCosIfqQedBytes.503."assured-forwarding" = Counter64: 0
    JUNIPER-COS-MIB::jnxCosIfqQedBytes.503."expedited-forwarding" = Counter64: 0
    JUNIPER-COS-MIB::jnxCosIfqQedByteRate.501."best-effort" = Counter64: 0
    JUNIPER-COS-MIB::jnxCosIfqQedByteRate.501."network-control" = Counter64: 0
    JUNIPER-COS-MIB::jnxCosIfqQedByteRate.501."assured-forwarding" = Counter64: 0
    JUNIPER-COS-MIB::jnxCosIfqQedByteRate.501."expedited-forwarding" = Counter64: 0
    JUNIPER-COS-MIB::jnxCosIfqQedByteRate.502."best-effort" = Counter64: 0
    JUNIPER-COS-MIB::jnxCosIfqQedByteRate.502."network-control" = Counter64: 0
    JUNIPER-COS-MIB::jnxCosIfqQedByteRate.502."assured-forwarding" = Counter64: 0
    JUNIPER-COS-MIB::jnxCosIfqQedByteRate.502."expedited-forwarding" = Counter64: 0
    <output truncated for brevity>
    
    

     

     

    You have to tell Net-SNMP to preload JUNIPER-COS-MIB (from c:\usr\share\snmp\mibs default MIB directory) to be able to walk  jnxCosIfqStatsTable, hence "-m JUNIPER-COS-MIB" on command line. You can do it in Net-SNMP config file as well.

    HTH

    Regards

    Alex

     



  • 4.  RE: Browsing Juniper MIBs

    Posted 01-15-2011 06:06

    Thank you for all the answers!

     

    I figured out that it was my mistake - if I unpack MIBs into /usr/share/snmp/mibs directory, then e.g. mbrowse loads them appropriately.

     

    The truth is, that as a part of my msc thesis I must write module which retrieves counters of queued packets/bytes in best-effort queues for all interfaces. Both IReasoning MIB browser and MBrowse sees OID: jnxCosQstatQedPkts (.1.3.6.1.4.1.2636.3.15.4.1.3) (it's under the one suggested by conty). It is marked as leaf and it has type counter(64) so it suggests (at least for me) that it is single-value. Apart from this it it obvious that it must contain information for multiple queues for multiple interfaces....

     

    Ok, so when i walk this OID there is:

     

    snmpwalk -m JUNIPER-COS-MIB -v 2c -c private myrouter .1.3.6.1.4.1.2636.3.15.4.1.3
    JUNIPER-COS-MIB::jnxCosQstatQedPkts.151.0 = Counter64: 279809
    JUNIPER-COS-MIB::jnxCosQstatQedPkts.151.1 = Counter64: 0
    JUNIPER-COS-MIB::jnxCosQstatQedPkts.151.2 = Counter64: 0
    JUNIPER-COS-MIB::jnxCosQstatQedPkts.151.3 = Counter64: 0
    JUNIPER-COS-MIB::jnxCosQstatQedPkts.151.4 = Counter64: 0
    JUNIPER-COS-MIB::jnxCosQstatQedPkts.151.5 = Counter64: 0
    JUNIPER-COS-MIB::jnxCosQstatQedPkts.151.6 = Counter64: 0
    JUNIPER-COS-MIB::jnxCosQstatQedPkts.151.7 = Counter64: 0
    JUNIPER-COS-MIB::jnxCosQstatQedPkts.507.0 = Counter64: 874176
    JUNIPER-COS-MIB::jnxCosQstatQedPkts.507.1 = Counter64: 0
    JUNIPER-COS-MIB::jnxCosQstatQedPkts.507.2 = Counter64: 0
    JUNIPER-COS-MIB::jnxCosQstatQedPkts.507.3 = Counter64: 1778836
    JUNIPER-COS-MIB::jnxCosQstatQedPkts.507.4 = Counter64: 0
    JUNIPER-COS-MIB::jnxCosQstatQedPkts.507.5 = Counter64: 0
    JUNIPER-COS-MIB::jnxCosQstatQedPkts.507.6 = Counter64: 0
    JUNIPER-COS-MIB::jnxCosQstatQedPkts.507.7 = Counter64: 0

     

    and values for *.151.0 and *.507.0 are the same as I can retrieve using CLI:

     

     

    lab@187# run show interfaces queue ge-0/0/0    
    Physical interface: ge-0/0/0, Enabled, Physical link is Up
      Interface index: 133, SNMP ifIndex: 151
      Description: MGMT INTERFACE - DO NOT DELETE
    Forwarding classes: 8 supported, 4 in use
    Egress queues: 8 supported, 4 in use
    Queue: 0, Forwarding classes: best-effort 
      Queued:
        Packets              :                279844                     1 pps

     

    lab@187# run show interfaces queue ge-0/0/1    
    Physical interface: ge-0/0/1, Enabled, Physical link is Up
      Interface index: 134, SNMP ifIndex: 507
    Forwarding classes: 8 supported, 4 in use
    Egress queues: 8 supported, 4 in use
    Queue: 0, Forwarding classes: best-effort 
      Queued:
        Packets              :                874176                     0 pps

     

     

     

    But I don't know if there is any "generic" method to retrieve OID numbers for best-effort queued packets for all router's interfaces. (it is something I would put in a documentation for my soft).

     

    Thank you in advance.



  • 5.  RE: Browsing Juniper MIBs
    Best Answer

    Posted 01-18-2011 09:33

    Ok,

     

    the answer is:

     

    .1.3.6.1.4.1.2636.3.15.4.1.3.X.Y

     

    where X is  SNMP interface index and Y is queue index (0 for the best effort queue).

     

    Interface index could be obtained via:

     

     

    # run show interfaces queue ge-0/0/3    
    Physical interface: ge-0/0/3, Enabled, Physical link is Up
      Interface index: 140, SNMP ifIndex: 35
    (...)

     (here ifIndex = 35)

     

    Thanks,

    Piotr

     

     



  • 6.  RE: Browsing Juniper MIBs

    Posted 12-13-2010 10:45

    I use the iReasoning product with no issues - also the Paessler tools work fine.