In the last post here, I provided some basic information on SNMP and also shared which networking MIB modules are supported in vSphere 5.1. Before I describe how to use these MIB modules, there is one correction I would like make to the last post. I had mentioned that network related Trap is not supported, but that is not correct. SNMP agent on the host does send SNMP Trap when a physical link goes UP or DOWN. The Trap is like an interrupt. Instead of polling the values of the different network parameters, specific trap tells the user which network parameter needs attention.
Let’s take a look how you can use Networking MIBs to monitor virtual switch parameters.
First, I will describe an example deployment that we will use to demonstrate virtual switch parameters monitoring through the MIBs. As shown in the diagram below, a host has the following components
– Three virtual switches – VSS1, VDS1, and VDS2
– Four Uplinks – Two connected to VDS1 and two other to VDS2
– VDS1 is configured with three port groups with VLANs 1775, 1815 and 1975
– VDS2 is configured with two port groups with VLANs 2000 and 3010
– Multiple vmkernel interfaces – Management, NFS, vMotion, VXLAN (not shown in the diagram)
A MIB browser application is installed on a PC connected to the same network. There are many MIB browsers available for free download. In my setup, I have deployed Manage engines MIB browser. However, based on the browser you are familiar with or have access to, you can use any browser tool. For those who are command line – linux/unix type users, “snmpwalk” can be used to retrieve virtual switch information. In this post though, I will only show the browser method to retrieve information.
The screen shot below shows the host network configuration in vCenter Server. You will see three virtual switches – Cluster01-VLANS-VDS, Infra-VDS and vSwitch0.
After looking at the example deployment details, let’s find out how to enable SNMP and how to access MIB parameters using the MIB browser.
Enabling SNMP on a Host
The following commands are used to enable SNMP on the host bk09-h380-05:
esxcli system snmp set –communities public
esxcli system snmp set –targets bk09-h380-05.pml.local@161/public
esxcli system snmp set –enable true
Browsing Networking MIBs using a MIB Browser
After enabling the SNMP agent on the host, it is time to find out what are the properties/capabilities of that particular agent. Please make sure that SNMPv2-MIB is loaded in to your browser as well as the host name and community string “public” is entered as shown in the screen below. Once you select “system” in the left panel under the SNMPv2-MIB and the click “Get” you will see the following properties of the host:
– VMware ESXi 5.1.0 build-799733 VMware, Inc.x86_64 as SysDescr
– bk09-h380-05.pml.local as SysName
To get more information about the MIBs supported by this agent select the “sysORDescr” field on the left panel under SNMP-v2-MIB and then click “Get”. As shown in the screen below, you will see the supported MIB list.
After you find out the list of MIBs supported, you have to make sure that those MIBs are loaded in to your MIB browser. In the left panel of the above screen you will see the currently loaded MIBs in my browser tool. Please make sure the appropriate MIBs are loaded before you go and try to find out more information about the virtual switch parameters.
Let’s now take a look at some screen shots that will demonstrate how you can get information about the different network interfaces on the host by probing IF-MIB. Also, how you can get stats on the number of packets through these interfaces?
We will focus on the IF-MIB and the IEEE802.1-Q-BRIDGE-MIB to show the examples.
How to get Host network Interface information using IF-MIB?
How to get MAC address information using IF-MIB?
How to get Packet counter information using IF-MIB?
How to get VLAN information using IEEE802.1-Q-BRIDGE-MIB?
There are lot more parameters you can monitor using the supported networking MIBs. Make use of this capability and centrally monitor your virtual switches network using a familiar and industry standard tool. As usual, I would love to hear your comments and any feedback.
Get notification of these blogs postings and more VMware Networking information by following me on Twitter: @VMWNetworking