Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to get Net-SNMP running over TCP instead of UDP?

The daemon program can be configured at the termiinnal to listen for TCP connections with:

snmpd tcp:1161

However, there are no flags for the snmpget to use TCP?


share|improve this question
up vote 2 down vote accepted

I think snmpget also supports that. There are some common features described on the snmpcmd(1M) man page that they don't bother repeating on all the individual command pages.

 Agent Specification
     The agent specification (see SYNOPSIS) takes the form:


     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:


     Perform query using UDP/IPv4 datagrams  sent  to  myhost  on
     port  161.  The  :161  is redundant here because that is the
     default SNMP port.


     Identical to the previous specification. The udp: is  redun-
     dant here because UDP/IPv4 is the default transport.
share|improve this answer
I see. Thanks for the info. – unkle_junky Apr 8 '13 at 19:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.