[AIX 네트워크 관리 31] SNMP (3) SNMPv1 에이전트, 메시지 처리, 설정 가능한 MIB 변수, 문제 해결

핵심 정리

  • SNMPv1 접근 정책은 커뮤니티(호스트 묶음과 커뮤니티 이름), 접근 모드(none, read-only, read-write, write-only), MIB 뷰의 연결이며 /etc/snmpd.conf에 적습니다. 요청의 출발지 IP와 커뮤니티 이름이 맞지 않으면 무시하거나 authenticationFailure 트랩을 냅니다.
  • snmpd는 루프백(ifconfig lo0 loopback up)이 필요하고 /etc/services에 snmp 161/udp, snmp-trap 162/udp, smux 199/tcp가 있어야 합니다. 구성 파일은 시작할 때와 refresh·kill -1 때 다시 읽습니다.
  • 요청 PDU는 GET, GET-NEXT, SET이고 응답은 GET-RESPONSE입니다. error-status: noError 0, tooBig 1, noSuchName 2, badValue 3, readOnly 4, genErr 5. 트랩: coldStart, warmStart(snmpd.conf를 다시 읽을 때), linkDown, linkUp, authenticationFailure, egpNeighborLoss.
  • gated가 snmp yes;로 SMUX 피어가 되면 ipRouteTable과 EGP MIB를 등록하며, 이때 ipRouteTable set은 허용되지 않습니다. snmpd.conf의 SMUX 항목과 /etc/snmpd.peers의 OID·비밀번호가 맞아야 합니다.
  • 문제 해결: 데몬이 바로 끝나면 로그의 FATAL, root 실행·소유, 구성 파일 존재, UDP 161 중복 바인드를 봅니다. 응답이 없으면 lo0 상태, 돌아가는 경로, community 항목의 모든 필드·접근 모드·view 항목, iso.3, 넷마스크(전체 허용은 0.0.0.0)를 확인합니다. 쓰기 권한 없는 커뮤니티의 set은 noSuchName을 돌려줍니다.
항목 내용
버전 AIX 5.3, AIX 6.1 (두 판의 내용이 같음)
원문 Networks and communication management — 5.3판 367386쪽, 6.1판 472491쪽
파일 /etc/snmpd.conf, /etc/snmpd.peers, /etc/services, /etc/gated.conf
관련 명령어 snmpd, snmpinfo, ifconfig, netstat -in, route, refresh, kill -1

이 정보는 SNMPv1에만 해당합니다. SNMPv1을 쓸 때 snmpd 에이전트는 간단한 인증 방식으로 어떤 SNMP 관리자 스테이션이 자기 MIB(Management Information Base) 변수에 접근할 수 있는지 정합니다.

이 인증 방식은 SNMPv1의 SNMP 접근 정책을 지정하는 것입니다. SNMP 접근 정책은 SNMP 커뮤니티, 접근 모드, MIB 뷰를 연결하는 관리 관계입니다.

SNMP 커뮤니티는 호스트 하나 이상의 묶음과 커뮤니티 이름입니다. 커뮤니티 이름은 SNMP 관리자가 인증을 위해 SNMP 요청 패킷에 넣어야 하는 옥텟 문자열입니다.

접근 모드는 커뮤니티의 호스트가 특정 SNMP 에이전트의 MIB 변수를 가져오고 바꾸는 데 허용되는 접근을 지정합니다. 접근 모드는 none, read-only, read-write, write-only 가운데 하나여야 합니다.

MIB 뷰는 특정 SNMP 커뮤니티가 접근할 수 있는 MIB 하위 트리 하나 이상을 정의합니다. MIB 뷰는 MIB 트리 전체일 수도, MIB 트리 전체의 제한된 부분 집합일 수도 있습니다.

SNMP 에이전트는 요청을 받으면 커뮤니티 이름과 요청 호스트의 IP 주소를 확인해 요청 호스트가 커뮤니티 이름으로 식별되는 SNMP 커뮤니티의 구성원인지 판단합니다. 구성원이면 SNMP 에이전트는 그 커뮤니티에 연결된 접근 정책에 정의된 대로, 요청 호스트에 지정한 MIB 변수에 대한 지정한 접근이 허용되는지 판단합니다. 모든 기준을 만족하면 SNMP 에이전트는 요청을 들어주려고 합니다. 그렇지 않으면 authenticationFailure 트랩을 만들거나 요청 호스트에 알맞은 오류 메시지를 돌려줍니다.

snmpd 에이전트의 SNMPv1 접근 정책은 사용자가 구성할 수 있으며 /etc/snmpd.conf 파일에 지정합니다. snmpd 에이전트의 SNMP 접근 정책을 구성하려면 Files Reference의 /etc/snmpd.conf 파일을 봅니다.

영어 원문

SNMPv1

This information is specific to SNMPv1. When using SNMPv1, the snmpd agent uses a simple authentication scheme to determine which Simple Network Management Protocol (SNMP) manager stations can access its Management Information Base (MIB) variables.

This authentication scheme involves the specification of SNMP access policies for SNMPv1. An SNMP access policy is an administrative relationship involving an association among an SNMP community, an access mode, and an MIB view.

An SNMP community is a group of one or more hosts and a community name. A community name is a string of octets that an SNMP manager must embed in an SNMP request packet for authentication purposes.

The access mode specifies the access the hosts in the community are allowed with respect to retrieving and modifying the MIB variables from a specific SNMP agent. The access mode must be one of the following: none, read-only, read-write, or write-only.

A MIB view defines one or more MIB subtrees that a specific SNMP community can access. The MIB view can be the entire MIB tree or a limited subset of the entire MIB tree.

When the SNMP agent receives a request, the agent verifies the community name with the requesting host IP address to determine if the requesting host is a member of the SNMP community identified by the community name. If the requesting host is a member of the SNMP community, the SNMP agent then determines if the requesting host is allowed the specified access for the specified MIB variables as defined in the access policy associated with that community. If all criteria are met, the SNMP agent attempts to honor the request. Otherwise, the SNMP agent generates an authenticationFailure trap or returns the appropriate error message to the requesting host.

The SNMPv1 access policies for the snmpd agent are user-configurable and are specified in the /etc/snmpd.conf file. To configure the SNMP access policies for the snmpd agent, see the /etc/snmpd.conf file in Files Reference.

SNMP 데몬 구성

SNMP 데몬은 어떤 TCP/IP 워크스테이션 호스트에서든 실행할 수 있는 백그라운드 서버 프로세스입니다.

SNMP 에이전트 역할을 하는 데몬은 관리자 응용 프로그램의 SNMP 요청을 받고, 인증하고, 처리합니다. 에이전트와 관리자 기능에 관한 자세한 정보는 Communications Programming Concepts의 Simple Network Management Protocol, How a Manager Functions, How an Agent Functions를 봅니다.

참고: SNMP 데몬, SNMP 에이전트, 에이전트라는 말은 같은 뜻으로 씁니다.

snmpd 데몬은 최소 구성으로 루프백 TCP/IP 인터페이스가 활성이어야 합니다. TCP/IP를 시작하기 전에 다음 명령을 입력합니다.

text
ifconfig lo0 loopback up

SNMP 데몬은 잘 알려진 UDP와 TCP 포트에 소켓을 bind하려 하며, 이 포트는 /etc/services 파일에 다음과 같이 정의되어 있어야 합니다.

text
snmp            161/udp
snmp-trap       162/udp
smux            199/tcp

RFC 1157에 따라 snmp 서비스는 포트 161이어야 합니다. /etc/services 파일은 이 서비스들에 포트 161, 162, 199를 할당합니다. /etc/services 파일을 다른 기계에서 제공받는다면, SNMP 데몬을 실행하기 전에 서버가 제공하는 /etc/services 파일에 이 포트들이 할당되어 있어야 합니다.

SNMP 데몬은 시작할 때와, (snmpd 데몬을 SRC 제어로 실행했다면) refresh 명령이나 kill -1 신호를 받을 때 실행 중인 SNMP 버전의 구성 파일을 읽습니다.

/etc/snmpd.conf 파일

/etc/snmpd.conf 구성 파일은 SNMPv1용 SNMP 데몬의 커뮤니티 이름과 그에 연결된 접근 권한과 뷰, 트랩 알림을 받을 호스트, 로깅 속성, snmpd 전용 매개변수 구성, SMUX(single multiplexer) 구성을 지정합니다.

자세한 정보는 Files Reference의 /etc/snmpd.conf 파일을 봅니다.

영어 원문

SNMP daemon configuration

The Simple Network Management Protocol (SNMP) daemon is a background server process that can be run on any Transmission Control Protocol/Internet Protocol (TCP/IP) workstation host.

The daemon, acting as SNMP agent, receives, authenticates, and processes SNMP requests from manager applications. See Simple Network Management Protocol, How a Manager Functions, and How an Agent Functions in Communications Programming Concepts for more detailed information on agent and manager functions.

Note: The terms SNMP daemon, SNMP agent, and agent are used interchangeably.

The snmpd daemon requires the loopback TCP/IP interface to be active for minimal configuration. Enter the following command before starting TCP/IP:

text
ifconfig lo0 loopback up

The SNMP daemon will attempt to bind sockets to certain well-known User Datagram Protocol (UDP) and Transmission Control Protocol (TCP) ports, which must be defined in the /etc/services file as follows:

text
snmp            161/udp
snmp-trap       162/udp
smux            199/tcp

The snmp service must be assigned port 161, as required by RFC 1157. The /etc/services file assigns ports 161, 162, and 199 to these services. If the /etc/services file is being serviced off another machine, these assigned ports must be made available in the served /etc/services file on the server before the SNMP daemon can run.

The SNMP daemon reads the configuration file on the running SNMP version on startup and when a refresh command (if the snmpd daemon is invoked under System Resource Controller control) or kill -1 signal is issued.

/etc/snmpd.conf file

The /etc/snmpd.conf configuration file specifies community names and associated access privileges and views, hosts for trap notification, logging attributes, snmpd-specific parameter configurations, and single multiplexer (SMUX) configurations for the SNMP daemon for SNMPv1.

See the /etc/snmpd.conf file in Files Reference for more information.

SNMP 데몬 처리

SNMP 데몬은 관리자 응용 프로그램의 SNMP 요청을 처리합니다.

에이전트와 관리자 기능에 관한 자세한 정보는 Communications Programming Concepts의 Simple Network Management Protocol (SNMP), How a Manager Functions, How an Agent Functions를 읽습니다.

SNMP 메시지 처리와 인증

모든 요청, 트랩, 응답은 ASN.1로 인코딩한 메시지 형태로 전송됩니다.

RFC 1157에 정의된 메시지는 다음 구조입니다.

text
Version  Community  PDU

여기서 Version은 SNMP 버전(지금은 버전 1), Community는 커뮤니티 이름, PDU는 SNMP 요청, 응답, 트랩 데이터가 든 프로토콜 데이터 단위입니다. PDU도 ASN.1 규칙에 따라 인코딩됩니다.

그림 30. SNMPv1 구조의 주요 부분

text
 SNMP 관리자                SNMPv1 에이전트(snmpdv1)                DPI2 서브에이전트
 +----------+  요청 ->      +-----------------------+   요청, 응답/트랩 +-----------+
 | snmpinfo | -- UDP 161 -> |  dpid2                | <---------------> | hostmibd  |
 |          | <- 응답/트랩  |                       |  dpiportforTCP.0  +-----------+
 +----------+               |  smux server          |                    SMUX 피어
                            |                       | <--- TCP 199 ---> +-----------+
                            +-----------------------+  요청, 응답/트랩  |  gated    |
                                                                         +-----------+

SNMP 데몬은 모든 SNMP 프로토콜 메시지를 TCP/IP의 UDP로 주고받습니다. 요청은 잘 알려진 포트 161에서 받습니다. 트랩은 /etc/snmpd.conf 파일의 trap 항목에 나열된, 잘 알려진 포트 162에서 기다리는 호스트로 보냅니다.

요청을 받으면 출발지 IP 주소와 커뮤니티 이름을, /etc/snmpd.conf 파일의 community와 view 항목에 지정된 IP 주소, 커뮤니티 이름, 권한, 뷰 목록과 대조합니다. snmpd 에이전트는 시작할 때와 refresh 요청 명령이나 kill -1 신호를 받을 때 이 파일을 읽습니다. 맞는 항목이 없으면 요청을 무시합니다. 맞는 항목이 있으면 /etc/snmpd.conf 파일에서 그 IP 주소, 커뮤니티, 뷰 이름 연결에 대한 community와 view 항목에 지정한 권한에 따라 접근을 허용합니다. 메시지와 PDU 모두 ASN.1 규칙에 따라 인코딩되어야 합니다.

이 인증 방식은 완전한 보안을 제공하려는 것이 아닙니다. SNMP 데몬을 get과 get-next 요청에만 쓴다면 보안이 문제가 되지 않을 수 있습니다. set 요청을 허용한다면 set 권한을 제한할 수 있습니다.

자세한 정보는 Files Reference의 /etc/snmpd.conf 파일과 Communications Programming Concepts의 Management Information Base (MIB)를 봅니다.

SNMP 요청 처리

SNMP 데몬이 받을 수 있는 요청 PDU는 세 종류입니다.

요청 종류는 RFC 1157에 정의되어 있으며 PDU는 모두 다음 형식입니다.

표 85. 요청 PDU 형식

request-ID error-status error-index variable-bindings
GET 0 0 VarBindList
GET-NEXT 0 0 VarBindList
SET 0 0 VarBindList

request-ID 필드는 요청의 성격을 나타냅니다. error-status 필드와 error-index 필드는 쓰지 않으며 0이어야 합니다. variable-bindings 필드에는 값을 요청하는 숫자 형식 인스턴스 ID의 가변 길이 목록이 들어 있습니다. request-ID 필드 값이 SET이면 variable-bindings 필드는 인스턴스 ID와 값의 쌍 목록입니다.

세 요청 종류에 관한 설명은 Communications Programming Concepts의 Using the Management Information Base (MIB) Database를 읽습니다.

SNMP 응답 처리

응답 PDU는 요청 PDU와 거의 같은 형식입니다.

표 86. 응답 PDU 형식

request-ID error-status error-index variable-bindings
GET-RESPONSE ErrorStatus ErrorIndex VarBindList

요청을 성공적으로 처리했으면 error-status와 error-index 필드 값이 모두 0이고, variable-bindings 필드에는 인스턴스 ID와 값 쌍의 완전한 목록이 들어 있습니다.

요청 PDU의 variable-bindings 필드에 있는 인스턴스 ID 가운데 하나라도 처리하지 못하면 SNMP 에이전트는 처리를 멈추고, 실패한 인스턴스 ID의 인덱스를 error-index 필드에 쓰고, error-status 필드에 오류 코드를 기록하고, 일부만 완성된 결과 목록을 variable-bindings 필드에 복사합니다.

RFC 1157은 error-status 필드에 다음 값을 정의합니다.

표 87. error-status 필드 값

이름 값 설명
noError 0 처리가 성공적으로 끝났습니다(error-index는 0).
tooBig 1 응답 PDU 크기가 구현이 정한 한계를 넘습니다(error-index는 0).
noSuchName 2 GET과 SET 요청에서는 인스턴스 ID가 해당 MIB 뷰에 없고, GET-NEXT 요청에서는 해당 MIB 뷰의 MIB 트리에 다음 항목이 없습니다(error-index는 0이 아님).
badValue 3 SET 요청에서만, 지정한 값이 해당 인스턴스 ID의 type 속성과 구문상 맞지 않습니다(error-index는 0이 아님).
readOnly 4 정의되지 않음
genErr 5 구현이 정한 오류가 일어났습니다(error-index는 0이 아님). 예를 들어 구현 한계를 넘는 값을 할당하려 했습니다.

SNMP 트랩 처리

트랩 PDU는 RFC 1157이 다음 형식으로 정의합니다.

표 88. 트랩 PDU 형식

enterprise agent-address generic-trap specific-trap time-stamp variable-bindings
Object ID Integer Integer Integer TimeTicks VarBindList

각 필드는 다음과 같이 씁니다.

필드 설명
enterprise 에이전트를 구현한 벤더에 할당된 객체 식별자. sysObjectID 변수의 값이며 SNMP 에이전트 구현자마다 고유합니다. 이 에이전트 구현에 할당된 값은 1.3.6.1.4.1.2.3.1.2.1.1.3, 곧 risc6000snmpd.3입니다.
agent-address 트랩을 만드는 객체의 IP 주소
generic-trap 정수. 0 coldStart, 1 warmStart, 2 linkDown, 3 linkUp, 4 authenticationFailure, 5 egpNeighborLoss, 6 enterpriseSpecific
specific-trap 쓰지 않음. 앞으로의 개발을 위해 예약
time-stamp 에이전트를 마지막으로 다시 초기화한 때부터 트랩을 만든 이벤트까지 지난 시간(100분의 1초 단위)
variable-bindings generic-trap 종류에 따른 추가 정보

다음 generic-trap 값은 특정 시스템 이벤트가 감지되었음을 나타냅니다.

값 뜻
coldStart 에이전트가 다시 초기화하고 있습니다. 구성 데이터나 MIB 변수 값, 또는 둘 다 바뀌었을 수 있습니다. 측정 기간을 다시 시작합니다.
warmStart 에이전트가 다시 초기화하고 있지만 구성 데이터나 MIB 변수 값은 바뀌지 않았습니다. 이 SNMP 에이전트 구현에서는 /etc/snmpd.conf 파일을 다시 읽을 때 warmStart 트랩을 만듭니다. /etc/snmpd.conf 파일의 구성 정보는 SNMP 관리자 데이터베이스에 부작용이 없는 에이전트 구성용입니다. 측정 기간을 다시 시작하면 안 됩니다.
linkDown 에이전트가 알려진 통신 인터페이스가 꺼진 것을 감지했습니다.
linkUp 에이전트가 알려진 통신 인터페이스가 켜진 것을 감지했습니다.
authenticationFailure 인증할 수 없는 메시지를 받았습니다.
egpNeighborLoss EGP(Exterior Gateway Protocol) 이웃을 잃었습니다. 이 값은 EGP를 쓰는 gated 데몬을 실행하는 호스트에서 에이전트가 실행될 때만 만들어집니다.
enterpriseSpecific 구현되지 않았으며 앞으로 쓰려고 예약했습니다.

linkDown과 linkUp 트랩에는 variable-bindings 목록에 인스턴스 ID와 값 쌍이 하나 들어 있습니다. 인스턴스 ID는 꺼지거나 켜진 어댑터의 ifIndex를 식별하고, 값은 ifIndex 값입니다. egpNeighborLoss 트랩에도 잃은 이웃의 egpNeighAddr 인스턴스 ID와 값으로 된 바인딩이 들어 있습니다.

영어 원문

SNMP daemon processing

The Simple Network Management Protocol (SNMP) daemon processes SNMP requests from manager applications.

Read Simple Network Management Protocol (SNMP), How a Manager Functions, and How an Agent Functions in Communications Programming Concepts for more detailed information on agent and manager functions.

SNMP message processing and authentication

All requests, traps, and responses are transmitted in the form of ASN.1-encoded messages.

A message, as defined by RFC 1157, has the following structure:

Version Community PDU

where Version is the SNMP version (currently version 1), Community is the community name, and PDU is the protocol data unit that contains the SNMP request, response, or trap data. A PDU is also encoded according to ASN.1 rules.

This illustration shows and example of the SNMPv1 architecture. The DPI2 subagent, smux peer, SNMP manager, and SNMP agent are shown. In addition, how they communicate with each other is shown.

The SNMP daemon receives and transmits all SNMP protocol messages through the Transmission Control Protocol/Internet Protocol (TCP/IP) User Datagram Protocol (UDP). Requests are accepted on well-known port 161. Traps are transmitted to the hosts listed in the trap entries in the /etc/snmpd.conf file that are listening on well-known port 162.

When a request is received, the source IP address and the community name are checked against a list containing the IP addresses, community names, permissions, and views as specified in the community and view entries in the /etc/snmpd.conf file. The snmpd agent reads this file at startup and on a refresh request

response request

response/trap snmpinfo snmpdv1

UDP 161 smux server hostmibd Smux Peer

TCP 199

request response/trap gated dpid2

request response/trap dpiportforTCP.0

Figure 30. The primary parts of the SNMPv1 architecture

command or a kill -1 signal. If no matching entry is found, the request is ignored. If a matching entry is found, access is allowed according to the permissions specified in the community and view entries for that IP address, community, and view name association in the /etc/snmpd.conf file. Both the message and the PDU must be encoded according to the ASN.1 rules.

This authentication scheme is not intended to provide full security. If the SNMP daemon is used only for get and get-next requests, security might not be a problem. If set requests are allowed, the set privilege can be restricted.

See the /etc/snmpd.conf file in Files Reference for further information. See Management Information Base (MIB) in Communications Programming Concepts for further information.

SNMP request processing

There are three types of request PDUs that can be received by the SNMP daemon.

The request types are defined in RFC 1157, and the PDUs all have the following format:

Table 85. Request PDU format

request-ID error-status error-index variable-bindings
GET 0 0 VarBindList
GET-NEXT 0 0 VarBindList
SET 0 0 VarBindList

The request-ID field identifies the nature of the request; the error-status field and error-index field are unused and must be set to 0 (zero); and the variable-bindings field contains a variable-length list of numeric-format instance IDs whose values are being requested. If the value of the request-ID field is SET, the variable-bindings field is a list of pairs of instance IDs and values.

Read Using the Management Information Base (MIB) Database in Communications Programming Concepts for a discussion of the three request types.

SNMP response processing

Response PDUs have nearly the same format as request PDUs.

Table 86. Response PDU format

request-ID error-status error-index variable-bindings
GET-RESPONSE ErrorStatus ErrorIndex VarBindList

If the request was successfully processed, the value for both the error-status and error-index field is 0 (zero), and the variable-bindings field contains a complete list of pairs of instance IDs and values.

If any instance ID in the variable-bindings field of the request PDU was not successfully processed, the SNMP agent stops processing, writes the index of the failing instance ID into the error-index field, records an error code in the error-status field, and copies the partially completed result list into the variable-bindings field.

RFC 1157 defines the following values for the error-status field:

Table 87. Values for the error-status field

Value Value Explanation
noError 0 Processing successfully completed (error-index is 0).
tooBig 1 The size of the response PDU would exceed an implementation-defined limit (error-index is 0).
noSuchName 2 An instance ID does not exist in the relevant MIB view for GET and SET request types or has no successor in the MIB tree in the relevant MIB view for GET-NEXT requests (nonzero error-index).
badValue 3 For SET requests only, a specified value is syntactically incompatible with the type attribute of the corresponding instance ID (nonzero error-index).
readOnly 4 Not defined.
genErr 5 An implementation-defined error occurred (nonzero error- index); for example, an attempt to assign a value that exceeds implementation limits.

SNMP trap processing

Trap PDUs are defined by RFC 1157 to have the format shown in this table.

Table 88. Trap PDU format

enterprise agent-address generic-trap specific-trap time-stamp variable-bindings
Object ID Integer Integer Integer TimeTicks VarBindList

The fields are used as follows:

  • enterprise — The object identifier assigned to the vendor implementing the agent. This is the value of the sysObjectID variable, and it is unique for each implementer of an SNMP agent. The value assigned to this implementation of the agent is 1.3.6.1.4.1.2.3.1.2.1.1.3, or risc6000snmpd.3.
  • agent-address — IP address of the object generating the trap.
  • generic-trap — Integer, as follows: 0 coldStart 1 warmStart 2 linkDown 3 linkUp 4 authenticationFailure 5 egpNeighborLoss 6 enterpriseSpecific
  • specific-trap — Unused, reserved for future development.
  • time-stamp — Elapsed time, in hundredths of a second, from the last reinitialization of the agent to the event generating the trap.
  • variable-bindings — Extra information, dependent on generic-trap type.

The following generic-trap values indicate that certain system events have been detected:

  • coldStart — The agent is reinitializing. Configuration data or MIB variable values, or both, might have changed. Restart the measurement epochs.
  • warmStart — The agent is reinitializing but configuration data or MIB variable values have not changed. In this implementation of the SNMP agent, a warmStart trap is generated when the /etc/snmpd.conf file is reread. The configuration information in the /etc/snmpd.conf file is for agent configuration that has no side effects on SNMP manager databases. Measurement epochs should not be restarted.
  • linkDown — The agent has detected that a known communications interface has been disabled.
  • linkUp — The agent has detected that a known communications interface has been enabled.
  • authenticationFailure — A message was received that could not be authenticated.
  • egpNeighborLoss — An Exterior Gateway Protocol (EGP) neighbor was lost. This value is only generated when the agent is running on a host that runs the gated daemon using EGP.
  • enterpriseSpecific — Not implemented; reserved for future use.

The linkDown and linkUp traps contain a single instance ID/value pair in the variable-bindings list. The instance ID identifies the ifIndex of the adapter that was disabled or enabled, and the value is the ifIndex value. The trap for egpNeighborLoss also contains a binding consisting of the instance ID and value of egpNeighAddr for the lost neighbor.

SNMP 데몬의 EGP MIB 변수 지원과 설정 가능한 변수

에이전트 호스트가 EGP(Exterior Gateway Protocol)를 켠 gated 데몬을 실행하고 있으면, gated 데몬이 지원하는 EGP 그룹의 MIB 변수 여럿에 snmpd 에이전트가 접근할 수 있습니다.

다음 EGP MIB 변수는 고유한 인스턴스가 하나입니다.

변수 설명
egpInMsgs 오류 없이 받은 EGP 메시지 수
egpInErrors 오류가 있는 채로 받은 EGP 메시지 수
egpOutMsgs 에이전트 호스트에서 실행 중인 gated 데몬이 보낸 EGP 메시지 총수
egpOutErrors 자원 한계 때문에 에이전트 호스트의 gated 데몬이 보내지 못한 EGP 메시지 수
egpAs 에이전트 호스트 gated 데몬의 자율 시스템 번호

다음 EGP MIB 변수는 에이전트 호스트 gated 데몬이 얻은 EGP 피어(이웃)마다 인스턴스가 있습니다.

변수 설명
egpNeighState 이 EGP 피어의 상태: 1 idle, 2 acquisition, 3 down, 4 up, 5 cease
egpNeighAddr 이 EGP 피어의 IP 주소
egpNeighAs 이 EGP 피어의 자율 시스템 번호. 0이면 이 피어의 자율 시스템 번호를 아직 모른다는 뜻입니다.
egpInNeighMsgs 이 EGP 피어에게서 오류 없이 받은 EGP 메시지 수
egpNeighInErrs 이 EGP 피어에게서 오류가 있는 채로 받은 EGP 메시지 수
egpNeighOutMsgs 이 EGP 피어에게 보내려고 로컬에서 만든 EGP 메시지 수
egpNeighOutErrs 자원 한계 때문에 이 EGP 피어에게 보내지 못한, 로컬에서 만든 EGP 메시지 수
egpNeighInErrMsgs 이 EGP 피어에게서 받은 EGP 정의 오류 메시지 수
egpNeighOutErrMsgs 이 EGP 피어에게 보낸 EGP 정의 오류 메시지 수
egpNeighStateUp 이 EGP 피어와 UP 상태로 바뀐 횟수
egpNeighStateDowns 이 EGP 피어와 UP 상태에서 다른 상태로 바뀐 횟수
egpNeighIntervalHello EGP Hello 명령 재전송 간격(100분의 1초)
egpNeighIntervalPoll EGP poll 명령 재전송 간격(100분의 1초)
egpNeighMode 이 EGP 피어의 폴링 모드. active(1)나 passive(2)
egpNeighEventTrigger 이 EGP 피어에 운영자가 시작하는 start와 stop 이벤트를 일으키는 제어 변수. start(1)나 stop(2)로 설정할 수 있습니다.

gated 데몬이 실행 중이 아니거나, 실행 중이지만 snmpd 에이전트와 통신하도록 구성되지 않았거나, EGP용으로 구성되지 않았으면 이 변수 값에 대한 get과 set 요청은 noSuchName 오류 응답 코드를 돌려줍니다.

gated 데몬 구성 파일 /etc/gated.conf에는 다음 문이 있어야 합니다.

text
snmp      yes;

gated 데몬은 내부적으로 snmpd 데몬의 SMUX 프로토콜 피어, 곧 프록시 에이전트로 구성되어 있습니다. gated 데몬은 시작할 때 snmpd 에이전트에 ipRouteTable MIB 변수 트리를 등록합니다. gated 데몬이 EGP용으로 구성되어 있으면 EGP MIB 변수 트리도 등록합니다. 등록이 끝나면 SNMP 관리자는 이 에이전트 호스트의 gated 데몬이 지원하는 ipRouteTable과 EGP MIB 변수를 snmpd 에이전트에 성공적으로 요청할 수 있습니다. gated 데몬이 실행 중이면 모든 MIB 라우팅 정보는 gated 데몬으로 얻습니다. 이 경우 ipRouteTable에 대한 set 요청은 허용되지 않습니다.

gated 데몬과 snmpd 데몬 사이의 SMUX 통신은 잘 알려진 TCP 포트 199로 이루어집니다. gated 데몬이 끝나면 snmpd는 gated 데몬이 전에 등록한 트리를 즉시 등록 해제합니다. gated 데몬이 snmpd 데몬보다 먼저 시작하면, gated 데몬은 SMUX 연결을 맺을 수 있을 때까지 snmpd 데몬을 주기적으로 확인합니다.

snmpd 에이전트가 gated 데몬 클라이언트와의 SMUX 연결을 인식하고 허용하도록 구성하려면 /etc/snmpd.conf 파일에 SMUX 항목을 더해야 합니다. 이 SMUX 항목에 gated 데몬용으로 지정한 클라이언트 객체 식별자와 비밀번호는 /etc/snmpd.peers 파일에 지정한 것과 맞아야 합니다.

set을 지원하는 MIB I·MIB II 변수

snmpd 에이전트는 다음 read-write MIB I과 MIB II 변수에 대한 set 요청을 지원합니다.

sysContact

이 에이전트 호스트의 연락 담당자를 나타내는 텍스트. 이 사람의 이름과 연락 방법이 들어 있습니다(예: "Bob Smith, 555-5555, ext 5."). 값은 256자로 제한됩니다. set 요청에서 이 MIB 변수의 문자열이 256자보다 길면 snmpd 에이전트는 badValue 오류를 돌려주고 set 작업을 하지 않습니다. sysContact의 초기 값은 /etc/snmpd.conf에 정의합니다(원문은 /etc.snmp.conf). 정의가 없으면 값은 빈 문자열입니다.

인스턴스 값 동작
0 "string" MIB 변수를 "string"으로 설정합니다.

sysName

이 에이전트 호스트의 호스트 이름. 보통 노드의 완전한 도메인 이름입니다. 값은 256자로 제한됩니다. set 요청에서 문자열이 256자보다 길면 badValue 오류를 돌려주고 set 작업을 하지 않습니다.

인스턴스 값 동작
0 "string" MIB 변수를 "string"으로 설정합니다.

sysLocation

이 snmpd 에이전트가 있는 기계의 물리 위치를 나타내는 텍스트 문자열(예: "Austin site, building 802, lab 3C-23."). 값은 256자로 제한됩니다. set 요청에서 문자열이 256자보다 길면 badValue 오류를 돌려주고 set 작업을 하지 않습니다. sysLocation의 초기 값은 /etc/snmp.conf에 정의합니다. 정의가 없으면 값은 빈 문자열입니다.

인스턴스 값 동작
0 "string" MIB 변수를 "string"으로 설정합니다.

ifAdminStatus

에이전트 호스트에 있는 인터페이스 어댑터의 원하는 상태. up과 down 상태를 지원합니다. testing으로 설정할 수 있지만 인터페이스의 동작 상태에는 영향이 없습니다.

인스턴스 값 동작
f 1 ifIndex가 f인 인터페이스 어댑터를 켭니다.
f 2 ifIndex가 f인 인터페이스 어댑터를 끕니다(원문 표에는 이 행이 빠짐).

참고: ifAdminStatus 값은 up이나 down으로 설정되었지만 인터페이스의 실제 동작 변경은 실패했을 수 있습니다. 이 경우 ifAdminStatus get 요청은 up을 보여 주지만 그 인터페이스의 ifOperStatus는 down을 보여 줄 수 있습니다. 이런 상황이 생기면 네트워크 관리자는 동작 변경을 다시 시도하도록 ifAdminStatus를 up으로 설정하는 set 요청을 다시 보냅니다.

atPhysAddress

에이전트 호스트의 주소 표 바인딩(ARP 표 항목)의 하드웨어 주소 부분. ipNetToMediaPhysAddress와 같은 MIB 변수입니다.

인스턴스 값 동작
f.1.n.n.n.n hh:hh:hh:hh:hh:hh ifIndex가 f인 인터페이스에서 IP 주소 n.n.n.n의 기존 ARP 표 바인딩을 (n.n.n.n, hh:hh:hh:hh:hh:hh)로 바꿉니다. 바인딩이 없었으면 새로 더합니다. hh:hh:hh:hh:hh:hh는 16진수 12자리 하드웨어 주소입니다.

atNetAddress

atPhysAddress에 지정한 하드웨어(물리) 주소에 해당하는 IP 주소. ipNetToMediaNetAddress와 같은 MIB 변수입니다.

인스턴스 값 동작
f.1.n.n.n.n m.m.m.m ifIndex가 f인 인터페이스에서 IP 주소 n.n.n.n의 기존 ARP 표 항목을 IP 주소 m.m.m.m으로 바꿉니다.

ipForwarding

이 에이전트 호스트가 데이터그램을 전달하는지 나타냅니다.

표 89. ipforwarding

인스턴스 값 동작
0 1 에이전트 호스트에 활성 인터페이스가 둘 이상이면 TCP/IP 커널이 패킷을 전달하도록 구성됩니다. 활성 인터페이스가 하나뿐이면 set 요청이 실패합니다.
0 2 에이전트 호스트의 TCP/IP 커널이 패킷을 전달하지 않도록 구성됩니다.

ipDefaultTTL

에이전트 호스트가 만드는 데이터그램의 IP 헤더에 넣는 기본 TTL(time-to-live) 값.

인스턴스 값 동작
0 n IP 프로토콜 지원이 쓰는 기본 TTL 값을 정수 n으로 설정합니다.

ipRouteDest

라우팅 테이블에 있는 경로의 목적지 IP 주소.

인스턴스 값 동작
n.n.n.n m.m.m.m 경로 n.n.n.n의 목적지 경로를 IP 주소 m.m.m.m으로 설정합니다.

ipRouteNextHop

에이전트 호스트에서 목적지 IP 주소에 닿을 수 있는 게이트웨이(라우팅 테이블 항목).

인스턴스 값 동작
n.n.n.n m.m.m.m 게이트웨이 m.m.m.m을 써서 네트워크 n.n.n.n에 닿는 라우팅 테이블 항목을 더합니다. 네트워크 주소임을 나타내려면 IP 주소 n.n.n.n의 호스트 부분이 0이어야 합니다.

ipRouteType

에이전트 호스트의 라우팅 테이블 항목 상태(항목을 지우는 데 씀).

인스턴스 값 동작
h.h.h.h 1 호스트 IP 주소 h.h.h.h로 가는 경로를 지웁니다.
n.n.n.n 2 호스트 IP 주소 n.n.n.n으로 가는 경로를 지웁니다.

ipNetToMediaPhysAddress

에이전트 호스트의 주소 표 바인딩(ARP 표 항목)의 하드웨어 주소 부분. atPhysAddress와 같은 MIB 변수입니다.

인스턴스 값 동작
f.1.n.n.n.n hh:hh:hh:hh:hh:hh ifIndex가 f인 인터페이스에서 IP 주소 n.n.n.n의 기존 ARP 표 바인딩을 (n.n.n.n, hh:hh:hh:hh:hh:hh)로 바꿉니다. 바인딩이 없었으면 새로 더합니다. hh:hh:hh:hh:hh:hh는 16진수 12자리 하드웨어 주소입니다.

ipNetToMediaNetAddress

ipNetToMediaPhysAddress에 지정한 하드웨어(물리) 주소에 해당하는 IP 주소. atNetAddress와 같은 MIB 변수입니다.

인스턴스 값 동작
f.1.n.n.n.n m.m.m.m ifIndex가 f인 인터페이스에서 IP 주소 n.n.n.n의 기존 ARP 표 항목을 IP 주소 m.m.m.m으로 바꿉니다.

ipNetToMediaType

IP 주소에서 물리 주소로의 매핑 종류.

인스턴스 값 동작
f.1.n.n.n.n 1 ifIndex가 f인 인터페이스에서 IP 주소와 물리 주소 사이의 기존 ARP 바인딩의 매핑 종류를 1, 곧 other로 설정합니다.
f.1.n.n.n.n 2 매핑 종류를 2, 곧 invalid로 설정합니다. 부작용으로 ipNetMediaTable의 해당 항목이 무효가 됩니다. 곧 인터페이스와 이 ipNetToMediaTable 항목의 연결이 끊깁니다.
f.1.n.n.n.n 3 매핑 종류를 3, 곧 dynamic으로 설정합니다.
f.1.n.n.n.n 4 매핑 종류를 4, 곧 static으로 설정합니다.

snmpEnableAuthenTraps

snmpd 에이전트가 authenticationFailure 트랩을 만들도록 구성되었는지 나타냅니다.

인스턴스 값 동작
0 1 snmpd 에이전트가 인증 실패 트랩을 만듭니다.
0 2 snmpd 에이전트가 인증 실패 트랩을 만들지 않습니다.

smuxPstatus

SMUX 프로토콜 피어의 상태(SMUX 피어를 지우는 데 씀).

인스턴스 값 동작
n 1 snmpd 에이전트가 아무것도 하지 않습니다.
n 2 snmpd 에이전트가 SMUX 피어 n과의 통신을 멈춥니다.

smuxTstatus

SMUX MIB 트리의 상태(MIB 트리 마운트를 지우는 데 씀).

인스턴스 값 동작
l.m.m.m…p 1 snmpd 에이전트가 아무것도 하지 않습니다.
l.m.m.m…p 2 MIB 트리 m.m.m…의 SMUX 마운트를 해제합니다. l은 MIB 트리 인스턴스의 길이이고 p는 smuxTpriority입니다.

RFC 1229에 정의된 설정 가능한 변수

다음 변수는 RFC 1229에 정의된 설정 가능한 변수입니다. snmpd 데몬은 사용자가 이 변수를 설정하게 합니다. 밑의 장치가 이런 변수 설정을 허용하지 않을 수 있습니다. 장치마다 무엇이 지원되는지 확인합니다.

ifExtnsPromiscuous

장치의 promiscuous 모드 상태. 장치의 promiscuous 모드를 켜고 끄는 데 씁니다. snmpd의 동작은 최종적이고 완전합니다. snmpd가 끄라는 지시를 받으면 기계의 다른 응용 프로그램과 관계없이 promiscuous 모드를 완전히 끕니다.

인스턴스 값 동작
n 1 장치 n의 promiscuous 모드를 켭니다.
n 2 장치 n의 promiscuous 모드를 끕니다.

ifExtnsTestType

시험 시작 변수. 이 변수를 설정하면 그 장치에 알맞은 시험을 실행합니다. 변수 값은 객체 식별자입니다. 구체적인 값은 장치 종류와 실행할 시험에 따라 다릅니다. 지금 snmpd가 실행할 줄 아는 시험은 testFullDuplexLoopBack뿐입니다.

인스턴스 값 동작
n oid oid가 지정한 시험을 시작합니다.

ifExtnsRcvAddrStatus

주소 상태 변수. 이 변수를 설정하면 지정한 주소가 알맞은 지속 수준으로 생깁니다. snmpd는 장치 ODM(Object Data Manager) 레코드를 설정할 수 없으므로 임시 주소만 설정할 수 있고, 멀티캐스트나 브로드캐스트 주소만 설정할 수 있습니다.

인스턴스 값 동작
n.m.m.m.m.m.m 1 주소를 임시도 영구도 아닌 주소로 더합니다.
n.m.m.m.m.m.m 2 주소를 사용에서 뺍니다.
n.m.m.m.m.m.m 3 주소를 임시 주소로 더합니다.
n.m.m.m.m.m.m 4 주소를 영구 주소로 더합니다.

RFC 1231에 정의된 설정 가능한 변수(토큰링)

아래 변수는 RFC 1231에 정의된 설정 가능한 변수입니다. snmpd 데몬은 사용자가 이 변수를 설정하게 합니다. 밑의 장치가 허용하지 않을 수 있으니 장치마다 무엇이 지원되는지 확인해야 합니다.

dot5Commands

토큰링 장치가 할 명령.

인스턴스 값 동작
n 1 아무것도 하지 않습니다. 돌려받습니다.
n 2 토큰링 장치에 open을 지시합니다.
n 3 토큰링에 reset을 지시합니다.
n 4 토큰링 장치에 close를 지시합니다.

dot5RingSpeed

현재 링 속도나 대역폭.

인스턴스 값 동작
n 1 알 수 없는 속도
n 2 1 메가비트 링 속도
n 3 4 메가비트 링 속도
n 4 16 메가비트 링 속도

dot5ActMonParticipate

장치가 active monitor 선택 과정에 참여하는지 지정합니다.

인스턴스 값 동작
n 1 참여합니다.
n 2 참여하지 않습니다.

dot5Functional

토큰링 장치가 어떤 주소에서 프레임을 받을지 지정하는 functional 마스크.

인스턴스 값 동작
n m.m.m.m.m.m 설정할 functional 마스크

다음 복잡한 타이머 조작 변수는 RFC에서 read-only로 정의되었지만 read-write로 만드는 것이 권장됩니다. 서로의 상호 작용을 충분히 이해하려면 RFC를 검토합니다. snmpd는 요청자가 설정하게 하지만 장치는 허용하지 않을 수 있습니다. 자세한 정보는 장치 드라이버 문서를 확인합니다. 변수는 다음과 같습니다.

  • dot5TimerReturnRepeat
  • dot5TimerHolding
  • dot5TimerQueuePDU
  • dot5TimerValidTransmit
  • dot5TimerNoToken
  • dot5TimerActiveMon
  • dot5TimerStandbyMon
  • dot5TimerErrorReport
  • dot5TimerBeaconTransmit
  • dot5TimerBeaconReceive

FDDI 변수(RFC 1512)

SNMP 데몬은 사용자가 다음 변수를 설정하게 합니다. 데몬은 FDDI SMT(Station Management) 7.2 프로토콜 표준으로 정보를 얻으며 마이크로코드 수준에서 정해집니다. FDDI 문서에서 마이크로코드를 확인해 SMT 7.2 마이크로코드를 쓰는지 확인합니다.

fddimibSMTUserData

사용자 정보 32바이트를 담는 변수.

인스턴스 값 동작
n string 사용자 정보 32바이트를 저장합니다.

fddimibSMTConfigPolicy

구성 정책의 상태, 특히 hold 정책 사용.

인스턴스 값 동작
n 0 hold 정책을 쓰지 않습니다.
n 1 hold 정책을 씁니다.

fddimibSMTConnectionPolicy

FDDI 노드의 연결 정책 상태. 설정할 수 있는 구체적인 값은 RFC 1512를 봅니다.

인스턴스 값 동작
n k 연결 정책을 정의합니다.

fddimibSMTTNotify

Neighbor Notification 프로토콜에서 쓰는 타이머(초). 범위는 2~30초이며 기본값은 30초입니다.

인스턴스 값 동작
n k 타이머 값을 정의합니다.

fddimibSMTStatRptPolicy

상태 보고 프레임 생성의 상태.

인스턴스 값 동작
n 1 노드가 구현된 이벤트에 대해 상태 보고 프레임을 만듭니다.
n 2 노드가 상태 보고 프레임을 만들지 않습니다.

fddimibSMTTraceMaxExpiration

trace의 최대 타이머 만료 값을 정의합니다.

인스턴스 값 동작
n k 최대 타이머 만료를 밀리초로 정의합니다.

fddimibSMTStationAction

SMT 개체가 특정 동작을 하게 합니다. 이 변수에 관한 구체적인 정보는 RFC를 봅니다.

인스턴스 값 동작
n k SMT 개체의 동작을 정의합니다. 값은 1~8입니다.

fddimibMACRequestedPaths

MAC(medium access control)을 넣을 경로를 정의합니다.

인스턴스 값 동작
n.n k MAC의 요청 경로를 정의합니다.

fddimibMACFrameErrorThreshold

MAC 상태 보고서를 만들 임계값. 보고서를 만들기 전에 일어나야 할 오류 수를 정의합니다.

인스턴스 값 동작
n.n k MAC 상태 보고서를 만들기 전에 관찰되어야 할 오류 수를 정의합니다.

fddimibMACMAUnitdataEnable

RMT의 MA_UNITDATA_Enable 플래그 값을 정합니다. 이 플래그의 기본값이자 초기 값은 true(1)입니다.

인스턴스 값 동작
n.n 1 MA_UNITDATA_Enable 플래그를 true로 표시합니다.
n.n 2 MA_UNITDATA_Enable 플래그를 false로 표시합니다.

fddimibMACNotCopiedThreshold

MAC 상태(condition) 보고서를 만들 때를 정하는 임계값.

인스턴스 값 동작
n.n k MAC 상태 보고서를 만들기 전에 관찰되어야 할 오류 수를 정의합니다.

다음 세 변수는 서로 상호 작용하는 타이머 변수입니다. 이 변수를 바꾸기 전에 RFC 1512에 정의된 뜻을 잘 이해해야 합니다.

  • fddimibPATHTVXLowerBound
  • fddimibPATHTMaxLowerBound
  • fddimibPATHMaxTReq

fddimibPORTConnectionPolicies

지정한 포트의 연결 정책을 지정합니다.

인스턴스 값 동작
n.n k 지정한 포트의 연결 정책을 정의합니다.

fddimibPORTRequestedPaths

허용 경로 목록으로, 각 목록 요소가 포트의 허용 경로를 정의합니다. 첫 옥텟은 'none', 둘째 옥텟은 'tree', 셋째 옥텟은 'peer'에 해당합니다.

인스턴스 값 동작
n.n ccc 포트 경로를 정의합니다.

fddimibPORTLerCutoff

링크 연결을 끊는 링크 오류율 추정값. 범위는 10의 -4승부터 10의 -15승이며, 밑이 10인 로그의 절댓값으로 보고합니다(기본값 7).

인스턴스 값 동작
n.n k 포트 LerCutoff를 정의합니다.

fddimibPORTLerAlarm

링크 연결이 경보를 만드는 링크 오류율 추정값. 범위는 10의 -4승부터 10의 -15승이며, 추정값의 밑이 10인 로그의 절댓값으로 보고합니다(기본값 8).

인스턴스 값 동작
n.n k 포트 LerAlarm을 정의합니다.

fddimibPORTAction

포트가 특정 동작을 하게 합니다. 이 변수에 관한 구체적인 정보는 RFC를 봅니다.

인스턴스 값 동작
n k 정의한 포트의 동작을 정의합니다. 값은 1~6입니다.

참고: RFC 1213은 atEntry와 ipNetToMediaEntry 표의 모든 변수를 read-write로 설명합니다. set 지원은 atEntry 변수 atPhysAddress와 atNetAddress, ipNetToMediaEntry 변수 ipNetToMediaPhysAddress, ipNetToMediaNetAddress, ipNetToMediaType에만 구현되어 있습니다. 이 두 표의 나머지 지원하지 않는 속성을 지정할 수 있는 set 요청을 받아들이도록, 나머지 변수 atIfIndex와 ipNetToMediaIfIndex에 대한 set 요청도 받아들입니다. set 요청을 보낸 쪽에 오류 응답을 돌려주지 않지만, 이어지는 get 요청은 원래 값이 그대로임을 보여 줍니다.

ipRouteEntry 표에서 RFC 1213은 ipRouteProto를 뺀 모든 변수를 read-write로 설명합니다. 위에서 말했듯이 set 지원은 ipRouteDest, ipRouteNextHop, ipRouteType 변수에만 구현되어 있습니다. 지원하지 않는 여러 경로 속성을 지정할 수 있는 set 요청을 받아들이도록, ipRouteEntry 표의 나머지 변수 ipRouteIfIndex, ipRouteMetric1, ipRouteMetric2, ipRouteMetric3, ipRouteMetric4, ipRouteMetric5, ipRouteAge, ipRouteMask에 대한 set 요청도 받아들입니다. set 요청을 보낸 쪽에 오류 응답을 돌려주지 않지만, 이어지는 get 요청은 원래 값이 그대로임을 보여 줍니다. snmpd 데몬은 routed 데몬과 라우팅을 조율하지 않습니다. gated 데몬이 실행 중이고 snmpd 데몬에 ipRouteTable을 등록했으면 ipRouteTable에 대한 set 요청은 허용되지 않습니다.

RFC 1229는 snmpd가 허용하는 설정 가능한 변수를 설명합니다. 실제로 다른 점은 앞의 항목을 봅니다.

snmpinfo 사용 예

다음 예는 snmpinfo 명령을 씁니다. snmpinfo의 기본 커뮤니티 이름 public이 해당 MIB 하위 트리에 read-write 접근을 가진다고 가정합니다.

text
snmpinfo -m set sysContact.0="Primary contact: Bob Smith, office phone: 555-5555,
beeper: 9-123-4567. Secondary contact: John Harris, phone: 555-1234."

이 명령은 sysContact.0 값을 지정한 문자열로 설정합니다. sysContact.0 항목이 이미 있으면 바꿉니다.

text
snmpinfo -m set sysName.0="bears.austin.ibm.com"

이 명령은 sysName.0 값을 지정한 문자열로 설정합니다. sysName.0 항목이 이미 있으면 바꿉니다.

text
snmpinfo -m set sysLocation.0="Austin site, building 802, lab 3C-23, southeast
corner of the room."

이 명령은 sysLocation.0 값을 지정한 문자열로 설정합니다. sysLocation.0 항목이 이미 있으면 바꿉니다.

text
snmpinfo -m set ifAdminStatus.2=2

이 명령은 ifIndex가 2인 네트워크 인터페이스 어댑터를 끕니다. 할당한 값이 1이면 인터페이스 어댑터를 켭니다.

text
snmpinfo -m set atPhysAddress.2.1.192.100.154.2=02:60:8c:2e:c2:00
snmpinfo -m set ipNetToMediaPhysAddress.2.1.192.100.154.2=02:60:8c:2e:c2:00

이 두 명령은 192.100.154.2의 ARP 표 항목의 하드웨어 주소를 02:60:8c:2e:c2:00으로 바꿉니다. 두 명령은 같은 ARP 표 항목에 영향을 줍니다. MIB 변수 atPhysAddress는 더는 권장하지 않는 변수로 MIB 변수 ipNetToMediaPhysAddress로 대체되고 있습니다. 그래서 atPhysAddress와 ipNetToMediaPhysAddress는 TCP/IP 커널 ARP 표의 같은 구조에 접근합니다.

text
snmpinfo -m set atNetAddress.2.1.192.100.154.2=192.100.154.3
snmpinfo -m set ipNetToMediaNetAddress.2.1.192.100.154.2=192.100.154.3

이 명령들은 192.100.154.2의 ARP 표 항목의 IP 주소를 192.100.154.3으로 바꿉니다. 두 명령은 같은 ARP 표 항목에 영향을 줍니다. MIB 변수 atNetAddress는 더는 권장하지 않는 변수로 MIB 변수 ipNetToMediaNetAddress로 대체되고 있습니다. 그래서 atNetAddress와 ipNetToMediaNetAddress는 TCP/IP 커널 ARP 표의 같은 구조에 접근합니다.

text
snmpinfo -m set ipForwarding.0=1

이 명령은 에이전트 호스트에 올라와 있는 인터페이스가 둘 이상이면 패킷을 전달할 수 있도록 TCP/IP 커널을 설정합니다. 활성 인터페이스가 하나뿐이면 set 요청이 실패하고 snmpd 에이전트가 badValue 오류를 돌려줍니다.

text
snmpinfo -m set ipDefaultTTL=50

이 명령은 기본 TTL을 쓰는 IP 데이터그램이 버려지기 전에 게이트웨이를 50개까지 지날 수 있게 합니다. 각 게이트웨이는 데이터그램을 처리할 때 TTL 필드에서 1을 뺍니다. 또 각 게이트웨이는 다음 목적지로 데이터그램을 넘기기 전에 그 게이트웨이에서 서비스를 기다린 초만큼 TTL 필드를 줄입니다.

text
snmpinfo -m set ipRouteDest.192.100.154.0=192.100.154.5

이 명령은 경로 192.100.154가 이미 있다고 가정하고, 192.100.154.0에 연결된 경로의 목적지 IP 주소를 IP 주소 192.100.154.5로 설정합니다.

text
snmpinfo -m set ipRouteNextHop.192.100.154.1=129.35.38.47

이 명령은 경로 192.100.154.1이 이미 있다고 가정하고, 게이트웨이 호스트 129.35.38.47을 써서 호스트 192.100.154.1로 가는 경로를 설정합니다.

text
snmpinfo -m set ipRouteNextHop.192.100.154.0=192.100.154.7

이 명령은 경로 192.100.154.0이 이미 있다고 가정하고, 게이트웨이 호스트 192.100.154.7을 써서 C 클래스 네트워크 192.100.154로 가는 경로를 설정합니다. 네트워크 주소임을 나타내려면 주소의 호스트 부분이 0이어야 합니다.

text
snmpinfo -m set ipRouteType.192.100.154.5=2

이 명령은 호스트 192.100.154.5로 가는 경로를 지웁니다.

text
snmpinfo -m set ipRouteDest.129.35.128.1=129.35.128.1
                ipRouteType.129.35.128.1=3
             ipRouteNextHop.129.35.128.1=129.35.128.90

이 명령은 호스트 129.35.128.90에서 게이트웨이로서의 129.35.128.1로 가는 새 경로를 만듭니다.

text
snmpinfo -m set ipNetToMediaType.2.1.192.100.154.11=4

이 명령은 192.100.154.11의 ARP 표 항목을 static으로 설정합니다.

text
snmpinfo -m set snmpEnableAuthenTraps=2

이 명령은 지정한 호스트의 snmpd 에이전트가 authenticationFailure 트랩을 만들지 않게 합니다.

text
snmpinfo -m set smuxPstatus.1=2

이 명령은 SMUX 피어 1을 무효로 합니다. 그 결과 snmpd 에이전트와 이 SMUX 피어 사이의 연결이 끝납니다.

text
snmpinfo -m set smuxTstatus.8.1.3.6.1.2.1.4.21.0=2

이 명령은 SMUX 트리 1.3.6.1.2.1.4.21, 곧 ipRoute Table의 마운트를 무효로 하거나 없앱니다. 인스턴스의 첫 수는 SMUX 트리 식별자의 단계 수를 나타냅니다. 인스턴스의 마지막 수는 smuxTpriority를 나타냅니다. 이 예에서 SMUX 트리 식별자 1.3.6.1.2.1.4.21은 8단계입니다. 우선순위 0이 가장 높은 우선순위입니다.

text
snmpinfo -m set ifExtnsPromiscuous.1=1 ifExtnsPromiscuous.2=2

이 명령은 인터페이스 표의 첫째 장치의 promiscuous 모드를 켜고 둘째 장치의 promiscuous 모드를 끕니다.

text
snmpinfo -m set ifExtnsTestType.1=testFullDuplexLoopBack

이 명령은 인터페이스 1에서 testFullDuplexLoopBack 시험을 시작합니다.

text
snmpinfo -m set ifExtnsRcvAddrStatus.1.129.35.128.1.3.2=2

이 명령은 인터페이스 1이 받아들일 주소 목록에서 물리 주소 129.35.128.1.3.2를 빼게 합니다.

text
snmpinfo -m set dot5Commands.1=2

이 명령은 첫째 인터페이스에 open을 지시합니다.

text
snmpinfo -m set dot5RingSpeed.1=2

이 명령은 첫째 인터페이스의 링 속도를 1 메가비트로 설정하게 합니다.

text
snmpinfo -m set dot5ActMonParticipate.1=1

이 명령은 첫째 인터페이스가 active monitor 선택 과정에 참여하게 합니다.

text
snmpinfo -m set dot5Functional.1=255.255.255.255.255.255

이 명령은 모든 것을 허용하도록 functional 주소 마스크를 설정합니다.

text
snmpinfo -m set fddimibSMTUserData.1="Greg’s Data"

이 명령은 첫째 SMT 개체의 사용자 데이터를 "Greg's Data"로 설정합니다.

text
snmpinfo -m set fddimibMACFrameErrorThreshold.1.1=345

이 명령은 첫째 SMT 개체의 첫째 MAC에서 프레임 오류 임계값을 345로 설정합니다.

참고: 앞에서 설명한 모든 변수는 변수를 설정하는 데 쓰는, 나열한 방법 가운데 하나에 속합니다.

프로토콜과 인터넷 주소에 관한 자세한 정보는 Address Resolution Protocol과 Internet addresses를 봅니다.

영어 원문

SNMP daemon support for the EGP family of MIB variables

If the agent host is running the gated daemon with the Exterior Gateway Protocol (EGP) enabled, there are several Management Information Base (MIB) variables in the EGP group supported by the gated daemon which the snmpd agent can access.

The following EGP MIB variables have a single, unique instance:

  • egpInMsgs — Number of EGP messages received without error.
  • egpInErrors — Number of EGP messages received in error.
  • egpOutMsgs — Total number of EGP messages transmitted by the gated daemon running on the agent's host.
  • egpOutErrors — Number of EGP messages that could not be sent by the agent host gated daemon because of resource limitations.
  • egpAs — Autonomous system number of the agent host gated daemon.

The following EGP MIB variables have an instance for each EGP peer or neighbor acquired by the agent host gated daemon:

  • egpNeighState — The state of this EGP peer: 1 idle 2 acquisition 3 down 4 up 5 cease.
  • egpNeighAddr — IP address of this EGP peer.
  • egpNeighAs — Autonomous system number of this EGP peer. Zero (0) indicates the autonomous system number of this peer is not yet known.
  • egpInNeighMsgs — Number of EGP messages received without error from this EGP peer.
  • egpNeighInErrs — Number of EGP messages received in error from this EGP peer.
  • egpNeighOutMsgs — Number of locally generated EGP messages to this EGP peer.
  • egpNeighOutErrs — Number of locally generated EGP messages not sent to this EGP peer because of resource limitations.
  • egpNeighInErrMsgs — Number of EGP-defined error messages received from this EGP peer
  • egpNeighOutErrMsgs — Number of EGP-defined error messages sent to this EGP peer.
  • egpNeighStateUp — Number of EGP state transitions to the UP state with this EGP peer.
  • egpNeighStateDowns — Number of EGP state transitions from the UP state to any other state with this EGP peer.
  • egpNeighIntervalHello — Interval between EGP Hello command retransmissions in hundredths of a second.
  • egpNeighIntervalPoll — Interval between EGP poll command retransmissions in hundredths of a second.
  • egpNeighMode — Polling mode of this EGP peer. The mode can be either active (1) or passive (2).
  • egpNeighEventTrigger — Control variable triggers operator-initiated start and stop events to this EGP peer. This MIB variable can be set to start (1) or stop (2).

If the gated daemon is not running, or if the gated daemon is running but is not configured to communicate with the snmpd agent, or if the gated daemon is not configured for EGP, get and set requests for the values of these variables will return the noSuchName error response code.

The gated daemon configuration file, /etc/gated.conf, should contain the following statement:

text
snmp      yes;

The gated daemon is internally configured to be an Simple Network Management Protocol (SNMP) single multiplexer (SMUX) protocol peer, or proxy agent, of the snmpd daemon. When the gated daemon starts up, it registers the ipRouteTable MIB variable tree with the snmpd agent. If the gated daemon is configured for EGP, then thegated daemon also registers the EGP MIB variable tree. After this registration is complete, an SNMP manager can successfully make requests to the snmpd agent for the ipRouteTable an EGP MIB variables supported by this agent host gated daemon. When the gated daemon is running, all MIB routing information is obtained using the gated daemon. In this case, set requests to the ipRouteTable are not allowed.

The SMUX communication between the gated daemon and the snmpd daemon takes place over the well-known Transmission Control Protocol (TCP) port 199. If the gated daemon terminates, snmpd immediately unregisters the trees the gated daemon previously registered. If the gated daemon is started before the snmpd daemon, the gated daemon periodically checks for the snmpd daemon until the SMUX association can be established.

To configure the snmpd agent to recognize and allow the SMUX association with the gated daemon client, the user must add a SMUX entry to the /etc/snmpd.conf file. The client object identifier and password specified in this SMUX entry for the gated daemon must match those specified in the /etc/snmpd.peers file.

The snmpd agent supports set requests for the following read-write MIB I and MIB II variables:

sysContact

The textual identification of the contact person for this agent host. This information includes the name of this person and how to contact this person: for example, "Bob Smith, 555-5555, ext 5." The value is limited to 256 characters. If, for a set request, the string for this MIB variable is greater than 256 characters, the snmpd agent will return the error badValue, and the set operation is not performed. The initial value of sysContact is defined in /etc.snmp.conf. If nothing is defined, the value is null string.

Instance Value Action
0 "string" The MIB variable is set to "string".

sysName

The host name for this agent host. Typically this is the fully qualified domain name of the node. The value is limited to 256 characters. If, for a set request, the string for this MIB variable is greater than 256 characters, the snmpd agent returns the error badValue, and the set operation is not performed.

Instance Value Action
0 "string" The MIB variable is set to "string".

sysLocation

A textual string stating the physical location of the machine on which this snmpd agent resides: for example, "Austin site, building 802, lab 3C-23." The value is limited to 256 characters. If, for a set request, the string for this MIB variable is greater than 256 characters, the snmpd agent returns the error badValue, and the set operation is not performed. The initial value of sysLocation is defined in /etc/snmp.conf. If nothing is defined, the value is null string.

Instance Value Action
0 "string" The MIB variable is set to "string".

ifAdminStatus

The desired state of an interface adapter on the agent's host. Supported states are up and down. The state can be set to testing but such an action has no effect on the operational state of the interface.

Instance Value Action
f 1 The interface adapter with ifIndex f is enabled.

Note: It is possible that the ifAdminStatus value can be set to up or down, yet the actual operational change of the interface failed. In such a case, a get request of the ifAdminStatus might reflect up while an ifOperStatus for that interface might reflect down. If such a situation occurs, the network administrator would issue another set request to set ifAdminStatus to up to attempt the operational change again.

atPhysAddress

The hardware address portion of an address table binding on the agent host (an entry in the Address Resolution Protocol table). This is the same MIB variable as ipNetToMediaPhysAddress.

Instance Value Action
f.1.n.n.n.n hh:hh:hh:hh:hh:hh For the interface with ifIndex f, any existing ARP table binding for IP address n.n.n.n is replaced with the binding (n.n.n.n, hh:hh:hh:hh:hh:hh). If a binding did not exist, the new binding is added. hh:hh:hh:hh:hh:hh is a twelve-hexadecimal-digit hardware address.

atN0etAddress

The IP address corresponding to the hardware or physical address specified in atPhysAddress. This is the same MIB variable as ipNetToMediaNetAddress.

Instance Value Action
f.1.n.n.n.n m.m.m.m For the interface with ifIndex f, an existing ARP table entry for IP address n.n.n.n is replaced with IP address m.m.m.m.

ipForwarding

Indicates whether this agent host is forwarding datagrams.

Table 89. ipforwarding

Instance Value Action
0 1 If the agent host has more than one active interface, then the TCP/IP kernel is configured to forward packets. If the agent host has only one active interface, the set request fails.
0 2 The TCP/IP kernel on the agent host is configured to not forward packets.

ipDefaultTTL

The default time-to-live (TTL) value inserted into IP headers of datagrams originated by the agent host.

Instance Value Action
0 n The default time-to-live value used by IP protocol support is set to the integer n.

ipRouteDest

The destination IP address of a route in the route table.

Instance Value Action
n.n.n.n m.m.m.m The destination route for route n.n.n.n is set to the IP address m.m.m.m.

ipRouteNextHop

The gateway by which a destination IP address can be reached from the agent host (an entry in the route table).

Instance Value Action
n.n.n.n m.m.m.m A route table entry to reach network n.n.n.n using gateway m.m.m.m is added to the route table. The host portion of the IP address n.n.n.n must be 0 to indicate a network address.

ipRouteType

The state of a route table entry on the agent host (used to delete entries).

Instance Value Action
h.h.h.h 1 Any route to host IP address h.h.h.h is deleted.
n.n.n.n 2 Any route to host IP address n.n.n.n is deleted.

ipNetToMediaPhysAddress

The hardware address portion of an address table binding on the agent host (an entry in the ARP table). This is the same MIB variable as atPhysAddress.

Instance Value Action
f.1.n.n.n.n hh:hh:hh:hh:hh:hh For the interface with ifIndex f, any existing ARP table binding for IP address n.n.n.n is replaced with the binding (n.n.n.n, hh:hh:hh:hh:hh:hh). If a binding did not exist, the new binding is added. hh:hh:hh:hh:hh:hh is a 12-hexadecimal-digit hardware address.

ipNetToMediaNetAddress

The IP address corresponding to the hardware or physical address specified in ipNetToMediaPhysAddress. This is the same MIB variable as atNetAddress.

Instance Value Action
f.1.n.n.n.n m.m.m.m For the interface with ifIndex f, an existing ARP table entry for IP address n.n.n.n is replaced with IP address m.m.m.m.

ipNetToMediaType

The type of mapping from the IP address to the physical address.

Instance Value Action
f.1.n.n.n.n 1 For the interface with ifIndex f, for an existing ARP binding from IP address to physical address, the mapping type is set to 1, or other.
f.1.n.n.n.n 2 For the interface with ifIndex f, for an existing ARP binding from IP address to physical address, the mapping type is set to 2, or invalid. As a side effect, the corresponding entry in the ipNetMediaTable is invalidated; that is, the interface is disassociated from this ipNetToMediaTable entry.
f.1.n.n.n.n 3 For the interface with ifIndex f, for an existing ARP binding from IP address to physical address, the mapping type is set to 3, or dynamic.
f.1.n.n.n.n 4 For the interface with ifIndex f, for an existing ARP binding from IP address to physical address, the mapping type is set to 4, or static.

snmpEnableAuthenTraps

Indicates whether the snmpd agent is configured to generate authenticationFailure traps.

Instance Value Action
0 1 The snmpd agent will generate authentication failure traps.
0 2 The snmpd agent will not generate authentication failure traps.

smuxPstatus

The status of an SMUX protocol peer (used to delete SMUX peers).

Instance Value Action
n 1 snmpd agent does nothing.
n 2 snmpd agent stops communicating with SMUX peer n.

smuxTstatus

The status of a SMUX MIB tree (used to delete MIB tree mounts).

Instance Value Action
l.m.m.m._ _ _ .p 1 snmpd agent does nothing.
l.m.m.m._ _ _ .p 2 Unmounts SMUX mounting of MIB tree m.m.m... where l is the length of MIB tree instance and p is the smuxTpriority.

The following variables are the settable variables as defined in RFC 1229. The snmpd daemon allows the user to set these variables. The underlying device might not allow the setting of such variables. Check with each device to see what is and is not supported.

ifExtnsPromiscuous

The status of the promiscuous mode on a given device. This is used to enable and disable promiscuous mode on a given device. The snmpd action is final and complete. When snmpd is told to turn off, promiscuous mode is turned completely off regardless of the other applications on the machine.

Instance Value Action
n 1 Turns on the promiscuous mode for device n.
n 2 Turns off the promiscuous mode for device n.

ifExtnsTestType

The test initiation variable. When this variable is set, the appropriate test is run for that device. An Object Identifier is the value of the variable. The specific value is dependent on the device type and the test that is to be run. Currently, the only defined test that snmpd knows to run is the testFullDuplexLoopBack test.

Instance Value Action
n oid Start the test specified by oid.

ifExtnsRcvAddrStatus

The address status variable. When this variable is set, the specified address comes into existence with the appropriate level of duration. snmpd only allows the setting of temporary addresses because it is not able to set device Object Data Manager (ODM) records and it is only allowed to set multicast or broadcast addresses.

Instance Value Action
n.m.m.m.m.m.m 1 Add the address as something other than a temporary or permanent address.
n.m.m.m.m.m.m 2 Remove the address from usage.
n.m.m.m.m.m.m 3 Add the address as a temporary address.
n.m.m.m.m.m.m 4 Add the address as a permanent address.

The variables listed below are the settable variables as defined in RFC 1231. The snmpd daemon allows the user to set these variables. The underlying device might not allow the setting of such variables. You should check with each device to see what is supported.

dot5Commands

The command the token-ring device is to perform.

Instance Value Action
n 1 Does nothing. Returned.
n 2 Tells the token-ring device to open.
n 3 Tells the token-ring to reset.
n 4 Tells the token-ring device to close.

dot5RingSpeed

The current ring speed or bandwidth.

Instance Value Action
n 1 An unknown speed.
n 2 1 megabit ring speed.
n 3 4 megabit ring speed.
n 4 16 megabit ring speed.

dot5ActMonParticipate

The object specifies whether the device participates in the active monitor selection process.

Instance Value Action
n 1 Participates.
n 2 Not participate.

dot5Functional

The functional mask that allows the token-ring device to specify what addresses it receives frames from.

Instance Value Action
n m.m.m.m.m.m Functional mask to be set.

The following complex timer manipulations variables are defined in the RFC as read-only but you are encouraged to make them read-write. Review the RFC to gain a full understanding of their interactions. snmpd allows the requestor to set them, but the device might not. Check the device driver documentation for more information. The variables are:

  • dot5TimerReturnRepeat

  • dot5TimerHolding

  • dot5TimerQueuePDU

  • dot5TimerValidTransmit

  • dot5TimerNoToken

  • dot5TimerActiveMon

  • dot5TimerStandbyMon

  • dot5TimerErrorReport

  • dot5TimerBeaconTransmit

  • dot5TimerBeaconReceive.

The SNMP daemon allows the user to set the following variables. The daemon uses the FDDI Station Management (SMT) 7.2 protocol standard to get the information and is determined at the microcode level. Check the microcode on the FDDI documentation to ensure that the SMT 7.2 microcode is being used.

fddimibSMTUserData

A variable holding 32 bytes of user information.

Instance Value Action
n string Stores 32 bytes of user information.

fddimibSMTConfigPolicy

The status of the configuration policies, specifically the hold policy usage.

Instance Value Action
n 0 Do not use the hold policy.
n 1 Use the hold policy.

fddimibSMTConnectionPolicy

The status of the connection policies in the FDDI node. See RFC 1512 for more information about the specific settable values.

Instance Value Action
n k Defines the connection policies.

fddimibSMTTNotify

The timer, expressed in seconds, used in the Neighbor Notification protocol. It has a range of 2 seconds to 30 seconds, and its default value is 30 seconds.

Instance Value Action
n k Defines the timer value.

fddimibSMTStatRptPolicy

The status of the status reporting frame generation.

Instance Value Action
n 1 Indicates that the node generates status reporting frames for implemented events.
n 2 Indicates that the node does not create status reporting frames.

fddimibSMTTraceMaxExpiration

This variable defines the maximum timer expiration value for trace.

Instance Value Action
n k Defines the maximum timer expiration in milliseconds.

fddimibSMTStationAction

This variable causes the SMT entity to take a specific action. See the RFC to get specific information about this variable.

Instance Value Action
n k Defines an action on the SMT entity. Values range from 1 to 8.

fddimibMACRequestedPaths

Defines the paths the medium access control (MAC) should be inserted.

Instance Value Action
n.n k Defines the requested path for the MAC.

fddimibMACFrameErrorThreshold

Threshold for when a MAC status report is generated. Defines the number of error that must occur before a report is generated.

Instance Value Action
n.n k Defines the number of errors that must be observed before a MAC status report is generated.

fddimibMACMAUnitdataEnable

This variable determines the value of the MA_UNITDATA_Enable flag in RMT. The default and initial value of this flag is true (1).

Instance Value Action
n.n 1 Marks the MA_UNITDATA_Enable flag true.
n.n 2 Marks the MA_UNITDATA_Enable flag false.

fddimibMACNotCopiedThreshold

A threshold for determining when a MAC condition report is generated.

Instance Value Action
n.n k Defines the number of errors that must be observed before a MAC condition report is generated.

The following three variables are timer variables that are interactive among themselves. Before changing any of these variables, you should have a good understanding of their meaning as defined in RFC 1512.

  • fddimibPATHTVXLowerBound

  • fddimibPATHTMaxLowerBound

  • fddimibPATHMaxTReq

fddimibPORTConnectionPolicies

Specifies the connection policies for the specified port.

Instance Value Action
n.n k Defines the connection policies for the specified port.

fddimibPORTRequestedPaths

This variable is a list of permitted paths where each list element defines the port permitted paths. The first octet corresponds to 'none', the second octet to 'tree', and the third octet to 'peer'.

Instance Value Action
n.n ccc Defines the port paths.

fddimibPORTLerCutoff

The link error rate estimate at which a link connection is broken. It ranges from 10**-4 to 10**-15 and is reported as the absolute value of the base 10 logarithm (default of 7).

Instance Value Action
n.n k Defines the port LerCutoff.

fddimibPORTLerAlarm

The link error rate estimate at which a link connection generates an alarm. It ranges from 10**-4 to 10**-15 and is reported as the absolute value of the base 10 logarithm of the estimate (default is 8).

Instance Value Action
n.n k Defines the port LerAlarm.

fddimibPORTAction

This variable causes the port to take a specific action. See the RFC to get specific information about this variable.

Instance Value Action
n k Defines an action on the defined port. The values range from 1 to 6.

Note: RFC 1213 describes all variables in the atEntry and ipNetToMediaEntry tables as read-write. Set support is implemented only for the atEntry variables atPhysAddress and atNetAddress, and the ipNetToMediaEntry variables ipNetToMediaPhysAddress, ipNetToMediaNetAddress, and ipNetToMediaType. To accept set requests that might specify the remaining unsupported attributes in these two tables, set requests for the remaining variables are accepted in atIfIndex and ipNetToMediaIfIndex. No error response is returned to the set request originator, but a subsequent get request will show that the original values are retained.

In the ipRouteEntry table, RFC 1213 describes all variables except ipRouteProtoas read-write. As mentioned above, set support is implemented only for the variables ipRouteDest, ipRouteNextHop, and ipRouteType. To accept set requests that might specify several unsupported route attributes, set requests for the remaining variables in the ipRouteEntry table are accepted: ipRouteIfIndex, ipRouteMetric1, ipRouteMetric2, ipRouteMetric3, ipRouteMetric4, ipRouteMetric5, ipRouteAge, and ipRouteMask. No error response is returned to the set request originator, but a subsequent get request will show that the original values are retained. The snmpd daemon does not coordinate routing with the routed daemon. If the gated daemon is running and has registered the ipRouteTable with the snmpd daemon, set requests to the ipRouteTable are not allowed.

RFC 1229 describes settable variables that snmpd allows. See the previous entries for actual deviations.

The following examples use the snmpinfo command. It is assumed that the snmpinfo default community name, public, has read-write access for the respective MIB subtree.

text
snmpinfo -m set sysContact.0="Primary contact: Bob Smith, office phone: 555-5555,
beeper: 9-123-4567. Secondary contact: John Harris, phone: 555-1234."

This command sets the value of sysContact.0 to the specified string. If an entry for sysContact.0 already exists, it is replaced.

text
snmpinfo -m set sysName.0="bears.austin.ibm.com"

This command sets the value of sysName.0 to the specified string. If an entry for sysName.0 already exists, it is replaced.

text
snmpinfo -m set sysLocation.0="Austin site, building 802, lab 3C-23, southeast
corner of the room."

This command sets the value of sysLocation.0 to the specified string. If an entry for sysLocation.0 already exists, it is replaced.

text
snmpinfo -m set ifAdminStatus.2=2

This command disables the network interface adapter which has the ifIndex of 2. If the assigned value is 1, the interface adapter is enabled.

text
snmpinfo -m set atPhysAddress.2.1.192.100.154.2=02:60:8c:2e:c2:00
snmpinfo -m set ipNetToMediaPhysAddress.2.1.192.100.154.2=02:60:8c:2e:c2:00

These two commands change the hardware address in the ARP table entry for 192.100.154.2 to 02:60:8c:2e:c2:00. These two commands affect the same ARP table entry. The MIB variable atPhysAddress is a deprecated variable and is being replaced with the MIB variable ipNetToMediaPhysAddress. Thus, atPhysAddress and ipNetToMediaPhysAddress access the same structure in the TCP/IP kernel ARP table.

text
snmpinfo -m set atNetAddress.2.1.192.100.154.2=192.100.154.3
snmpinfo -m set ipNetToMediaNetAddress.2.1.192.100.154.2=192.100.154.3

These commands change the IP address in the ARP table entry for 192.100.154.2 to 192.100.154.3. These two commands affect the same ARP table entry. The MIB variable atNetAddress is a deprecated variable and is being replaced with the MIB variable ipNetToMediaNetAddress. Thus, atNetAddress and ipNetToMediaNetAddress access the same structure in the TCP/IP kernel ARP table.

text
snmpinfo -m set ipForwarding.0=1

This command sets the TCP/IP kernel so that it can forward packets if the agent host has more than one interface that is up. If the host has only one active interface, then the set request fails and the snmpd agent returns the error, badValue.

text
snmpinfo -m set ipDefaultTTL=50

This command allows an IP datagram using default time-to-live (TTL) to pass through up to 50 gateways before being discarded. When each gateway processes a datagram, the gateway subtracts 1 from the time-to-live field. In addition, each gateway decrements the time-to-live field by the number of seconds the datagram waited for service at that gateway before passing the datagram on to the next destination.

text
snmpinfo -m set ipRouteDest.192.100.154.0=192.100.154.5

This command sets the destination IP address of the route associated with 192.100.154.0 to the IP address 192.100.154.5, assuming route 192.100.154 already existed.

text
snmpinfo -m set ipRouteNextHop.192.100.154.1=129.35.38.47

This command sets a route to host 192.100.154.1 using the gateway host 129.35.38.47, assuming route 192.100.154.1 already existed.

text
snmpinfo -m set ipRouteNextHop.192.100.154.0=192.100.154.7

This command sets a route to the class C network 192.100.154 using the gateway host 192.100.154.7, assuming route 192.100.154.0 already existed. Note that the host part of the address must be 0 to indicate a network address.

text
snmpinfo -m set ipRouteType.192.100.154.5=2

This command deletes any route to host 192.100.154.5.

text
snmpinfo -m set ipRouteDest.129.35.128.1=129.35.128.1
                ipRouteType.129.35.128.1=3
             ipRouteNextHop.129.35.128.1=129.35.128.90

This command creates a new route from host 129.35.128.90 to 129.35.128.1 as a gateway.

text
snmpinfo -m set ipNetToMediaType.2.1.192.100.154.11=4

This command sets the ARP table entry for 192.100.154.11 to static.

text
snmpinfo -m set snmpEnableAuthenTraps=2

This command causes the snmpd agent on the specified host to not generate authenticationFailure traps.

text
snmpinfo -m set smuxPstatus.1=2

This command invalidates the SMUX peer 1. The result is that the connection between the snmpd agent and this SMUX peer is terminated.

text
snmpinfo -m set smuxTstatus.8.1.3.6.1.2.1.4.21.0=2

This command invalidates or removes the mounting of the SMUX tree 1.3.6.1.2.1.4.21, the ipRoute Table. The first number in the instance indicates the number of levels in the SMUX tree identifier. The final number in the instance indicates the smuxTpriority. In this example, there are 8 levels in the SMUX tree identifier: 1.3.6.1.2.1.4.21. The priority, 0, is the highest priority.

text
snmpinfo -m set ifExtnsPromiscuous.1=1 ifExtnsPromiscuous.2=2

This command turns on promiscuous mode for the first device in the interfaces table and turns off promiscuous mode for the second device in the interfaces table.

text
snmpinfo -m set ifExtnsTestType.1=testFullDuplexLoopBack

This command starts the testFullDuplexLoopBack test on interface 1.

text
snmpinfo -m set ifExtnsRcvAddrStatus.1.129.35.128.1.3.2=2

This command tells interface 1 to remove physical address 129.35.128.1.3.2 from its list of acceptable addresses.

text
snmpinfo -m set dot5Commands.1=2

This command tells the first interface to do an open.

text
snmpinfo -m set dot5RingSpeed.1=2

This command tells the first interface to set it ring speed to 1 megabit.

text
snmpinfo -m set dot5ActMonParticipate.1=1

This command tells the first interface to participate in the active monitor selection process.

text
snmpinfo -m set dot5Functional.1=255.255.255.255.255.255

This command sets the functional address mask to allow everything.

text
snmpinfo -m set fddimibSMTUserData.1="Greg’s Data"

This command sets the user data on the first SMT entity to "Greg's Data".

text
snmpinfo -m set fddimibMACFrameErrorThreshold.1.1=345

This command sets the threshold for frame errors to 345 on the first MAC of the first SMT entity.

Note: All of the variables described previously fall into one of the listed methods used to set the variable.

See Address Resolution Protocol and Internet addresses for more information on protocols and Internet addresses.

SNMP 데몬 문제 해결

SNMP 데몬 문제 해결 요령에는 종료 문제, MIB 변수 접근 문제, community 항목의 MIB 변수 접근 문제, noSuchName 문제, 에이전트 무응답 문제, 데몬 실패 해결이 있습니다.

데몬 종료 문제

snmpd 에이전트가 예상대로 동작하지 않으면 다음 요령으로 문제를 찾아 고칩니다. snmpd 에이전트는 어떤 종류든 로깅을 켜고 시작하기를 강력히 권합니다. snmpd 데몬을 실행해 문제가 생기면 daemon facility와 DEBUG 심각도 수준으로 syslogd 데몬 로깅을 설정하기를 강력히 권합니다. snmpd 로깅에 관한 자세한 정보는 Commands Reference, Volume 5의 snmpd 명령과 Files Reference의 snmpd.conf 파일을 봅니다.

snmpd 데몬이 실행하자마자 끝나면 다음이 가능한 실패 원인과 해결 방법입니다.

  • snmpd 데몬이 끝난 이유는 snmpd 로그 파일이나 구성된 syslogd 로그 파일에 기록됩니다. 로그 파일에서 FATAL 오류 메시지를 봅니다. 해결: 문제를 고치고 snmpd 데몬을 다시 시작합니다.
  • snmpd 명령행 사용법이 틀렸습니다. SRC 없이 snmpd 명령을 실행했다면 필요한 사용법 문구가 화면에 나옵니다. SRC 제어로 실행했다면 사용법 메시지가 화면에 나오지 않습니다. 로그 파일에서 사용법 메시지를 봅니다. 해결: 올바른 사용법으로 snmpd 명령을 실행합니다.
  • snmpd 데몬은 root 사용자가 실행해야 합니다. 해결: root 사용자로 바꿔 snmpd 데몬을 다시 시작합니다.
  • snmpd.conf 파일은 root 사용자가 소유해야 합니다. snmpd 에이전트는 구성 파일의 소유권을 확인합니다. root 사용자가 소유하지 않으면 snmpd 에이전트가 치명적 오류로 끝납니다. 해결: root 사용자인지 확인하고, 구성 파일의 소유권을 root 사용자로 바꾸고, snmpd 데몬을 다시 시작합니다.
  • snmpd.conf 파일이 있어야 합니다. snmpd 명령행에 -c 플래그를 지정하지 않았는데 /etc/snmpd.conf 파일이 없는 경우입니다. /etc/snmpd.conf 파일을 실수로 지웠다면 bos.net.tcp.client 이미지를 다시 설치하거나, snmpd.conf 파일 설명에 정의된 알맞은 구성 항목으로 파일을 다시 만듭니다. snmpd 명령행에 -c 플래그로 구성 파일을 지정했다면 파일이 있고 root 사용자가 소유하는지 확인합니다. 구성 파일은 전체 경로와 파일 이름으로 지정해야 하며, 그렇지 않으면 기본 /etc/snmpd.conf 파일을 씁니다. 해결: 지정한 구성 파일이 있고 root 사용자가 소유하는지 확인합니다. snmpd 데몬을 다시 시작합니다.
  • udp port 161이 이미 bind되어 있습니다. snmpd 데몬이 이미 실행 중이 아닌지 확인합니다. ps -eaf 출력을 grep으로 snmpd를 걸러 snmpd 데몬 프로세스가 이미 실행 중인지 판단합니다. udp port 161에는 snmpd 에이전트 하나만 bind할 수 있습니다. 해결: 기존 snmpd 에이전트를 죽이거나, 다른 snmpd 데몬 프로세스를 시작하지 않습니다.

데몬 실패 문제

refresh나 kill -1 신호를 보낼 때 snmpd 데몬이 실패하면 다음이 가능한 실패 원인과 해결 방법입니다.

  • snmpd 데몬이 끝난 이유는 snmpd 로그 파일이나 구성된 syslogd 로그 파일에 기록됩니다. 로그 파일에서 FATAL 오류 메시지를 봅니다. 해결: 문제를 고치고 snmpd 데몬을 다시 시작합니다.
  • snmpd 데몬을 실행할 때 구성 파일의 전체 경로와 파일 이름을 지정했는지 확인합니다. snmpd 데몬은 실행할 때 fork하고 루트 디렉터리로 바꿉니다. 구성 파일의 전체 경로 이름을 지정하지 않으면 refresh 때 snmpd 에이전트가 파일을 찾지 못합니다. 이는 치명적 오류이며 snmpd 에이전트를 끝냅니다. 해결: snmpd 구성 파일의 전체 경로와 파일 이름을 지정합니다. 구성 파일을 root 사용자가 소유하는지 확인합니다. snmpd 데몬을 다시 시작합니다.
  • snmpd 구성 파일이 아직 있는지 확인합니다. snmpd 에이전트를 실행한 뒤 파일이 실수로 지워졌을 수 있습니다. snmpd 에이전트가 구성 파일을 열 수 없으면 끝납니다. 해결: snmpd 구성 파일을 다시 만들고, root 사용자가 소유하는지 확인하고, snmpd 데몬을 다시 시작합니다.

MIB 변수 접근 문제

snmpd 에이전트에서 MIB 변수에 접근할 수 없으면, 곧 snmpd 에이전트는 실행 중인데 SNMP 관리자 응용 프로그램이 snmpd 에이전트의 응답을 기다리다 시간 초과되면 다음을 시도합니다.

  • netstat -in 명령으로 snmpd 에이전트가 실행되는 호스트의 네트워크 구성을 확인합니다. lo0(루프백) 장치가 올라와 있는지 확인합니다. 장치가 꺼져 있으면 lo0 왼쪽에 *(별표)가 표시됩니다. snmpd 에이전트가 요청을 처리하려면 lo0이 올라와 있어야 합니다. 해결: 다음 명령으로 루프백 인터페이스를 올립니다.
text
ifconfig lo0 inet up
  • snmpd 데몬에 요청을 보내는 호스트로 가는 경로가 있는지 확인합니다. 해결: snmpd 데몬이 실행되는 호스트에서 요청을 보내는 호스트로 가는 경로를 route add 명령으로 더합니다. 자세한 정보는 Commands Reference, Volume 4의 route 명령을 봅니다.
  • 호스트 이름과 호스트 IP 주소가 같은 값인지 확인합니다. 해결: 호스트 이름이 호스트 IP 주소와 대응하도록 다시 설정합니다.
  • localhost가 lo0 IP 주소로 정의되어 있는지 확인합니다. 해결: localhost를 lo0 IP 주소(보통 127.0.0.1)와 같은 주소로 정의합니다.

community 항목의 MIB 변수 접근 문제

구성 파일에 MIB 뷰 이름과 함께 community 항목을 지정했는데 MIB 변수에 접근할 수 없으면 다음을 확인합니다.

  • community 항목을 올바르게 지정했는지 확인합니다. community 항목에 뷰 이름을 지정했다면 community의 모든 필드가 반드시 필요합니다. 해결: 구성 파일의 community 항목에 모든 필드를 지정합니다. snmpd 에이전트를 새로 고치고 요청을 다시 시도합니다.
  • community 항목의 접근 모드가 요청 종류와 맞는지 확인합니다. get이나 get-next 요청이면 community에 read-only나 read-write 권한이 있어야 합니다. set 요청이면 community에 read-write 권한이 있어야 합니다. 해결: community 항목에 올바른 접근 모드를 지정합니다. snmpd 에이전트를 새로 고치고 요청을 다시 시도합니다.
  • 구성 파일의 community 항목에 지정한 뷰 이름에 대한 view 항목이 있는지 확인합니다. community 항목에 뷰 이름이 있는데 해당 view 항목이 없으면 snmpd 에이전트는 그 community의 접근을 허용하지 않습니다. 구성 파일의 community 항목에 지정한 뷰 이름에는 view 항목이 반드시 필요합니다. 해결: community 항목에 지정한 뷰 이름의 view 항목을 지정합니다. snmpd 에이전트를 새로 고치고 요청을 다시 시도합니다.
  • view 항목의 MIB 하위 트리로 iso를 지정했다면 iso.3을 지정했는지 확인합니다. snmpd 에이전트가 iso 트리의 org 부분에 접근하려면 인스턴스 3이 필요합니다. 해결: view 항목의 MIB 하위 트리를 iso.3으로 지정합니다. snmpd 에이전트를 새로 고치고 요청을 다시 시도합니다.
  • community 항목의 IP 주소와 네트워크 마스크를 확인합니다. SNMP 요청을 보내는 호스트가 커뮤니티 이름으로 지정한 community에 포함되는지 확인합니다. 해결: SNMP 요청을 보내는 호스트를 포함하도록 구성 파일의 community 항목에서 IP 주소와 네트워크 마스크 필드를 바꿉니다.

에이전트 무응답 문제

community의 IP 주소를 0.0.0.0으로 지정했는데 snmpd 에이전트에서 응답이 없으면 다음을 시도합니다.

  • community 항목의 네트워크 마스크 필드를 확인합니다. 이 커뮤니티 이름에 일반 접근을 주려면 네트워크 마스크가 0.0.0.0이어야 합니다. 네트워크 마스크를 255.255.255.255로 지정하면 snmpd 에이전트는 지정한 커뮤니티 이름의 어떤 요청도 허용하지 않도록 구성됩니다. 해결: community 항목의 네트워크 마스크를 0.0.0.0으로 지정합니다. snmpd 에이전트를 새로 고치고 요청을 다시 시도합니다.
  • community 항목의 접근 모드가 요청 종류와 맞는지 확인합니다. get이나 get-next 요청이면 community에 read-only나 read-write 권한이 있어야 합니다. set 요청이면 read-write 권한이 있어야 합니다. 해결: community 항목에 올바른 접근 모드를 지정합니다. snmpd 에이전트를 새로 고치고 요청을 다시 시도합니다.

noSuchName 문제

snmpd 에이전트가 지원해야 하는 MIB 변수를 설정하려는데 noSuchName 오류 메시지가 돌아오면 다음이 원인일 수 있습니다.

보낸 set 요청에 쓰기 접근이 있는 올바른 community의 커뮤니티 이름이 들어 있지 않았습니다. SNMP 프로토콜은 접근 권한이 알맞지 않은 community의 set 요청에 noSuchName 오류 메시지로 응답하도록 정합니다.

해결: 쓰기 권한이 있고 set 요청을 보내는 호스트를 포함하는 community의 커뮤니티 이름으로 set 요청을 보냅니다.

영어 원문

SNMP daemon troubleshooting

Troubleshooting tips for the SNMP daemon include solving termination problems, MIB variable access problems, MIB variable access in community entry problems, noSuchName problems, no response from agent problems, and daemon failures.

Daemon termination problem

If the snmpd agent is not behaving as expected, the following are some hints to help determine and correct the problem. It is strongly recommended that you start up the snmpd agent with some type of logging. If invoking the snmpd daemon causes problems, it is strongly recommended that the syslogd daemon be set up for logging at the daemon facility and DEBUG severity level. See the snmpd command in Commands Reference, Volume 5 and the snmpd.conf file in Files Referencefor more information on snmpd logging.

If the snmpd daemon terminates as soon as it is invoked, the following are possible reasons for failure and probable solutions:

  • The reason the snmpd daemon terminated will be logged in the snmpd log file or the configured syslogd log file. Check the log file to see the FATAL error message. Solution: Correct the problem and restart the snmpd daemon.

  • The snmpd command line usage was incorrect. If the snmpd command was invoked without the System Resource Controller (SRC), the required usage statement is echoed to the screen. If the snmpd daemon was invoked under SRC control, the usage message is not echoed to the screen. Check the log file to see the usage message. Solution: Invoke the snmpd command with the correct usage statement.

  • The snmpd daemon must be invoked by the root user. Solution: Switch to the root user and restart the snmpd daemon.

  • The snmpd.conf file must be owned by the root user. The snmpd agent verifies the ownership of the configuration file. If the file is not owned by the root user, the snmpd agent terminates with a fatal error. Solution: Make sure you are the root user, change the ownership of the configuration file to the root user, and restart the snmpd daemon.

  • The snmpd.conf file must exist. If the -c flag is not specified in the configuration file on the snmpd command line, the /etc/snmpd.conf file does not exist. If the /etc/snmpd.conf file is accidentally removed, reinstall the bos.net.tcp.client image or else reconstruct the file with the appropriate configuration entries as defined in the snmpd.conf file management page. If the configuration file is specified with the-c flag on the snmpd command line, make sure that the file exists and that the file is owned by the root user. The full path and file name of the configuration file must be specified or else the default /etc/snmpd.conf file will be used. Solution: Make sure the specified configuration file exists and that this file is owned by the root user. Restart the snmpd daemon.

  • The udp port 161 is already bound. Make sure that the snmpd daemon is not already running. Issue the ps -eaf | grep snmpd command to determine if an snmpd daemon process is already executing. Only one snmpd agent can bind to udp port 161. Solution: Either kill the existing snmpd agent or do not try to start up another snmpd daemon process.

Daemon failure problem

If the snmpd daemon fails when you issue a refresh or a kill -1 signal, the following are possible reasons for failure and probable solutions:

  • The reason the snmpd daemon terminated is logged in the snmpd log file or the configured syslogd log file. Check the log file to see the FATAL error message. Solution: Correct the problem and restart the snmpd daemon.

  • Make sure that the complete path and file name of the configuration file is specified when the snmpd daemon is invoked. The snmpd daemon forks and changes to the root directory at invocation. If the complete path name of the configuration file is not specified, the snmpd agent cannot find the file on a refresh. This is a fatal error and will cause the snmpd agent to terminate. Solution: Specify the complete path and file name of the snmpd configuration file. Make sure the configuration file is owned by the root user. Restart the snmpd daemon.

  • Make sure that the snmpd configuration file still exists. The file may have been accidentally removed after the snmpd agent was invoked. If the snmpd agent cannot open the configuration file, the snmpd agent terminates. Solution: Recreate the snmpd configuration file, make sure the configuration file is owned by the root user, and restart the snmpd daemon.

MIB variable access problem

If Management Information Base (MIB) variables cannot be accessed from the snmpd agent; if the snmpd agent is running, but the Simple Network Management Protocol (SNMP) manager application times out waiting for a response from the snmpd agent, try the following:

  • Check the network configuration of the host on which the snmpd agent is running using the netstat -in command. Verify the lo0, loopback, device is up. If the device is down, an * (asterisk) displays to the left of the lo0. The lo0 must be up for the snmpd agent to service requests. Solution: Issue the following command to start up the loopback interface:
text
ifconfig lo0 inet up
  • Verify that the snmpd daemon has a route to the host where the requests are issued. Solution: On the host where the snmpd daemon is running, add a route to the host where the route add command is issued. See the route command in Commands Reference, Volume 4for more information.

  • Check to see that the host name and the host IP address are the same value. Solution: Reset the host name to correspond to the host IP address.

  • Check to see that localhost is defined to be the lo0 IP address. Solution: Define localhost to be the same address used by the lo0 IP address (usually 127.0.0.1).

MIB variable access in community entry problem

If a community entry is specified in the configuration file with a MIB view name, but MIB variables cannot be accessed, check the following:

  • Make sure that you have correctly specified the community entry. If you have specified a view name in the community entry, all fields in the community are absolutely required. Solution: Specify all fields in the community entry in the configuration file. Refresh the snmpd agent and try your request again.

  • Make sure the access mode in the community entry corresponds with your request type. If you are issuing a get or get-next request, make sure that the community has read-only or read-write permission. If you are issuing a set request, make sure that the community has read-write permission. Solution: Specify the correct access mode in the community entry. Refresh the snmpd agent and try your request again.

  • Make sure that a view entry for the specified view name is specified in the community entry in the configuration file. If there is a specified view name in the community entry, but there is no corresponding view entry, the snmpd agent does not allow access for that community. A view entry is absolutely required for a view name specified in a community entry in the configuration file.

Solution: Specify a view entry for the view name specified in the community entry. Refresh the snmpd agent and try your request again.

  • If iso is specified as the MIB subtree for the view entry, verify that iso.3 is specified. The instance of 3 is required for the snmpd agent to access the org portion of the iso tree. Solution: Specify the MIB subtree as iso.3 in the view entry. Refresh the snmpd agent and try your request again.

  • Check the IP address and network mask in the community entry. Verify that the host issuing the SNMP request is included in the community being specified with the community name. Solution: Change the IP address and network mask fields in the community entry in the configuration file to include the host that is issuing the SNMP request.

No response from agent problem

If the IP address in the community is specified as 0.0.0.0, but there is no response from the snmpd agent, try the following:

  • Check the network mask field in the community entry. For general access to this community name, the network mask must be 0.0.0.0. If the network mask is specified to be 255.255.255.255, the snmpd agent is configured to not allow any requests with the specified community name. Solution: Specify the network mask in the community entry to 0.0.0.0. Refresh the snmpd agent and try the request again.

  • Make sure the access mode in the community entry corresponds with the request type. When issuing a get or get-next request, make sure that the community has read-only or read-write permission. If you are issuing a set request, make sure that the community has read-write permission. Solution: specify the correct access mode in the community entry. Refresh the snmpd agent and try your request again.

noSuchName Problem

If, in attempting to set an MIB variable that the snmpd agent is supposed to support, a noSuchName error message is returned, the following might be the reason:

The set request issued did not include a community name for a valid community with write access. The SNMP protocol dictates that a set request with a community with inappropriate access privileges be answered with the noSuchName error message.

Solution: Issue the set request with a community name for a community that has write privileges and includes the host from which the set request is issued.