in reply to SNMP how to change transport from UDP to TCP ?

Net::SNMP Documentation

Transport Layer Arguments

The Net::SNMP module uses UDP/IP as the Transport Layer to pass SNMP messages between the local and remote devices. The destination device can be specified using the -hostname argument. The -hostname argument accepts either an IP network hostname or an IP address in dotted notation. This argument is optional and defaults to "localhost". The destination UPD port number can be specified using the -port argument. This argument is also optional and defaults to 161, which is the port number on which devices using default values expect to receive SNMP request messages. The -port argument will need to be specified for remote devices expecting to receive SNMP notifications since these device typically default to port 162.

By default, the source IP address and port number are assigned dynamically by the local device on which the Net::SNMP module is being used. This dynamic assignment can be overridden by using the -localaddr and -localport arguments. These values default to INADDR_ANY (typically 0.0.0.0) and 0 respectively. The -localaddr argument will accept either an IP network hostname or an IP address in dotted notation. If a hostname is specified, the resolved IP address must be a valid address on the local device.

From the above quote the answer is there is no way to do it with that module out of the box.

"No matter where you go, there you are." BB
  • Comment on Re: SNMP how to change transport from UDP to TCP ?

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.