pysnmp icon indicating copy to clipboard operation
pysnmp copied to clipboard

Binding source port used in nextCmd

Open irfancnk opened this issue 4 years ago • 1 comments

I am using nextCmd method in pysnmp.hlapi to fetch information. But I also watch the network and saw that every SNMP request is sent from another port from sender device. I could not find the API to bind the port that is used to sent SNMP from. I got following conversation in my wireshark and I want to reduce the size of it by fixing the source port.

192.168.0.104:49805 <-> 192.168.0.1:161 192.168.0.104:49806 <-> 192.168.0.1:161 192.168.0.104:49808 <-> 192.168.0.1:161 192.168.0.104:49809 <-> 192.168.0.1:161

I got nearly 13k conversation that is sent from different ports if 104 to 1. How to bind the port?

irfancnk avatar Jan 17 '20 08:01 irfancnk

It is determined by your source code. If you use a single SNMP engine (and its transport dispatcher), then a single port is used on the manager side.

lextm avatar Feb 11 '24 04:02 lextm