6.7

Table Of Contents
By default, the embedded SNMP agent listens on UDP port 161 for polling requests from management
systems. You can use the esxcli system snmp set command with the --port option to configure an
alternative port. To avoid conflicting with other services, use a UDP port that is not defined
in /etc/services.
If you run ESXCLI commands through vCLI, you must supply connection options that specify the target
host and login credentials. If you use ESXCLI commands directly on a host using the ESXi Shell, you can
use the commands as given without specifying connection options. For more information on connection
options see vSphere Command-Line Interface Concepts and Examples.
Prerequisites
Configure the ESXi SNMP agent by using the ESXCLI commands. See Getting Started with vSphere
Command-Line Interfaces for more information on how to use ESXCLI.
Procedure
1 Run the esxcli system snmp set command with the --port option to configure the port.
For example, run the following command:
esxcli system snmp set --port port
Here, port is the port the SNMP agent uses to listen for polling requests.
Note The port you specify must not be already in use by other services. Use IP addresses from the
dynamic range, port 49152 and up.
2 (Optional) If the ESXi SNMP agent is not enabled, run the following command:
esxcli system snmp set --enable true
Configure ESXi for SNMPv1 and SNMPv2c
When you configure the ESXi SNMP agent for SNMPv1 and SNMPv2c, the agent supports sending
notifications and receiving GET requests.
In SNMPv1 and SNMPv2c, authentication is performed by using community strings. Community strings
are namespaces which contain one or more managed objects. This form of authentication does not
secure the communication between the SNMP agent and the management system. To secure the SNMP
communication in your environment, use SNMPv3.
Procedure
1 Configure SNMP Communities
To enable the ESXi SNMP agent to send and receive SNMP v1 and v2c messages, you must
configure at least one community for the agent.
vSphere Monitoring and Performance
VMware, Inc. 183