Crates.io | tenjin_sdn |
lib.rs | tenjin_sdn |
version | 0.5.0 |
source | src |
created_at | 2024-08-07 10:24:26.52276 |
updated_at | 2024-10-21 16:34:41.172816 |
description | Tenjin is The software-defined networking framework written in Rust, offering high performance and memory safety. It can be used as both a framework and a command line tool. |
homepage | |
repository | https://github.com/Arikato111/Tenjin |
max_upload_size | |
id | 1328272 |
size | 168,815 |
Tenjin is The software-defined networking framework written in Rust, offering high performance and memory safety. It can be used as both a framework and a command line tool.
full
feature by default.cargo add tenjin_sdn
some features needed dependencies you might be not using,which can cause slow compilation. Using only features you needed can decrease number of dependencies you need to compile.
cargo install tenjin_sdn --no-default-features
if you need to use example controller, add -F example
flag to command.
Tenjin is asynchronous,so for using it, you need to make your main function be async by using tokio. install tokio with command below.
cargo add tokio
With Tenjin as cli you can run The example controller with your terminal without writing any code. (see example controller at ./src/example)
first, you need rust
and cargo
to install Tenjin as comand line program. go to official website for installation.
or run this command below. (For macOS, Linux, or another Unix-like OS)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
after installing rust and cargo, you can use command below to install Tenjin.
cargo install tenjin_sdn
tenjin run
tenjin run ctrl10
tenjin run --port 6653
tenjin run --port 6653,6633
run
commandtenjin run --help
After you install tenjin_sdn
to your project with feature example
, you can run example controller with this code below.
use tenjin::{example, openflow::ofp13::ControllerFrame13};
fn main() {
let controller = example::Controller13::new();
controller.listener("127.0.0.1:6633");
}
use tenjin::{example, openflow::ofp10::ControllerFrame10};
fn main() {
let controller = example::Controller10::new();
controller.listener("127.0.0.1:6633");
}
Mininet is a network emulator to create virtual networks for rapid prototyping of Software-Defined. Using mininet for testing this SDN Framework.
sudo mn --controller=remote,ip=127.0.0.1 --mac --switch=ovsk,protocols=OpenFlow13 --topo=tree,2
sudo mn --controller=remote,ip=127.0.0.1 --mac --switch=ovsk,protocols=OpenFlow10 --topo=tree,2