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:"" -op:""

  • Get Vlan No and Vlan Name

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

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

  • Get MAC Address

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

    snmpwalk -r:"switchName" -v:2 -t:10 -c:"*******" -os:"1.0.8802." -op:"1.0.8802."

  • 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.

  • 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, 2021 at 18:41
  • I have never seen an snmpwalk command with -os: and -op: options. What do they do?
    – David42
    Apr 13, 2021 at 18:09

1 Answer 1

  • 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 (jnxExVlanPortStatus)
  • translate between dot1dBasePortIfIndex and IfIndex using (dot1dBase)
  • translate between IfIndex and Interface name as you discussed using

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 and acknowledge you have read our privacy policy.

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