This repository contains implementation of BurstRadar system using P4 V1Model Architecture on simple_switch target. BurstRadar system is presented in the paper: BurstRadar: Practical Real-time Microburst Monitoring for Datacenter Networks by Raj Joshi et. al., published in the Proceedings of the ACM 9th Asia-Pacific Workshop on Systems (APSys’18).
BurstRadar detects a microburst in the dataplane, captures a snapshot of telemetry information of all the involved packets, and further exports this telemetry information to a monitoring server in an out-of-band manner. A detailed explanation and background of BurstRadar system is provided in the aforementioned paper.
- Install Oracle VirtualBox.
- Download the VM Image (P4 Tutorial 2019-08-15).
- Import P4 Tutorial 2019-08-15.ova appliance in VirtualBox.
- Start the VM in VirtualBox and execute the following:
-
Change to
/home/vagrant
directory.vagrant@p4:~$ cd /home/vagrant
-
Clone the
p4lang/tutorials
repository.vagrant@p4:~$ git clone https://github.com/p4lang/tutorials.git
-
Uninstall
python-scapy
and its dependent packages.vagrant@p4:~$ sudo apt-get remove --auto-remove python-scapy
-
Download and install Scapy 2.4.3.
vagrant@p4:~$ git clone https://github.com/secdev/scapy.git vagrant@p4:~$ cd scapy vagrant@p4:~/scapy$ sudo python setup.py install
-
Set environment
PATH
to scapy directory.vagrant@p4:~/scapy$ gedit ~/.bashrc
- Add the following line to
.bashrc
file, save and exit.export PATH="/home/vagrant/scapy:$PATH"
- Source
.bashrc
file.vagrant@p4:~/scapy$ source ~/.bashrc
- Add the following line to
-
Install
tcpreplay
package which is needed for executingsendpfast()
scapy function.vagrant@p4:~$ sudo apt-get install tcpreplay
-
Change to the exercises directory.
vagrant@p4:~/scapy$ cd ../tutorials/exercises/
-
Clone the burstradar repository and move to that directory.
vagrant@p4:~/tutorials/exercises$ git clone https://github.com/harshgondaliya/burstradar.git vagrant@p4:~/tutorials/exercises$ cd burstradar vagrant@p4:~/tutorials/exercises/burstradar$
-
- In the
/home/vargrant/tutorials/exercises/burstradar/
directory, execute:BMv2 Mininet CLI starts.vagrant@p4:~/tutorials/exercises/burstradar$ sudo make run
- Open a new terminal and execute the following:
- Start CLI
Connection to the BMv2 simple_switch through thrift-port is started.
vagrant@p4:~$ simple_switch_CLI
- Set default values of
bytesRemaining
andindex
registersvagrant@p4:~$ simple_switch_CLI Obtaining JSON from switch... Done Control utility for runtime P4 table manipulation RuntimeCmd: register_write bytesRemaining 0 0 RuntimeCmd: register_write index 0 0
- Set mirror port for a given session id (In our case, session id = 11)
RuntimeCmd: mirroring_add 11 4
- Start CLI
- In BMv2 Mininet CLI, execute:
Note: Two xterm displays for
mininet> xterm h1 h2 h3 h4 h3
h3
are started.- In
h4
's xterm display, execute:./receive.py
- In the first xterm display of
h3
, execute:./receive.py
- In the second xterm display of
h3
, execute:iperf -s -w 2m
- In
h2
's xterm display, execute:This ensures that approx. 4-4.5 Mbps background traffic is running between host 2 and host 3.iperf -c 10.0.3.3 -w 2m -t 35
- In
h1
's xterm display, execute:This ensures that approx. 10 Mbps burst traffic is sent from host 1 to host host 3../send.py 10.0.3.3 6700 300
- A few packets that causes microburst will be marked and received at the monitoring server (
h4
). - Similarly, burst traffic can be sent concurrently to multiple egress ports and the BurstRadar system will give desired results.
- In