Skip to content

KNE Lab with BGP and traffic via Arista cEOSLab as a DUT


This lab demonstrates validation of Arista cEOSLab DUT for basic BGP peering, prefix announcements and passing of traffic between announced subnets. To run OTG protocols and flows, Keysight Elastic Network Generator Community Edition with Ixia-c test ports is used.

To run the lab, OpenConfig KNE is used on top of a KIND cluster – K8s environment running inside a single Docker container.

OTG test logic is executed using otgen CLI client running in a dedicated K8s POD:

Lab configuration



Layer 3 topology and generated traffic flows

IP Diagram


The lab uses OTG configuration created by otgen with the following properties:

OTG Diagram


  • Arista cEOSLab Docker image. You can register on Arista support website as a Guest to download the image
  • Linux host or VM with sudo permissions. See possible deployment options here
    • build-essential package
    • curl utility
    • git utility
    • Docker

Quick start

  1. Clone this repository

    git clone
    cd otg-examples/kne/bgp-ceos
  2. To run all the steps necessary to prepare the KNE environment and start the lab, execute:

    make prereqs deploy start
  3. Validate the OTG API endpoint is available:

    kubectl run otgen --image otgen:local -- sleep 1000000
    kubectl exec -it otgen -- /bin/bash
    curl -k https://service-https-keng-controller.keng-ceos.svc.cluster.local:8443/capabilities/version
  4. Run otgen to establish BGP session with r1, announce routes and send traffic between them:

    kubectl exec -it otgen -- /bin/bash
    export OTG_API="https://service-https-keng-controller.keng-ceos.svc.cluster.local:8443"
    otgen create device -n otg1 -p p1 -l eth1 --ip --prefix 30 --gw | \
    otgen add device    -n otg2 -p p2 -l eth2 --ip --prefix 30 --gw | \
    otgen add bgp -d otg1 --asn 1111 --route | \
    otgen add bgp -d otg2 --asn 2222 --route  | \
    otgen add flow -n f-1-2 --tx otg1 --rx otg2 --src --dst --count 1000 --rate 100 --size 128 | \
    otgen add flow -n f-2-1 --tx otg2 --rx otg1 --dst --src --count 2000 --rate 200 --size 256 | \
    otgen --log info run -k -m flow | otgen transform -m flow | otgen display -m table
  5. If you would like to monitor status of BGP sessions from r1 perspective, launch a separate SSH session and run:

    kubectl exec -it r1 -n keng-ceos -- Cli
    watch show ip bgp summary
  6. To stop the keng-ceos lab, use

    make stop
  7. To remove the KIND cluster with KNE, use

    make clean

Virtual machine setup examples

Multipass VM

multipass launch 20.04 -n knevm -c8 -m16G -d64G
multipass shell knevm
sudo apt update && sudo apt upgrade -y
sudo apt install build-essential -y
sudo apt install curl git -y
sudo usermod -aG docker $USER

Google Cloud Compute Instance

  1. Deploy the instance

    MYIP=`curl -s`
    MYIPSTR="$(echo $MYIP | sed 's/\./-/g')"
    gcloud compute firewall-rules create otg-demo-allow-ssh-${MYIPSTR} --description="Allow tcp 22 ingress to any instance tagged as otg-demo-kne" --direction=INGRESS --priority=1000 --network=default --action=ALLOW --rules=tcp:22 --source-ranges="$MYIP/32" --target-tags=otg-demo-kne
    gcloud compute instances create otg-demo-kne \
    --subnet=default \
    --machine-type=e2-standard-16 \
    --image-family=ubuntu-2004-lts \
    --image-project=ubuntu-os-cloud \
    --boot-disk-size=100GB \
    --boot-disk-device-name=otg-demo-kne \
    gcloud compute ssh otg-demo-kne
    sudo apt update && sudo apt upgrade -y
    sudo apt install build-essential -y
    sudo usermod -aG docker $USER
  2. Terminate the instance

    gcloud compute instances stop otg-demo-kne
    gcloud compute instances delete otg-demo-kne
    gcloud compute firewall-rules delete otg-demo-allow-ssh-${MYIPSTR}