Rapace Project is a network simulation that features configurable equipment, including routers and firewalls. The simulation is built upon the mininet framework. This project utilizes the P4 language for the data-plane and leverages the P4utils Python libraries for the control-plane.
the idea is to make a controle plane that drive the dataplane, that allow a user to quickly reconfigure a SDN.
- To get the depot, you can download it from git be sure to have proper right for clone it.
- having a working P4 vm with Thrift patch enabled
git clone
#Before starting, you need to install and compile some elements. Ensure you have Rust, Python 3.7, the gRPC API, and other dependencies installed.
#To simplify this process, run the script with sudo.
sudo bash grpc_build_install_dep.bash
#after that we are on same page
To launch a simple network, follow these steps:
-
Load the physical topology with:
sudo python network.py [number_of_node]
you can lunch command inside it like
h1 ping h4
.if you have issue here maybe you need to check if you have the thrift patch working
the physical topology are verry strong if somthing wrong it is not from here it support manny server restart
-
Launch the logical topology with:
python grpc_server.py [topo_conf/conf_subject.yaml]
At this point, the network is launched, and you can manage it using the API.
-
connect the client
- it made for being lunched outside the vm, for that specify the ip of your vm
- if you run it on the vm you need too ensure that you have ssh forwarding activated with ssh -X you need to log in and out one time (x forwarding bug)
- be sure having all dependancy installed and having the protofile on the right place(all is done thanks to the install script), you can watch the installation script if you want to do it manualy
ip a|grep enp1|grep inet #to get your vm ip cd client/ cargo run [VM IP]
Inside the client, you'll find the help command.
-
enjoy you have help, you can try show topo
Know all network, can launch controller on switchs
- network knowlege
- lunch controler
- add link
- remove link
- show topo
- swap
- status
The instantiation of a controller will therefore start with the opening of a Thrift connection, resetting the current states of the switch, and uploading the new compiled data-plane. compiled.
- router
- load-balancer
- firewall
- repeter
- has 2 ports IN => OUT.
- add_fw_rule
- counts filtered and received packets
- 1:N one entry many output
- outflux random (but respect the flow), use a hash function
- limite
set_rate_lb <pkt/s> (voir choise)
- counts received packets
- segment routing
add_encap_node <flow> <node or link>
- counts received and encaplulated packets
flow => IP source, IP dst, protocole, port source, port destination
enable user to modulate the network
- show topology
- modify topology
- interactive shell
- remote access
grpc_server.py
: lunch server and lunch topo given on argumentgrpc_build_install_dep.bash
: install dep and used to compile python grpcnetwork.py
: lunch with sudo build up the mininet physical network
client/
: The Rust client for the gRPC API.P4src/
: The data-plane P4 code for the equipment.switch_classes/
: The control-plane logic for the equipment.topo_conf/
: Various YAML configurations and their representations.api.proto
: Main definition of the API grpc
port number are same that port displayed by the grpc client command show
log/
: inside it you have log of all switchpcap/
: capture of all port of all switch