Skip to content

Ixia-c 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 Ixia-c Protocol Engine 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 Ixia-c to bring up a BGP session between two ports, generate traffic and report statistics.



  • Linux host or VM with sudo permissions and Docker support
  • Docker
  • Go

Install components

  1. Clone this repository

    git clone --recursive

Deploy Ixia-c lab

  1. Launch the deployment

    cd otg-examples/docker-compose/cpdp-b2b
    sudo 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
    7168dfa86bc3   "/docker_im/opt/Ixia…"   6 minutes ago   Up 6 minutes                                                                                               cpdp-b2b-protocol_engine_2-1
    dc798be3cdd6   "/docker_im/opt/Ixia…"   6 minutes ago   Up 6 minutes                                                                                               cpdp-b2b-protocol_engine_1-1
    1cf8508108db      "./"        6 minutes ago   Up 42 seconds>5555/tcp, :::5555->5555/tcp,>50071/tcp, :::50071->50071/tcp   cpdp-b2b-traffic_engine_1-1
    7dbb2f28375a      "./"        6 minutes ago   Up 42 seconds>5556/tcp, :::5556->5556/tcp,>50071/tcp, :::50072->50071/tcp   cpdp-b2b-traffic_engine_2-1
    b62dd5ccc6f8             "./bin/controller --…"   6 minutes ago   Up 6 minutes                                                                                               cpdp-b2b-controller-1
  3. Interconnect traffic engine containers via a veth pair

    sudo bash ../../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 OTG traffic flows with Python snappi library

  1. Setup virtualenv for Python

    mkdir -p $HOME/.venv
    python3.9 -m venv $HOME/.venv/snappi
    source $HOME/.venv/snappi/bin/activate
    pip install -r snappi/requirements.txt
    pip install -r snappi/conformance/requirements.txt
  2. Run BGP B2B test

    python ./snappi/

Destroy the lab

To destroy the lab, including veth pair, use:

sudo docker compose down


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