netdisco icon indicating copy to clipboard operation
netdisco copied to clipboard

NX-OS SSHCollector errors out parsing output of some IPv6 neighbor entries on old versions of NX-OS

Open njohnsn opened this issue 2 years ago • 1 comments

Expected Behavior

arpnip should successfully use the NXOS SSHCollector to retrieve the ARP and Neighbor table from an NXOS device

Current Behavior

arpinp crashes parsing IPv6 neighbor entries retrieved from the deivce. It appears some entries appear on a single line rather than on two lines.

Possible Solution

Alter parsing routine to check special case where the entry is all in one line.

Pull request with potential fix to be submitted shortly

Steps to Reproduce (for bugs)

  1. Run aprnip against a NXOS device running older versions of NXOS

Context

Unable to retrieve the full IPv6 neighbor table from our core and datacenter routers.

Your Environment

  • Netdisco version used: 2.071001
  • SNMP::Info version used: NA

Config info (deployment.yml)

Device information

https://github.com/netdisco/netdisco/wiki/Snapshot#share-a-snapshot

Nexus 7018 running NX-OS 8.4(5) (Sup 1., 1st Gen Fabrics)

njohnsn avatar Jan 21 '24 20:01 njohnsn

from your example is seems to depend on how much the ipv6 address can be shortened.

you say "some" entries use 1 line, can i conclude then that you have both 1 & 2 line entries? if so, can you run "terminal width 350" first & then the neighbor info -> are they all 1 line now?

(terminal width is valid only for the current session, do no danger there)

another solution for nx-os could be to the use | json-pretty or | xml, since it creates output in a uniform format in my testing, so if you only have 30 chars/line or whatever, you can still reconstruct the output since you know what to expect in json or xml. could also be a more stable option across platforms or os versions with a predictable structure. it is a lot more work to implement, and very old nx-os might not support that output filter, but i no longer have access to 7000's running nx-os 6 to test that.

but perhaps first see if terminal width makes everything uniform, seems to be a common function across nx-os versions too. if it works it can be added quickly without increasing code complexity.

inphobia avatar Jan 31 '24 02:01 inphobia