[Nottingham] Easy network programming

Charles Samuels charles at kde.org
Sun May 13 19:26:27 BST 2007


Martin wrote, on Saturday 2007 May 12:
> OK, so is that using a default of an IPv6 prefix + MAC?

Not a default, all ipv6 interfaces have this address whether they are 
configured with an "Global" address or not.

>
> And what if sshd isn't configured or up yet?...
Don't do that :)

>
> Still interesting.
>
> When might the rest of the world move over to IPv6 so that we can at
> long last forget all the NAT fun and distraction?...

Not until you and every other geek starts using it first.

You can start by getting an "6in4" tunnel right now!

Note that 68.123.44.50 is my ip address. You should use your own instead. I 
use it twice, the first time with spaces instead of dots.

do this to get your ipv6 prefix:
prefix=$(printf "2002:%02x%02x:%02x%02x" 68 123 44 50)

do this to make the tunnel:
/sbin/ip tunnel add tun6to4 mode sit ttl 44 remote any local 68.123.44.50
/sbin/ip link set dev tun6to4 up

this makes use of your ipv6 prefix:
/sbin/ip -6 addr add $prefix::1/16 dev tun6to4

this opens a tunnel to the "internet's home office" (available by anycast!)
/sbin/ip -6 route add 2000::/3 via ::192.88.99.1 dev tun6to4 metric 1

ifconfig eth0 inet6 add  $prefix:1::1/64

lets your computer be an ipv6 router for other machines on your network (for 
use with radvd). I think you won't need this:
echo 1 > /proc/sys/net/ipv6/conf/all/forwarding

Now visit www.ipv6.org on a web browser that supports it, which really should 
be any. Well, I know konqueror works.

Remember that to specify an ip address in a web browser, you need to put the 
address in square brackets (so it doesn't confused the colon for a 
port-delimiter):

http://[2002:447b:2c32:1::1]/ is my server, for example.

Charles
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mailman.lug.org.uk/pipermail/nottingham/attachments/20070513/fa4a0b25/attachment.bin


More information about the Nottingham mailing list