etingof / pysnmp

Python SNMP library
http://snmplabs.com/pysnmp/
BSD 2-Clause "Simplified" License
568 stars 188 forks source link

Enable Broadcast for the UdpTransportTarget #410

Open yegorich opened 2 years ago

yegorich commented 2 years ago

How can I enable broadcasts for the UdpTransportTargetobject in getCmd and setCmd use cases?

lextm commented 1 year ago

For IPv4 broadcast, you can refer to the example,

https://github.com/lextudio/pysnmp/blob/v5.0.24/examples/v1arch/asyncore/manager/cmdgen/broadcast-agent-discovery.py#L88

In most cases, SNMP agents are configured to respond to broadcast GET requests to allow them to be discovered. However, the actual agents you test might not be configured the same way, and SET requests are more likely to fail.