Matthieu Boutier

Recherche

Source specific routing

IP paquets contain multiple fields, among which the destination and source addresses. Traditionnally, packets are routed by looking at the destination only. Source-specific routing is a routing technique that takes the source of a packet into account in addition to the destination.

An Internet draft about source specific routing can be found at:
http://tools.ietf.org/html/draft-boutier-homenet-source-specific-routing-00.

I have implemented source-specific routing in babeld. The code is available at:
http://git.wifi.pps.univ-paris-diderot.fr/?p=babels.git;a=summary

Demo: multihomed IPv6 network

Our testbed at PPS is a double-homed IPv6 network. It is connected to the OVH network and to the freenet6 tunnel broker.

MyTraceroute results

The two traces below were obtained on the same machine, at the same time.

Multipath TCP

Multipath TCP needs source-specific routing, which can be done by hand, as explained here. If we look carefully at their solution, we see it is exactly what makes automatically babeld. There is no need to setup hosts, but only gateways, to indicate babeld with which source prefix are redistributed the default routes (see the configuration part).

The following graphs represents incomming throughput observed when downloading a file, at three interfaces: "eth0" (the output of the downloading machine — note that everything goes through that interface, since this machine is connected by tunnels to others), "ariane" (the OVH gateway) and "sampi" (the Freenet6 gateway). The file is download with the command:

wget --bind-address=2001:5c0:1505:6b00:b6b5:2fff:feb8:35c3 \
      http://multipath-tcp.org/snapshots/mptcp_2013_09_05.tar.gz

The "fullV6" graphs are graphs obtained when the v4 default route is removed (I just let routes for VPNs). In these cases, the "--bind-address" option is needed, because otherwise the kernel consider the IPv6 hosts as unreachable.

Finally, on these graphs, we can sometimes see the throughput of one or the other of the interface going down: this is when I stop the babel routing daemon on one or the other of the gateways. In this case, the source-specific route is no more distributed, and as expected, the traffic goes down.

Throughput is measured with this script: throughput.sh.
Graphs are drawn with that one: draw_throughput_graphs.R. It can be executed with the following command ("." is the path of a directory containing csv files):

R --vanilla --slave --args . < draw_throughput_graphs.R

Configuration

The network looks like: A --- VPNs --- B --- VPNs --- C.

tun-ariane: flags=4305  mtu 1400
        inet 192.168.4.3  netmask 255.255.255.255  destination 192.168.4.3
        inet6 fe80::b6b5:2fff:feb8:35c3  prefixlen 64  scopeid 0x20
        inet6 2001:41d0:1:f19f:b6b5:2fff:feb8:35c3  prefixlen 128  scopeid 0x0
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 100  (UNSPEC)
        RX packets 1167  bytes 316083 (308.6 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2436  bytes 258796 (252.7 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

tun-sampi: flags=4305  mtu 1400
        inet 192.168.4.3  netmask 255.255.255.255  destination 192.168.4.3
        inet6 fe80::b6b5:2fff:feb8:35c3  prefixlen 64  scopeid 0x20
        inet6 2001:5c0:1505:6b00:b6b5:2fff:feb8:35c3  prefixlen 128  scopeid 0x0
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 100  (UNSPEC)
        RX packets 2527  bytes 691119 (674.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2499  bytes 692937 (676.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Babel is used as routing protocol. The only configuration changes are in the gateways: we must specify the source prefix of redistributed routes (recall that redistributed routes are route imported by babeld from the kernel). This is made by the "source-prefix" option. For example, our gateway connected to freenet6 is configured with:

source-prefix 2001:05c0:1505:6b00::/56

Routing tables

Here are the routing tables. I just collapse the /128 addresses, which are duplicated in each routing table, since they are redistributed with a default source prefix.

$ ip -6 rule show
0:	from all lookup local
100:	from 2001:5c0:1505:6b00::/56 lookup 10
102:	from 2001:41d0:1:f100::/56 lookup 12
32766:	from all lookup main

$ ip -6 route show table 10
[ ...all /128 addresses... ]
default via fe80::250:56ff:fe8f:1aba dev tun-sampi  proto 42  metric 1024

$ ip -6 route show table 12
[ ...all /128 addresses... ]
default via fe80::4e72:b9ff:fe43:7608 dev tun-ariane  proto 42  metric 1024

$ ip -6 route show
[ ...all /128 addresses... ]
2001:5c0:1505:6b00:b6b5:2fff:feb8:35c3 dev tun-sampi  proto kernel  metric 256
2001:41d0:1:f19f:b6b5:2fff:feb8:35c3 dev tun-ariane  proto kernel  metric 256
fe80::/64 dev tun-sampi  proto kernel  metric 256
fe80::/64 dev eth0  proto kernel  metric 256
fe80::/64 dev tun-ariane  proto kernel  metric 256