iperf軟件介紹.doc_第1頁
iperf軟件介紹.doc_第2頁
iperf軟件介紹.doc_第3頁
iperf軟件介紹.doc_第4頁
iperf軟件介紹.doc_第5頁
已閱讀5頁,還剩14頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)

文檔簡介

Iperf 是一種用來測量網(wǎng)絡(luò)帶寬和網(wǎng)絡(luò)質(zhì)量的工具。Jperf與Iperf一起使用的話可以提供一個java寫成的圖形界面。 兩個運行Iperf的主機將網(wǎng)絡(luò)分成了兩份 可以用以下方法測試連接的質(zhì)量:- 延時(反應(yīng)時間或者RTT):用ping命令量度- jitter(延時變化):用 Iperf UDP 測試來量度- 數(shù)據(jù)報丟失:用Iperf UDP 測試來量度帶寬可以通過TCP測試來量度 TCP (Transmission Control Protocol)與 UDP (User Datagram Protocol)的區(qū)別是:TCP檢查數(shù)據(jù)包是否正確的傳送給接受者,而UDP并不進行檢查。所以UDP的傳送速度比TCP要快。 Tperf使用TCP與UDP的不同功能來提供網(wǎng)絡(luò)連接的統(tǒng)計數(shù)據(jù)。 最后,Iperf可以很容易的安裝在任何UNIX/Linux或者Microsoft Windows系統(tǒng)中。必須將一臺主機設(shè)置為客戶端,一臺設(shè)置為服務(wù)器。 以下是Iperf安裝在Linux以及Microsoft Windows系統(tǒng)中的截圖。在這里,Linux是Iperf客戶端,Windows是 Iperf服務(wù)器端。當然,兩個都用上Linux系統(tǒng)也是可以的。Iperf tests:no arg. -b -r -d -w 缺省設(shè)置 數(shù)據(jù)格式 雙向性帶寬 同步雙向性帶寬 TCP窗口大小 -p, -t, -i -u, -b -m -M -P -h 端口,時間,間隔 UDP測試,帶寬設(shè)置 顯示最大片段大小 最大片段大小設(shè)置 平行測試 幫助 Jperf:no arg. -d -u, -b 缺省設(shè)置 同步雙向性帶寬 UDP測試,帶寬設(shè)置 缺省Iperf設(shè)置同時檢查Jperf部分 初始狀態(tài),Iperf客戶端使用TCP端口5001來連接Iperf服務(wù)器,Iperf顯示的帶寬是從用戶到服務(wù)器之間的帶寬。如果想使用UDP測試,使用-u 參數(shù)。Iperf客戶端的-d 和-r參數(shù)可以用來測量雙向性帶寬。(詳情見指導(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). 一般來說,帶寬使用的單位是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 雙向帶寬測量(-r 參數(shù))為了量度雙向帶寬,Iperf服務(wù)器會主動向客戶端發(fā)起連接。初始狀態(tài)時,只會量度客戶到服務(wù)器的帶寬。如果你想同時測量雙向帶寬,請使用-d 關(guā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 同步雙向性帶寬測量(-d 參數(shù))同時檢查Jperf部分。 使用-d 參數(shù)同步測量雙向帶寬。如果你想將測試分開進行 ,請使用-r參數(shù)(見前面測試)。如果不加任何參數(shù)的話,只會量度從客戶端到服務(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ù))在連接中,如果接收方來不及驗證,數(shù)據(jù)會暫時被存在一個緩沖區(qū)里。這個緩沖區(qū)的上限就是所謂的TCP窗口大小。 窗口的大小可以在2到65,535 bytes之間。在Linux系統(tǒng)中,如果用-w 參數(shù)指定TCP 緩存的大小,核心將會分配指定的雙倍。 客戶端#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),時間(-t)以及間隔(-i)-p 參數(shù)可以修改Iperf服務(wù)器的端口??蛻舳伺c服務(wù)器必須同樣的端口,默認的TCP端口是5001. -t 參數(shù)指定測試持續(xù)時間(以秒為單位),默認值為10秒。 -I 參數(shù)制定兩個帶寬報告之間的間隔(以秒為單位)。 客戶端#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 測試: (-u), 帶寬設(shè)置 (-b)同時檢查Jperf 部分 使用-u 參數(shù)進行UDP測試會得到關(guān)于jitter和數(shù)據(jù)包丟失的重要信息。 要保持良好的連接質(zhì)量,數(shù)據(jù)包的丟失率要小于1%。數(shù)據(jù)包的丟失率過高會導(dǎo)致許多TCP數(shù)據(jù)報需要重傳,從而影響帶寬。 Jitter基本上代表的是延時變化,而并不依賴于延時本身。你可能擁有很長的反應(yīng)時間,但是jitter卻很低。在支持IP話音(VoIP)的網(wǎng)絡(luò)中,Jitter的值非常重要,因為jitter值很高的話會打斷話音呼叫。如果需要帶寬,可以用-b 參數(shù)來分配 客戶端#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)是電腦能夠支持的單個,未切分的TCP 數(shù)據(jù)段的最大容量,以bytes為單位??梢杂萌缦路椒ㄓ嬎悖篗SS =MTU-TCP & IP 頭TCP & IP 頭等于40bytes。MTU(最大傳輸單位)是可以在單個幀(frame)中傳輸?shù)淖畲髷?shù)據(jù)量。以下是一些不同網(wǎng)絡(luò)結(jié)構(gòu)的默認MTU大小Ethernet - 1500 bytes: 在LAN中使用 PPPoE - 1492 bytes: 在ADSL連接中使用 Token Ring (16Mb/sec) - 17914 bytes: IBM研發(fā)的一項舊技術(shù) Dial-up - 576 bytes 一般來說,較高的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(時間戳選項)=1448.服務(wù)器端#iperf -s Top of the page 最大數(shù)據(jù)段大?。?M 參數(shù))設(shè)置:用-M 參數(shù) 改變MSS。(更多關(guān)于MSS的解釋見之前的實驗)#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 并行實驗(-P參數(shù))使用-P 參數(shù)來運行并行實驗??蛻舳?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 # 報告格式: Kbits, Mbits, KBytes, MBytes 連個帶寬報告的間隔時間 讀寫的緩沖大小 (默認 8 KB) 打印最大的TCP數(shù)據(jù)段大小 (MTU - TCP/IP header) 監(jiān)聽/連接到服務(wù)器端口 使用UDP而不是TCP TCP 窗口大小 (socket緩沖大小) 捆綁到 主機, 接口或者多點傳送地址 使用較舊版本時不發(fā)送額外信息 設(shè)置TCP最大數(shù)據(jù)段大小 (MTU - 40 bytes) 設(shè)置無延遲TCP,禁用 Nagles Algorithm 設(shè)置域 為Ipv6 服務(wù)器 -s-U-D -server -single_udp -daemon 服務(wù)器模式下運行 單線程UDP模式下運行 以守護進程模式運行服務(wù)器 用戶 -b-c-d-n-r-t-F-I-L-P-T -bandwidth -client -dua

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
  • 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論