Friday, February 8, 2013

some random IPv6 notes

resources:
http://www.tldp.org/HOWTO/Linux+IPv6-HOWTO/index.html
Silvia Hagen: IPv6 Essentials (O'Reilly, 2006, ISBN 0-596-10058-2)
David Malone, Niall Murphy: IPv6 Network Administration (O'Reilly, 2005, ISBN 0-596-00934-8)

invalid argument ?:
# ping6 fe80::212:34ff:fe12:3456
connect: Invalid argument
the kernel doen't know through which interface to send. specify the interface with -I
# ping6 -I eth0 fe80::2e0:18ff:fe90:9205
PING fe80::212:23ff:fe12:3456(fe80::212:23ff:fe12:3456) from
¬ fe80::212:34ff:fe12:3478 eth0: 56 data bytes
64 bytes from fe80::212:23ff:fe12:3456: icmp_seq=0 hops=64 time=445 usec

 ping6 to the link-local all-node multicast address to find ipv6 activated hosts in the network:
panda@marvin ~ $ ping6 -I eth0 ff02::1
PING ff02::1(ff02::1) from fe80::92e6:baff:fec1:7749 eth0: 56 data bytes
64 bytes from fe80::92e6:baff:fec1:7749: icmp_seq=1 ttl=64 time=0.056 ms
64 bytes from fe80::222:5fff:fe03:3225: icmp_seq=1 ttl=64 time=127 ms (DUP!)
64 bytes from fe80::52ea:d6ff:fe92:a40e: icmp_seq=1 ttl=64 time=133 ms (DUP!)
64 bytes from fe80::92e6:baff:fec1:7749: icmp_seq=2 ttl=64 time=0.066 ms
64 bytes from fe80::222:5fff:fe03:3225: icmp_seq=2 ttl=64 time=45.9 ms (DUP!)
64 bytes from fe80::52ea:d6ff:fe92:a40e: icmp_seq=2 ttl=64 time=57.2 ms (DUP!)
^C
--- ff02::1 ping statistics ---
2 packets transmitted, 2 received, +4 duplicates, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 0.056/60.810/133.580/53.861 ms

regex for address, sort, uniq and you have all ipv6 active hosts! (which answered during 5 seconds)
 $ ping6 -w5 -I eth0 ff02::1 | egrep -o '([0-9a-f]+::?){4}[0-9a-f]+' | sort | uniq
fe80::222:5fff:fe03:3225
fe80::223:26ff:fe3c:1d35

 

No comments:

Post a Comment