aristanetworks / avd

Arista Validated Designs
https://avd.arista.com
Apache License 2.0
260 stars 193 forks source link

Fix(eos_designs): Fix the snmp_settings local engineID computation #3011

Open tgodaA opened 1 year ago

tgodaA commented 1 year ago

Issue Summary

Issue

As per rfc-3411, the engineID generated by AVD is not following any of the schemes. This requires a change to the "hostname_and_ip" and "system_mac" methods.

The algorithm must be tuned to use either of these methods decided by the 5th octet(rfc-3411):

The fifth octet indicates how the rest (6th and following octets)
are formatted. The values for the fifth octet are:

                      0     - reserved, unused.

                      1     - IPv4 address (4 octets)
                              lowest non-special IP address

                      2     - IPv6 address (16 octets)
                              lowest non-special IP address

                      3     - MAC address (6 octets)
                              lowest IEEE MAC address, canonical
                              order

                      4     - Text, administratively assigned
                              Maximum remaining length 27

                      5     - Octets, administratively assigned
                              Maximum remaining length 27

                      6-127 - reserved, unused

                    128-255 - as defined by the enterprise
                              Maximum remaining length 27

There are two engineID formats, decided by the first bit (refer rfc-3411):

             0 - as defined by enterprise using former methods that existed
                   before SNMPv3. The snmpEngineID has a length of 12 octets.
             1 - The length of the octet string varies.

Some of the examples are listed here, slides 7-14.

What can be implemented

EngineID formulae: As the enterprise ID = 30065 = 00007571x 1) for hostname_and_ip: 80007571 + 04 + <ascii(hostname_and_ip)> or <hexdigest(hostname_and_ip)> 2) for system_mac: 80007571 + 03 + mac

Additionally, we can implement: 3) mgmt_ip: 80007571 + 01 + <hex(ip)>

Which component(s) of AVD impacted

eos_designs

How do you run AVD ?

None

Steps to reproduce

No response

Relevant log output

No response

Contributing Guide

github-actions[bot] commented 10 months ago

This issue is stale because it has been open 90 days with no activity. The issue will be reviewed by a maintainer and may be closed