軟體天堂 Foxy download 中文繁體2011PPS 繁體版下戴Skype 繁體中文版 downloadMSN 9 0 繁體中文版QQ 繁體版下载迅雷7繁體中文版pps 繁體版下戴2011

【Tcpreplay使用說明及實例】

Usage: tcpreplay [args] <file(s)>

-A "<args>" Arguments passed to tcpdump decoder

可選參數,在使用tcpdump風格打印輸出信息時,同時再調用tcpdump中的參數,默認已經帶有“-n,-l”,所以一般看到的都是ip地址,而沒有主機名的打印,注意這個是在tcpreplay使用了-v參數時,才能使用,不帶-v不會報錯,但是沒有實際意義。格式:-vA nnt”表示以tcpdump風格輸出報文信息,並且不打印時間戳、主機名、端口服務名稱。注意不要使用-c參數來指定打印的數據報文的個數,這樣發送出去的報文也會變少。

-c <cachefile> Split traffic via a tcpprep cache file

,後麵緊跟cache文件名,該文件為tcpprep根據對應的pcap文件構造出來。

-h Display less usage information and exit

顯示幫助文件。

-i <nic> Server/primary traffic output interface

雙網卡回放報文必選參數,指定主接口。

-I <nic> Client/secondary traffic output interface

雙網卡回放報文必選參數,指定從接口。

-K <cache> Enable caching of packets to internal memory

啟用緩存的數據包到內部存儲器

-l <loop> Loop through the capture file X times

可選參數,指定循環的次數。

-L <limit> Limit the number of packets to send

可選參數,指定最大的發包數量。可以在確認連接的調試時使用。

-M Replay packets at a given Mbps

可選參數,設定發包帶寬

-o One output mode

可選參數,設定重複發送時是為每個用戶每次一個包

-p <packetrate> Set replay speed to given rate (packets/sec)

可選參數,指定每秒發送報文PPS,指定該參數,其它速率相關的參數被忽略,最後的打印信息顯示為設定值,測試有小幅出入。

-P Print the PID of tcpreplay at startup

可選參數,表示在輸出信息中打印PID的信息,用於單用戶或單帳戶模式下暫停和重啟程序。

-t <num> Replay packets as fast as possible

可選參數,線速發包。

-T Truncate packets > MTU so they can be sent

可選參數,截去報文中MTU大於標準值的部分再發送出去,默認是不發送,skip掉。目前還有疑問,為什麼會產生MTU大於1500字節的包,在BT報文中,這種包比較常見。

-v Print decoded packets via tcpdump to STDOUT

可選參數,沒發送一個報文都以tcpdump的風格打印出對應的信息。

-V Version

查看版本號。

-x <match> Modify replay speed to a given multiple

可選參數,修改重複發送報文的速度。

-l Loop through the capture file X times

可選參數,參數內容就是阿拉伯數字,設定重複發送次數。