20210308 Iperf
課堂資料
課堂練習
安裝 pip
安裝 ppa
add-apt-repository ppa:deadsnakes/ppa
Update packeges
apt-get updateapt-get upgrade
升級 python 2.x 到 python 3.x
apt-get install python3.6apt-get install python3.6-gdbm

apt-get install python3.7apt-get install python3.7-gdbm

apt install ansible
python -Vpython3 -V
安裝 pip
apt-get install python3-pippip3 install --upgrade pip
設定優先順序
update-alternatives --install / usr / bin / python3 python3 /usr/bin/python3.6 1update-alternatives --install / usr / bin / python3 python3 /usr/bin/python3.7 2
到 pip document 官方網站建議的載點下載 pip 安裝檔
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
啟動剛剛下載好的 get-pip.py 檔案
python3 get-pip.py
查看 pip 目前版本
python3 -m pip -V
額外補充

Part 02.
ping 192.168.8.140
Part 04.
ssh cisco@192.168.8.140
conf tint e0/0ip add 192.168.1.254 255.255.255.0no shutint e0/1ip add 192.168.2.254 255.255.255.0no shutdo sh ip int briexitexitexit
python3 -m pip install paramikopython3 -m pip install --upgrade pippython3import paramiko
exitmkdir ciscocd ciscogedit hosts config_cisco.yml
mkdir config_ciscocd config_ciscomkdir taskscd tasksgedit main.yml
cd ..cd ..apt install treetree
ansible-playbook config_cisco.yml -i hostsansible-playbook plyabook.yml -i hostscd ..cd mininetIperf
mnnetxterm h1 h2pingall
iperf -s -i 1
iperf -s -i 1 -u
iperf -s -i 1 -u -p 6666-p:port

iperf -c 10.0.0.2 -t 20-c:Client-t:Time

iperf -c 10.0.0.2 -t 10 -u -b 100M
iperf -c 10.0.0.2 -t 10 -u -b 100M -p 6666
xterm h1 h2 s1iperf -s -i 1 -u -p 5555
iperf -c 10.0.0.2 -t 10 -u -b 100M -p 5555
exitxterm h1 h2iperf -s -i 1 -u -p 5555 > udp5555^Ccat udp5555
cat udp5555 | grep sec
cat udp5555 | grep sec | grep -y 0.0-15 
cat udp5555 | grep sec | head -n 14 > result.txt
iperf -c 10.0.0.2 -t 15 -u -b 100M -p 5555

cd mininetmnxterm h1 h2xterm s1
h1 ifconfig
h1 ping 10.0.0.2 -c 3
ping 10.0.0.2python -m SimpleHTTPServer 80

su - userfirefox
ping 10.0.0.1
10.0.0.2:80
sh ls /tmppingall
Gnuplot
apt install gnuplot
exitgnuplotplot "result.txt"set yrange [0:110]set ytics 0,10,110replotset xrange [0:15]set xtics 0,5,15plot "result.txt" with linespointsset xtics 0,1,15replotset xlabel "tine (sec)"set ylabel "throughput (Mbis/sec)"replotset title "udp throughput"replotset terminal "gif"type set to 'gif'set output "result.gif"replotexitLast updated
Was this helpful?


