Ad Widget

Collapse

OID Mikrotik

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • analaura
    Junior Member
    • Oct 2011
    • 14

    #1

    OID Mikrotik

    I need to get an OID eth1 mikrotik

    For example i make:


    1.)

    snmpwalk -v1 -cMYCOMMUNITY (IP-MIKROTIK)

    i want ifName

    IF-MIB::ifName.1 = STRING: ether12
    IF-MIB::ifName.2 = STRING: ether13
    IF-MIB::ifName.3 = STRING: ether11
    IF-MIB::ifName.4 = STRING: ether06
    IF-MIB::ifName.5 = STRING: ether07
    IF-MIB::ifName.6 = STRING: ether08
    IF-MIB::ifName.7 = STRING: ether09
    IF-MIB::ifName.8 = STRING: ether10
    IF-MIB::ifName.9 = STRING: ether01
    IF-MIB::ifName.10 = STRING: ether02
    IF-MIB::ifName.11 = STRING: ether03
    IF-MIB::ifName.12 = STRING: ether04
    IF-MIB::ifName.13 = STRING: ether05

    Now i am want

    ifInOctets.9 and ifOutOctets.9

    2.)
    snmpwalk -v1 -cMYCOMMUNITY (IP-MIKROTIK) ifInOctets.9 -On

    say:

    .1.3.6.1.2.1.2.2.1.10.9 = Counter32: 2369128073


    .1.3.6.1.2.1.2.2.1.10.9 is the oid mikrotik? that is wrong?


    Best Wishes
  • LeoCombes
    Member
    • Mar 2011
    • 32

    #2
    snmpwalk -v1 -c public 10.1.2.2 .1.3.6.1.2.1.2.2.1.10 -On

    OR

    snmpwalk -v1 -c public 10.1.2.2 ifInOctets -On

    ...gets all table data

    If you're looking index 9 of the table you must use snmpget:

    snmpget -v1 -c public 10.1.2.2 .1.3.6.1.2.1.2.2.1.10.9 -On

    OR

    snmpget -v1 -c public 10.1.2.2 ifInOctets.9 -On

    Comment

    • analaura
      Junior Member
      • Oct 2011
      • 14

      #3
      do not graphic.

      Comment

      • analaura
        Junior Member
        • Oct 2011
        • 14

        #4
        if i write

        snmpwalk -v1 -c (COMUNITY) X.X.X.X .1.3.6.1.2.1.2.2.1.10.9.ifInOctets.9 -On

        .1.3.6.1.2.1.2.2.1.10.9.ifInOctets.9: Unknown Object Identifier (Sub-id not found: ifIndex -> ifInOctets.9)


        Because it fails?

        Comment

        • LeoCombes
          Member
          • Mar 2011
          • 32

          #5
          .1.3.6.1.2.1.2.2.1.10.9.ifInOctets.9 => use snmpget

          .1.3.6.1.2.1.2.2.1.10.9.ifInOctets => use snmpwalk

          Comment

          • analaura
            Junior Member
            • Oct 2011
            • 14

            #6
            is same if i write

            snmpget -v1 -c (COMUNITY) X.X.X.X .1.3.6.1.2.1.2.2.1.10.9.ifInOctets.9 -On

            say:

            .1.3.6.1.2.1.2.2.1.10.9.ifInOctets.9: Unknown Object Identifier (Sub-id not found: ifIndex -> ifInOctets.9)

            thk for the advance

            Comment

            • LeoCombes
              Member
              • Mar 2011
              • 32

              #7
              Sorry, I answer incorrectly the last time...

              .1.3.6.1.2.1.2.2.1.10

              =

              .iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifInOctets

              =

              .1.3.6.1.2.1.2.2.1.10.ifInOctets

              .1 = .iso
              .1.3 = .iso.org
              .1.3.6 = .iso.org.dod
              and continue...

              ifInOctets is a table which contains all interfaces.

              .1.3.6.1.2.1.2.2.1.10 = table of interfaces, use snmpwalk to read all interfaces values.

              .1.3.6.1.2.1.2.2.1.10.9 = value of interface 9, use snmpget to read this value.

              snmpget -v1 -c (COMUNITY) X.X.X.X .1.3.6.1.2.1.2.2.1.10.9.ifInOctets.9 -On is a mistake, because repeated twice interfaces table!

              use:
              snmpget -v1 -c public 10.1.2.2 .1.3.6.1.2.1.2.2.1.10.9 -On

              If you continue getting errors, check that your mktk has an interface "9".

              Comment

              Working...