Skip to content

sflow-rt/containerlab

Repository files navigation

containerlab

Experiment with real-time network telemetry using containerlab to simulate Clos (leaf/spine) fabrics.

Get started (on a system running Docker):

git clone https://github.com/sflow-rt/containerlab.git
./containerlab/run-clab

5 Stage Clos Topology

Deploy 5 stage Clos topology:

containerlab deploy -t clos5.yml

Upload topology to sFlow-RT:

./topo.py clab-clos5

Generate traffic between h1 and h4:

docker exec -it clab-clos5-h1 iperf3 -c 172.16.4.2

docker exec -it clab-clos5-h1 iperf3 -c 2001:172:16:4::2

Connect to http://localhost:8008/ for analytics, see Quickstart for more information.

3 Stage Clos Topology

Deploy 3 stage Clos topology:

containerlab deploy -t clos3.yml

Upload topology to sFlow-RT:

./topo.py clab-clos3

Generate traffic between h1 and h2:

docker exec -it clab-clos3-h1 iperf3 -c 172.16.2.2

docker exec -it clab-clos3-h1 iperf3 -c 2001:172:16:2::2

Connect to http://localhost:8008/ for analytics, see Quickstart for more information.

EVPN Topology

Deploy EVPN topology:

containerlab deploy -t evpn3.yml

Upload topology to sFlow-RT:

./topo.py clab-evpn3

Generate traffic between h1 and h2:

docker exec -it clab-evpn3-h1 iperf3 -c 172.16.10.2

docker exec -it clab-evpn3-h1 iperf3 -c 2001:172:16:10::2

Connect to http://localhost:8008/ for analytics, see Quickstart for more information.

RoCEv2 Topology

Deploy RoCEv2 toplogy:

containerlab deploy -t rocev2.yml

Upload topology to sFlow-RT:

./topo.py clab-rocev2

Generate traffic between h1 and h2:

docker exec -it clab-rocev2-h1 hping3 exec rocev2.tcl 172.16.2.2 10000 500 100

Connect to http://localhost:8008/ for analytics, see Quickstart for more information.

DDoS Topology

Deploy DDOS topology:

containerlab deploy -t ddos.yml

Simulate DDoS attack against victim:

docker exec -it clab-ddos-attacker hping3 --flood --udp -k -a 198.51.100.1 -s 53 192.0.2.129

Connect to http://localhost:8008/ for analytics, see Quickstart for more information.

Nokia SR Linux

Deploy SR Linux topology:

containerlab deploy -t srlinux.yml

Simulate traffic:

docker exec -it clab-srlinux-h1 iperf3 -c 172.16.2.2

Connect to http://localhost:8008/ for analytics, see Quickstart for more information.

sFlow-RT Development Environment

Deploy the development environment topology:

containerlab deploy -t develop.yml

Install basic sFlow-RT apps (browse-metrics, browse-flows, containerlab-dashboard):

./develop/get-basic-apps.sh

Install an sFlow-RT application, see Applications:

./develop/get-app.sh sflow-rt topology

Example Javascript and Python programs are included in the develop/script and develop/python directories respectively. The scripts are based on examples in Writing Applications.

Start sFlow-RT:

./develop/start.sh

Start sFlow-RT with a script:

./develop/start.sh -Dscript.file=script/largeflows.js

System Properties can also be set by editing the develop/sflow-rt.conf file. If running, restart clab-develop-sflow-rt container after editing file in order to pick up changes.

Generate traffic:

./develop/generate-traffic.sh

Run iperf3 test 3 times spaced by 10 seconds:

./develop/generate-traffic.sh 3 10

Install Topology. Note: sFlow-RT needs to be running.

./develop/set-topology.sh

Run a Python script from the python directory. Note: sFlow-RT needs to be running.

./develop/run-python.sh largeflows.py

Start Python script directly:

./develop/python/largeflows.py

The containerlab container has Python3 with requests module pre-installed making it easy to run these scripts in the window used to run containerlab. The start.sh, generate-traffic.sh, run-python.sh, and set-topology.sh scripts can be run in any window.

The following scripts are available:

  • largeflows.js, largeflows.py report on the start of a large TCP flow
  • logflows.js, logflows.py log bytes transmitted in each active flow every 10 seconds
  • topflows.js, topflows.py display the data rate in bytes/second for busiest flows every 5 seconds

Connect to http://localhost:8008/ for analytics, see Quickstart to learn how to explore metrics using browse-flows and browse-metrics applications.

For documentation, tutorials, and community support, visit: https://sFlow-RT.com

About

Experiment with real-time network telemetry using containerlab

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors