18. Virtual cross-cable connecting two virtual TAP interfaces

The benchmark command and functionality are about to be replaced by an updated version reflecting the current multithreading scheduler and 10GBit interfaces with more precise benchmarking results.

This example shows how to implement a virtual cross-cable which connects two virtual TAP interfaces (Linux only). This setup is implemented by one instance, where the other instance may be used to examine the HW performance using the BalanceNG benchmark command.

The following BalanceNG instance 1 configuration (/etc/bng1.conf) implements the cross cable and sets up the virtual TAP interfaces:

//        configuration taken ...
//        BalanceNG ...
hostname  c_1_crossover
module    crossover
interface 1 {
          name veth0
          access tap
          init "ip addr add dev veth0; ip link set veth0 up"
interface 2 {
          name veth1
          access tap
          init "ip addr add dev veth1; ip link set veth1 up"
register  interfaces 1,2
enable    interfaces 1,2
//        end of configuration