User Tools

Site Tools


soft:link-error-model

Link Error Model for Virtual Confine Testbed (VCT)

The CONFINE testbed infrastructure can not only be used for real world testbeds, it can also be used as a completely virtualized testbed for local experiments. Each CONFINE node is implemented as a virtual machine on a host system. These virtual machines are connected by a Linux bridge on the host system. The link error model is applied to the host system to influence the network connectivity between the virtual machines.

Unfortunately using the Linux bridging code limits the types of connectivity that can be used in the emulated mesh network. It is easy to prevent certain pairs of nodes to communicate with each other by using the EBTables subsystem, but this constrains the virtual testbed to a set of perfect links without any packet loss. While Linux includes a subsystem called NetEm (Network Emulator) to emulate packet loss, delay and packet reordering, it is also very hard to setup and use because NetEm is part of the traffic shaping subsystem of Linux.

To make it easier to setup a virtualized testbed with lossy links, Fraunhofer FKIE has developed a set of scripts using only EBTables and IPTables subsystem to generate configurable packet loss between each pair of virtualized CONFINE nodes. EBTables is used to mark forwarded packets based on the incoming and outgoing interface. This marker is then used by the IPTables statistics module to drop a certain proportion of the packets.

Additionally Fraunhofer FKIE reused measurements of IEEE 802.11 packet loss to write a function that can be used to estimate the unicast or broadcast packet loss based on the distance between the two communication partners. This functions allow to setup a topology based on coordinates on a 2D grid and quickly calculate a rough estimate of the packet loss between each pair of nodes.

While this link error model cannot emulate the effects of collisions between packets or the delay caused by transmission speed or retransmissions, it allows to easily setup a more realistic virtual testbed.

Usage

The basic bash script route_basic.sh.gz encapsulates most of the complexity in a series of functions, which have to be called by the user. It used ebtables and iptables to block all forwarded traffic, then marking packets based on the incoming interface and allows a whitelist of pairs between incoming and outgoing interfaces to be forwarded. It also uses the iptables “statistics” module to simulate packet drops with a configurable drop rate.

The user has to adapt the functions “get_eth1()” and “get_eth2()” at the beginning of the file to generate the interface names for the first and second interface of each VM.

The following example sets up a line of connections (1 and 2, 2 and 3, …) between a series of five nodes:

#!/bin/bash

. ./route_basic.sh
route_init

for num in `seq 2 5`
do
        prev=$((${num}-1))

        set_route_eth1 ${num} ${prev}
done
soft/link-error-model.txt · Last modified: 2014/04/01 09:36 by julia