I recently wanted to find the IPv6 address of a computer on my network. However, since I’m using autoconfiguration, I had no way of knowing what it was, unless I walked the 5 feet and checked it out on the computer itself. Instead, I went looking and found this IPv6 trick to get a list of addresses on your network.
It returns the link local addresses (so it only works as long as you’re on the same link).
But I needed to know the global IPv6 address. Fortunately for me, the only addresses on this link are my computer, the gateway and the computer I wanted to find. I got this from the above ping6 trick (addresses may have been changed to protect the guilty):
$ ping6 -I eth2 ff02::1
PING ff02::1(ff02::1) from fe80::92e6:baff:febd:6532 eth2: 56 data bytes
64 bytes from fe80::91e6:baff:feba:6532: icmp_seq=1 ttl=64 time=0.045 ms
64 bytes from fe80::211:f3ff:fe67:8fee: icmp_seq=1 ttl=64 time=0.131 ms (DUP!)
64 bytes from fe80::212:3fff:fef6:2c23: icmp_seq=1 ttl=64 time=0.149 ms (DUP!)
^C
--- ff02::1 ping statistics ---
1 packets transmitted, 1 received, +2 duplicates, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.045/0.108/0.149/0.046 ms
I know what my link local is (from ifconfig), and I know what my router’s link local is (from ip -f inet6 neigh) [shortened to ip -6 n, thanks to @barttrojanowski]:
$ ip -6 n
fe80::212:3fff:fef6:2c33 dev eth2 lladdr 00:12:3f:f6:2c:23 router REACHABLE
2001:db8:81e5::1 dev eth2 lladdr 00:12:3f:f6:2c:23 router REACHABLE
So that leaves me with fe80::211:f3ff:fe67:8fee. To get the global address, I drop fe80 and tack on my subnet of 2001:db8::/64
$ ping6 2001:db8::211:f3ff:fe67:8fee
PING 2001:db8::211:f3ff:fe67:8fee(2001:db8::211:f3ff:fe67:8fee) 56 data bytes
64 bytes from 2001:db8::211:f3ff:fe67:8fee: icmp_seq=1 ttl=64 time=9.73 ms
64 bytes from 2001:db8::211:f3ff:fe67:8fee: icmp_seq=2 ttl=64 time=0.113 ms
^C
--- 2001:db8::211:f3ff:fe67:8fee ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 0.113/4.923/9.733/4.810 ms
Archive for September, 2010
Stupid IPv6 tricks
Tuesday, September 28th, 2010The Home Router and IPv6
Wednesday, September 8th, 2010As someone who’s trying to implement IPv6 for an ISP, I’ve found that the biggest piece lacking out there is the home router. Going forward with IPv6, it’s even less desirable to not have a hardware firewall, as it’s now not just a firewall, but an actual router. Previously, with IPv4, a home “router” actually only did NAT, not routing. With IPv6, we’re now routing all public addresses around the home, and finding one that does this somewhat intelligently is a challenge. The other piece of the puzzle you’ll need is a router that will do DHCPv6. Most ISP’s will continue to use DHCP to hand out IP addresses (v4 or v6), utilizing it’s ability to hand out prefixes (PD – Prefix Delegation) to give customers a subnet of some size (/48 and /56 seem to be the most talked about sizes) to use in their networks. The thinking is that at some point in the (hopefully) not so distant future, you’ll be able to subnet off computers, appliances, mobile devices, and whatever else we put on the interwebs into discreet subnets.
So far, there are only 2 commercial routers that you can buy today that seem to work for a user looking to have IPv6 on an ISP using DHCPv6: The Apple Airport Extreme, and the D-Link DIR-615.
I’ve also heard of a router made in Australia, but haven’t seen it for sale here in North America.
The only other option is to try installing a third party software onto your router (ala tomato or dd-wrt) This should only be taken by those who don’t mind breaking things for fun, as the worst case scenario is wrecking the router you put it on.
The good news is that there are more of these routers coming, so if you can put it off, wait a while before buying an router so you can be sure IPv6 is available. If not, maybe spend some time either ensuring it has IPv6 support now, or that you can use one of the third party software versions on the one you buy.
Getting there
Wednesday, September 1st, 2010Hopefully we’ll have some real content here. In the meantime, I present this comic by xkcd! (make sure you hover your cursor over the image.)