All examples for the P4 transmissions are integrated into a simple topology, which consists of two hosts (h1 and h2) and four P4 enabled switches (s1 to s4)
- Install Docker. We suggest installing Docker from this script.
- Suggested: Install tmux (usually
sudo apt install tmux
) and specify it as a different terminal emulator by using thekathara settings
command. - Add Kathará public key to your keyring:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 21805A48E6CBBA6B991ABE76646193862B759810
- Add the Kathará repo to your repos on Debian based systems:
sudo add-apt-repository ppa:katharaframework/kathara
- Update your apt cache by running
sudo apt update
- Install Kathará running
sudo apt install kathara
- Install Docker
- During the installation procedure do not flag Use Windows Containers, Kathará works only with default (Linux) containers.
- Download the setup file to a directory of your choice from a Release.
- You may also need to share the drive that will contain the labs and the drive with your user folder (it can be done from Docker settings, from the tray icon), as shown here (note that you may have/need different drives).
- Run the setup wizard and follow the instructions.
- Remember to run Docker before using Kathará.
Please note that Docker runs on Windows inside a virtual machine running Linux and is managed by Hyper-V. The virtual hard drive usually takes a variable amount of space depending on the number of Docker images that you compile and can go up to about 60 GBytes. However the space occupation can be drastically reduced by removing unused Docker images with the command docker system prune
and by following this procedure. This can be used every time your virtual disk space goes up because of some Docker Images you later decide to remove
- Install Docker.
- Download the setup file to a directory of your choice from a Release.
- Run the setup wizard and follow the instructions.
- Remember to run Docker before using Kathará.
Please note that Docker runs on MacOS inside virtual machine running Linux and is managed by a proprietary hypervisor.
Navigate into the folder random_split
and start the laboratory with kathara lstart
.
To access the machines of the topology, you may use tmux
and call tmux a -t RandomSplit
.
Application execution:
- h2 acts as server and must start the receiving applications first, which are executed by calling:
python3 TCPserver.py
python3 UDPserver.py
iperf [-u] -s
- h1 acts as client and the installed programs can be executed, which are
python3 TCPclient.py
python3 UDPclient.py server [message]
iperf [-u] -c server
Navigate into the folder duplicate
and start the laboratory with kathara lstart
.
To access the machines of the topology, you may use tmux
and call tmux a -t Duplicate
.
Application execution:
- h2 acts as server and must start the receiving applications first, which are executed by calling:
python3 TCPserver.py
python3 UDPserver.py
iperf [-u] -s
- h1 acts as client and the installed programs can be executed, which are
python3 TCPclient.py
python3 UDPclient.py server [message]
iperf [-u] -c server
Adding Wireshark to the laboratory can be done with an additional container:
docker run -d --name=wireshark --cap-add=NET_ADMIN --restart unless-stopped -p 3000:3000 lscr.io/linuxserver/wireshark:latest
Thereafter, the network to analyze can be found with Docker and must be added to the wireshark container:
docker network ls
docker network connect kathara_[...-id_A] wireshark
Now, a web browser can be opened on localhost and Wireshark can be accessed after its initialization. Use eth1 to capture on the connected network.
[Remark:] The described procedure works on all operating systems, as we use a Linux-based Wireshark container, which has direct access to the underlying network.
Adding Wireshark directly to the collision domains can be done by adding a Wireshark node to the lab.conf
file, wherever it is needed.
With the following example you can capture on collision domain A:
wireshark[0]=A
wireshark[bridged]=true
wireshark[image]="lscr.io/linuxserver/wireshark"
After starting the laboratory with kathara lstart
, a web browser can be opened on localhost and Wireshark can be accessed after its initialization. Use eth1 to capture on the connected network.
The P4 Multipath transmissions concept is developed by Computer Networks Group.
Our publication can be found here:
- Emulation of Multipath Transmissions in P4 Networks with Kathará (at WueWoWas 2023)
- Presentation