[AIX 네트워크 관리 30] SNMP (2) SNMPv1에서 SNMPv3로 이전, SNMPv3 사용자 만들기, 문제 해결

핵심 정리

  • 이전 대응: 커뮤니티 이름은 VACM_GROUP의 securityName(securityModel SNMPv1)으로, 뷰는 COMMUNITY(netAddr·netMask 유지), VACM_VIEW, VACM_ACCESS(readOnly면 writeView를 -)로, 트랩은 TARGET_ADDRESS와 TARGET_PARAMETERS로 옮깁니다. trapmask는 옮기지 않고, smux 줄은 그대로 복사합니다.
  • 새 사용자: pwtokey -p HMAC-MD5 -u auth 비밀번호 에이전트IP로 키를 만들어, 에이전트 snmpdv3.conf의 USM_USER에는 지역화 키(keyType L), 관리자 clsnmp.conf에는 비지역화 키(seclevel AuthNoPriv)를 넣습니다. 각 값은 32바이트를 넘을 수 없습니다.
  • 그 뒤 사용자를 VACM_GROUP(securityModel USM)에 넣고, VACM_VIEW(included·excluded)와 VACM_ACCESS(securityLevel, readView, writeView, notifyView), 트랩용 NOTIFY·TARGET_ADDRESS·TARGET_PARAMETERS를 만듭니다. 시험은 clsnmp -h 이름 walk mib.
  • snmpdv3.conf를 바꾼 뒤에는 refresh가 동작하지 않으므로 stopsrc -s snmpd와 startsrc -s snmpd로 다시 시작합니다.
  • 실행 버전은 ps -e 출력의 snmpdv1·snmpdv3ne·snmpdv3e로 보고 snmpv3_ssw -1|-n|-e로 바꿉니다. DPI2 서브에이전트가 응답하지 않으면 public 커뮤니티를, SMUX 피어는 snmpdv3.conf와 snmpd.peers 양쪽을, 직접 만든 MIB는 VACM_VIEW에 OID로 적었는지 확인합니다.
항목 내용
버전 AIX 5.3, AIX 6.1 (문제 해결 첫 항목의 문구만 다름)
원문 Networks and communication management — 5.3판 358367쪽, 6.1판 464472쪽
파일 /etc/snmpd.conf, /etc/snmpdv3.conf, /etc/clsnmp.conf, /etc/snmpd.peers
관련 명령어 pwtokey, clsnmp, snmpv3_ssw, startsrc, stopsrc

이 시나리오는 SNMPv1에서 SNMPv3로의 전형적인 이전을 보여 줍니다.

AIX 운영 체제에서 시스템 부팅 때 실행되는 기본 SNMP 에이전트는 SNMPv3의 암호화하지 않는 버전입니다. SNMPv3는 /etc/snmpdv3.conf 파일을 구성 파일로 씁니다. 이전 버전의 AIX 운영 체제에서 SNMPv1이 쓰던 /etc/snmpd.conf 파일에 구성한 매개변수는 /etc/snmpdv3.conf 파일로 직접 옮겨야 합니다.

이 시나리오에서는 /etc/snmpd.conf 파일에 구성한 커뮤니티와 트랩을 /etc/snmpdv3.conf 파일로 옮깁니다. 시나리오가 끝나면 SNMPv3가 SNMPv1이 제공하던 것과 같은 기능을 제공합니다. SNMPv1 커뮤니티나 트랩을 직접 구성하지 않았다면 이 절차를 마칠 필요가 없습니다.

이 절에는 SNMPv3에서 쓸 수 있는 기능에 관한 정보가 없습니다. SNMPv1에 없는 SNMPv3 기능으로 사용자를 만드는 방법은 SNMPv3 사용자 만들기를 봅니다.

다음 파일은 이전할 /etc/snmpd.conf 파일의 예입니다. 커뮤니티 daniel, vasu, david가 구성되어 있습니다. 이 커뮤니티들은 직접 옮겨야 합니다.

text
logging         file=/usr/tmp/snmpd.log         enabled
logging         size=0                          level=0
community       daniel       0.0.0.0     0.0.0.0         readWrite  1.17.35
community       vasu         9.3.149.49  255.255.255.255 readOnly   10.3.5
community       david        9.53.150.67 255.255.255.255 readWrite  1.17.35
view 1.17.35    udp  icmp  snmp 1.3.6.1.2.1.25
view 10.3.5     system interfaces tcp icmp
trap            daniel          9.3.149.49      1.17.35   fe
trap            vasu            9.3.149.49      10.3.5   fe
trap            david           9.53.150.67     1.17.35   fe
smux            1.3.6.1.4.1.2.3.1.2.3.1.1         sampled_password  # sampled

이 시나리오의 단계를 마치려면 자신의 /etc/snmpd.conf 파일을 참고합니다. 이 절차를 시작할 때 그 파일의 사본을 준비해 둡니다.

생각할 점

  • 이 시나리오의 정보는 특정 AIX 버전으로 시험했습니다. 얻는 결과는 AIX 버전과 수준에 따라 크게 다를 수 있습니다.

1단계. 커뮤니티 정보 이전

/etc/snmpd.conf 파일의 커뮤니티 이름은 /etc/snmpdv3.conf 파일의 VACM_GROUP 항목의 일부가 됩니다. 각 커뮤니티는 그룹에 넣어야 합니다. 그런 다음 그룹에 필요한 뷰와 접근 권한을 줍니다.

  1. root 권한으로 좋아하는 텍스트 편집기에서 /etc/snmpdv3.conf 파일을 엽니다. 파일에서 VACM_GROUP 항목을 찾습니다.
  2. 옮길 커뮤니티마다 VACM_GROUP 항목을 만듭니다. 여러 커뮤니티가 같은 뷰와 접근 권한을 함께 쓴다면 그룹을 하나만 만들면 됩니다. /etc/snmpd.conf 파일의 커뮤니티 이름이 VACM_GROUP 항목의 securityName 값이 됩니다. 이 시나리오에서는 vasu, daniel, david에 다음 항목을 더했습니다.
text
#--------------------------------------------------------------------
# VACM_GROUP entries
#    Defines a security group (made up of users or communities)
#    for the View-based Access Control Model (VACM).
# Format is:
#  groupName securityModel securityName storageType
VACM_GROUP group2 SNMPv1  vasu -
VACM_GROUP group3 SNMPv1  daniel -
VACM_GROUP group3 SNMPv1  david -
#--------------------------------------------------------------------
  • groupName은 group1만 아니면 원하는 아무 값이나 될 수 있습니다.
    • SNMPv1 커뮤니티를 옮기므로 securityModel은 SNMPv1로 둡니다.
    • 이 시나리오에서 daniel과 david는 /etc/snmpd.conf 파일에서 같은 뷰와 접근 권한을 함께 씁니다. 그래서 둘 다 /etc/snmpdv3.conf 파일에서 group3의 구성원입니다. 커뮤니티 vasu는 뷰와 접근 권한이 david, daniel과 다르므로 다른 그룹에 넣습니다. 이제 커뮤니티가 그룹에 들어갔습니다.

2단계. 뷰 정보 이전

/etc/snmpd.conf 파일의 뷰 정보는 /etc/snmpdv3.conf 파일의 COMMUNITY, VACM_VIEW, VACM_ACCESS 항목이 됩니다. 이 항목들이 각 그룹의 뷰와 접근 권한을 정합니다.

  1. daniel, vasu, david의 COMMUNITY 항목을 만들되, netAddr와 netMask는 /etc/snmpd.conf 파일에 지정한 IP 주소를 그대로 둡니다.
text
#------------------------------------------------------------------------
# COMMUNITY
#    Defines a community for community-based security.
# Format is:
#  communityName securityName securityLevel netAddr netMask storageType
COMMUNITY public    public     noAuthNoPriv 0.0.0.0     0.0.0.0         -
COMMUNITY daniel    daniel     noAuthNoPriv 0.0.0.0     0.0.0.0         -
COMMUNITY vasu      vasu       noAuthNoPriv 9.3.149.49  255.255.255.255 -
COMMUNITY david     david      noAuthNoPriv 9.53.150.67 255.255.255.255 -
#------------------------------------------------------------------------
  1. 각 그룹이 접근할 수 있는 MIB 객체나 변수마다 VACM_VIEW 항목을 만듭니다. /etc/snmpd.conf 파일에 따르면 daniel과 david는 udp, icmp, snmp, 1.3.6.1.2.1.25(RFC 1514에 정의된 host 하위 트리)에 접근할 수 있고, vasu는 system, interfaces, tcp, icmp에 접근할 수 있습니다. 이 뷰 항목은 /etc/snmpdv3.conf 파일로 다음과 같이 옮깁니다.
text
#--------------------------------------------------------------------
# VACM_VIEW entries
#    Defines a particular set of MIB data, called a view, for the
#    View-based Access Control Model.
# Format is:
#  viewName viewSubtree viewMask viewType storageType
VACM_VIEW group2View        system                      - included -
VACM_VIEW group2View        interfaces                  - included -
VACM_VIEW group2View        tcp                         - included -
VACM_VIEW group2View        icmp                        - included -
VACM_VIEW group3View        udp                         - included -
VACM_VIEW group3View        icmp                        - included -
VACM_VIEW group3View        snmp                        - included -
VACM_VIEW group3View        1.3.6.1.2.1.25              - included -
#---------------------------------------------------------------------
  1. VACM_ACCESS 항목을 더해 VACM_VIEW 항목에 정의한 MIB 변수의 접근 권한을 정의합니다. /etc/snmpd.conf 파일에서 daniel과 david는 자기 MIB 변수에 모두 readWrite 권한이 있지만 vasu는 readOnly입니다. VACM_ACCESS 항목을 더해 이 권한을 정의합니다. 이 시나리오에서는 vasu가 /etc/snmpd.conf 파일에서 readOnly였으므로 group2(vasu)에 readView로 group2View를 주되 writeView에는 -를 주었습니다. group3(daniel과 david)은 /etc/snmpd.conf에서 readWrite 접근이 있었으므로 readView와 writeView 모두에 group3View를 주었습니다. 다음 예를 봅니다.
text
#-----------------------------------------------------------------------------------------------------------
# VACM_ACCESS entries
#    Identifies the access permitted to different security groups
#    for the View-based Access Control Model.
# Format is:
# groupName contextPrefix contextMatch securityLevel securityModel readView writeView notifyView storageType
VACM_ACCESS  group1 - - noAuthNoPriv SNMPv1  defaultView - defaultView -
VACM_ACCESS  group2 - - noAuthNoPriv SNMPv1  group2View - group2View -
VACM_ACCESS  group3 - - noAuthNoPriv SNMPv1  group3View group3View group3View -
#-----------------------------------------------------------------------------------------------------------

3단계. 트랩 정보 이전

/etc/snmpd.conf 파일의 트랩 항목은 /etc/snmpdv3.conf 파일의 NOTIFY, TARGET_ADDRESS, TARGET_PARAMETERS 항목이 됩니다. 그러나 TARGET_ADDRESS와 TARGET_PARAMETERS만 옮기면 됩니다.

  1. /etc/snmpd.conf 파일의 트랩 항목에 나열된 IP 주소는 /etc/snmpdv3.conf 파일의 TARGET_ADDRESS 항목의 일부가 됩니다. 이 줄은 트랩을 보낼 호스트를 지정합니다. targetParams 항목은 직접 정할 수 있습니다. 이 시나리오에서는 trapparms1, trapparms2, trapparms3, trapparms4를 쓰며 이 값들은 TARGET_PARAMETERS 항목에서 정의합니다.
text
#-------------------------------------------------------------------------------------
# TARGET_ADDRESS
#    Defines a management application’s address and parameters
#    to be used in sending  notifications.
# Format is:
#  targetAddrName tDomain tAddress tagList targetParams timeout retryCount storageType
TARGET_ADDRESS Target1 UDP 127.0.0.1    traptag trapparms1 - - -
TARGET_ADDRESS Target2 UDP 9.3.149.49   traptag trapparms2 - - -
TARGET_ADDRESS Target3 UDP 9.3.149.49   traptag trapparms3 - - -
TARGET_ADDRESS Target4 UDP 9.53.150.67  traptag trapparms4 - - -
#-------------------------------------------------------------------------------------
  1. /etc/snmpd.conf 파일의 트랩 항목에 지정한 커뮤니티 이름은 /etc/snmpdv3.conf 파일의 TARGET_PARAMETERS 항목의 일부가 됩니다. 커뮤니티 이름은 targetParams 값으로 특정 TARGET_ADDRESS 항목에 대응시켜야 합니다. 예를 들어 커뮤니티 daniel은 trapparms2와 대응하며, 이것은 TARGET_ADDRESS 항목에서 IP 주소 9.3.149.49에 대응합니다. 커뮤니티 daniel과 IP 주소 9.3.149.49는 원래 /etc/snmpd.conf 파일의 trap 항목이었습니다. 다음 예를 봅니다.
text
#--------------------------------------------------------------------------
# TARGET_PARAMETERS
#    Defines the message processing and security parameters
#    to be used in sending notifications to a particular management target.
# Format is:
#  paramsName mpModel securityModel securityName securityLevel storageType
TARGET_PARAMETERS trapparms1 SNMPv1  SNMPv1  public  noAuthNoPriv -
TARGET_PARAMETERS trapparms2 SNMPv1  SNMPv1  daniel  noAuthNoPriv -
TARGET_PARAMETERS trapparms3 SNMPv1  SNMPv1  vasu    noAuthNoPriv -
TARGET_PARAMETERS trapparms4 SNMPv1  SNMPv1  david   noAuthNoPriv -
#--------------------------------------------------------------------------
  1. /etc/snmpd.conf 파일의 trapmask 정보는 /etc/snmpdv3.conf 파일로 옮기지 않습니다.

4단계. smux 정보 이전

옮겨야 할 smux 정보가 있으면 그 줄을 새 파일에 그대로 복사할 수 있습니다. 이 시나리오에서는 /etc/snmpd.conf 파일에 sampled smux 항목이 구성되어 있었습니다. 그 줄을 /etc/snmpdv3.conf 파일로 복사해야 합니다.

text
#--------------------------------------------------------------------------------------------
#       smux <client OIdentifier> <password> <address> <netmask>
smux            1.3.6.1.4.1.2.3.1.2.3.1.1         sampled_password  # sampled
#--------------------------------------------------------------------------------------------

5단계. snmpd 데몬 멈추고 시작하기

/etc/snmpd.conf 파일을 /etc/snmpdv3.conf 파일로 옮기는 일이 끝나면 snmpd 데몬을 멈춘 뒤 시작합니다. /etc/snmpdv3.conf 파일을 바꿀 때마다 snmpd 데몬을 멈추고 시작해야 합니다.

  1. 다음 명령을 입력해 데몬을 멈춥니다.
text
stopsrc -s snmpd
  1. 다음 명령을 입력해 데몬을 다시 시작합니다.
text
startsrc -s snmpd

참고: SNMPv3 에이전트는 SNMPv1처럼 refresh만으로는 되지 않습니다. /etc/snmpdv3.conf 파일을 바꾸면 위 지시대로 데몬을 멈추고 시작해야 합니다. SNMPv3가 지원하는 동적 구성 기능 때문에 refresh를 쓸 수 없습니다.

영어 원문

Migrating from SNMPv1 to SNMPv3

This scenario shows a typical migration from SNMPv1 to SNMPv3.

In the AIX operating system, the default SNMP agent running at system boot time is the non-encrypted version of SNMPv3. SNMPv3 uses the /etc/snmpdv3.conf file as its configuration file. Any parameters that you had configured in the /etc/snmpd.conf file, which is used by SNMPv1 in earlier versions of the AIX operating system, will need to be manually migrated to the /etc/snmpdv3.conf file.

In this scenario, the communities and traps that were configured in the /etc/snmpd.conf file will be migrated to the /etc/snmpdv3.conf file. By the end of the scenario, SNMPv3 will provide identical functionality that SNMPv1 offered. If you did not configure any of your own SNMPv1 communities or traps, there is no need for you to complete this procedure.

This file does not contain any information about features available in SNMPv3. For information about creating users using SNMPv3 features not available in SNMPv1, see Creating users in SNMPv3.

The following file is the example /etc/snmpd.conf file that is going to be migrated. The following communities are configured: daniel, vasu, and david. These communities must be migrated manually.

text
logging         file=/usr/tmp/snmpd.log         enabled
logging         size=0                          level=0
community       daniel       0.0.0.0     0.0.0.0         readWrite  1.17.35
community       vasu         9.3.149.49  255.255.255.255 readOnly   10.3.5
community       david        9.53.150.67 255.255.255.255 readWrite  1.17.35
view 1.17.35    udp  icmp  snmp 1.3.6.1.2.1.25
view 10.3.5     system interfaces tcp icmp
trap            daniel          9.3.149.49      1.17.35   fe
trap            vasu            9.3.149.49      10.3.5   fe
trap            david           9.53.150.67     1.17.35   fe
smux            1.3.6.1.4.1.2.3.1.2.3.1.1         sampled_password  # sampled

To complete the steps in this scenario, refer to your /etc/snmpd.conf file. Have a copy of that file ready when you start this procedure.

Things to consider

  • The information in this how-to scenario was tested using specific versions of AIX. The results you obtain might vary significantly depending on your version and level of AIX.

Step 1. Migrate the community information

The community names in the /etc/snmpd.conf file become part of the VACM_GROUP entries in the /etc/snmpdv3.conf file. Each community must be placed in a group. You will then give the groups the view and access permissions needed.

  1. With root authority, open the /etc/snmpdv3.conf file with your favorite text editor. Locate the VACM_GROUP entries in the file.

  2. Create a VACM_GROUP entry for each community that you want to migrate. If multiple communities are going to share the same view and access permissions, you need to create only one group for them. The community names in the /etc/snmpd.conf file become the securityName values for the VACM_GROUP entries. In this scenario, the following entries were added for vasu, daniel, and david:

text
#--------------------------------------------------------------------
# VACM_GROUP entries
#    Defines a security group (made up of users or communities)
#    for the View-based Access Control Model (VACM).
# Format is:
#  groupName securityModel securityName storageType
VACM_GROUP group2 SNMPv1  vasu -
VACM_GROUP group3 SNMPv1  daniel -
VACM_GROUP group3 SNMPv1  david -
#--------------------------------------------------------------------
  • groupName can be any value you choose, except group1.

  • securityModel remains SNMPv1 because we are migrating the SNMPv1 communities.

  • In this scenario, daniel and david share the same view and access permissions in the /etc/snmpd.conf file. Therefore, they are both members of group3 in the /etc/snmpdv3.conf file. Community vasu is placed in a different group because its view and access permissions are different than those for david and daniel. The communities are now placed in groups.

Step 2. Migrate the view information

The view information in the /etc/snmpd.conf file will become COMMUNITY, VACM_VIEW, and VACM_ACCESS entries in the /etc/snmpdv3.conf file. These entries will determine the view and access permissions for each group.

  1. Create COMMUNITY entries for daniel, vasu, and david, maintaining the same IP addresses for netAddr and netMask as were specified in the /etc/snmpd.conf file.
text
#------------------------------------------------------------------------
# COMMUNITY
#    Defines a community for community-based security.
# Format is:
#  communityName securityName securityLevel netAddr netMask storageType
COMMUNITY public    public     noAuthNoPriv 0.0.0.0     0.0.0.0         -
COMMUNITY daniel    daniel     noAuthNoPriv 0.0.0.0     0.0.0.0         -
COMMUNITY vasu      vasu       noAuthNoPriv 9.3.149.49  255.255.255.255 -
COMMUNITY david     david      noAuthNoPriv 9.53.150.67 255.255.255.255 -
#------------------------------------------------------------------------
  1. Create a VACM_VIEW entry for every MIB object or variable that each group has access to. According to the /etc/snmpd.conf file, daniel and david have access to udp, icmp, snmp, and 1.3.6.1.2.1.25 (host subtree as defined in RFC 1514), and vasu has access to system, interfaces, tcp, and icmp. These view entries are migrated to the /etc/snmpdv3.conf file as follows:

(15줄짜리 예는 위 한글 본문에 그대로 실었습니다.)

  1. Define access permissions to the MIB variables defined in the VACM_VIEW entries by adding VACM_ACCESS entries. In the /etc/snmpd.conf file, daniel and david both have readWrite permission to their MIB variables, whereas vasu has readOnly. Define these permissions by adding VACM_ACCESS entries. In this scenario, we gave group2 (vasu) the group2View for readView, but gave it - for writeView because vasu had readOnly in the /etc/snmpd.conf file. We gave group3 (daniel and david) the group3View for both readView and writeView because those groups had readWrite access in /etc/snmpd.conf. See the following example.
text
#-----------------------------------------------------------------------------------------------------------
# VACM_ACCESS entries
#    Identifies the access permitted to different security groups
#    for the View-based Access Control Model.
# Format is:
# groupName contextPrefix contextMatch securityLevel securityModel readView writeView notifyView storageType
VACM_ACCESS  group1 - - noAuthNoPriv SNMPv1  defaultView - defaultView -
VACM_ACCESS  group2 - - noAuthNoPriv SNMPv1  group2View - group2View -
VACM_ACCESS  group3 - - noAuthNoPriv SNMPv1  group3View group3View group3View -
#-----------------------------------------------------------------------------------------------------------

Step 3. Migrate the trap information

The trap entries in the /etc/snmpd.conf file will become the NOTIFY, TARGET_ADDRESS, and TARGET_PARAMETERS entries in the /etc/snmpdv3.conf file. However, only the TARGET_ADDRESS and TARGET_PARAMETERS will need to be migrated.

  1. The IP addresses listed in the trap entries in the /etc/snmpd.conf file become part of the TARGET_ADDRESS entries in the /etc/snmpdv3.conf file. This line specifies the host where the trap will be sent. You can define the targetParams entries. In this scenario, we use trapparms1, trapparms2, trapparms3, and trapparms4, which will be defined in the TARGET_PARAMETERS entries.
text
#-------------------------------------------------------------------------------------
# TARGET_ADDRESS
#    Defines a management application’s address and parameters
#    to be used in sending  notifications.
# Format is:
#  targetAddrName tDomain tAddress tagList targetParams timeout retryCount storageType
TARGET_ADDRESS Target1 UDP 127.0.0.1    traptag trapparms1 - - -
TARGET_ADDRESS Target2 UDP 9.3.149.49   traptag trapparms2 - - -
TARGET_ADDRESS Target3 UDP 9.3.149.49   traptag trapparms3 - - -
TARGET_ADDRESS Target4 UDP 9.53.150.67  traptag trapparms4 - - -
#-------------------------------------------------------------------------------------
  1. The community names specified in the trap entries in the /etc/snmpd.conf file become part of the TARGET_PARAMETERS entries in the /etc/snmpdv3.conf file. The community names must be mapped to a specific TARGET_ADDRESS entry using the targetParams values. For example, community daniel is mapped with trapparms2, which, under the TARGET_ADDRESS entry, maps to IP address 9.3.149.49. Community daniel and IP address 9.3.149.49 were originally a trap entry in the /etc/snmpd.conf file. See the following example:
text
#--------------------------------------------------------------------------
# TARGET_PARAMETERS
#    Defines the message processing and security parameters
#    to be used in sending notifications to a particular management target.
# Format is:
#  paramsName mpModel securityModel securityName securityLevel storageType
TARGET_PARAMETERS trapparms1 SNMPv1  SNMPv1  public  noAuthNoPriv -
TARGET_PARAMETERS trapparms2 SNMPv1  SNMPv1  daniel  noAuthNoPriv -
TARGET_PARAMETERS trapparms3 SNMPv1  SNMPv1  vasu    noAuthNoPriv -
TARGET_PARAMETERS trapparms4 SNMPv1  SNMPv1  david   noAuthNoPriv -
#--------------------------------------------------------------------------
  1. The trapmask information in the /etc/snmpd.conf file does not migrate to the /etc/snmpdv3.conf file.

Step 4. Migrate the smux information

If you have smux information that you need to migrate, you can copy those lines directly into the new file. In this scenario, the sampled smux entry was configured in the /etc/snmpd.conf file. That line must be copied to the /etc/snmpdv3.conf file.

text
#--------------------------------------------------------------------------------------------
#       smux <client OIdentifier> <password> <address> <netmask>
smux            1.3.6.1.4.1.2.3.1.2.3.1.1         sampled_password  # sampled
#--------------------------------------------------------------------------------------------

Step 5. Stop and Start the snmpd daemon

After the migration of the /etc/snmpd.conf file to the /etc/snmpdv3.conf file is complete, stop and then start the snmpd daemon. You will need to stop and start the snmpd daemon each time you make changes to the /etc/snmpdv3.conf file.

  1. Type the following command to stop the daemon:
text
stopsrc -s snmpd
  1. Type the following command to restart the daemon:
text
startsrc -s snmpd

Note: Simply refreshing the SNMPv3 agent will not work as it did in SNMPv1. If you make changes to the /etc/snmpdv3.conf file, you must stop and start the daemon as instructed above. The dynamic configuration function supported in SNMPv3 will not allow you to refresh.

SNMPv3 사용자 만들기

이 시나리오는 /etc/snmpdv3.conf와 /etc/clsnmp.conf 파일을 직접 편집해 SNMPv3 사용자를 만드는 방법을 보여 줍니다.

이 시나리오에서는 사용자 u1을 만듭니다. 사용자 u1에는 인증 키를 주지만 암호 키(snmp.crypto 파일 세트가 설치되어 있어야 쓸 수 있음)는 주지 않습니다. u1의 인증 키는 HMAC-MD5 프로토콜로 만듭니다. u1을 구성한 뒤 그룹에 넣고, 그 그룹의 뷰와 접근 권한을 정의합니다. 마지막으로 u1의 트랩 항목을 만듭니다.

/etc/snmpdv3.conf와 /etc/clsnmp.conf 파일에 쓰는 각 값은 32바이트를 넘으면 안 됩니다.

생각할 점

  • 이 시나리오의 정보는 특정 AIX 버전으로 시험했습니다. 얻는 결과는 AIX 버전과 수준에 따라 크게 다를 수 있습니다.

1단계. 사용자 만들기

  1. HMAC-MD5와 HMAC-SHA 가운데 쓸 보안 프로토콜을 정합니다. 이 시나리오에서는 HMAC-MD5를 씁니다.
  2. pwtokey 명령으로 인증 키를 만듭니다. 쓰는 인증 프로토콜과 암호 키 사용 여부에 따라 출력이 다를 수 있습니다. 이 키들은 /etc/snmpdv3.conf와 /etc/clsnmp.conf 파일에 씁니다. 사용자 u1에 쓴 명령은 다음과 같습니다.
text
pwtokey -p HMAC-MD5 -u auth anypassword 9.3.230.119

지정한 IP 주소는 에이전트가 실행되는 IP 주소입니다. 비밀번호는 아무것이나 될 수 있지만 나중을 위해 안전한 곳에 보관합니다. 출력은 다음과 비슷해야 합니다.

text
Display of 16 byte HMAC-MD5 authKey:
  63960c12520dc8829d27f7fbaf5a0470
Display of 16 byte HMAC-MD5 localized authKey:
  b3b6c6306d67e9c6f8e7e664a47ef9a0
  1. root 권한으로 좋아하는 텍스트 편집기에서 /etc/snmpdv3.conf 파일을 엽니다.
  2. 파일에 주어진 형식에 따라 USM_USER 항목을 더해 사용자를 만듭니다. authKey 값은 pwtokey 명령으로 만든 지역화 인증 키입니다. 사용자 u1의 항목은 다음과 같습니다.
text
#---------------------------------------------------------------------------
# USM_USER entries
#    Defines a user for the User-based Security Model (USM).
# Format is:
#  userName engineID authProto authKey privProto privKey keyType storageType
#
USM_USER u1 - HMAC-MD5 b3b6c6306d67e9c6f8e7e664a47ef9a0 - - L -
#----------------------------------------------------------------------------
  • userName은 사용자 이름입니다. 이 경우 u1입니다.
    • authProto는 키를 만들 때 쓴 프로토콜이어야 합니다. 이 경우 HMAC-MD5입니다.
    • authKey는 pwtokey 명령으로 만든 지역화 인증 키입니다.
    • 이 시나리오에서는 암호 키를 쓰지 않으므로 privProto와 privkey는 지정하지 않습니다.
    • 지역화 인증 키를 쓰므로 keyType은 L입니다.
  1. /etc/snmpdv3.conf 파일을 저장하고 닫습니다.
  2. SNMP 관리자에서 좋아하는 텍스트 편집기로 /etc/clsnmp.conf 파일을 엽니다.
  3. 파일에 주어진 형식에 따라 새 사용자를 더합니다. u1의 항목은 다음과 같습니다.
text
#----------------------------------------------------------------------------------------------------
#
# Format of entries:
# winSnmpName targetAgent admin secName password context secLevel authProto authKey privProto privKey
#
user1  9.3.230.119  SNMPv3  u1  -  -  AuthNoPriv  HMAC-MD5  63960c12520dc8829d27f7fbaf5a0470  -  -
#----------------------------------------------------------------------------------------------------
  • winSnmpName은 아무 값이나 될 수 있습니다. clsnmp 명령으로 SNMP 요청을 할 때 이 값을 씁니다.
    • targetAgent는 에이전트가 실행되는 IP 주소이며, 인증 키를 만들 때도 썼습니다.
    • SNMPv3 요청을 보내므로 admin은 SNMPv3로 설정합니다.
    • secName은 만드는 사용자의 이름입니다. 이 경우 u1입니다.
    • 인증은 쓰지만 암호는 쓰지 않도록 구성하므로 seclevel은 AuthNoPriv로 설정합니다(그래서 privProto와 privKey 값이 없습니다).
    • authproto는 인증 키를 만들 때 쓴 인증 프로토콜로 설정합니다.
    • authKey는 pwtokey 명령으로 만든 비지역화 키입니다.
  1. /etc/clsnmp.conf 파일을 저장하고 닫습니다.

2단계. 그룹 구성

이제 사용자를 그룹에 넣어야 합니다. 이 사용자에게 주려는 뷰와 접근 권한이 모두 구성된 그룹이 이미 있으면 그 그룹에 넣을 수 있습니다. 다른 그룹에 없는 뷰와 접근 권한을 주려 하거나, 구성된 그룹이 없으면 그룹을 만들고 사용자를 더합니다.

사용자를 새 그룹에 넣으려면 /etc/snmpdv3.conf 파일에 새 VACM_GROUP 항목을 만듭니다. u1의 그룹 항목은 다음과 같습니다.

text
#--------------------------------------------------------------
# VACM_GROUP entries
#    Defines a security group (made up of users or communities)
#    for the View-based Access Control Model (VACM).
# Format is:
#  groupName securityModel securityName storageType
VACM_GROUP group1 USM u1 -
#--------------------------------------------------------------
  • groupName은 아무 이름이나 될 수 있습니다. 그것이 그룹 이름이 됩니다. 이 경우 group1입니다.
  • securityModel은 SNMPv3 보안 기능을 활용하는 USM으로 설정합니다.
  • securityName은 사용자 이름입니다. 이 경우 u1입니다.

3단계. 뷰와 접근 권한 구성

방금 만든 새 그룹의 뷰와 접근 권한을 설정해야 합니다. 이 권한은 /etc/snmpdv3.conf 파일에 VACM_VIEW와 VACM_ACCESS 항목을 더해 설정합니다.

  1. 새 그룹에 줄 뷰와 접근 권한을 정합니다.
  2. /etc/snmpdv3.conf 파일에 VACM_VIEW 항목을 더해 그룹이 접근할 수 있는 MIB 객체를 정의합니다. 이 시나리오에서 group1은 interfaces, tcp, icmp, system MIB 하위 트리에 접근할 수 있습니다. 그러나 system MIB 하위 트리 안의 sysObjectID MIB 변수에 대한 group1의 접근은 제한합니다.
text
#----------------------------------------------------------------
# VACM_VIEW entries
#    Defines a particular set of MIB data, called a view, for the
#    View-based Access Control Model.
# Format is:
#  viewName viewSubtree viewMask viewType storageType
VACM_VIEW group1View  interfaces    - included -
VACM_VIEW group1View  tcp        - included -
VACM_VIEW group1View  icmp        - included -
VACM_VIEW group1View  system     - included -
VACM_VIEW group1View  sysObjectID    - excluded -
#----------------------------------------------------------------
  • viewName은 뷰 이름입니다. 이 시나리오에서는 group1View입니다.
    • viewSubtree는 접근을 줄 MIB 하위 트리입니다.
    • viewType은 정의한 MIB 하위 트리가 뷰에 포함되는지 정합니다. 이 경우 모든 하위 트리가 포함되지만 system 하위 트리의 일부인 MIB 변수 sysObjectID는 제외됩니다.
  1. /etc/snmpdv3.conf 파일에 VACM_ACCESS 항목을 더해 그룹이 위에 지정한 MIB 객체에 갖는 권한을 정의합니다. group1에는 읽기 전용 접근을 줍니다.
text
#-----------------------------------------------------------------------------------------------------------
# VACM_ACCESS entries
#    Identifies the access permitted to different security groups
#    for the View-based Access Control Model.
# Format is:
# groupName contextPrefix contextMatch securityLevel securityModel readView writeView notifyView storageType
VACM_ACCESS  group1 - - AuthNoPriv USM group1View - group1View -
#-----------------------------------------------------------------------------------------------------------
  • groupName은 그룹 이름입니다. 이 경우 group1입니다.

    • securityLevel은 쓰는 보안 수준입니다. 이 시나리오에서는 인증 키는 쓰지만 암호 키는 쓰지 않습니다. 그래서 값을 AuthNoPriv로 설정합니다.
    • securityModel은 쓰는 보안 모델(SNMPv1, SNMPv2c, USM)입니다. 이 시나리오에서는 SNMPv3 보안 기능을 쓰도록 USM으로 설정합니다.
    • readView는 그룹이 읽기 접근을 갖는 VACM_VIEW를 정합니다. 이 시나리오에서는 group1View를 주어 group1이 group1View VACM_VIEW 항목에 읽기 접근을 갖습니다.
    • writeView는 그룹이 쓰기 접근을 갖는 VACM_VIEW를 정합니다. 이 시나리오에서는 group1에 쓰기 접근을 주지 않습니다.
    • notifyView는 접근 표의 항목 제어 아래 트랩을 보낼 때 적용할 뷰의 이름을 지정합니다.

    참고: 경우에 따라 한 그룹에 VACM_ACCESS 항목이 여럿 필요할 수 있습니다. 그룹의 사용자마다 인증과 암호 설정(noAuthNoPriv, AuthNoPriv, AuthPriv)이 다르면 securityLevel 매개변수를 그에 맞게 설정한 VACM_ACCESS 항목이 여럿 필요합니다.

4단계. 사용자의 트랩 항목 구성

SNMPv3의 트랩 항목은 /etc/snmpdv3.conf 파일에 NOTIFY, TARGET_ADDRESS, TARGET_PARAMETERS 항목을 더해 만듭니다. TARGET_ADDRESS 항목은 트랩을 보낼 곳을 지정하고, TARGET_PARAMETERS 항목은 TARGET_ADDRESS 정보를 group1에 대응시킵니다.

NOTIFY 항목은 기본으로 구성되어 있습니다. 기본 NOTIFY 항목은 다음과 같습니다.

text
NOTIFY notify1 traptag trap -

이 시나리오에서는 기본 항목에 지정된 값 traptag를 씁니다.

  1. 트랩을 보낼 곳을 지정하도록 TARGET_ADDRESS 항목을 더합니다.
text
#-------------------------------------------------------------------------------------
# TARGET_ADDRESS
#    Defines a management application’s address and parameters
#    to be used in sending  notifications.
# Format is:
#  targetAddrName tDomain tAddress tagList targetParams timeout retryCount storageType
#-------------------------------------------------------------------------------------
TARGET_ADDRESS Target1 UDP 9.3.207.107     traptag trapparms1 - - -
  • targetAddrName은 아무 이름이나 될 수 있습니다. 이 시나리오에서는 Target1을 썼습니다.
    • tAddress는 그룹의 트랩을 보낼 IP 주소입니다.
    • tagList는 NOTIFY 항목에 구성한 이름입니다. 이 시나리오에서는 traptag입니다.
    • targetParams는 아무 값이나 될 수 있습니다. TARGET_PARAMETERS 항목에서 쓸 trapparms1을 썼습니다.
  1. TARGET_PARAMETERS 항목을 더합니다.
text
#-------------------------------------------------------------------------
# TARGET_PARAMETERS
#    Defines the message processing and security parameters
#    to be used in sending notifications to a particular management target.
# Format is:
#  paramsName mpModel securityModel securityName securityLevel storageType
#-------------------------------------------------------------------------
TARGET_PARAMETERS trapparms1 SNMPv3  USM     u1        AuthNoPriv -
  • paramsName은 TARGET_ADDRESS 항목의 targetParams 값과 같으며, 이 경우 trapparms1입니다.
    • mpModel은 쓰는 SNMP 버전입니다.
    • securityModel은 쓰는 보안 모델(SNMPv1, SNMPv3, USM)입니다. 이 시나리오에서는 SNMPv3 보안 기능을 쓰도록 USM으로 설정합니다.
    • securityName은 USM_USER 항목에 지정한 사용자 이름이며, 이 경우 u1입니다.
    • 인증 키는 쓰지만 암호 키는 쓰지 않으므로 securityLevel은 AuthNoPriv로 설정합니다.

5단계. snmpd 데몬 멈추고 시작하기

/etc/snmpdv3.conf 파일을 바꾼 뒤 snmpd 데몬을 멈추고 시작합니다.

  1. 다음 명령을 입력해 snmpd 데몬을 멈춥니다.
text
stopsrc -s snmpd
  1. 다음 명령을 입력해 snmpd 데몬을 시작합니다.
text
startsrc -s snmpd

이제 새 설정이 적용됩니다.

참고: SNMPv3 에이전트는 SNMPv1처럼 refresh -s snmpd로 새로 고치는 것만으로는 되지 않습니다. /etc/snmpdv3.conf 파일을 바꾸면 위 지시대로 데몬을 멈추고 시작해야 합니다. SNMPv3가 지원하는 동적 구성 기능 때문에 refresh를 쓸 수 없습니다.

6단계. 구성 시험

구성이 올바른지 확인하려면 SNMP 관리자에서 다음 명령을 실행할 수 있습니다.

text
clsnmp -h user1 walk mib

여기서 mib는 사용자가 접근할 수 있는 MIB 하위 트리입니다. 이 시나리오에서는 interfaces, tcp, icmp, system이 될 수 있습니다. 구성이 올바르면 지정한 하위 트리의 정보가 보입니다.

올바른 출력이 나오지 않으면 이 문서의 단계를 검토하고 모든 정보를 올바르게 입력했는지 확인합니다.

영어 원문

Creating users in SNMPv3

This scenario shows how to create a user in SNMPv3 by manually editing the /etc/snmpdv3.conf and /etc/clsnmp.conf files.

User u1 will be created in this scenario. User u1 will be given authorization keys, but will not be given privacy keys (which are available only if you have the snmp.crypto fileset installed). The HMAC-MD5 protocol will be used to create u1's authorization keys. After u1 is configured, it will be put into a group, after which that group will have its view and access permissions defined. Finally, trap entries for u1 will be created.

Each individual value used in the /etc/snmpdv3.conf and /etc/clsnmp.conf files must not exceed 32 bytes.

Things to Consider

  • The information in this how-to scenario was tested using specific versions of AIX. The results you obtain might vary significantly depending on your version and level of AIX.

Step 1. Create the user 1. Decide which security protocols you want to use, either HMAC-MD5 or HMAC-SHA. In this scenario, HMAC-MD5 will be used.

  1. Generate the authentication keys by using the pwtokey command. Your output may look different based on the authentication protocol you are using and if you are using privacy keys. These keys will be used in the /etc/snmpdv3.conf and /etc/clsnmp.conf files. The command used for user u1 follows:
text
pwtokey -p HMAC-MD5 -u auth anypassword 9.3.230.119

The IP address specified is the IP address where the agent is running. The password can by any password, but be sure to save it in a secure place for future use. The output should look similar to the following:

text
Display of 16 byte HMAC-MD5 authKey:
  63960c12520dc8829d27f7fbaf5a0470
Display of 16 byte HMAC-MD5 localized authKey:
  b3b6c6306d67e9c6f8e7e664a47ef9a0
  1. With root authority, open the /etc/snmpdv3.conf file with your favorite text editor.

  2. Create a user by adding a USM_USER entry following the format given in the file. The authKey value will be the localized authentication key that was generated using the pwtokey command. The entry for user u1 follows:

text
#---------------------------------------------------------------------------
# USM_USER entries
#    Defines a user for the User-based Security Model (USM).
# Format is:
#  userName engineID authProto authKey privProto privKey keyType storageType
#
USM_USER u1 - HMAC-MD5 b3b6c6306d67e9c6f8e7e664a47ef9a0 - - L -
#----------------------------------------------------------------------------
  • userName is the name of the user. In this case, it is u1.

  • authProto must be the protocol that you used when you created the keys. In this case, it is HMAC-MD5.

  • authKey is the localized authentication key that was created using the pwtokey command.

  • privProto and privkey are not specified because we are not using the privacy keys in this scenario.

  • keyType is L because we are using the localized authentication key.

  1. Save and close the /etc/snmpdv3.conf file.

  2. Open the /etc/clsnmp.conf file on the SNMP manager with your favorite text editor.

  3. Add the new user according to the format given in the file. The entry for u1 follows:

text
#----------------------------------------------------------------------------------------------------
#
# Format of entries:
# winSnmpName targetAgent admin secName password context secLevel authProto authKey privProto privKey
#
user1  9.3.230.119  SNMPv3  u1  -  -  AuthNoPriv  HMAC-MD5  63960c12520dc8829d27f7fbaf5a0470  -  -
#----------------------------------------------------------------------------------------------------
  • winSnmpName can be any value. This value will be used when making SNMP requests using the clsnmp command.

  • targetAgent is the IP address where the agent is running, which was also used in creating the authentication keys.

  • admin is set to SNMPv3 because we will be sending SNMPv3 requests.

  • secName is the name of the user that you are creating. In this case, it is u1.

  • seclevel is set to AuthNoPriv because it is being configured to use authentication but not privacy (as a result, there are no values for privProto and privKey).

  • authproto is set to the authentication protocol that was used in creating the authentication keys.

  • authKey is the non-localized key that was generated by the pwtokey command.

  1. Save and close the /etc/clsnmp.conf file.

Step 2. Configure the group

The user must now be placed in a group. If you already have a group that is configured with all of the view and access permissions that you want to give this user, you can put this user in that group. If you want to give this user view and access permissions that no other groups have, or if you do not have any groups configured, create a group and add this user to it.

To add the user to a new group, create a new VACM_GROUP entry in the /etc/snmpdv3.conf file. The group entry for u1 follows:

text
#--------------------------------------------------------------
# VACM_GROUP entries
#    Defines a security group (made up of users or communities)
#    for the View-based Access Control Model (VACM).
# Format is:
#  groupName securityModel securityName storageType
VACM_GROUP group1 USM u1 -
#--------------------------------------------------------------
  • groupName can be any name. It becomes that name of your group. In this case, it is group1.

  • securityModel is set to USM, which takes advantage of the SNMPv3 security features.

  • securityName is the name of the user. In this case, it is u1.

Step 3. Configure view and access permissions

The view and access permissions must be set for the new group that was just created. These permissions are set by adding VACM_VIEW and VACM_ACCESS entries to the /etc/snmpdv3.conf file.

  1. Decide what view and access permissions you want the new group to have.

  2. Add VACM_VIEW entries to the /etc/snmpdv3.conf file to define what MIB objects the group can access. In this scenario, group1 will have access to the interfaces, tcp, icmp, and system MIB subtrees. However, we will restrict group1's access to the sysObjectID MIB variable within the system MIB subtree.

text
#----------------------------------------------------------------
# VACM_VIEW entries
#    Defines a particular set of MIB data, called a view, for the
#    View-based Access Control Model.
# Format is:
#  viewName viewSubtree viewMask viewType storageType
VACM_VIEW group1View  interfaces    - included -
VACM_VIEW group1View  tcp        - included -
VACM_VIEW group1View  icmp        - included -
VACM_VIEW group1View  system     - included -
VACM_VIEW group1View  sysObjectID    - excluded -
#----------------------------------------------------------------
  • viewName is the name of the view. In this scenario, it is group1View.

  • viewSubtree is the MIB subtree that you want to give access to.

  • viewType determines whether the MIB subtrees defined are included in the view. In this case, all subtrees are included, but the MIB variable sysObjectID, which is part of the system subtree, is excluded.

  1. Add a VACM_ACCESS entry to the /etc/snmpdv3.conf file to define the permissions that the group has to the MIB objects specified above. For group1, read only access is given.
text
#-----------------------------------------------------------------------------------------------------------
# VACM_ACCESS entries
#    Identifies the access permitted to different security groups
#    for the View-based Access Control Model.
# Format is:
# groupName contextPrefix contextMatch securityLevel securityModel readView writeView notifyView storageType
VACM_ACCESS  group1 - - AuthNoPriv USM group1View - group1View -
#-----------------------------------------------------------------------------------------------------------
  • groupName is the name of the group. In this case, it is group1.

  • securityLevel is the level of security that is being used. In this scenario, authentication keys are used but not privacy keys. The value is therefore set to AuthNoPriv.

  • securityModel is the security model that you are using (SNMPv1, SNMPv2c, or USM). In this scenario, it is set to USM to allow the SNMPv3 security features to be used.

  • readView determines which VACM_VIEWs the group has read access to. In this scenario, group1View is given, which gives group1 read access to the group1View VACM_VIEW entries.

  • writeView determines which VACM_VIEWs the group has write access to. In this scenario, no write access is given to group1.

  • notifyView specifies the name of the view to be applied when a trap is performed under control of the entry in the access table.

Note: In some cases, multiple VACM_ACCESS entries for one group may be necessary. If users in the group have different authentication and privacy settings (noAuthNoPriv, AuthNoPriv, or AuthPriv) multiple VACM_ACCESS entries are required with the securityLevel parameter set accordingly.

Step 4. Configure trap entries for the user

Trap entries in SNMPv3 are created by adding NOTIFY, TARGET_ADDRESS and TARGET_PARAMETERS entries to the /etc/snmpdv3.conf file. The TARGET_ADDRESS entry will specify where you want the traps to be sent, and the TARGET_PARAMETERS entry will map the TARGET_ADDRESS information to group1.

The NOTIFY entry has been configured by default. Following is the default NOTIFY entry:

text
NOTIFY notify1 traptag trap -

In this scenario, we use the value that is specified in the default entry, traptag.

  1. Add a TARGET_ADDRESS entry to specify where you want traps to be sent.
text
#-------------------------------------------------------------------------------------
# TARGET_ADDRESS
#    Defines a management application’s address and parameters
#    to be used in sending  notifications.
# Format is:
#  targetAddrName tDomain tAddress tagList targetParams timeout retryCount storageType
#-------------------------------------------------------------------------------------
TARGET_ADDRESS Target1 UDP 9.3.207.107     traptag trapparms1 - - -
  • targetAddrName can be any name. In this scenario, we used Target1.

  • tAddress is the IP address where the traps for the group should be sent.

  • tagList is the name configured in the NOTIFY entry. In this scenario, it is traptag.

  • targetParams can be any value. We used is trapparms1, which will be used in the TARGET_PARAMETERS entry.

  1. Add a TARGET_PARAMETERS entry.
text
#-------------------------------------------------------------------------
# TARGET_PARAMETERS
#    Defines the message processing and security parameters
#    to be used in sending notifications to a particular management target.
# Format is:
#  paramsName mpModel securityModel securityName securityLevel storageType
#-------------------------------------------------------------------------
TARGET_PARAMETERS trapparms1 SNMPv3  USM     u1        AuthNoPriv -
  • paramsName is the same as the targetParams value in the TARGET_ADDRESS entry, which, in this case, is trapparms1.

  • mpModel is the version of SNMP being used.

  • securityModel is the security model that you are using (SNMPv1, SNMPv3, or USM). In this scenario, it is set to USM to allow the SNMPv3 security features to be used.

  • securityName is the user name specified in the USM_USER entry, which, in this case, is u1.

  • securityLevel is set to AuthNoPriv because we are using authentication keys but not privacy keys.

Step 5. Stop and start the snmpd daemon

After making the changes the /etc/snmpdv3.conf file, stop and the start the snmpd daemon.

  1. Type the following command to stop the snmpd daemon:
text
stopsrc -s snmpd
  1. Type the following command to start the snmpd daemon:
text
startsrc -s snmpd

The new settings will now take effect.

Note: Simply refreshing the SNMPv3 agent using refresh -s snmpd will not work as it did in SNMPv1. If you make changes to the /etc/snmpdv3.conf file, you must stop and start the daemon as instructed above. The dynamic configuration function supported in SNMPv3 will not allow you to refresh.

Step 6. Test your configuration

To verify that your configuration is correct, you can run the following command on the SNMP manager .

text
clsnmp -h user1 walk mib

where mib is a MIB subtree to which the user has access. In this scenario, it could be interfaces, tcp, icmp, or system. If the configuration is correct, you will see the information from the specified subtree.

If you did not get the correct output, review the steps in this document and verify that you have entered all information correctly.

SNMPv3 문제 해결

SNMPv3를 쓰면서 만날 수 있는 문제입니다.

  • 이전하는 동안 /etc/snmpd.conf 파일에 정의한 커뮤니티와 SMUX 항목을 /etc/snmpdv3.conf 파일로 옮겨야 합니다. 이 정보를 옮기는 방법은 SNMPv1에서 SNMPv3로 이전을 봅니다. (5.3판은 이 항목을 "이전 AIX에서 AIX 5.2로 올린 뒤 SNMP가 이전처럼 동작하지 않는다"는 증상으로 적었습니다.)
  • 요청에 응답이 없습니다. 가장 가능성 높은 원인은 /etc/snmpdv3.conf 파일이나 /etc/clsnmp.conf 파일, 또는 둘 다의 구성 오류입니다. 이 파일들을 꼼꼼히 검토해 모든 정보가 올바르게 입력되었는지 확인합니다. 새 사용자를 만들 때 이 파일을 편집하는 방법은 SNMPv3 사용자 만들기를 봅니다.
  • 인증 키와 암호 키를 모두 써서 새 사용자를 구성했는데 이 사용자를 쓰면 오류 메시지가 나옵니다. 가장 가능성 높은 원인은 SNMPv3 암호화 버전을 실행하고 있지 않은 것입니다. 실행 중인 버전을 알아내려면 다음 단계를 따릅니다.
    1. ps -e 출력에서 snmpd를 찾습니다(원문은 ps -e를 grep으로 거른 명령).
      • 출력이 없으면 snmpd 데몬을 시작해야 할 것입니다. startsrc -s snmpd를 실행합니다.
      • 출력에 snmpdv1이 있으면 SNMPv1을 실행하고 있습니다. 이 버전에서는 SNMPv1 요청을 할 수 있습니다.
      • 출력에 snmpdv3ne가 있으면 SNMPv3 암호화하지 않는 버전을 실행하고 있습니다. AIX 운영 체제를 설치하면 이 버전이 기본으로 실행됩니다. 이 버전에서는 암호 키를 쓸 수 없습니다.
      • 출력에 snmpdv3e가 있으면 따로 설치하는 제품인 SNMPv3 암호화 버전을 실행하고 있습니다. SNMPv3 암호화 버전은 허용되는 곳에서 AIX Expansion Pack으로 쓸 수 있습니다. 이 버전에서는 암호 키를 쓸 수 있습니다.
    2. 실행 중인 버전이 의도한 버전인지 판단합니다. 아니라면 다음과 같이 snmpv3_ssw 명령으로 버전을 바꿉니다.
      • snmpv3_ssw -1은 SNMPv1로 바꿉니다.
      • snmpv3_ssw -n은 SNMPv3 암호화하지 않는 버전으로 바꿉니다.
      • snmpv3_ssw -e는 설치되어 있으면 SNMPv3 암호화 버전으로 바꿉니다.
  • /etc/snmpdv3.conf 파일을 바꾸고 데몬을 새로 고쳤는데 변경이 적용되지 않습니다. /etc/snmpdv3.conf 파일을 바꾼 뒤에는 SNMP 데몬을 멈추고 시작해야 합니다. 데몬을 새로 고치는 것으로는 되지 않습니다. 다음 절차를 씁니다.
    1. stopsrc -s snmpd를 실행해 SNMP 데몬을 멈춥니다.
    2. startsrc -s snmpd를 실행해 SNMP 데몬을 시작합니다.
  • DPI2 서브에이전트가 시작되었는데 그로부터 MIB 변수를 질의할 수 없습니다. 가장 가능성 높은 원인은 /etc/snmpdv3.conf 파일에 public 커뮤니티가 구성되어 있지 않은 것입니다. 기본으로 AIX와 함께 제공되는 DPI2 서브에이전트는 커뮤니티 이름 public으로 SNMP 에이전트에 연결합니다. public 커뮤니티는 기본으로 /etc/snmpdv3.conf 파일에 구성되어 있습니다. public 커뮤니티를 지웠다면 파일에 다음 줄을 더합니다.
text
VACM_GROUP group1 SNMPv1 public -
VACM_VIEW defaultView 1.3.6.1.4.1.2.2.1.1.1.0 - included -
VACM_ACCESS  group1 - - noAuthNoPriv SNMPv1  defaultView - defaultView -
COMMUNITY public    public     noAuthNoPriv 0.0.0.0     0.0.0.0         -

1.3.6.1.4.1.2.2.1.1.1.0은 dpiPortForTCP.0의 OID입니다.

  • 이전 전에는 질의할 수 있던, SMUX 피어가 관리하는 MIB 변수를 더는 질의할 수 없습니다. SMUX 항목이 /etc/snmpdv3.conf 파일과 /etc/snmpd.peers 파일에 모두 있는지 확인합니다. 새 SMUX 피어를 구성하면 이 두 파일 모두에 넣었는지도 확인합니다.
  • 직접 만든 MIB 변수 묶음을 구현했는데, 그 변수를 다른 사용자의 뷰에 넣거나 뺄 수 없습니다. /etc/snmpdv3.conf 파일의 VACM_VIEW 항목에는 MIB 변수 이름이 아니라 MIB 변수의 OID를 지정해야 합니다.
  • 트랩을 받지 못합니다. /etc/snmpdv3.conf 파일에 트랩 항목을 올바르게 구성했는지 확인합니다. 또 SNMPv3 트랩이면 /etc/clsnmp.conf 파일도 구성해야 합니다. 트랩 구성 방법은 SNMPv3 사용자 만들기를 봅니다. 또 (/etc/snmpdv3.conf 파일에) 트랩을 받도록 지정한 기계가 트랩을 기다리고 있는지 확인합니다. 받는 기계의 명령행에서 clsnmp trap을 실행해 이 프로세스를 시작할 수 있습니다.
  • SNMPv3 환경에서 DPI2 서버가 실행되지 않는 이유는 무엇입니까? SNMPv3 구조에서는 SNMPv3 에이전트 자체가 DPI2 서버를 실행합니다. 자세한 정보는 SNMPv3 구조를 봅니다.
영어 원문

SNMPv3 troubleshooting

These problems might be encountered using SNMPv3.

  • While migrating, you need to migrate the community and SMUX entries defined in the /etc/snmpd.conf file to the /etc/snmpdv3.conf file. For information on migrating this information, see Migrating from SNMPv1 to SNMPv3.

  • Requests are not generating any responses. The most likely cause of this problem is a configuration error in either the /etc/snmpdv3.conf file or the /etc/clsnmp.conf file, or both. Carefully review these files to ensure that all information is entered correctly. For information on editing these files when creating new users, see Creating users in SNMPv3.

  • A new user was configured using both authentication and privacy keys, but an error message is returned when using this user. The most likely cause is that you are not running the SNMPv3 encrypted version. Follow these steps to determine what version you are running:

  1. Run ps -e|grep snmpd. – If you receive no output, you probably need to start the snmpd daemon. Run startsrc -s snmpd. – If your output included snmpdv1, you are running SNMPv1. You will be able to make SNMPv1 requests when running this version. – If your output included snmpdv3ne, you are running the SNMPv3 non-encrypted version. After installing the AIX operating system, this version will be running by default. This version does not allow you to use privacy keys. – If your output included snmpdv3e, you are running the SNMPv3 encrypted version, which is a separately-installable product. The SNMPv3 encrypted version is available on the AIX Expansion Pack where allowed. The SNMPv3 encrypted version allows the use of privacy keys.

  2. Determine if the version that you are running is the intended version. If it is not, use the

snmpv3_ssw command to change the version as follows

– snmpv3_ssw -1 will switch to SNMPv1 – snmpv3_ssw -n will switch to SNMPv3 non-encrypted – snmpv3_ssw -e will switch to SNMPv3 encrypted if it is installed

  • After making changes to the /etc/snmpdv3.conf file and refreshing the daemon, my changes are not taking effect. After making changes to the /etc/snmpdv3.conf file, the SNMP daemon must be stopped and started. Refreshing the daemon will not work. Use the following procedure:
  1. Stop the SNMP daemon by running stopsrc -s snmpd.

  2. Start the SNMP daemon by running startsrc -s snmpd.

  • The DPI2 subagent is started, but no MIB variables can be queried from it. The most likely cause is that the public community is not configured in the /etc/snmpdv3.conf file. By default, and DPI2 subagent shipped with AIX uses the community name public to connect itself to the SNMP agent. The public community is configured in the /etc/snmpdv3.conf file by default. If you have removed the public community from the /etc/snmpd.conf file, add the following lines to the file:
text
VACM_GROUP group1 SNMPv1 public -
VACM_VIEW defaultView 1.3.6.1.4.1.2.2.1.1.1.0 - included -
VACM_ACCESS  group1 - - noAuthNoPriv SNMPv1  defaultView - defaultView -
COMMUNITY public    public     noAuthNoPriv 0.0.0.0     0.0.0.0         -

1.3.6.1.4.1.2.2.1.1.1.0 is the OID for dpiPortForTCP.0.

  • MIB variables managed by the SMUX peer that could be queried before migration can no longer be queried. Ensure that your SMUX entry is present in the /etc/snmpdv3.conf file and the /etc/snmpd.peers file. If you configure new SMUX peers, ensure that they are entered in both of these files as well.

  • A personal set of MIB variables was implemented, but the variables cannot be included or excluded from viewing by other users. In the VACM_VIEW entry in the /etc/snmpdv3.conf file, you must specify the OID of the MIB variable rather than the MIB variable name.

  • Receiving traps are not being received. Ensure that you have configured the trap entries correctly in the /etc/snmpdv3.conf file. In addition, if the trap is an SNMPv3 trap, the /etc/clsnmp.conf file must also be configured. For instructions on configuring traps, see Creating users in SNMPv3. In addition, make sure that the machine specified to receive traps (in the /etc/snmpdv3.conf file) is listening for them. You can start this process by running clsnmp trap on the command line of the receiving machine.

  • Why is the DPI2 server not running in the SNMPv3 environment? In the SNMPv3 architecture, the SNMPv3 agent itself runs the DPI2 server. See SNMPv3 architecture for more information.