Skip to content

KENG back-to-back BGP and traffic setup with Docker Compose


This is an extended version of a basic Ixia-c back-2-back lab with Keysight Elastic Network Generator components added to emulate L2-3 protocols like BGP. In this lab, Ixia-c has two traffic ports connected back-2-back using a veth pair. In addition, two protocol engines share network namespaces with respective traffic ports. The lab is defined via Docker Compose YAML file. Once the lab is up, a test Go package is used to request KENG to bring up a BGP session between two ports, generate traffic and report statistics.



Install components

  1. Install docker-compose

    sudo curl -L "$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
    sudo chmod +x /usr/local/bin/docker-compose
  2. Make sure /usr/local/bin is in your $PATH variable (by default this is not the case on CentOS 7)

    if ! command -v ${cmd} &> /dev/null && [ -x ${dir}/${cmd} ]; then
      echo "${cmd} exists in ${dir} but not in the PATH, updating PATH to:"
      echo $PATH
  3. Clone this repository

    git clone --recursive

Deploy Ixia-c lab

  1. Launch the deployment

    cd otg-examples/docker-compose/cpdp-b2b
    sudo -E docker-compose up -d 
    sudo docker ps
  2. Make sure you have all five containers running. The result should look like this

    CONTAINER ID   IMAGE                                                                       COMMAND                  CREATED          STATUS         PORTS                                                                                      NAMES
    4a9d84784c46   "/docker_im/opt/Ixia…"   8 seconds ago    Up 7 seconds                                                                                              cpdp-b2b_protocol_engine_1_1
    13119efaea26   "/docker_im/opt/Ixia…"   8 seconds ago    Up 7 seconds                                                                                              cpdp-b2b_protocol_engine_2_1
    0bf9781a133a   ixiacom/ixia-c-traffic-engine:                                      "./"        11 seconds ago   Up 8 seconds>5556/tcp, :::5556->5556/tcp,>50071/tcp, :::50072->50071/tcp   cpdp-b2b_traffic_engine_2_1
    1604ef2956ab   ixiacom/ixia-c-traffic-engine:                                      "./"        11 seconds ago   Up 8 seconds>5555/tcp, :::5555->5555/tcp,>50071/tcp, :::50071->50071/tcp   cpdp-b2b_traffic_engine_1_1
    45798f6d3c59        "./bin/controller --…"   11 seconds ago   Up 9 seconds                                                                                              cpdp-b2b_controller_1
  3. Interconnect traffic engine containers via a veth pair

    sudo ../../utils/ cpdp-b2b_traffic_engine_1_1 cpdp-b2b_traffic_engine_2_1 veth0 veth1
  4. Check traffic and protocol engine logs to see if they picked up veth interfaces

    sudo docker logs cpdp-b2b_traffic_engine_1_1
    sudo docker logs cpdp-b2b_traffic_engine_2_1
    sudo docker logs cpdp-b2b_protocol_engine_1_1
    sudo docker logs cpdp-b2b_protocol_engine_2_1

Run test package

cd tests
go test -run TestIPv4BGPRouteInstall
cd ..

Destroy the lab

To destroy the lab, including veth pair, use:

docker-compose down


  • copyright of Levente Csikor, with modifications to replace ifconfig with ip link.