Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPV6 support for SNMPDetect #3027

Closed
kacem-expereo opened this issue Nov 10, 2022 · 2 comments
Closed

IPV6 support for SNMPDetect #3027

kacem-expereo opened this issue Nov 10, 2022 · 2 comments

Comments

@kacem-expereo
Copy link
Contributor

Hi Team!
The snmp_autodetect.py providing netmiko's SNMPDetect do not seem to support ipv6 addresses passed to the hostname parameter.

snmp_autodetect uses UdpTransportTarget by default , which works for ipv4 only.
We can use Udp6TransportTarget for ipv6 instead of UdpTransportTarget.
I propose to identify the host ip version using ipaddress.ip_address().version from ipaddress library and to switch between UdpTransportTarget and Udp6TransportTarget accordingly.
I tested it successfully.
If the idea looks ok for you let me know and I will submit a PR.

Kindly,

@ktbyers
Copy link
Owner

ktbyers commented Nov 10, 2022

@kacem-expereo Yeah, that sounds fine to me.

kacem-expereo added a commit to kacem-expereo/netmiko that referenced this issue Nov 14, 2022
ktbyers pushed a commit that referenced this issue Dec 14, 2022
* IPV6 support for SNMPDetect(#3027)

* apply black
@kacem-expereo
Copy link
Contributor Author

Thanks a lot :)

ktbyers pushed a commit that referenced this issue May 5, 2023
* IPV6 support for SNMPDetect(#3027)

* apply black
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants