dpetzel/ZenPacks.community.f5 — Issue #1: Issues with route-domains and IPv6 addresses
Author: dpetzel
Created: 2011-12-03 00:22:34+00:00
State: open

We are using F5s with route-domains. F5 supports this by "sort-of" using IPv6 addresses internall, so there are a couple places where your scripts are bombing out. Particularly the BigipLtmNodeMap.py and PigipLtmVirtualServerMap.py scripts, when they try to use the socket.inet_ntoa call to convert the hex table indices to dotted decimal. It over-flows because when a route-domain is used, the address is 64 bits, (8 octets, not just 4). I looks a couple octets before the IP are differant as well. Here is an snmpwalk from out F5.

SNMPv2-SMI::enterprises.3375.2.2.4.1.2.1.2.1.4.3.64.74.80 = Hex-STRING: 03 40 4A 50
SNMPv2-SMI::enterprises.3375.2.2.4.1.2.1.2.3.8.3.64.64.75.0.0.0.2 = Hex-STRING: 03 40 40 4B 00 00 00 02
SNMPv2-SMI::enterprises.3375.2.2.4.1.2.1.2.3.8.3.64.64.76.0.0.0.2 = Hex-STRING: 03 40 40 4C 00 00 00 02
SNMPv2-SMI::enterprises.3375.2.2.4.1.2.1.2.3.8.3.64.64.77.0.0.0.2 = Hex-STRING: 03 40 40 4D 00 00 00 02
SNMPv2-SMI::enterprises.3375.2.2.4.1.2.1.2.3.8.3.64.64.78.0.0.0.2 = Hex-STRING: 03 40 40 4E 00 00 00 02

The first entry is a test entry which doesn't use a route-domain. The other four entries all use route-domain 2 ("%2" in F5 speak). (We have many other route-domains, but I left them off for brevity).

Here is the output of the unchanged values from the snmpwalk
'ltmNodeAddrAddr': '\x03@@\xca\x00\x00\x00\x03',
'ltmNodeAddrScreenName': 'alEVbempVMp03e',
'modname': 'ZenPacks.community.f5.BigipLtmNode',

'ltmNodeAddrAddr': '\x03@JP',
'ltmNodeAddrScreenName': 'testing',
'modname': 'ZenPacks.community.f5.BigipLtmNode',

The second node, which I created for testing, is the one that does not use a route-domain, The one above it uses route-domain 2.

Any help anyone could offer on how to convert the ltmNodeAddrAddr to the correct dotted-decimal format would be greatly appreciated.