Commit 009fe9ee authored by Milan Pässler's avatar Milan Pässler 🐈

add demo script

parent dac7a0b7
#!/usr/bin/env bash
if [ "$EUID" -ne 0 ]
then
cargo build
echo I need root to set up networking
sudo $0
sleep 2
sudo ip netns exec 23 ping 10.0.0.1
echo killing qaul-switch...
sudo pkill qaul-switch
sudo ip netns del 23
sudo ip netns del 42
else
target/debug/qaul-switch 2> /dev/null &
sleep 1
ip netns add 23
ip l set dev foo1 netns 23
ip -n 23 l set dev foo1 up
ip -n 23 a add 10.0.0.2/24 dev foo1
ip netns add 42
ip l set dev foo2 netns 42
ip -n 42 l set dev foo2 up
ip -n 42 a add 10.0.0.1/24 dev foo2
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment