Technology Overview
Retrieving VLAN Information Using SNMP on an
EX Series Ethernet Switch
Published: 2014-01-10
Copyright © 2014, Juniper Networks, Inc.
Juniper Networks, Inc.
1194 North Mathilda Avenue
Sunnyvale, California 94089
USA
408-745-2000
www.juniper.net
Juniper Networks, Junos, Steel-Belted Radius, NetScreen, and ScreenOS are registered trademarks of Juniper Networks, Inc. in the United
States and other countries. The Juniper Networks Logo, the Junos logo, and JunosE are trademarks of Juniper Networks, Inc. All other
trademarks, service marks, registered trademarks, or registered service marks are the property of their respective owners.
Juniper Networks assumes no responsibility for any inaccuracies in this document. Juniper Networks reserves the right to change, modify,
transfer, or otherwise revise this publication without notice.
Technology Overview Retrieving VLAN Information Using SNMP on an EX Series Ethernet Switch
NCE0055
Copyright © 2014, Juniper Networks, Inc.
All rights reserved.
The information in this document is current as of the date on the title page.
YEAR 2000 NOTICE
Juniper Networks hardware and software products are Year 2000 compliant. Junos OS has no known time-related limitations through the
year 2038. However, the NTP application is known to have some difficulty in the year 2036.
END USER LICENSE AGREEMENT
The Juniper Networks product that is the subject of this technical documentation consists of (or is intended for use with) Juniper Networks
software. Use of such software is subject to the terms and conditions of the End User License Agreement (“EULA”) posted at
http://www.juniper.net/support/eula.html. By downloading, installing or using such software, you agree to the terms and conditions of
that EULA.
ii
Copyright © 2014, Juniper Networks, Inc.
Table of Contents
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
SNMP Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Retrieving VLAN Information Using SNMP on EX Series Ethernet Switches
FAQs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Copyright © 2014, Juniper Networks, Inc.
iii
Retrieving VLAN Information Using SNMP on an EX Series Ethernet Switch
iv
Copyright © 2014, Juniper Networks, Inc.
Introduction
This document describes how to retrieve and interpret VLAN information from an EX
Series Ethernet switch using SNMP.
SNMP Overview
SNMP enables users to monitor network devices from a central location. Many network
management systems (NMS) are based on SNMP, and support for this protocol is a key
feature of most network devices.
®
®
The Juniper Networks Junos operating system supports SNMP on many different Juniper
Networks platforms. The Junos OS includes an onboard SNMP agent that provides remote
management applications with access to detailed information about the devices on the
network.
A typical SNMP implementation contains three components:
•
Managed devices – Such as routers and switches.
•
SNMP agent – Process that resides on a managed device and communicates with the
NMS.
•
NMS – A combination of hardware and software used to monitor and administer the
network; network device that runs SNMP manager software. Also referred to as an
SNMP manager.
The SNMP agent exchanges network management information with the SNMP manager
(NMS). The agent responds to requests for information and actions from the manager.
The SNMP manager collects information about network connectivity, activity, and events
by polling managed devices.
SNMP implementation in the Junos OS uses a master SNMP agent (known as the SNMP
process or snmpd) that resides on the managed device. Various subagents reside on
different modules of the Junos OS as well (such as the Routing Engine), and these
subagents are managed by the snmpd.
Related
Documentation
•
Understanding SNMP Implementation in Junos OS
•
Retrieving VLAN Information Using SNMP on EX Series Ethernet Switches FAQs on
page 1
Retrieving VLAN Information Using SNMP on EX Series Ethernet Switches FAQs
Sample Configuration
The following is the configuration referenced in the FAQs. The configuration was done
on a Juniper Networks EX4200 Series Ethernet Switch. Only configuration relevant to
the FAQs is included in this sample configuration.
user@host>show configuration | display set
Copyright © 2014, Juniper Networks, Inc.
1
Retrieving VLAN Information Using SNMP on an EX Series Ethernet Switch
set
set
set
set
set
set
set
set
set
set
set
set
set
set
set
set
set
set
set
version 11.4D0.1
interfaces ge-0/0/20 unit 0 family inet address 192.1.1.2/16
interfaces ge-0/0/21 unit 0 family ethernet-switching vlan members vlan2
interfaces ge-0/0/22 unit 0 family ethernet-switching vlan members vlan1
interfaces ge-0/0/23 unit 0 family ethernet-switching port-mode trunk
interfaces ge-0/0/23 unit 0 family ethernet-switching vlan members vlan1
interfaces vlan unit 1 family inet6 address 1::1/128
interfaces vlan unit 2 family inet address 192.2.1.1/24
protocols igmp-snooping vlan all
protocols rstp
protocols lldp interface all
protocols lldp-med interface all
ethernet-switching-options storm-control interface all
vlans vlan1 vlan-id 5
vlans vlan1 l3-interface vlan.1
vlans vlan2 vlan-id 600
vlans vlan2 interface ge-0/0/21.0
vlans vlan2 l3-interface vlan.2
poe interface all
How can I retrieve the names of the VLANs configured on an EX Series switch?
Use the jnxExVlanName MIB object to retrieve the names of the VLANs configured on a
switch.
user@host> show snmp mib walk jnxExVlanName
jnxExVlanName.2 = default
jnxExVlanName.4 = vlan1
jnxExVlanName.5 = vlan2
To verify the results displayed in the output of the show snmp mib walk jnxExVlanName
command, issue the show vlans brief command.
user@host> show vlans brief
Name
default
vlan1
Tag
Primary Address
5
Ports
Active/Total
0/20
0/2
1::1/128
Name
vlan2
Tag
600
Primary Address
192.2.1.1/24
Ports
Active/Total
0/1
How can I retrieve the VLAN tag of a VLAN?
Use the jnxExVlanTag MIB object to retrieve the VLAN tag of a VLAN.
The following example shows the output of the jnxExVlanTag MIB object. It displays the
VLAN tags of all the VLANs configured on the switch.
user@host> show snmp mib walk jnxExVlanTag
jnxExVlanTag.2 = 0
jnxExVlanTag.4 = 5
jnxExVlanTag.5 = 600
Use the show snmp mib get jnxExVlanTag.OID command to display the VLAN tag of a
specific VLAN.
2
Copyright © 2014, Juniper Networks, Inc.
The following example shows the output of the jnxExVlanTag MIB object. It displays the
VLAN tag of vlan2.
user@host> show snmp mib get jnxExVlanTag.5
jnxExVlanTag.5 = 600
To verify the results displayed in the output of the show snmp mib get jnxExVlanTag.OID
command, issue the show vlans vlan-name brief command.
user@host> show vlans vlan2 brief
Name
vlan2
Tag
600
Primary Address
192.2.1.1/24
Ports
Active/Total
0/1
How can I retrieve the VLAN ID, the internal index of a VLAN?
Use the jnxExVlanPortGroupInstance MIB object to retrieve the VLAN’s internal index.
The following example shows the output of the jnxExVlanPortGroupInstance MIB object.
It displays the internal index of all the VLANs configured on the switch.
user@host> show snmp mib walk jnxExVlanPortGroupInstance
jnxExVlanPortGroupInstance.2 = 2
jnxExVlanPortGroupInstance.4 = 4
jnxExVlanPortGroupInstance.5 = 5
Use the show snmp mib get jnxExVlanPortGroupInstance.OID command to display the
internal index of a specific VLAN.
The following example shows the output of the jnxExVlanPortGroupInstance MIB object.
It displays the internal index of vlan2.
user@host> show snmp mib get jnxExVlanPortGroupInstance.5
jnxExVlanPortGroupInstance.5 = 5
To verify the results displayed in the output of the show snmp mib get
jnxExVlanPortGroupInstance.OID command, issue the show vlans vlan-name extensive
command.
user@host> show vlans vlan2 extensive
VLAN: vlan2, Created at: Sun Dec 25 23:20:21 2011
802.1Q Tag: 600, Internal index: 5, Admin State: Enabled, Origin: Static
Layer 3 interface: vlan.2 (DOWN)
IPV4 addresses:
192.2.1.1/24(Primary)
Protocol: Port Mode, Mac aging time: 300 seconds
Number of interfaces: Tagged 0 (Active = 0), Untagged 1 (Active = 0)
ge-0/0/21.0, untagged, access
How can I determine the status of a port in a VLAN?
Copyright © 2014, Juniper Networks, Inc.
3
Retrieving VLAN Information Using SNMP on an EX Series Ethernet Switch
Use the jnxExVlanPortStatus MIB object to retrieve the status of the association between
a port and the VLAN. The port status is displayed as an integer. Following are the possible
values:
•
1—autoActive: The port is part of the VLAN because the switch has automatically added
the port.
•
2—allowed: The port has been configured to be part of the VLAN, and is allowed to be
part of the VLAN, if the port meets all other requirements.
•
3—allowedActive: The port has been configured to be part of the VLAN, and is allowed
to be part of the VLAN, if the port meets all other requirements. However, unlike the
case of allowed ports, this port has a device that is participating in the VLAN associated
with the port.
•
4—allowedNotAvail: The port is active on some other VLAN, and is not available
currently. This value applies to devices that do not allow a port to be part of more than
one VLAN at the same time.
•
5—notAssociated: The port is part of a port group that is not associated with the VLAN.
The following example shows the output of the jnxExVlanPortStatus MIB object. It displays
the status of the association between a port and the VLAN.
user@host> show snmp mib walk jnxExVlanPortStatus
jnxExVlanPortStatus.2.513 = 3
jnxExVlanPortStatus.2.514 = 3
jnxExVlanPortStatus.2.515 = 3
jnxExVlanPortStatus.2.516 = 3
jnxExVlanPortStatus.2.517 = 3
jnxExVlanPortStatus.2.518 = 3
jnxExVlanPortStatus.2.519 = 3
jnxExVlanPortStatus.2.520 = 3
jnxExVlanPortStatus.2.521 = 3
jnxExVlanPortStatus.2.522 = 3
jnxExVlanPortStatus.2.523 = 3
jnxExVlanPortStatus.2.524 = 3
jnxExVlanPortStatus.2.525 = 3
jnxExVlanPortStatus.2.526 = 3
jnxExVlanPortStatus.2.527 = 3
jnxExVlanPortStatus.2.528 = 3
jnxExVlanPortStatus.2.529 = 3
jnxExVlanPortStatus.2.530 = 3
jnxExVlanPortStatus.2.531 = 3
jnxExVlanPortStatus.2.532 = 3
jnxExVlanPortStatus.4.535 = 3
jnxExVlanPortStatus.4.536 = 3
jnxExVlanPortStatus.5.534 = 3
To retrieve the status of all ports in a specific VLAN, use the show snmp mib walk
jnxExVlanPortStatus.OID command.
user@host> show snmp mib walk jnxExVlanPortStatus.4
jnxExVlanPortStatus.4.535 = 3
jnxExVlanPortStatus.4.536 = 3
jnxExVlanPortStatus.5.534 = 3
How can I determine if a port associated with a VLAN is tagged or untagged?
4
Copyright © 2014, Juniper Networks, Inc.
Use the jnxExVlanPortTagness MIB object to retrieve information about the port and to
determine if the port is tagged or untagged. The status is displayed as an integer. Following
are the possible values:
•
1—tagged
•
2—untagged
The following example shows the output of the jnxExVlanPortTagness MIB object. It
displays information about the port and whether the port is tagged or untagged.
user@host> show snmp mib walk jnxExVlanPortTagness
jnxExVlanPortTagness.2.513 = 2
jnxExVlanPortTagness.2.514 = 2
jnxExVlanPortTagness.2.515 = 2
jnxExVlanPortTagness.2.516 = 2
jnxExVlanPortTagness.2.517 = 2
jnxExVlanPortTagness.2.518 = 2
jnxExVlanPortTagness.2.519 = 2
jnxExVlanPortTagness.2.520 = 2
jnxExVlanPortTagness.2.521 = 2
jnxExVlanPortTagness.2.522 = 2
jnxExVlanPortTagness.2.523 = 2
jnxExVlanPortTagness.2.524 = 2
jnxExVlanPortTagness.2.525 = 2
jnxExVlanPortTagness.2.526 = 2
jnxExVlanPortTagness.2.527 = 2
jnxExVlanPortTagness.2.528 = 2
jnxExVlanPortTagness.2.529 = 2
jnxExVlanPortTagness.2.530 = 2
jnxExVlanPortTagness.2.531 = 2
jnxExVlanPortTagness.2.532 = 2
jnxExVlanPortTagness.4.535 = 2
jnxExVlanPortTagness.4.536 = 1
jnxExVlanPortTagness.5.534 = 2
To verify the results displayed in the output of the show snmp mib walk
jnxExVlanPortTagness command, issue the show vlans vlan-name detail command.
user@host> show vlans vlan1 detail
VLAN: vlan1, 802.1Q Tag: 5, Admin State: Enabled
Primary IPv6: 1::1/128
Number of interfaces: 2 (Active = 0)
Untagged interfaces: ge-0/0/22.0
Tagged interfaces: ge-0/0/23.0
How can I determine if a port associated with a VLAN is configured as an access port
or a trunk port?
Use the jnxExVlanPortAccessMode MIB object to retrieve the port mode information. The
port mode is displayed as an integer. Following are the possible values:
•
1—access port
•
2—trunk port
Copyright © 2014, Juniper Networks, Inc.
5
Retrieving VLAN Information Using SNMP on an EX Series Ethernet Switch
The following example shows the output of the jnxExVlanPortAccessMode MIB object.
It displays the port information.
user@host> show snmp mib walk jnxExVlanPortAccessMode
jnxExVlanPortAccessMode.2.513 = 1
jnxExVlanPortAccessMode.2.514 = 1
jnxExVlanPortAccessMode.2.515 = 1
jnxExVlanPortAccessMode.2.516 = 1
jnxExVlanPortAccessMode.2.517 = 1
jnxExVlanPortAccessMode.2.518 = 1
jnxExVlanPortAccessMode.2.519 = 1
jnxExVlanPortAccessMode.2.520 = 1
jnxExVlanPortAccessMode.2.521 = 1
jnxExVlanPortAccessMode.2.522 = 1
jnxExVlanPortAccessMode.2.523 = 1
jnxExVlanPortAccessMode.2.524 = 1
jnxExVlanPortAccessMode.2.525 = 1
jnxExVlanPortAccessMode.2.526 = 1
jnxExVlanPortAccessMode.2.527 = 1
jnxExVlanPortAccessMode.2.528 = 1
jnxExVlanPortAccessMode.2.529 = 1
jnxExVlanPortAccessMode.2.530 = 1
jnxExVlanPortAccessMode.2.531 = 1
jnxExVlanPortAccessMode.2.532 = 1
jnxExVlanPortAccessMode.4.535 = 1
jnxExVlanPortAccessMode.4.536 = 2
jnxExVlanPortAccessMode.5.534 = 1
To verify the results displayed in the output of the show snmp mib walk
jnxExVlanPortAccessMode command, issue the show vlans vlan-name extensive command.
user@host> show vlans vlan1 extensive
VLAN: vlan1, Created at: Sun Dec 25 03:01:35 2011
802.1Q Tag: 5, Internal index: 4, Admin State: Enabled, Origin: Static
Layer 3 interface: vlan.1 (DOWN)
IPV6 addresses:
1::1/128(Primary)
fe80::2e21:72ff:fe94:4441/64
Protocol: Port Mode, Mac aging time: 300 seconds
Number of interfaces: Tagged 1 (Active = 0), Untagged 1 (Active = 0)
ge-0/0/23.0, tagged, trunk
ge-0/0/22.0, untagged, access
How can I determine if the routed VLAN interfaces (RVIs) are configured with an IPv4
address or an IPv6 address?
Use the jnxExVlanInterfaceProtocol MIB object to display the protocol configured on the
RVI as shown in this example.
user@host> show snmp mib walk jnxExVlanInterfaceProtocol
jnxExVlanInterfaceProtocol.4 = 2
jnxExVlanInterfaceProtocol.5 = 1
The protocol configured is displayed as an integer. Following are the possible values:
6
•
1—Indicates that the RVI is configured with an IPv4 address.
•
2—Indicates that the RVI is configured with an IPv6 address.
Copyright © 2014, Juniper Networks, Inc.
To verify the results displayed in the output of the show snmp mib walk
jnxExVlanInterfaceProtocol command, issue the show interfaces terse | grep vlan command.
user@host> show interfaces terse | grep vlan
vlan
up
up
vlan.1
up
down inet6
vlan.2
up
down inet
1::1
192.2.1.1/24
How can I retrieve the IP address of an RVI?
Use the jnxExVlanInterfaceIpAddress MIB object to display the IP address of an RVI in
hexadecimal format as shown in this example.
user@host> show snmp mib walk jnxExVlanInterfaceIpAddress
jnxExVlanInterfaceIpAddress.4 = 00 01 00 00 00 00 00 00
01
jnxExVlanInterfaceIpAddress.5 = c0 02 01 01
00 00 00 00
00 00 00
In the preceding sample output, the IP address displayed for the first RVI (00 01 00 00
00 00 00 00 00 00 00 00 00 00 00 01) can be translated into the IPv6 address 1::1,
and the IP address displayed for the second RVI (c0 02 01 01) can be translated into the
IPv4 address 192.2.1.1.
To verify the results displayed in the output of the show snmp mib walk
jnxExVlanInterfaceIpAddress command, issue the show interfaces terse | grep vlan
command.
user@host> show interfaces terse | grep vlan
vlan
up
up
vlan.1
up
down inet6
vlan.2
up
down inet
1::1
192.2.1.1/24
How can I determine the length of the prefix or subnet mask in the IP address configured
on an RVI?
Use the jnxExVlanInterfacePrefixLength MIB object to retrieve the length of the IP address
prefix or subnet mask as shown in this example.
user@host> show snmp mib walk jnxExVlanInterfacePrefixLength
jnxExVlanInterfacePrefixLength.4 = 0
jnxExVlanInterfacePrefixLength.5 = 8
In the preceding sample output, the first line displays the prefix length for the IPv6 address
1::1, and the second line displays the prefix length for the IPv4 address 192.2.1.1. The output
shows the difference between IP address length and subnet mask length. In the sample
output, the first line represents vlan1, which has been configured with the IPv6 address
1::1, and the subnet mask is set to 128. The jnxExVlanInterfacePrefixLength MIB object
returns 0, the difference between the IP address length of the IPv6 address (128) and
the subnet mask (128), and this value is assigned to vlan1. Similarly, 24 is the subnet mask
of the IP address assigned to vlan2 (the second line in the output). The
jnxExVlanInterfacePrefixLength MIB object returns 8, the difference between the IP
address length of the IPv4 address (32) and the subnet mask (24), and this value is
assigned to vlan2.
Copyright © 2014, Juniper Networks, Inc.
7
Retrieving VLAN Information Using SNMP on an EX Series Ethernet Switch
To verify the subnet mask and IP address type of a VLAN, issue the show vlans vlan-name
extensive command.
user@host> show vlans vlan1 extensive
VLAN: vlan1, Created at: Sun Dec 25 03:01:35 2011
802.1Q Tag: 5, Internal index: 4, Admin State: Enabled, Origin: Static
Layer 3 interface: vlan.1 (DOWN)
IPV6 addresses:
1::1/128(Primary)
fe80::2e21:72ff:fe94:4441/64
Protocol: Port Mode, Mac aging time: 300 seconds
Number of interfaces: Tagged 1 (Active = 0), Untagged 1 (Active = 0)
ge-0/0/23.0, tagged, trunk
ge-0/0/22.0, untagged, access
{master:0}
You can also obtain the prefix length from the output displayed.
How can I retrieve the broadcast address of a VLAN?
Use the jnxExVlanInterfaceBroadcastAddress MIB object to retrieve the broadcast address
of a VLAN in hexadecimal format as shown in this example.
user@host> show snmp mib walk jnxExVlanInterfaceBroadcastAddress
jnxExVlanInterfaceBroadcastAddress.4
jnxExVlanInterfaceBroadcastAddress.5 = c0 02 01 ff
In the preceding sample output, the second line shows the broadcast address c0 02 01
ff, which translates to 192.2.1.255 for the IPv4 address 192.2.1.1.
How can I retrieve the name of an RVI?
Use the jnxExVlanInterfaceDescription MIB object to retrieve the name of an RVI as shown
in this example.
user@host> show snmp mib walk jnxExVlanInterfaceDescription
jnxExVlanInterfaceDescription.4 = vlan.1
jnxExVlanInterfaceDescription.5 = vlan.2
How can I retrieve the interface index (ifIndex) of an RVI?
Use the jnxExVlanSnmpIfIndex MIB object to retrieve the interface index (ifIndex) of an
RVI as shown in this example.
user@host> show snmp mib walk jnxExVlanSnmpIfIndex
jnxExVlanSnmpIfIndex.4 = 658
jnxExVlanSnmpIfIndex.5 = 659
To verify the results displayed in the output of the show snmp mib walk
jnxExVlanSnmpIfIndex command, issue the show interfaces vlan command.
user@host> show interfaces vlan
Physical interface: vlan, Enabled, Physical link is Up
Interface index: 128, SNMP ifIndex: 502
Type: VLAN, Link-level type: VLAN, MTU: 1518, Speed: 1000mbps
Device flags
: Present Running
Link type
: Full-Duplex
Link flags
: None
Current address: 2c:21:72:94:44:41, Hardware address: 2c:21:72:94:44:41
8
Copyright © 2014, Juniper Networks, Inc.
Last flapped
: Never
Input packets : 0
Output packets: 6
Logical interface vlan.1 (Index 89) (SNMP ifIndex 658)
Flags: Link-Layer-Down SNMP-Traps 0x0 Encapsulation: ENET2
Input packets : 0
Output packets: 4
Protocol inet6, MTU: 1500
Flags: Is-Primary
Addresses, Flags: Is-Default Is-Primary
Local: 1::1
Addresses, Flags: Is-Preferred
Destination: fe80::/64, Local: fe80::2e21:72ff:fe94:4441
Logical interface vlan.2 (Index 90) (SNMP ifIndex 659)
Flags: Link-Layer-Down SNMP-Traps 0x0 Encapsulation: ENET2
Input packets : 0
Output packets: 3
Protocol inet, MTU: 1500
Flags: None
Addresses, Flags: Dest-route-down Is-Preferred Is-Primary
Destination: 192.2.1/24, Local: 192.2.1.1, Broadcast: 192.2.1.255
How can I determine the administrative status (Admin Status) of an RVI?
Use the jnxExVlanInterfaceAdminStatus MIB object to retrieve the administrative status
(Admin Status) of a VLAN as shown in this example. The status is displayed as an integer,
where 1 indicates that the interface is up and ready to pass packets, and 2 indicates that
the interface is down and cannot pass packets.
user@host> show snmp mib walk jnxExVlanInterfaceAdminStatus
jnxExVlanInterfaceAdminStatus.4 = 1
jnxExVlanInterfaceAdminStatus.5 = 1
In the preceding sample output, the Admin Status for both the VLAN interfaces is 1,
indicating that they are up and ready to pass packets.
To verify the results displayed in the output of the show snmp mib walk
jnxExVlanInterfaceAdminStatus command, issue the show interfaces terse | grep vlan
command.
user@host> show interfaces terse | grep vlan
vlan
up
up
vlan.1
up
down inet6
vlan.2
up
down inet
1::1
192.2.1.1/24
In the preceding sample output, the third column indicates the administrative status of
the RVI.
How can I determine the operational status (Oper Status) of a VLAN?
Use the jnxExVlanInterfaceOperStatus MIB object to retrieve the operational status (Oper
Status) of a VLAN as shown in this example. The status is displayed as an integer, where
1 indicates that the interface is up and ready to pass packets, and 2 indicates that the
interface is down and cannot pass packets.
user@host> show snmp mib walk jnxExVlanInterfaceOperStatus
Copyright © 2014, Juniper Networks, Inc.
9
Retrieving VLAN Information Using SNMP on an EX Series Ethernet Switch
jnxExVlanInterfaceOperStatus.4 = 2
jnxExVlanInterfaceOperStatus.5 = 2
In the preceding sample output, the operational status for both VLAN interfaces is 2,
indicating that they are down and cannot pass packets.
To verify the results displayed in the output of the show snmp mib walk
jnxExVlanInterfaceOperStatus command, issue the show interfaces terse | grep vlan
command.
user@host> show interfaces terse | grep vlan
vlan
up
up
vlan.1
up
down inet6
vlan.2
up
down inet
1::1
192.2.1.1/24
In the preceding sample output, the third column indicates the operational status of the
RVI.
How can I determine if a VLAN is created dynamically or statically?
Use the jnxExVlanType MIB object to retrieve the type of a VLAN as shown in this example.
A value of 1 indicates static VLAN and 2 indicates dynamic VLAN.
user@host> show snmp mib walk jnxExVlanType
jnxExVlanType.2 = 1
jnxExVlanType.4 = 1
In this example, the value displayed is 1, because both VLANs were created statically.
To verify the results displayed in the output of the show snmp mib walk jnxExVlanType
command, issue the show vlans vlan-name extensive command.
user@host> show vlans vlan1 extensive
VLAN: vlan1, Created at: Sun Dec 25 03:01:35 2011
802.1Q Tag: 5, Internal index: 4, Admin State: Enabled, Origin: Static
Layer 3 interface: vlan.1 (DOWN)
IPV6 addresses:
1::1/128(Primary)
fe80::2e21:72ff:fe94:4441/64
Protocol: Port Mode, Mac aging time: 300 seconds
Number of interfaces: Tagged 1 (Active = 0), Untagged 1 (Active = 0)
ge-0/0/23.0, tagged, trunk
ge-0/0/22.0, untagged, access
How do I retrieve the MAC addresses added or learned over a VLAN?
Use the jnxVlanMacAddress MIB object to retrieve the MAC addresses added or learned
over a VLAN.
user@host> show snmp mib walk jnxVlanMacAddress
jnxVlanMacAddress.1 = 2c 21 72 94 44 41
jnxVlanMacAddress.2 = 2c 21 72 94 44 41
To verify the results displayed in the output of the show snmp mib walk jnxVlanMacAddress
command, issue the show ethernet-switching mac-learning-log command.
user@host> show ethernet-switching mac-learning-log
Sun Dec 25 23:53:36 2011 vlan_name vlan1 mac 2c:21:72:94:44:41 was added
Sun Dec 25 23:53:36 2011 vlan_name vlan2 mac 2c:21:72:94:44:41 was added
10
Copyright © 2014, Juniper Networks, Inc.
Related
Documentation
•
SNMP Overview on page 1
Copyright © 2014, Juniper Networks, Inc.
11
Retrieving VLAN Information Using SNMP on an EX Series Ethernet Switch
12
Copyright © 2014, Juniper Networks, Inc.