UDP 대신 TCP를 통해 Net-SNMP를 실행할 수 있습니까?
TCP 연결을 수신하도록 터미널에서 데몬을 구성할 수 있습니다.
snmpd tcp:1161
snmpget
그런데 TCP를 사용하는 플래그가 없나요 ?
답변1
snmpget도 이것을 지원한다고 생각합니다. 일부 공통 기능은 snmpcmd(1M) 매뉴얼 페이지에 설명되어 있지만 모든 개별 명령 페이지에서 이러한 기능을 반복하지는 않습니다.
Agent Specification
The agent specification (see SYNOPSIS) takes the form:
[transport-specifier:]transport-address
At its simplest, the agent specification consists of a host-
name or an IPv4 address in the standard, "dotted quad" nota-
tion. In this case, communication will be attempted using
UDP/IPv4 to port 161 of the given host. Otherwise, the
transport-address part of the specification is parsed
according to the following table:
<transport-specifier> <transport-address> format
udp hostname[:port]
Note that transport-specifier strings are case-insensitive
so that, for example, "tcp" and "TCP" are equivalent. Here
are some examples, along with interpretations:
myhost:161
Perform query using UDP/IPv4 datagrams sent to myhost on
port 161. The :161 is redundant here because that is the
default SNMP port.
udp:myhost
Identical to the previous specification. The udp: is redun-
dant here because UDP/IPv4 is the default transport.