[Nottingham] Easy network programming

Charles Samuels charles at kde.org
Sat May 12 03:27:55 BST 2007


Martin wrote, on Friday 2007 May 11:
> Good to see you on the list again!

Martin, I never left! Just that by the time I wake up, a question would have 
already been answered :)

Speaking of networking, here's something useful and fun for you all to try if 
you have multiple computers on your ethernet

$ ping6 -Ieth0 ip6-allnodes

(btw, that's a capital Eye)

Now pick any host that's not yours (the first one is the local host) and ssh 
into it like so:

$ ssh address%eth0



Here's an example:

charles at arkimedes:~$ ping6 -Ieth0 ip6-allnodes
PING ip6-allnodes(ip6-allnodes) from fe80::202:3fff:feb2:7c40 eth0: 56 data 
bytes
64 bytes from fe80::202:3fff:feb2:7c40: icmp_seq=1 ttl=64 time=0.113 ms
64 bytes from fe80::209:5bff:fe19:de81: icmp_seq=1 ttl=64 time=0.185 ms (DUP!)

--- ip6-allnodes ping statistics ---
1 packets transmitted, 1 received, +1 duplicates, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.113/0.149/0.185/0.036 ms

(extra points if you can use this information to figure out the manufacturer 
of my ethernet cards :)

charles at arkimedes:~$ ssh fe80::209:5bff:fe19:de81%eth0



What are the implications of this, you ask?

Well, first of all, you can ssh into not only a machine that you don't know 
it's ip address for (like you can with broadcast pings in IPv4), but (Set 
your faces to stun!!!) you can ping and ssh into machines whose network 
interfaces haven't yet even been configured. In other words, you can connect 
to ipv6 hosts prior to them being given addresses by ipv6's automatic 
configuration protocol (radvd) or dhcp.

*Wow* !

What's more is that practically every Linux distro from the last few years has 
supported all of this out of the box.

Charles



More information about the Nottingham mailing list