Go to main content

Oracle® ILOM Protocol Management Reference SNMP and IPMI Firmware Release 4.0.x

Exit Print View

Updated: August 2017

SNMP Command-Line Syntax Examples

In some network environments, you are required to specify the SNMP version, community name, hostname, and default port when issuing SNMP commands. For example, to request the value of the object identifier (OID) sysDescr.0 in an IPv4 environment, you might type the following:

%snmpget -v2c -c public sysDescr.0

However, it is possible to configure your network environment such that most command-line arguments are not necessary. For example, for SNMP v1 or v2c, if you set default values for the SNMP version, community name, and default port, the following syntax is considered valid:

%snmpget SNMP_agent sysDescr.0

Throughout this guide, SNMP_agent refers to the hostname or IP address of the system you are querying.

Note -  If you query a device using IPv6 addressing, you must use the following syntax: udp6:[IPv6 address] If the following message appears in response to the query: getaddrinfo: node name or service name not known, try adding -YdefaultPort=<port_number> to the SNMP command line arguments.

In addition, the examples in this guide omit most command-line arguments. To configure your network so that most command-line arguments are not necessary, see the following procedure: