{"id":63,"date":"2010-09-28T20:33:19","date_gmt":"2010-09-29T02:33:19","guid":{"rendered":"http:\/\/www.ipcalypse.ca\/?p=63"},"modified":"2010-09-30T22:19:39","modified_gmt":"2010-10-01T04:19:39","slug":"stupid-ipv6-tricks","status":"publish","type":"post","link":"https:\/\/www.ipcalypse.ca\/?p=63","title":{"rendered":"Stupid IPv6 tricks"},"content":{"rendered":"<p>I recently wanted to find the IPv6 address of a computer on my network.  However, since I&#8217;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 <a href=\"http:\/\/tldp.org\/HOWTO\/html_single\/Linux+IPv6-HOWTO\/#AEN834\">this IPv6 trick<\/a> to get a list of addresses on your network.<br \/>\nIt returns the link local addresses (so it only works as long as you&#8217;re on the same link).<br \/>\nBut 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):<br \/>\n<code><br \/>\n$ ping6 -I eth2 ff02::1<br \/>\nPING ff02::1(ff02::1) from fe80::92e6:baff:febd:6532 eth2: 56 data bytes<br \/>\n64 bytes from fe80::91e6:baff:feba:6532: icmp_seq=1 ttl=64 time=0.045 ms<br \/>\n64 bytes from fe80::211:f3ff:fe67:8fee: icmp_seq=1 ttl=64 time=0.131 ms (DUP!)<br \/>\n64 bytes from fe80::212:3fff:fef6:2c23: icmp_seq=1 ttl=64 time=0.149 ms (DUP!)<br \/>\n^C<br \/>\n--- ff02::1 ping statistics ---<br \/>\n1 packets transmitted, 1 received, +2 duplicates, 0% packet loss, time 0ms<br \/>\nrtt min\/avg\/max\/mdev = 0.045\/0.108\/0.149\/0.046 ms<br \/>\n<\/code><br \/>\nI  know what my link local is (from ifconfig), and I know what my router&#8217;s link local is (from ip -f inet6 neigh) [shortened to ip -6 n, thanks to <a href=\"http:\/\/twitter.com\/barttrojanowski\">@barttrojanowski<\/a>]:<br \/>\n<code><br \/>\n$ ip -6  n<br \/>\nfe80::212:3fff:fef6:2c33 dev eth2 lladdr 00:12:3f:f6:2c:23 router REACHABLE<br \/>\n2001:db8:81e5::1 dev eth2 lladdr 00:12:3f:f6:2c:23 router REACHABLE<br \/>\n<\/code><br \/>\nSo 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<br \/>\n<code>$ ping6 2001:db8::211:f3ff:fe67:8fee<br \/>\nPING 2001:db8::211:f3ff:fe67:8fee(2001:db8::211:f3ff:fe67:8fee) 56 data bytes<br \/>\n64 bytes from 2001:db8::211:f3ff:fe67:8fee: icmp_seq=1 ttl=64 time=9.73 ms<br \/>\n64 bytes from 2001:db8::211:f3ff:fe67:8fee: icmp_seq=2 ttl=64 time=0.113 ms<br \/>\n^C<br \/>\n--- 2001:db8::211:f3ff:fe67:8fee ping statistics ---<br \/>\n2 packets transmitted, 2 received, 0% packet loss, time 1001ms<br \/>\nrtt min\/avg\/max\/mdev = 0.113\/4.923\/9.733\/4.810 ms<br \/>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I recently wanted to find the IPv6 address of a computer on my network. However, since I&#8217;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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[40],"tags":[],"class_list":["post-63","post","type-post","status-publish","format-standard","hentry","category-ipv6"],"_links":{"self":[{"href":"https:\/\/www.ipcalypse.ca\/index.php?rest_route=\/wp\/v2\/posts\/63","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ipcalypse.ca\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ipcalypse.ca\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ipcalypse.ca\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ipcalypse.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=63"}],"version-history":[{"count":6,"href":"https:\/\/www.ipcalypse.ca\/index.php?rest_route=\/wp\/v2\/posts\/63\/revisions"}],"predecessor-version":[{"id":69,"href":"https:\/\/www.ipcalypse.ca\/index.php?rest_route=\/wp\/v2\/posts\/63\/revisions\/69"}],"wp:attachment":[{"href":"https:\/\/www.ipcalypse.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=63"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ipcalypse.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=63"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ipcalypse.ca\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=63"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}