Configure routing

The current implementation of MP-DCCP allows the establishment of multipath sessions between two hosts (client-server) under a half-mesh topoloy, which means, only the client side can use multiple network addresses to connect to an unique network address on server side. In addition it is required that source based routing is configured on the client for the available interfaces. The detailed process is described throughout this page by using the example topology depicted below.

IP Layout

Interface IP address Gateway
ens3 192.168.100.10 192.168.100.1
ens8 192.168.101.10 192.168.101.1
ens0 192.168.102.10 192.168.102.1

Host configuration

To set up the source based routing, a dedicated routing table is configured for each interface by using ip rules. Packets will be matched to each table by using firewall marks. In the example topology, tables 100 and 101 will be created respectively for interfaces ens3 and ens8. Packets with te corresponding fwmarks (0x100 and 0x101) will matched to them.

Configure routing for interface ens3

ip rule add from all fwmark 0x100 table 100 // Create routing table
iptables -A OUTPUT -s 192.168.100.10 -t mangle -j MARK --set-mark 0x100 // Mark packets based on source IP
ip route add 192.168.100.0/24 dev ens3 scope link table 100 // Configure routng table
ip route add default via 192.168.100.1 dev ens3 table 100

Configure routing for interface ens8

ip rule add from all fwmark 0x101 table 101
iptables -A OUTPUT -s 192.168.101.10 -t mangle -j MARK --set-mark 0x101
ip route add 192.168.101.0/24 dev ens8 scope link table 101
ip route add default via 192.168.101.1 dev ens8 table 101

Aggregation point configuration

In the example topology only one interface is available at the aggregation point, therefore, no routing configuration is needed, however, if more interfaces are available, the routing can be configured as follows

Configure routing for interface ens0

ip rule add from all fwmark 0x102 table 102
iptables -A OUTPUT -s 192.168.102.10 -t mangle -j MARK --set-mark 0x102
ip route add 192.168.102.0/24 dev ens0 scope link table 102
ip route add default via 192.168.102.1 dev ens0 table 102