IBM Support

IBM AIX: How To Configure SNMPv2c On AIX

Question & Answer


Question

The SNMP monitoring station requires SNMPv2c 
 

Cause

Unable to query SNMP on AIX

Answer

The following steps are based on the /etc/snmpdv3.conf default configuration file.
Change community public to a different name, one that isn't easily guessed.
In this example, we used foo1234 as the community name.

 
1) Verify that the start of snmpd,aixmibd,hostmibd, and snmpmibd are uncommented in /etc/rc.tcpip
start /usr/sbin/snmpd "$src_running"
start /usr/sbin/hostmibd "$src_running"
start /usr/sbin/snmpmibd "$src_running"
start /usr/sbin/aixmibd "$src_running"
-
2) snmpd is linked to snmpdv3ne, which is the default.
# ls -l /usr/sbin/snmpd
lrwxrwxrwx 1 root system 9 Jun 23 2023 /usr/sbin/snmpd -> /usr/sbin/snmpdv3ne
-
3) Configure snmpdv3.conf for SNMPv2c
Remove the comment from the internet line:
#VACM_VIEW defaultView       internet                   - included -
-
Change this line from:
VACM_GROUP group1 SNMPv1  public  -
-
Change to:
VACM_GROUP group1 SNMPv1  foo1234  -
-
Change this line from:
VACM_VIEW defaultView        1.3.6.1.4.1.2.6.191        - excluded -
-
Change to:
VACM_VIEW defaultView        1.3.6.1.4.1.2.6.191        - included -
-
Add these 3 lines to snmpdv3.conf:
The 3 lines can be added to the end of the file.
VACM_GROUP group2 SNMPv2c foo1234 -
VACM_ACCESS group2 - - noAuthNoPriv SNMPv2c defaultView - defaultView -
COMMUNITY foo1234 foo1234 noAuthNoPriv 0.0.0.0 0.0.0.0 -
-
4) Add this line to clsnmp.conf for testing. The file is not used external to AIX.
v2c 127.0.0.1 snmpv2c
-
5) Use the chssys command to assign the new community name to the DPI2 subagents in the ODM
# chssys -s aixmibd -a "-c foo1234"; chssys -s hostmibd -a "-c foo1234"; chssys -s snmpmibd -a "-c foo1234"
-
6) Stop and start the daemons in this order
# stopsrc -s aixmibd; stopsrc -s hostmibd; stopsrc -s snmpmibd
# stopsrc -s snmpd
-
# startsrc -s snmpd
# startsrc -s aixmibd; startsrc -s hostmibd; startsrc -s snmpmibd
-
# ps -ef | grep mibd
root 5177616 3539374   0 09:03:15      -  0:00 /usr/sbin/aixmibd -c foo1234
root 8913242 3539374   0 09:03:15      -  0:00 /usr/sbin/snmpmibd -c foo1234
root 9306592 3539374   0 09:03:15      -  0:00 /usr/sbin/hostmibd -c foo1234
-
7) Test SNMPv2c by sending a query back to itself over loopback.
Output similar to the following:
-
# clsnmp -h v2c -c foo1234 walk system
1.3.6.1.2.1.1.1.0 = IBM PowerPC CHRP Computer
Machine Type: 0x0800004c Processor id: 00FABFB24B00
Base Operating System Runtime AIX version: 07.02.0005.0103
TCP/IP Client Core Support  version: 07.02.0005.0104
1.3.6.1.2.1.1.2.0 = 1.3.6.1.4.1.2.3.1.2.1.1.3
1.3.6.1.2.1.1.3.0 = 1700
1.3.6.1.2.1.1.4.0 = NULL
1.3.6.1.2.1.1.5.0 = tcp121.aus.stglabs.ibm.com
1.3.6.1.2.1.1.6.0 = NULL
1.3.6.1.2.1.1.7.0 = 72
1.3.6.1.2.1.1.8.0 = 300
1.3.6.1.2.1.1.9.1.2.1 = 1.3.6.1.4.1.2.3.1.2.1.1.3
1.3.6.1.2.1.1.9.1.2.2 = 1.3.6.1.4.1.2.6.191
1.3.6.1.2.1.1.9.1.2.3 = 1.3.6.1.2.1.25
1.3.6.1.2.1.1.9.1.2.4 = 1.3.6.1.4.1.2.3.1.2.1.6
1.3.6.1.2.1.1.9.1.3.1 = AIX SNMP Agent
1.3.6.1.2.1.1.9.1.3.2 = AIX Enterprise MIB Support subagent
1.3.6.1.2.1.1.9.1.3.3 = Host Resources DPI sub-agent Version 1
1.3.6.1.2.1.1.9.1.3.4 = AIX SNMP MIB SubAgent
1.3.6.1.2.1.1.9.1.4.1 = 0
1.3.6.1.2.1.1.9.1.4.2 = 300
1.3.6.1.2.1.1.9.1.4.3 = 300
1.3.6.1.2.1.1.9.1.4.4 = 300
-
# clsnmp -h v2c -v -c foo1234 walk system
sysDescr.0 = IBM PowerPC CHRP Computer
Machine Type: 0x0800004c Processor id: 00FABFB24B00
Base Operating System Runtime AIX version: 07.02.0005.0103
TCP/IP Client Core Support  version: 07.02.0005.0104
sysObjectID.0 = 1.3.6.1.4.1.2.3.1.2.1.1.3
sysUpTime.0 = 6 minutes, 48 seconds (40800 timeticks)
sysContact.0 = NULL
sysName.0 = tcp121.aus.stglabs.ibm.com
sysLocation.0 = NULL
sysServices.0 = 72
sysORLastChange.0 = 3 seconds (300 timeticks)
sysORID.1 = 1.3.6.1.4.1.2.3.1.2.1.1.3
sysORID.2 = 1.3.6.1.4.1.2.6.191
sysORID.3 = 1.3.6.1.2.1.25
sysORID.4 = 1.3.6.1.4.1.2.3.1.2.1.6
sysORDescr.1 = AIX SNMP Agent
sysORDescr.2 = AIX Enterprise MIB Support subagent
sysORDescr.3 = Host Resources DPI sub-agent Version 1
sysORDescr.4 = AIX SNMP MIB SubAgent
sysORUpTime.1 = 0 seconds (0 timeticks)
sysORUpTime.2 = 3 seconds (300 timeticks)
sysORUpTime.3 = 3 seconds (300 timeticks)
sysORUpTime.4 = 3 seconds (300 timeticks)
-
# clsnmp -h v2c -c foo1234 walk aixpagingspace
1.3.6.1.4.1.2.6.191.2.4.1.0 = 95
1.3.6.1.4.1.2.6.191.2.4.2.1.1.1 = hd6
1.3.6.1.4.1.2.6.191.2.4.2.1.2.1 = rootvg
1.3.6.1.4.1.2.6.191.2.4.2.1.3.1 = hdisk0
1.3.6.1.4.1.2.6.191.2.4.2.1.4.1 = 512
1.3.6.1.4.1.2.6.191.2.4.2.1.5.1 = 2
1.3.6.1.4.1.2.6.191.2.4.2.1.6.1 = 1
1.3.6.1.4.1.2.6.191.2.4.2.1.7.1 = 1
1.3.6.1.4.1.2.6.191.2.4.2.1.8.1 = 1
-
# clsnmp -h v2c -v -c foo1234 walk aixpagingspace
aixPageThreshold.0 = 95
aixPageName.1 = hd6
aixPageNameVG.1 = rootvg
aixPageNamePV.1 = hdisk0
aixPageSize.1 = 512
aixPagePercentUsed.1 = 2
aixPageStatus.1 = 1
aixPageType.1 = 1
aixPageIndex.1 = 1
-
The working snmpdv3.conf and clsnmp.conf files can be used on other AIX LPARs.
For more information:
https://www.ibm.com/docs/en/aix/7.2?topic=files-snmpdv3conf-file


SUPPORT:
 

If more assistance is required follow the step-by-step instructions to contact IBM to open a case for software under warranty or with an active and valid support contract.  

a.  Document all symptoms, errors, and messages that might have occurred

b.  Capture any logs or data relevant to the situation.

c.  Contact IBM to open a case:

   -For electronic support, visit the IBM Support Community:
     https://www.ibm.com/mysupport
   -If you require telephone support, visit the web page:
      https://www.ibm.com/planetwide/

d.  Provide a good description of your issue and reference to this technote

e.  Upload all of the details and data to your case

   -You can attach files to your case in the IBM Support Community
   -Or Upload data to IBM test case server analysis:

    http://www.ibm.com/support/docview.wss?uid=ibm10733581

f.  Click here to submit feedback for this document.

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG10","label":"AIX"},"Component":"","Platform":[{"code":"PF002","label":"AIX"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

Modified date:
29 December 2023

UID

ibm17103665