Ipv6 on IOS-XE (Solved, or close enough)

On IOS-XE, I’m not getting much IPv6. Example:

Gives lots of IPv4 addresses:

select 
  ipv4_address, 
  devices.sysName, 
  ports.ifName 
from 
  ipv4_addresses 
  join ports on ipv4_addresses.port_id = ports.port_id 
  join devices on ports.device_id = devices.device_id 
where 
  sysName = "some_9500";

Gives just the loopback:

select 
  ipv6_address, 
  devices.sysName, 
  ports.ifName 
from 
  ipv6_addresses 
  join ports on ipv6_addresses.port_id = ports.port_id 
  join devices on ports.device_id = devices.device_id 
where 
  sysName = "some_9500";

Ideas appreciated, much thanks

Perhaps check the debug output of discovery (particularly the ipv6_addresses module)

Thanks much Tony, should have thought of that. Please excuse the late reply.

There it is - look, there’s an address I want.

~$ grep  a8:46:9d:8b:cf:3f discovery.txt 
IP-MIB::ipNetToPhysicalPhysAddress[72][ipv4]["*"] = a8:46:9d:8b:cf:3f
IP-MIB::ipNetToPhysicalPhysAddress[72][ipv6]["26:20:00:31:40:02:00:52:aa:46:9d:ff:fe:8b:cf:3f"] = a8:46:9d:8b:cf:3f
IP-MIB::ipNetToMediaPhysAddress[72][*] = a8:46:9d:8b:cf:3f
a8:46:9d:8b:cf:3f => 172.25.225.58  
BRIDGE-MIB::dot1dTpFdbPort[a8:46:9d:8b:cf:3f] = 47

Now, if I were smarter (I’m not, hints appreciated), I could think of a good join for this to get IP address. But, I’m only smart enough to look at ports_fdb.

MariaDB [librenms]> select ports_fdb_id,port_id,mac_address,vlan_id,device_id from ports_fdb where device_id = 1746 and mac_address = ‘a8469d8bcf3f’;

+--------------+---------+--------------+---------+-----------+
| ports_fdb_id | port_id | mac_address  | vlan_id | device_id |
+--------------+---------+--------------+---------+-----------+
|     13898997 |  108864 | a8469d8bcf3f |   24422 |      1746 |
+--------------+---------+--------------+---------+-----------+

I also see there isn’t an Ipv6 option at search/search=fdb/. Is this possible?

MariaDB [librenms]> select * from ipv4_mac where ipv4_address = "172.25.225.58";
+---------+---------+-----------+--------------+---------------+--------------+
| id      | port_id | device_id | mac_address  | ipv4_address  | context_name |
+---------+---------+-----------+--------------+---------------+--------------+
| 8673577 |  109485 |      1753 | a8469d8bcf3f | 172.25.225.58 |              |
+---------+---------+-----------+--------------+---------------+--------------+
1 row in set (0.329 sec)

ipv6_mac table would be nice…

1 Like

Let me try adding a new IPv4/IPv6 addr, then discovery.php > discovery.txt

$ grep 172.25.247.4 discovery.txt
0:87:64:33:79:41 => 172.25.247.4
SQL[insert into ipv4_mac (context_name, device_id, ipv4_address, mac_address, port_id) values (?, ?, ?, ?, ?), (?, ?, ?, ?, ?), (?, ?, ?, ?, ?) [“”,1753,“159.238.217.123”,“bce92f8eb0b9”,109480,“”,1753,“10.22.1.6”,“b0a4603ed20d”,160860,“”,1753,“172.25.247.4”,“008764337941”,161299] 7.99ms]
librenms@nacho:~$ grep 79:41 discovery.txt
IP-MIB::ipNetToPhysicalPhysAddress[72][ipv4][““] = b0:90:7e:d0:79:41
IP-MIB::ipNetToPhysicalPhysAddress[174][ipv4][”
”] = 0:87:64:33:79:41
IP-MIB::ipNetToPhysicalPhysAddress[174][ipv6][“26:20:00:31:40:02:00:aa:02:87:64:ff:fe:33:79:41”] = 0:87:64:33:79:41
IP-MIB::ipNetToPhysicalPhysAddress[174][ipv6][“fe:80:00:00:00:00:00:00:02:87:64:ff:fe:33:79:41”] = 0:87:64:33:79:41
IP-MIB::ipNetToMediaPhysAddress[72][] = b0:90:7e:d0:79:41
IP-MIB::ipNetToMediaPhysAddress[174][
] = 0:87:64:33:79:41
b0:90:7e:d0:79:41 => 172.25.225.12
0:87:64:33:79:41 => 172.25.247.4
BRIDGE-MIB::dot1dTpFdbPort[b0:90:7e:d0:79:41] = 15
BRIDGE-MIB::dot1dTpFdbPort[0:87:64:33:79:41] = 15

MariaDB [librenms]> select * from ipv4_addresses where ipv4_address = "172.25.247.4";
Empty set (0.002 sec)

MariaDB [librenms]> select * from ipv6_addresses where ipv6_compressed like "%7941";
Empty set (0.000 sec)


MariaDB [librenms]> select * from ipv4_mac where ipv4_address = "172.25.247.4";
+----------+---------+-----------+--------------+--------------+--------------+
| id       | port_id | device_id | mac_address  | ipv4_address | context_name |
+----------+---------+-----------+--------------+--------------+--------------+
| 10019564 |  161299 |      1753 | 008764337941 | 172.25.247.4 |              |
+----------+---------+-----------+--------------+--------------+--------------+
1 row in set (0.023 sec)

WELL… I see no statement in that discover to suggest it added to ipv4/ipv6_addresses. But, my cohort said the interface wasn’t there so he ran a discover. (with no debug. Obscenities were uttered.)

MariaDB [librenms]> select ipv6_compressed from ipv6_addresses where ipv6_compressed like "%7941";
+------------------------------------+
| ipv6_compressed                    |
+------------------------------------+
| 2620:31:4002:aa:287:64ff:fe33:7941 |
+------------------------------------+
1 row in set (0.001 sec)

:thinking:
Surely, I must be losing my mind.

%7941 doesn’t seem like an IP address. I wonder where that came from.

Well, now, my good friend Tony, that there 'be an ipv6 address and they are a rather different sort of breed. BTW, you let me know if you ever get near Cedar Rapids, hear?

Somewhere along the line, I seem to have found an example that disproved my problem. Perhaps I’ll mark this thread solved until I have time to find something more concrete.

Thanks!

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.