Aller au contenu

CHGCOMSNMP

Modifier communauté pour SNMP

Change Community for SNMP

En bref

La commande Modification de communauté SNMP (CHGCOMSNMP) modifie un profil de communauté SNMP dans la liste des communautés de l'agent SNMP. The Change Community for SNMP (CHGCOMSNMP) command changes an SNMP community profile in the SNMP agent community list.

CHGCOMSNMP se lit CHG (Modifier) + COMSNMP. Sur IBM i, le nom d'une commande associe presque toujours un verbe et un objet.

Syntaxe minimale

CHGCOMSNMP COM(…)

Paramètres

  • COM Nom de communauté Community name obligatoire
  • ASCIICOM Traduire le nom de communauté Translate community name
  • INTNETADR Adresse Internet du gestionnaire Manager internet address
  • OBJACC Accès aux objets Object access
  • LOGSET Consigner les demandes set Log set requests
  • LOGGET Consigner les demandes get Log get requests

Astuce : dans une session 5250, tapez CHGCOMSNMP puis F4 pour l'invite de saisie, et F1 sur un paramètre pour son aide.

Aide IBM i de la commande

Texte du F1, IBM i 7.5 en français (bibliothèque QSYS)

Où s'exécute : Tous les environnements (*ALL)
Compatible multitâche : Non

La commande Modification de communauté SNMP (CHGCOMSNMP) modifie un profil de communauté SNMP dans la liste des communautés de l'agent SNMP. Un agent SNMP utilise un profil de communauté pour déterminer s'il doit honorer ou non une demande envoyée par un gestionnaire SNMP. Le profil de communauté se compose d'un nom de communauté, d'une spécification d'accès aux objets et d'une liste des gestionnaires SNMP qui font partie de la communauté. Le nom de communauté combiné au paramètre de communauté ASCII (ASCIICOM) définit une communauté. 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:

  • Vous devez posséder le droit spécial de configuration du système d'entrée-sortie (*IOSYSCFG) pour utiliser cette commande. You must have input/output system configuration (*IOSYSCFG) special authority to use this command.

Paramètres

Mot-clé Description Valeurs possibles Remarques
COM Nom de communautéCommunity name Valeur caractère Obligatoire, clé, positionnel 1
ASCIICOM Traduire le nom de communautéTranslate community name *YES, *NO Facultatif, clé
INTNETADR Adresse Internet du gestionnaireManager internet address Valeurs uniques: *SAME, *ANY
Autres valeurs (jusqu'à 300 répétitions): Liste d'éléments
Facultatif
Élément 1: Manager internet address Valeur caractère
Élément 2: Manager internet address mask Valeur caractère
OBJACC Accès aux objetsObject access *SAME, *SNMPATR, *READ, *WRITE, *NONE Facultatif
LOGSET Consigner les demandes setLog set requests *SAME, *SNMPATR, *YES, *NO Facultatif
LOGGET Consigner les demandes getLog get requests *SAME, *SNMPATR, *YES, *NO Facultatif

Nom de communauté (COM)Community name (COM)

Indique le nom de la communauté SNMP à modifier. La communauté doit déjà exister dans la liste des communautés de l'agent SNMP. Vous pouvez définir une communauté SNMP avec la commande Ajout de communauté SNMP (ADDCOMSNMP). 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
Indiquez le nom de la communauté SNMP à modifier. Le nom peut contenir des caractères qui ne peuvent pas être affichés. Specify the name of the SNMP community being changed. The name may contain characters that cannot be displayed.

Traduire le nom de communauté (ASCIICOM)Translate community name (ASCIICOM)

Indique si le nom de communauté est traduit en caractères ASCII avant d'être comparé au nom de communauté indiqué dans une demande d'un gestionnaire SNMP. Ce paramètre est utilisé avec le nom de communauté pour déterminer la communauté à modifier. 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
Le nom de communauté est traduit en caractères ASCII avant d'être comparé à un nom de communauté indiqué par un gestionnaire SNMP. The community name is translated to ASCII characters before it is compared with a community name specified by an SNMP manager.
*NO
Le nom de communauté n'est pas traduit en caractères ASCII avant d'être comparé à un nom de communauté indiqué par un gestionnaire SNMP. The community name is not translated to ASCII characters before it is compared with a community name specified by an SNMP manager.

Adresse Internet du gestionnaire (INTNETADR)Manager internet address (INTNETADR)

Les adresses Internet et le masque d'adresse Internet des gestionnaires SNMP qui font partie de cette communauté. L'adresse Internet peut être une adresse IPv4 ou IPv6. 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.

Valeurs uniques

*SAME
La valeur ne change pas. The value does not change.
*ANY
Autorise n'importe quel gestionnaire SNMP à faire partie de cette communauté. Allow any SNMP manager to be part of this community.
Autres valeurs (jusqu'à 300 répétitions)

Élément 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.

Élément 2: IP address mask

manager-internet-address-mask
Si l'adresse du gestionnaire associé est une adresse IPv6, le masque d'adresse Internet est soit un masque d'adresse IPv6 (par exemple FFFF:FFFF::), soit un entier de 0 à 128 indiquant le nombre de bits de préfixe d'adresse IPv6 utilisés pour construire un masque d'adresse IPv6. Si l'adresse Internet du gestionnaire est une adresse IPv4, le masque d'adresse Internet est soit un masque d'adresse IPv4 (par exemple 255.255.255.0), soit un entier de 0 à 32 indiquant le nombre de bits de préfixe d'adresse IPv4 utilisés pour construire un masque d'adresse IPv4. 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.

Accès aux objets (OBJACC)Object access (OBJACC)

Indique l'accès aux objets pour la communauté. Specifies the object access for the community.

*SAME
La valeur ne change pas. The value does not change.
*SNMPATR
L'accès aux objets défini par la commande Modifier les attributs SNMP (CHGSNMPA) est utilisé pour cette communauté. The object access defined with the Change SNMP Attributes (CHGSNMPA) command is used for this community.
*READ
Autorise les gestionnaires SNMP de cette communauté à lire tous les objets de la base d'informations de gestion (MIB). La modification des objets MIB par les gestionnaires SNMP n'est pas autorisée. 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
Autorise les gestionnaires SNMP de cette communauté à modifier tous les objets MIB modifiables. Indiquer *WRITE implique l'accès *READ. Allow SNMP managers that are part of this community to change all MIB objects that can be changed. Specifying *WRITE implies *READ access.
*NONE
N'autorise pas les gestionnaires SNMP de cette communauté à accéder à un objet MIB quelconque. Do not allow SNMP managers that are part of this community to access any MIB objects.

Consigner les demandes set (LOGSET)Log set requests (LOGSET)

Indique si les demandes Set des gestionnaires SNMP de cette communauté sont consignées dans le journal QSNMP de la bibliothèque QUSRSYS. Specifies whether Set requests from SNMP managers in this community are logged in journal QSNMP in library QUSRSYS.

*SAME
La valeur ne change pas. The value does not change.
*SNMPATR
La valeur définie par la commande Modifier les attributs SNMP (CHGSNMPA) est utilisée pour cette communauté. The value defined with the Change SNMP Attributes (CHGSNMPA) command is used for this community.
*YES
Les demandes set sont consignées. Set requests are logged.
*NO
Les demandes set ne sont pas consignées. Set requests are not logged.

Consigner les demandes get (LOGGET)Log get requests (LOGGET)

Indique si les demandes get et get-next des gestionnaires SNMP de cette communauté sont consignées dans le journal QSNMP de la bibliothèque QUSRSYS. Specifies whether get requests and get-next requests from SNMP managers in this community are logged in journal QSNMP in library QUSRSYS.

*SAME
La valeur ne change pas. The value does not change.
*SNMPATR
La valeur définie par la commande Modifier les attributs SNMP (CHGSNMPA) est utilisée pour cette communauté. The value defined with the Change SNMP Attributes (CHGSNMPA) command is used for this community.
*YES
Les demandes get et get-next sont consignées. Get requests and get-next requests are logged.
*NO
Les demandes get et get-next ne sont pas consignées. Get requests and get-next requests are not logged.

Exemples

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

Cette commande modifie la communauté ROCHESTER pour lui donner un accès aux objets en lecture et autoriser tout gestionnaire SNMP à lire les objets MIB de ce système. Toutes les autres valeurs de la communauté restent inchangées. 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.

Exemple 2Example 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'))

Cette commande modifie la communauté par défaut PUBLIC pour n'autoriser le traitement que des paquets SNMP provenant de 10.4.120.97, 9.71.128.4 et 192.4.52.1. Notez que le premier masque Internet est égal au masque 255.255.0.0. Toutes les autres valeurs de la communauté restent inchangées. 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.

Exemple 3Example 3

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

Cette commande modifie la communauté PRIVATE pour n'autoriser le traitement que des paquets SNMP provenant de 2001:db8::10f et 2001:db8::10e. Notez que la longueur du préfixe de la première adresse Internet est égale au masque FFFF:FFFF:FFFF:FFFF:: en notation hexadécimale à deux-points. Toutes les autres valeurs de la communauté restent inchangées. 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.

Messages d'erreur

Messages *ESCAPE *ESCAPE Messages

TCP4001
Une erreur s'est produite lors de l'accès aux informations de configuration SNMP. Error occurred accessing SNMP configuration information.
TCP4009
La communauté n'existe pas. Community does not exist.
TCP8050
Le droit *IOSYSCFG est requis pour utiliser &1. *IOSYSCFG authority required to use &1.

© Copyright IBM Corp. Texte d'aide reproduit à des fins de formation.