5

Below are the following commands I used to get the specific data that I need.

  • Get Port Id and Interface

    snmpwalk -r:"switchName" -v:2 -t:10 -c:"*******" -os:"1.3.6.1.2.1.2.2.1.2" -op:"1.3.6.1.2.1.2.2.1.3"

  • Get Vlan No and Vlan Name

    snmpwalk -r:"switchName" -v:2 -t:10 -c:"*******" -os:"1.3.6.1.4.1.2636.3.40.1.5.1.5.1.2" -op:"1.3.6.1.4.1.2636.3.40.1.5.1.5.1.3"

    snmpwalk -r:"switchName" -v:2 -t:10 -c:"*******" -os:"1.3.6.1.4.1.2636.3.40.1.5.1.5.1.5" -op:"1.3.6.1.4.1.2636.3.40.1.5.1.5.1.6"

  • Get MAC Address

    snmpwalk -r:"switchName" -v:2 -t:10 -c:"*******" -os:"1.3.6.1.2.1.2.2.1.2" -op:"1.3.6.1.2.1.2.2.1.3"

    snmpwalk -r:"switchName" -v:2 -t:10 -c:"*******" -os:"1.0.8802.1.1.2.1.4.1.1.7" -op:"1.0.8802.1.1.2.1.4.1.1.8"

  • Get Port Id and Vlan No / Interface And Vlan No

    ??????????????????

Do you guys know what command/oid will I used to get the following vlan no per interface? kindly also verify OID that I used.

Thank you in advance.

2
  • 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 can post and accept your own answer.
    – Ron Maupin
    Jan 5 at 18:41
  • I have never seen an snmpwalk command with -os: and -op: options. What do they do?
    – David42
    Apr 13 at 18:09
3
  • find the vlan number as you discussed.
  • after you find the vlan number, you can find the association between Port's dot1dBasePortIfIndex number and VLAN number by using 1.3.6.1.4.1.2636.3.40.1.5.1.7.1.3 (jnxExVlanPortStatus)
  • translate between dot1dBasePortIfIndex and IfIndex using 1.3.6.1.2.1.17.1.4.1.1 (dot1dBase)
  • translate between IfIndex and Interface name as you discussed using 1.3.6.1.2.1.2.2.1.2

My version of snmpwalk has very different command structure, but hopefully this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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