Support Support Downloads Knowledge Base Juniper Support Portal Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

[EX] How to retrieve interface names mapped to a specific VLAN using SNMP MIB



Article ID: KB30759 KB Last Updated: 10 Mar 2016Version: 1.0
This article shows how to retrieve interface names that are mapped to a specific VLAN using SNMP MIB.
Using SNMP MIB, a user can obtain details of the number of interfaces along with the names that are mapped to a VLAN on EX series.
Example: Use vlan20, and interfaces ge-0/0/39 and ge-0/0/46, which are mapped to that VLAN:

      root@WIRE>   show   vlans                         vlan20
      Name         Tag    Interfaces
      vlan20       20     ge-0/0/39.0*, ge-0/0/46.0*

  1. Use jnxExVlanName to get the index of the specific VLAN:

        root@WIRE> show snmp mib walk jnxExVlanName
        jnxExVlanName.2 = Test
        jnxExVlanName.4 = default
        jnxExVlanName.5 = vlan20     ----> 5 is the index for vlan20
        jnxExVlanName.10 = vt
        jnxExVlanName.11 = wireless
        jnxExVlanName.12 = vlan30

  2. Use jnxExVlanPortStatus to get the number and status of the interface mapped to the VLAN:

        root@WIRE> show snmp mib walk jnxExVlanPortStatus.5
        jnxExVlanPortStatus.5.552 = 3
        jnxExVlanPortStatus.5.559 = 3

  3.   Use dot1dBasePortIfIndex to obtain the ifindex value:

        root@WIRE> show snmp mib get dot1dBasePortIfIndex.552  
        dot1dBasePortIfIndex.552 = 589     ----> index for interface ge-0/0/39

  4. Use ifDescr to provide the interface name for that specific index:

          root@WIRE> show snmp mib get ifDescr.589
        ifDescr.589 = ge-0/0/39.0

Retrieve information of the other interface mapped to the VLAN:

     root@WIRE> show snmp mib get dot1dBasePortIfIndex.559
     dot1dBasePortIfIndex.559 = 596

     root@WIRE> show snmp mib get ifDescr.596
     ifDescr.596 = ge-0/0/46.0

Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search