Run the docker image with p4c compiler and nikss-ctl installed:
docker run -it --privileged --rm -v "$(pwd)":/nikss osinstom/nikss
Whole demo runs inside that container, so every later command must be executed in the container, e.g. prepended with docker container exec -it <container_name>.
Boot up the demo infrastructure:
make startThe above script will create 4 Linux namespaces: switch, client, server1, server2.
Compile the P4 program (replace path to p4c repository):
make compileDeploy PSA-eBPF program and insert eBPF programs with forwarding rules (no virtual IP yet):
make deploySet up rules for load-balancing and server virtual IP address:
make load-balancerRun HTTP servers, one in every container. Issue these commands, every in separate terminal:
make http-server-1
make http-server-2Run client, which makes some requests to the server(s) on virtual IP:
make http-clientThis should take about 20 second to execute. When client stops, stop servers with Ctrl-C to see number of processed requests per server.
Disaable load-balancer and remove virtual IP:
make stop-load-balancerSet up a meter rule:
make rate-limiterRun iperf server on server no. 1:
make iperf-serverRun iperf client and observe results:
make iperf-clientTo remove meter rule:
make stop-rate-limiterConfigure traffic manager (tc qdisc) with QoS classes and treatment.
make configure-traffic-manager
Start ping between client and server1:
make ping
Create congestion on the link between client and server1:
make iperf-server
make iperf-client
Set priority for ICMP traffic:
make set-priority
Clear priority for ICMP traffic:
make clear-priority