[TriLUG] IPv6 equivalent to dhclient list

Alan Porter porter at trilug.org
Tue Jan 6 20:46:46 EST 2015


My home router is a small Linux box, a 2008-era "Fit PC 1.0".
It runs a few basic services, including dnsmasq, a DNS/DHCP
server.  Dnsmasq is in charge of allocating IPv4 addresses
to all devices in the house.  For IPv6, I have radvd, which
advertises my home subnet and route info.

I have a simple web CGI script that shows a web page with a
list of clients who are on the home network.  Basically, it
reads /var/lib/dnsmasq.leases and shows that info in a tidy
little grid.

lease time   mac addr             ip addr        host name
0:09:10      6c:40:08:a3:b9:2e    172.31.1.57    hedwig
0:05:34      00:27:10:b7:79:90    172.31.1.56    xps
0:07:41      00:13:ef:d5:27:f8    172.31.1.31    garagepi

...and so on.

I'd like to add IPv6 hosts to that list, but I don't know how
to get that info from my router, or if it even knows.

How would I find the IPv6 machines on my network?  Do they
leave some trail when they do their little dance with radvd?
Is there some IPv6 equivalent to the ARP table (is it ndp)?

I hope I don't end up doing something crazy, like logging
IP addresses with an ip6tables rule, and using that somehow!
Or writing a script that monitors "ip -6 neighbor show" and
keeps a lookup table.  And I really hope I don't have to do
some stunt that requires me to find the host on IPv4 before
I can look him up on IPv6!

Ideas?


Alan








More information about the TriLUG mailing list