Change Community for SNMP (CHGCOMSNMP)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

The Change Community for SNMP (CHGCOMSNMP) command changes an SNMP community profile in the SNMP agent community list. An SNMP agent uses a community profile to determine whether or not to honor a request sent by an SNMP manager. The community profile consists of a community name, an object access specification, and a list of the SNMP managers that are part of the community. The community name combined with the ASCII community (ASCIICOM) parameter defines a community.

Restrictions:

Top

Parameters

Keyword Description Choices Notes
COM Community name Character value Required, Key, Positional 1
ASCIICOM Translate community name *YES, *NO Optional, Key
INTNETADR Manager internet address Single values: *SAME, *ANY
Other values (up to 300 repetitions): Element list
Optional
Element 1: Manager internet address Character value
Element 2: Manager internet address mask Character value
OBJACC Object access *SAME, *SNMPATR, *READ, *WRITE, *NONE Optional
LOGSET Log set requests *SAME, *SNMPATR, *YES, *NO Optional
LOGGET Log get requests *SAME, *SNMPATR, *YES, *NO Optional
Top

Community name (COM)

Specifies the name of the SNMP community being changed. The community must already exist in the SNMP agent community list. You can define an SNMP community using the Add Community for SNMP (ADDCOMSNMP) command.

community-name
Specify the name of the SNMP community being changed. The name may contain characters that cannot be displayed.
Top

Translate community name (ASCIICOM)

Specifies whether the community name is translated to ASCII characters before it is compared with the community name specified in a request from an SNMP manager. This parameter is used in combination with the community name to determine the community to be changed.

*YES
The community name is translated to ASCII characters before it is compared with a community name specified by an SNMP manager.
*NO
The community name is not translated to ASCII characters before it is compared with a community name specified by an SNMP manager.
Top

Manager internet address (INTNETADR)

The internet addresses and internet address mask of the SNMP managers that are part of this community. The internet address may be an IPv4 or IPv6 address.

Single values

*SAME
The value does not change.
*ANY
Allow any SNMP manager to be part of this community.
Other values (up to 300 repetitions)

Element 1: Manager Internet Address

manager-internet-address
An IPv4 internet address is specified in the form nnn.nnn.nnn.nnn, where nnn is a decimal number ranging from 0 through 255. An IPv4 internet address is not valid if it has a value of all binary ones or all binary zeros for the network identifier (ID) portion or the host ID portion of the address. An IPv6 internet address is specified in the form x:x:x:x:x:x:x:x, where x is a hexadecimal number ranging from 0 through X'FFFF'. "::" may be used once in the IPv6 address to indicate one or more groups of 16 bits of zeros. The "::" may be used to compress leading, imbedded, or trailing zeros in the address. If the internet address is entered from a command line, the address must be enclosed in apostrophes. Up to 300 unique internet addresses may be specified. The same internet address may appear in more than one community profile.

Element 2: IP address mask

manager-internet-address-mask
If the associated manager address is an IPv6 address, then the internet address mask is either an IPv6 address mask (for example, FFFF:FFFF::) or an integer from 0 to 128 specifying the number of IPv6 address prefix bits used to construct an IPv6 address mask. If the manager internet address is an IPv4 address, then internet address mask is either an IPv4 address mask (for example, 255.255.255.0) or an integer from 0 to 32 specifying the number of IPv4 address prefix bits used to construct an IPv4 address mask.
Top

Object access (OBJACC)

Specifies the object access for the community.

*SAME
The value does not change.
*SNMPATR
The object access defined with the Change SNMP Attributes (CHGSNMPA) command is used for this community.
*READ
Allow SNMP managers that are part of this community to read all management information base (MIB) objects. Modification of MIB objects by SNMP managers is not permitted.
*WRITE
Allow SNMP managers that are part of this community to change all MIB objects that can be changed. Specifying *WRITE implies *READ access.
*NONE
Do not allow SNMP managers that are part of this community to access any MIB objects.
Top

Log set requests (LOGSET)

Specifies whether Set requests from SNMP managers in this community are logged in journal QSNMP in library QUSRSYS.

*SAME
The value does not change.
*SNMPATR
The value defined with the Change SNMP Attributes (CHGSNMPA) command is used for this community.
*YES
Set requests are logged.
*NO
Set requests are not logged.
Top

Log get requests (LOGGET)

Specifies whether get requests and get-next requests from SNMP managers in this community are logged in journal QSNMP in library QUSRSYS.

*SAME
The value does not change.
*SNMPATR
The value defined with the Change SNMP Attributes (CHGSNMPA) command is used for this community.
*YES
Get requests and get-next requests are logged.
*NO
Get requests and get-next requests are not logged.
Top

Examples

CHGCOMSNMP   COM(ROCHESTER)  INTNETADR(*ANY)  OBJACC(*READ)

This command changes community ROCHESTER to have an object access of read and to allow any SNMP manager to read the MIB objects on this system. All of the other community values are unchanged.

Example 2

CHGCOMSNMP   COM(PUBLIC)
             INTNETADR(('10.4.120.97' 16)( '9.71.128.4'
             '255.255.255.0') ('192.4.52.1' '255.255.0.0'))

This command changes default community PUBLIC to only allow SNMP packets coming from 10.4.120.97, 9.71.128.4, and 192.4.52.1 to be processed. Note that the first internet mask is equal to 255.255.0.0 mask. All of the other community values are unchanged.

Example 3

CHGCOMSNMP   COM(PRIVATE)
             INTNETADR(('2001:db8::10f' 64)('2001:db8::10e'
             'FFFF:FFFF:FFFF:FFFF::'))

This command changes community PRIVATE to only allow SNMP packets coming from 2001:db8::10f and 2001:db8::10e to be processed. Note that the prefix length of the first internet address is equal to the second colon hexadecimal notation FFFF:FFFF:FFFF:FFFF:: mask. All of the other community values are unchanged.

Top

Error messages

*ESCAPE Messages

TCP4001
Error occurred accessing SNMP configuration information.
TCP4009
Community does not exist.
TCP8050
*IOSYSCFG authority required to use &1.
Top