Press "Enter" to skip to content

Virtual cross-cable connecting two virtual TAP interfaces

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 Wed May  8 13:55:38 2013
//        BalanceNG 3.450 (created 2013/05/08)
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

After instance 1 has been started using “bng start 1“, the BalanceNG benchmark command may be run as usual (see BalanceNG Benchmark Results Page for more information.