rfc2765 part1

Some 3-4 years ago, i had the idea of replacing all ipv4 addresses in a mesh network with ipv6 addresses, while still routing ipv4 through the mesh.

The basic idea behind it was to translate ip4 stateless into ipv6 packets, route them through the mesh and translate them back into ipv4 packets at the border of the mesh.

i tried to visualize it: ipv6-translation.

Experiments with trt did not succeed, but after reading more rfc documents, i found rfc2765, which descibes exactly what i wanted to do.

But there was no implementation.

Some more googleing led to russian documents, doing mostly what i wanted.

With some help from Daniel and google translate, we got the source and a vague idea of how i might work. Felix from the OpenWrt project helped a lot to make a broadcom-2.4 kernel package.

Took 2 router and a notebook, put a 192.168.11.0/24 on one lan between the 2 router, put a ::ffff:0:192.168.13.0/96 between the router and the notebook and was finally able to see a translated ping on my routers siit0 interface:

07:30:19.583928 IP 192.168.11.1 > 192.168.13.3: ICMP echo request, id 51461, seq 31, length 64
07:30:19.584046 IP6 ::ffff:ffff:c0a8:b01 > ::ffff:0:c0a8:d03: ICMP6, echo request, seq 31, length 64
07:30:20.583894 IP 192.168.11.1 > 192.168.13.3: ICMP echo request, id 51461, seq 32, length 64
07:30:20.584012 IP6 ::ffff:ffff:c0a8:b01 > ::ffff:0:c0a8:d03: ICMP6, echo request, seq 32, length 64
07:30:21.583923 IP 192.168.11.1 > 192.168.13.3: ICMP echo request, id 51461, seq 33, length 64
07:30:21.584038 IP6 ::ffff:ffff:c0a8:b01 > ::ffff:0:c0a8:d03: ICMP6, echo request, seq 33, length 64

resulting in:

07:31:00.584243 IP6 ::ffff:ffff:c0a8:b01 > ::ffff:0:c0a8:d03: ICMP6, echo request, seq 72, length 64
07:31:01.584215 IP6 ::ffff:ffff:c0a8:b01 > ::ffff:0:c0a8:d03: ICMP6, echo request, seq 73, length 64

on the lan segment to the notebook, where i can see the packets arriving.

The route back is still missing, the 2nd translator is missing, the prefixes and the prefixlenght is hardcoded in the driver, but it is a first success on the way to a better world.

And, the kernelmodule is only 13340 bytes, which makes it much more interesting than putting it together in click, which also should be possible.

I would like to see it working with click too, as the code is much cleaner and better maintained, even when its much bigger and therefore not so well suited for our small wireless router.

Now some sleep.

update: source here.

to be continued…

P.S.: openwrt build is here.

Update2: setting the defaultroute to an fe80:: link local address on the notebook worked, so the route back works and the ping gets back. It works!

This entry was posted in freifunk, network, software and tagged , , , . Bookmark the permalink.

2 Responses to rfc2765 part1

  1. aaron says:

    nice work!! 🙂

  2. Pingback: 6mesh oder freifunk 2.0 | leo34.net

Comments are closed.