# BBRv3在GNS3調整傳播延遲與TC延遲指令 # 拓樸操作 client 操作 sop !! 皆使用GNS3進行實驗。 !! 所有實驗都要對準時間,如時間不準請重開虛擬機或是重啟NTP進行校準,請檢查時間是否準確,不然數據會是錯的。 !! 請記得開始每個實驗時都ping發送端(或接收端)的IP,來看是否連線成功,並且延遲是正常運作的。 # NTP設定 ## 安裝NTP ``` apt-get install ntpsec ``` ``` cd /etc/ntpsec/ ``` ``` vim ntp.conf ``` (更改並加入規則) (此次為使用GNS3的主機進行時間同步)  ## NTP操作 重啟NTP ``` systemctl restart ntpd ``` ``` systemctl restart ntp ``` 查詢NTP是否正常運作 ``` sytemctl status ntp ``` 設定完後請記得重新開機,即可正常使用。 ## Client 端 iperf3 設定 請先開啟終端機 (cmd),來進行指令的輸出 ``` su - ``` ``` password: (請填寫自行設定的 ``` ``` cd .. ``` ``` cd .. ``` ``` cd /home/service/ ``` ``` vim auto4.sh ``` ``` #!/bin/bash # Create a directory with current timestamp TIMESTAMP=$(date +"%Y%m%d_%H%M%S") DIRECTORY="iperf3_test_$TIMESTAMP" # Create the directory mkdir -p "/home/service/$DIRECTORY" # Change to the directory cd "/home/service/$DIRECTORY" # Run iperf3 command and save output to file iperf3 -c 10.0.0.11 -b 100M -t 200 -p 5020 - J >bandwidth.json ``` 有一行, iperf3 -c 10.0.0.11 -b 100M -t 200 -p 5020 - J >bandwidth.json -b 100M 調整發送速率 100Mbps -t 200 發送整體秒數 -p 5020 傳送的port -c 10.0.0.11 接收端ip (c client) 存檔記得打 :wq! 單純離開: :q! # 第二組實驗設定( 使用者本體機台延遲) ## 設定tc qdisc netem 的 delay 設定 ``` sudo tc qdisc replace dev enp0s3 root netem delay 10ms ``` 刪除 ``` sudo tc qdisc del dev enp0s3 root netem delay 10ms ``` 查詢狀態 ``` sudo tc qdisc show dev enp0s3 ``` # OpenvSwitch 上 SOP ## 刪除QOS ``` ovs-vsctl clear port eth0 qos ``` ``` ovs-vsctl list qos ``` ``` ovs-vsctl destroy qos <qos_uuid> ``` ``` ovs-vsctl destroy qos ``` ## 設定10Mbps的QOS流量 ``` ovs-vsctl -- set port eth0 qos=@newqos -- --id=@newqos create qos type=linux-htb other-config:max-rate=10000000 ``` ## 設定50Mbps的QOS流量 ``` ovs-vsctl -- set port eth0 qos=@newqos -- --id=@newqos create qos type=linux-htb other-config:max-rate=50000000 ``` ## 設定100Mbps的QOS流量 ``` ovs-vsctl -- set port eth0 qos=@newqos -- --id=@newqos create qos type=linux-htb other-config:max-rate=100000000 ``` ## 設定500Mbps的QOS流量 ``` ovs-vsctl -- set port eth0 qos=@newqos -- --id=@newqos create qos type=linux-htb other-config:max-rate=500000000 ``` ## 設定延遲 根據d/s來換算延遲 屬於傳播延遲 0ms=0km 10ms=1950km 50ms=9750km 100ms=19500km (此距離不包含所有路徑節點的延遲,皆以公式進行運算)   # server SOP ``` su - ``` ``` password: service123 ``` ``` cd .. ``` ``` cd .. ``` ``` cd /home/service/ ``` (後續為了要區分實驗,在創立資料夾區分) 抵達目的資料夾後,請輸入指令 iperf3 -s -p 5020 >(名字部分看得懂就好) (後續標註實驗的延遲或是頻僅頻寬進行辨認) ex: iperf3 -s -p 5020 >BBRv3-F 100ms     跑完實驗後存檔 
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up