2.8.1 IPv6 transport and trap destination settings
This section describes the settings for using IPv6 transport and IPv6 trap destinations.
Procedure
-
If SNMP Agent is running, execute the command /opt/CM2/ESA/bin/snmpstop while logged on as a superuser.
This stops SNMP Agent.
-
Specify the -ip_proto argument using the startup options environment variable SNMP_MASTER_OPTIONS in the environment variable definition file SnmpMaster.
By default, the -ip_proto argument is not defined in the environment variable definition file SnmpMaster when SNMP is installed. For details about the -ip_proto argument, see snmpdm in Chapter 5. Commands and Processes. The following example shows the settings to make the SNMP manager and SNMP Agent use IPv6 transport only.
SNMP_MASTER_OPTIONS="-ip_proto ipv6 -tcplocal -aperror -apwarn -apverbose -hexdump -vbdump" export SNMP_MASTER_OPTIONS
-
Back up /etc/srconf/agt/snmpd.cnf to a location of your choice.
-
Edit snmpTargetAddrEntry in snmpd.cnf.
For details, see 2.8.1(1) Customizing the configuration file (/etc/srconf/agt/snmpd.cnf).
-
Execute the command /opt/CM2/ESA/bin/snmpstart while logged on as a superuser.
SNMP Agent is started with the new settings applied.
- Organization of this subsection
(1) Customizing the configuration file (/etc/srconf/agt/snmpd.cnf)
Trap destinations are set in snmpTargetAddrEntry in the snmpd.cnf file. The following default configuration template is set in snmpd.cnf when the product is installed:
#snmpTargetAddrEntry <CONFIG_NAME> transportDomainUdpIpv6 \ # [<IPv6_ADDRESS>]:0 0 0 TrapConf <v1TrapParams|v2cTrapParams> readOnly \ # [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:0 2048
Copy the configuration template, and then enable the settings by removing the hash mark (#) at the beginning of each line. Edit the area inside the angle brackets (< >) to set the trap destination and remove the angle brackets. If you want to add more trap destinations, add more snmpTargetAddrEntry definitions.
Setting |
Description |
---|---|
<CONFIG_NAME> |
Specify any name as the configuration name. If multiple trap destinations are set, give each a unique configuration name. The configuration name cannot exceed 32 characters, and can contain only alphanumeric characters, including underscores. |
<IPv6_ADDRESS># |
Specify an IPv6 address for the trap destination. A host name cannot be specified. |
<v1TrapParams | v2cTrapParams> |
Specify the protocol version for the SNMP trap.
|
- #
-
If you specify an IPv6 address with a scope ID, write the transportDomainUdpIpv6 portion of the snmpTargetAddrEntry definition line as transportDomainUdpIpv6z.
(2) Examples of settings in the configuration file (/etc/srconf/agt/snmpd.cnf)
Below is a sample configuration for sending SNMPv1 traps to interface number 1 at IP address fec0::1111:2222:3333:4444:5555. The configuration name is Trapsend_SNMPv1_IPv6. Note that when a %scope-ID is specified, you must write transportDomainUdpIpv6z.
snmpTargetAddrEntry Trapsend_SNMPv1_IPv6 transportDomainUdpIpv6z \ [fec0::1111:2222:3333:4444:5555%1]:0 0 0 TrapConf v1TrapParams readOnly \ [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:0 2048
Below is a sample configuration for sending SNMPv2c traps to IP address fec0::1111:2222:3333:4444:5555, with no %scope-ID specified. The configuration name is Trapsend_SNMPv2c_IPv6.
snmpTargetAddrEntry Trapsend_SNMPv2c_IPv6 transportDomainUdpIpv6 \ [fec0::1111:2222:3333:4444:5555]:0 0 0 TrapConf v2cTrapParams readOnly \ [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:0 2048
Below are sample configurations for sending SNMPv2c traps to IP address fec0::1111:2222:3333:4444:5555 and IP address fec0::aaaa:bbbb:cccc:dddd:eeee, with no %scope-ID specified. The configuration names are NNM_1 and NNM_2. Note that when multiple trap destinations are set, each must be given a unique configuration name.
snmpTargetAddrEntry NNM_1 transportDomainUdpIpv6 \ [fec0::1111:2222:3333:4444:5555]:0 0 0 TrapConf v2cTrapParams readOnly \ [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:0 2048 snmpTargetAddrEntry NNM_2 transportDomainUdpIpv6 \ [fec0::aaaa:bbbb:cccc:dddd:eeee]:0 0 0 TrapConf v2cTrapParams readOnly \ [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:0 2048
For both SNMPv1 traps and SNMPv2c traps, the IPv6 address must be enclosed in square brackets ([ ]). The square brackets cannot be omitted.