




已閱讀5頁(yè),還剩14頁(yè)未讀, 繼續(xù)免費(fèi)閱讀
版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
Iperf 是一種用來(lái)測(cè)量網(wǎng)絡(luò)帶寬和網(wǎng)絡(luò)質(zhì)量的工具。Jperf與Iperf一起使用的話可以提供一個(gè)java寫成的圖形界面。 兩個(gè)運(yùn)行Iperf的主機(jī)將網(wǎng)絡(luò)分成了兩份 可以用以下方法測(cè)試連接的質(zhì)量:- 延時(shí)(反應(yīng)時(shí)間或者RTT):用ping命令量度- jitter(延時(shí)變化):用 Iperf UDP 測(cè)試來(lái)量度- 數(shù)據(jù)報(bào)丟失:用Iperf UDP 測(cè)試來(lái)量度帶寬可以通過(guò)TCP測(cè)試來(lái)量度 TCP (Transmission Control Protocol)與 UDP (User Datagram Protocol)的區(qū)別是:TCP檢查數(shù)據(jù)包是否正確的傳送給接受者,而UDP并不進(jìn)行檢查。所以UDP的傳送速度比TCP要快。 Tperf使用TCP與UDP的不同功能來(lái)提供網(wǎng)絡(luò)連接的統(tǒng)計(jì)數(shù)據(jù)。 最后,Iperf可以很容易的安裝在任何UNIX/Linux或者M(jìn)icrosoft Windows系統(tǒng)中。必須將一臺(tái)主機(jī)設(shè)置為客戶端,一臺(tái)設(shè)置為服務(wù)器。 以下是Iperf安裝在Linux以及Microsoft Windows系統(tǒng)中的截圖。在這里,Linux是Iperf客戶端,Windows是 Iperf服務(wù)器端。當(dāng)然,兩個(gè)都用上Linux系統(tǒng)也是可以的。Iperf tests:no arg. -b -r -d -w 缺省設(shè)置 數(shù)據(jù)格式 雙向性帶寬 同步雙向性帶寬 TCP窗口大小 -p, -t, -i -u, -b -m -M -P -h 端口,時(shí)間,間隔 UDP測(cè)試,帶寬設(shè)置 顯示最大片段大小 最大片段大小設(shè)置 平行測(cè)試 幫助 Jperf:no arg. -d -u, -b 缺省設(shè)置 同步雙向性帶寬 UDP測(cè)試,帶寬設(shè)置 缺省Iperf設(shè)置同時(shí)檢查Jperf部分 初始狀態(tài),Iperf客戶端使用TCP端口5001來(lái)連接Iperf服務(wù)器,Iperf顯示的帶寬是從用戶到服務(wù)器之間的帶寬。如果想使用UDP測(cè)試,使用-u 參數(shù)。Iperf客戶端的-d 和-r參數(shù)可以用來(lái)測(cè)量雙向性帶寬。(詳情見指導(dǎo)書) 客戶端#iperf -c 10.1.1.1 - Client connecting to 10.1.1.1, TCP port 5001 TCP window size: 16384 Byte (default) - 3 local 10.6.2.5 port 33453 connected with 10.1.1.1 port 5001 30.0-10.2 sec1.26 MBytes1.05 Mbits/sec 服務(wù)器端#iperf -s - Server listening on TCP port 5001 TCP window size: 8.00 KByte (default) - 852 local 10.1.1.1 port 5001 connected with 10.6.2.5 port 33453 IDIntervalTransferBandwidth 8520.0-10.6 sec1.26 MBytes1.03 Mbits/sec 數(shù)據(jù)形式(-f參數(shù))-f參數(shù)可以指定結(jié)果顯示的格式: bits(b), bytes(B), kilobits(k), kilobytes(K), megabits(m), megabytes(M), gigabits(g) or gigabytes(G). 一般來(lái)說(shuō),帶寬使用的單位是bits (或者 Kilobit,等等),大量的數(shù)據(jù)使用bytes(或者Kilobytes,等等) 回顧一下,1 bytes等于8 bits,在電腦科學(xué)中,1 kilo等于1024(2的10次方) 例如:100000000 bytes不等于100 Mbytes而是等于95.37 Mbytes(=100000000/1024/1024) 客戶端#iperf -c 10.1.1.1 -f b - Client connecting to 10.1.1.1, TCP port 5001 TCP window size: 16384 Byte (default) - 3 local 10.6.2.5 port 54953 connected with 10.1.1.1 port 5001 30.0-10.2 sec1359872 Bytes1064272 bits/sec 服務(wù)器端#iperf -s - Server listening on TCP port 5001 TCP window size: 8.00 KByte (default) - 852 local 10.1.1.1 port 5001 connected with 10.6.2.5 port 33453 IDIntervalTransferBandwidth 8520.0-10.6 sec920 KBytes711 Kbits/sec Top of the page 雙向帶寬測(cè)量(-r 參數(shù))為了量度雙向帶寬,Iperf服務(wù)器會(huì)主動(dòng)向客戶端發(fā)起連接。初始狀態(tài)時(shí),只會(huì)量度客戶到服務(wù)器的帶寬。如果你想同時(shí)測(cè)量雙向帶寬,請(qǐng)使用-d 關(guān)鍵字。(見以下實(shí)驗(yàn)) 客戶端#iperf -c 10.1.1.1 -r - Server listening on TCP port 5001 TCP window size: 85.3 KByte (default) - - Client connecting to 10.1.1.1, TCP port 5001 TCP window size: 16.0 KByte (default) - 5 local 10.6.2.5 port 35726 connected with 10.1.1.1 port 5001 50.0-10.0 sec1.12 MBytes936 Kbits/sec 4 local 10.6.2.5 port 5001 connected with 10.1.1.1 port 1640 40.0-10.1 sec74.2 MBytes61.7 Mbits/sec 服務(wù)器端#iperf -s - Server listening on TCP port 5001 TCP window size: 8.00 KByte (default) - 852 local 10.1.1.1 port 5001 connected with 10.6.2.5 port 54355 IDIntervalTransferBandwidth 8520.0-10.1 sec1.15 MBytes956 Kbits/sec - Client connecting to 10.6.2.5, TCP port 5001 TCP window size: 8.00 KByte (default) - 824 local 10.1.1.1 port 1646 connected with 10.6.2.5 port 5001 IDIntervalTransferBandwidth 8240.0-10.0 sec73.3 MBytes61.4 Mbits/sec Top of the page 同步雙向性帶寬測(cè)量(-d 參數(shù))同時(shí)檢查Jperf部分。 使用-d 參數(shù)同步測(cè)量雙向帶寬。如果你想將測(cè)試分開進(jìn)行 ,請(qǐng)使用-r參數(shù)(見前面測(cè)試)。如果不加任何參數(shù)的話,只會(huì)量度從客戶端到服務(wù)器端的帶寬。 客戶端#iperf -c 10.1.1.1 -d - Server listening on TCP port 5001 TCP window size: 85.3 KByte (default) - - Client connecting to 10.1.1.1, TCP port 5001 TCP window size: 16.0 KByte (default) - 5 local 10.6.2.5 port 60270 connected with 10.1.1.1 port 5001 4 local 10.6.2.5 port 5001 connected with 10.1.1.1 port 2643 4 0.0-10.0 sec 76.3 MBytes 63.9 Mbits/sec 5 0.0-10.1 sec 1.55 MBytes 1.29 Mbits/sec 服務(wù)器端#iperf -s - Server listening on TCP port 5001 TCP window size: 8.00 KByte (default) - 852 local 10.1.1.1 port 5001 connected with 10.6.2.5 port 60270 - Client connecting to 10.6.2.5, TCP port 5001 TCP window size: 8.00 KByte (default) - 800 local 10.1.1.1 port 2643 connected with 10.6.2.5 port 5001 IDIntervalTransferBandwidth 8000.0-10.0 sec76.3 MBytes63.9 Mbits/sec 8520.0-10.1 sec1.55 MBytes1.29 Mbits/sec Top of the page TCP窗口大小:(-w 參數(shù))在連接中,如果接收方來(lái)不及驗(yàn)證,數(shù)據(jù)會(huì)暫時(shí)被存在一個(gè)緩沖區(qū)里。這個(gè)緩沖區(qū)的上限就是所謂的TCP窗口大小。 窗口的大小可以在2到65,535 bytes之間。在Linux系統(tǒng)中,如果用-w 參數(shù)指定TCP 緩存的大小,核心將會(huì)分配指定的雙倍。 客戶端#iperf -c 10.1.1.1 -w 2000 WARNING: TCP window size set to 2000 bytes. A small window size will give poor performance. See the Iperf documentation. - Client connecting to 10.1.1.1, TCP port 5001 TCP window size: 3.91 KByte (WARNING: requested 1.95 KByte) - 3 local 10.6.2.5 port 51400 connected with 10.1.1.1 port 5001 30.0-10.1 sec704 KBytes572 Kbits/sec 服務(wù)器端#iperf -s -w 4000 - Server listening on TCP port 5001 TCP window size: 3.91 KByte - 852 local 10.1.1.1 port 5001 connected with 10.6.2.5 port 51400 IDIntervalTransferBandwidth 8520.0-10.1 sec704 KBytes570 Kbits/sec Top of the page 端口(-p),時(shí)間(-t)以及間隔(-i)-p 參數(shù)可以修改Iperf服務(wù)器的端口。客戶端與服務(wù)器必須同樣的端口,默認(rèn)的TCP端口是5001. -t 參數(shù)指定測(cè)試持續(xù)時(shí)間(以秒為單位),默認(rèn)值為10秒。 -I 參數(shù)制定兩個(gè)帶寬報(bào)告之間的間隔(以秒為單位)。 客戶端#iperf -c 10.1.1.1 -p 12000 -t 20 -i 2 - Client connecting to 10.1.1.1, TCP port 12000 TCP window size: 16.0 KByte (default) - 3 local 10.6.2.5 port 58316 connected with 10.1.1.1 port 12000 30.0- 2.0 sec224 KBytes918 Kbits/sec 32.0- 4.0 sec368 KBytes1.51 Mbits/sec 34.0- 6.0 sec704 KBytes2.88 Mbits/sec 36.0- 8.0 sec280 KBytes1.15 Mbits/sec 38.0-10.0 sec208 KBytes852 Kbits/sec 310.0-12.0 sec344 KBytes1.41 Mbits/sec 312.0-14.0 sec208 KBytes852 Kbits/sec 314.0-16.0 sec232 KBytes950 Kbits/sec 316.0-18.0 sec232 KBytes950 Kbits/sec 318.0-20.0 sec264 KBytes1.08 Mbits/sec 30.0-20.1 sec3.00 MBytes1.25 Mbits/sec 服務(wù)器端#iperf -s -p 12000 - Server listening on TCP port 12000 TCP window size: 8.00 KByte (default) - 852 local 10.1.1.1 port 12000 connected with 10.6.2.5 port 58316 ID Interval Transfer Bandwidth 8520.0-20.1 sec3.00 MBytes1.25 Mbits/sec Top of the page UDP 測(cè)試: (-u), 帶寬設(shè)置 (-b)同時(shí)檢查Jperf 部分 使用-u 參數(shù)進(jìn)行UDP測(cè)試會(huì)得到關(guān)于jitter和數(shù)據(jù)包丟失的重要信息。 要保持良好的連接質(zhì)量,數(shù)據(jù)包的丟失率要小于1%。數(shù)據(jù)包的丟失率過(guò)高會(huì)導(dǎo)致許多TCP數(shù)據(jù)報(bào)需要重傳,從而影響帶寬。 Jitter基本上代表的是延時(shí)變化,而并不依賴于延時(shí)本身。你可能擁有很長(zhǎng)的反應(yīng)時(shí)間,但是jitter卻很低。在支持IP話音(VoIP)的網(wǎng)絡(luò)中,Jitter的值非常重要,因?yàn)閖itter值很高的話會(huì)打斷話音呼叫。如果需要帶寬,可以用-b 參數(shù)來(lái)分配 客戶端#iperf -c 10.1.1.1 -u -b 10m - Client connecting to 10.1.1.1, UDP port 5001 Sending 1470 byte datagrams UDP buffer size: 108 KByte (default) - 3 local 10.6.2.5 port 32781 connected with 10.1.1.1 port 5001 30.0-10.0 sec11.8 MBytes9.89 Mbits/sec 3 Sent 8409 datagrams 3 Server Report: 30.0-10.0 sec11.8 MBytes9.86 Mbits/sec2.617 ms9/ 8409(0.11%) 服務(wù)器端#iperf -s -u -i 1 - Server listening on UDP port 5001 Receiving 1470 byte datagrams UDP buffer size: 8.00 KByte (default) - 904 local 10.1.1.1 port 5001 connected with 10.6.2.5 port 32781 IDIntervalTransferBandwidthJitterLost/Total Datagrams 9040.0- 1.0 sec1.17 MBytes9.84 Mbits/sec1.830 ms0/ 837(0%) 9041.0- 2.0 sec1.18 MBytes9.94 Mbits/sec1.846 ms5/ 850(0.59%) 9042.0- 3.0 sec1.19 MBytes9.98 Mbits/sec1.802 ms2/ 851(0.24%) 9043.0- 4.0 sec1.19 MBytes10.0 Mbits/sec1.830 ms0/ 850(0%) 9044.0- 5.0 sec1.19 MBytes9.98 Mbits/sec1.846 ms1/ 850(0.12%) 9045.0- 6.0 sec1.19 MBytes10.0 Mbits/sec1.806 ms0/ 851(0%) 9046.0- 7.0 sec1.06 MBytes8.87 Mbits/sec1.803 ms1/ 755(0.13%) 9047.0- 8.0 sec1.19 MBytes10.0 Mbits/sec1.831 ms0/ 850(0%) 9048.0- 9.0 sec1.19 MBytes10.0 Mbits/sec1.841 ms0/ 850(0%) 9049.0-10.0 sec1.19 MBytes10.0 Mbits/sec1.801 ms0/ 851(0%) 9040.0-10.0 sec11.8 MBytes9.86 Mbits/sec2.618 ms9/ 8409(0.11%) Top of the page 最大數(shù)據(jù)段大小(-m參數(shù))顯示:最大的數(shù)據(jù)段大?。∕SS)是電腦能夠支持的單個(gè),未切分的TCP 數(shù)據(jù)段的最大容量,以bytes為單位??梢杂萌缦路椒ㄓ?jì)算:MSS =MTU-TCP & IP 頭TCP & IP 頭等于40bytes。MTU(最大傳輸單位)是可以在單個(gè)幀(frame)中傳輸?shù)淖畲髷?shù)據(jù)量。以下是一些不同網(wǎng)絡(luò)結(jié)構(gòu)的默認(rèn)MTU大小Ethernet - 1500 bytes: 在LAN中使用 PPPoE - 1492 bytes: 在ADSL連接中使用 Token Ring (16Mb/sec) - 17914 bytes: IBM研發(fā)的一項(xiàng)舊技術(shù) Dial-up - 576 bytes 一般來(lái)說(shuō),較高的MTU(及MSS)可以提高帶寬的效率??蛻舳?iperf -c 10.1.1.1 -m - Client connecting to 10.1.1.1, TCP port 5001 TCP window size: 16.0 KByte (default) - 3 local 10.6.2.5 port 41532 connected with 10.1.1.1 port 5001 30.0-10.2 sec1.27 MBytes1.04 Mbits/sec 3 MSS size 1448 bytes (MTU 1500 bytes, ethernet) 這里MSS不等于1500-40,而是1500-40-12(時(shí)間戳選項(xiàng))=1448.服務(wù)器端#iperf -s Top of the page 最大數(shù)據(jù)段大?。?M 參數(shù))設(shè)置:用-M 參數(shù) 改變MSS。(更多關(guān)于MSS的解釋見之前的實(shí)驗(yàn))#iperf -c 10.1.1.1 -M 1300 -m WARNING: attempt to set TCP maximum segment size to 1300, but got 536 - Client connecting to 10.1.1.1, TCP port 5001 TCP window size: 16.0 KByte (default) - 3 local 10.6.2.5 port 41533 connected with 10.1.1.1 port 5001 30.0-10.1 sec4.29 MBytes3.58 Mbits/sec 3 MSS size 1288 bytes (MTU 1328 bytes, unknown interface) 服務(wù)器端#iperf -s Top of the page 并行實(shí)驗(yàn)(-P參數(shù))使用-P 參數(shù)來(lái)運(yùn)行并行實(shí)驗(yàn)??蛻舳?iperf -c 10.1.1.1 -P 2 - Client connecting to 10.1.1.1, TCP port 5001 TCP window size: 16.0 KByte (default) - 3 local 10.6.2.5 port 41534 connected with 10.1.1.1 port 5001 4 local 10.6.2.5 port 41535 connected with 10.1.1.1 port 5001 40.0-10.1 sec1.35 MBytes1.12 Mbits/sec 30.0-10.1 sec1.35 MBytes1.12 Mbits/sec SUM0.0-10.1 sec2.70 MBytes2.24 Mbits/sec 服務(wù)器端#iperf -s Top of the page Iperf幫助#iperf -h Usage: iperf -s|-c host options iperf -h|-help -v|-version 用戶/服務(wù)器 -f-i-l-m-p-u-w-B-C-M-N-V -format -interval -len -print_mss -port -udp -window -bind -compatibility -mss -nodelay -IPv6Version kmKM # #KM # #KM host # 報(bào)告格式: Kbits, Mbits, KBytes, MBytes 連個(gè)帶寬報(bào)告的間隔時(shí)間 讀寫的緩沖大小 (默認(rèn) 8 KB) 打印最大的TCP數(shù)據(jù)段大小 (MTU - TCP/IP header) 監(jiān)聽/連接到服務(wù)器端口 使用UDP而不是TCP TCP 窗口大小 (socket緩沖大小) 捆綁到 主機(jī), 接口或者多點(diǎn)傳送地址 使用較舊版本時(shí)不發(fā)送額外信息 設(shè)置TCP最大數(shù)據(jù)段大小 (MTU - 40 bytes) 設(shè)置無(wú)延遲TCP,禁用 Nagles Algorithm 設(shè)置域 為Ipv6 服務(wù)器 -s-U-D -server -single_udp -daemon 服務(wù)器模式下運(yùn)行 單線程UDP模式下運(yùn)行 以守護(hù)進(jìn)程模式運(yùn)行服務(wù)器 用戶 -b-c-d-n-r-t-F-I-L-P-T -bandwidth -client -dua
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 異常信息考核管理辦法
- 外聘機(jī)構(gòu)服務(wù)管理辦法
- 薪酬等級(jí)評(píng)審管理辦法
- 肝病護(hù)理課件教學(xué)
- 福建二升三數(shù)學(xué)試卷
- 福建2024成人高考數(shù)學(xué)試卷
- 二年級(jí)拔尖數(shù)學(xué)試卷
- 足球培訓(xùn)課件模板
- 廣東6年級(jí)升學(xué)數(shù)學(xué)試卷
- 高中藝術(shù)生數(shù)學(xué)試卷
- 2024年 紹興市交通控股集團(tuán)公司招聘考試筆試真題試題含答案
- 口腔診室終末消毒流程
- 維保人員培訓(xùn)管理制度
- 2024年廣州市荔灣區(qū)社區(qū)專職招聘考試真題
- 超限模板及高支模安全專項(xiàng)施工方案(論證后)
- 大隱靜脈患者的護(hù)理查房講課件
- 切口感染案例分析
- 2025-2030年中國(guó)管道運(yùn)輸行業(yè)市場(chǎng)深度分析及發(fā)展前景與投資研究報(bào)告
- 2025-2030年中國(guó)汽車檢測(cè)行業(yè)市場(chǎng)深度調(diào)研及競(jìng)爭(zhēng)格局與投資發(fā)展?jié)摿ρ芯繄?bào)告
- 特性設(shè)備安全培訓(xùn)課件
- 兒童版心肺復(fù)蘇課件
評(píng)論
0/150
提交評(píng)論