Fixing ipv6 autodiscovery


IPv6 has a wonderful feature called stateless autoconfiguration, by which every machine on a participating IPv6 network can get a valid and unique IP address.

Theoretically, this eliminates the need for DHCP, but it doesn’t. There are no provisions for passing useful, and usually required, additional information along in the IPv6 autoconfiguration packet.

You can’t get your ntp server, a fixed ip address, web server proxy, wins server, domain name, extra routes, or any of the other things normal DHCP for IPv4 provides - via IPv6 autoconfiguration. You can’t get your default routing protocol out of DHCP for ipv4, either, as best I recall, which really bugs me.

MUCH internet heat was expended on merely getting a default DNS server incorporated into the RDNSS record, and it wasn’t until a year or two ago that you could get DNS out of the radvd demon and kernel under linux.

While it would be possible to dump a set of additional autoconfiguration records into the DNS backend, most routers ran a really limited DNS server that would be kind of difficult to extend (and protect).

Back in 20078, I didn’t like DHCP6 as an option, either, it was big, bloated, slow, and incomplete, and both the DHCP servers I tried back in 20078 were flaky.

While casting about for a sane means of full autoconfiguration while working on [/wiki/wisp6) I hit on an idea so simple, so clever, so audacious, so modern that I wondered why nobody else had proposed it. I had (and still have) one of those “I must be crazy” moments…

Every router and nameserver nowadays has a webserver. Most have the curl library for updates, and openssl is more or less a requirement - so why not serve up the additional information with a sanely designed - and fully extensible - text protocol, like json?

The requirement on the client machine(s) are curl (maybe openssl), with the addition of a tiny json parser like jansson. A tiny change to the total architecture of the internet… ok…

So I decided that my clients would look at their local ra-provided router table and RDNSS servers, and attempt to fetch their configuration via http from those devices.

There would be no need for the complexity of a binary protocol like DHCP6, or a new one like AHCP - the router (and name server) have got everything on it you need already, and json would let you do what’s required in a simple, well defined, text file format, over a standard protocol that already exists, that already had extensible security features like certificate based authentication.

This is where one of those places where the ietf needs to step in, as the code I got working was pretty rough, and the details got a little messy. (I also have a piece of crap json parser). Over the next months, I’m going to work on well-defining the mechanisms I designed. I took this idea really far, extending it all the way to a concept of automatically generating 4in6 tunnels, thus eliminating the need for IPv4 entirely on anything but the client devices that actually needed IPv4.

I’ve been running bits of this code for forever. This is what my laptop looks like today. IPv4 IS NOT running natively on it:

    d@cruithne:/etc$ ip addr
    1: lo:  mtu 16436 qdisc noqueue state UNKNOWN
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
        inet 127.0.0.18 scope host lo
        inet6 ::1128 scope host
           valid_lft forever preferred_lft forever
    2: eth0:  mtu 1500 qdisc pfifo_fast state UP qlen 100
        link/ether 00:1c:25:80:46:f9 brd ff:ff:ff:ff:ff:ff
        inet6 2002:4b91:7fe5:2:21f:3bff:fe2d:dff5/64 scope global
           valid_lft forever preferred_lft forever
        inet6 fe80::21c:25ff:fe80:46f9/64 scope link
           valid_lft forever preferred_lft forever
    3: wlan0:  mtu 1500 qdisc mq state UP qlen 1000
        link/ether 00:1f:3b:2d:df:f5 brd ff:ff:ff:ff:ff:ff
        inet6 2002:4b91:7fe5:3:21f:3bff:fe2d:dff5/64 scope global deprecated dynamic
           valid_lft 48506sec preferred_lft 0sec
        inet6 fe80::21f:3bff:fe2d:dff5/64 scope link
           valid_lft forever preferred_lft forever
    4: pan0:  mtu 1500 qdisc noop state DOWN
        link/ether 5a:c5:ad:65:0b:4d brd ff:ff:ff:ff:ff:ff
    5: ip6tnl0:  mtu 1460 qdisc noop state DOWN
        link/tunnel6 :: brd ::
    18: laptop:  mtu 1280 qdisc noqueue state UNKNOWN
        link/tunnel6 2002:4b91:7fe5:8::2 peer 2002:4b91:7fe5:8::1
        inet 192.168.177.230 scope global laptop
        inet6 2002:4b91:7fe5:8::2128 scope global
           valid_lft forever preferred_lft forever
        inet6 fe80::21c:25ff:fe80:46f9/64 scope link
           valid_lft forever preferred_lft forever

And my routing table:

    d@cruithne:/etc$ ip route
    192.168.177.1 dev laptop  scope link  metric 1 
    192.168.177.0/30 dev laptop  proto kernel  scope link  src 192.168.177.2 
    192.168.177.0/30 dev laptop  scope link  metric 1 
    default via 192.168.177.1 dev laptop 
    
    d@cruithne:/etc$ ip -6 route
    ::75.145.127.229 via fe80::215:6dff:fede:fc11 dev wlan0  proto 42  metric 1024  mtu 1500 advmss 1440 hoplimit 4294967295
    2002:4b91:7fe5::1 via fe80::215:6dff:fede:fc11 dev wlan0  proto 42  metric 1024  mtu 1500 advmss 1440 hoplimit 4294967295
    2002:4b91:7fe5:1::1 via fe80::215:6dff:fede:fc11 dev wlan0  proto 42  metric 1024  mtu 1500 advmss 1440 hoplimit 4294967295
    2002:4b91:7fe5:1::5 via fe80::215:6dff:fede:fc11 dev wlan0  proto 42  metric 1024  mtu 1500 advmss 1440 hoplimit 4294967295
    2002:4b91:7fe5:2:215:6dff:fedf:f65d via fe80::215:6dff:fedf:f65d dev eth0  proto 42  metric 1024  mtu 1500 advmss 1440 hoplimit 4294967295
    2002:4b91:7fe5:2::/64 dev eth0  proto kernel  metric 256  mtu 1500 advmss 1440 hoplimit 4294967295
    2002:4b91:7fe5:3::1 via fe80::215:6dff:fede:fc11 dev wlan0  proto 42  metric 1024  mtu 1500 advmss 1440 hoplimit 4294967295
    2002:4b91:7fe5:3:215:6dff:fede:f65d via fe80::215:6dff:fedf:f65d dev eth0  proto 42  metric 1024  mtu 1500 advmss 1440 hoplimit 4294967295
    2002:4b91:7fe5:3::/64 dev wlan0  proto kernel  metric 256  expires 0sec mtu 1500 advmss 1440 hoplimit 4294967295
    2002:4b91:7fe5:8::1 via fe80::215:6dff:fede:fc11 dev wlan0  proto 42  metric 1024  mtu 1500 advmss 1440 hoplimit 4294967295
    2002:4b91:7fe5:8::2 dev laptop  proto kernel  metric 256  mtu 1280 advmss 1220 hoplimit 4294967295
    2002:4b91:7fe5:ffff::1 via fe80::215:6dff:fede:fc11 dev wlan0  proto 42  metric 1024  mtu 1500 rtt 0.00ms rttvar 0.00ms cwnd 5 advmss 1440 hoplimit 4294967295
    fe80::/64 dev wlan0  proto kernel  metric 256  mtu 1500 advmss 1440 hoplimit 4294967295
    fe80::/64 dev eth0  proto kernel  metric 256  mtu 1500 advmss 1440 hoplimit 4294967295
    fe80::/64 dev laptop  proto kernel  metric 256  mtu 1280 advmss 1220 hoplimit 4294967295
    default via fe80::215:6dff:fede:fc11 dev wlan0  proto 42  metric 1024  mtu 1500 advmss 1440 hoplimit 4294967295
    
    

Find me elsewhere.

Best of the blog Uncle Bill's Helicopter - A speech I gave to ITT Tech - Chicken soup for engineers
Beating the Brand - A pathological exploration of how branding makes it hard to think straight
Inside the Internet Mind - trying to map the weather within the global supercomputer that consists of humans and google
Sex In Politics - If politicians spent more time pounding the flesh rather than pressing it, it would be a better world
Getting resources from space - An alternative to blowing money on mars using NEAs.
On the Columbia - Why I care about space
Authors I like:
Doc Searls
Jerry Pournelle
The Cubic Dog
David Brin
Charlie Stross
Eric Raymond
Anonymous
WikiLeaks
The Intercept
Chunky Mark
Brizzled
Dan Luu's rants about hardware design
Selenian Boondocks
Transterrestial Musings
Callahans

February 10, 2011
968 words


Tags
ipv6 latency usability