Configuring SNMPv1 or v2c settings by using the command line

Enable SNMP and specify main connection and community details.

About this task

The v1 and v2c versions of SNMP rely on a password phrase that is known as a community. The name of the community accompanies SNMP requests, and is used to determine whether the request can be fulfilled or not.

Procedure

  1. Connect to the IBM® MQ Appliance as described in Command line access. Log in as an administrative user.
  2. Type config to enter global configuration mode.
  3. Type snmp to enter SNMP configuration mode.
  4. Enable SNMP by entering the following command:
    admin-state enabled
  5. Specify the IP address of the local interface on which the SNMP service listens for SNMP requests by entering the following command:
    ip-address local_IP_address
    Where local_IP_address is a local IP address. Specify 0.0.0.0 to listen on all appliance interfaces.
  6. Specify the port that is listened on by entering the following command:
    port port_number
    Where port_number is the port listened on. The port is set to 161 by default.
  7. Enter the following command to specify a community:
    community communityName access-level [ip_address] 
    Where:
    communityName

    Specifies the name of the community.

    access-level
    Set access-level to read-only to specify that SNMP managers are restricted to SNMP get operations, which means that these managers can read, but cannot change management information base (MIB) values.
    ip_address

    Optionally, specify an IP address to restrict access to the SNMP manager in the named community with the specified IP address. By default, any SNMP manager that belongs to the named community can make requests.

What to do next

Specify whether default trap events are enabled.