20210503 Containernet / Mininet-Wifi ( Miniedit )

課堂資料

Containernet ( Dockernet )

Mininet-Wifi ( Miniedit )

進行Mininet-Wifi實驗時,需停下NetworkManager

課堂練習

Containernet ( Dockernet )

cd containernet
python3 ./setup.py install
docker pull ubuntu:16.04
docker images
apt update
apt upgrade
apt install openssh-server -y

建立兩組使用者密碼及sshd

docker run -it ubuntu:16.04 bash

建立 sshd1

adduser user

建立 sshd2

passwd user
apt update
apt install net-tools
ifconfig
apt install iputils-ping
ping 8.8.8.8

Containernet ( SSH Tunnel )

實驗一

cd server-test/test-sshtunnel
gedit 1.py 2.py 3.py 4.py 5.py
python3 1.py
xterm h1
exit

實驗二

python3 2.py
xterm h2
xterm h1
exit

實驗三

python3 3.py
xterm h1
xterm h1
exit

實驗四

python3 4.py
xterm h1 h2
exit

實驗五

python3 5.py
xterm h2 h3
xterm h1
exit

Static routing vs Dynamic Routing

cd containernet
python3 ./setup.py install
cd ..
cd server-test/test-quagga/
 python3 static_routing.py
xterm h1 r1

OSPF

exit
cd server-test/test-quagga-ospf/
ls
docker images
python3 dynamic_routing.py
h1 ping h2 -c 5
xterm h2 h1

Mininet-Wifi ( Miniedit )

cd mininet-wifi
cd examples
python miniedit.py
cd ..
cd ..
cd test-miniedit
gedit lab3.py

更改 Controller Type 後

cd mininet-wifi
util/install.sh -n
cd examples
python miniedit.py
py sta1.params
py sta1.wintfs
py sta1.wintfs[0].txpower
sta1 iwconfig
py sta1.setRange(10, intf='sta1-wlan0')

Last updated

Was this helpful?