• 解决 tcpdump 抓包时的丢包问题


    #---------------------------------------------------------------------------------------------- begin
    # 因为 M8 接收的数据 (1238×1428÷1024 = 1726 KB) < 3.6M, 因此,再做一次实验,仅对 M1 & M8 抓包
    # transmission time: 95 seconds
        cd /root/tcpdump-on-8-nodes/MPTCP-Markov-F-xIF-MDR-2
        tcpdump -i br_a_10 -p tcp -n -X -tt > mim-improved-mptcp-markov-f-xif-mdr--M1--tcpdump-eth0.txt &
        tcpdump -i br_a_11 -p tcp -n -X -tt > mim-improved-mptcp-markov-f-xif-mdr--M1--tcpdump-eth1.txt &
        tcpdump -i br_a_12 -p tcp -n -X -tt > mim-improved-mptcp-markov-f-xif-mdr--M1--tcpdump-eth2.txt &
        tcpdump -i br_a_13 -p tcp -n -X -tt > mim-improved-mptcp-markov-f-xif-mdr--M1--tcpdump-eth3.txt &
        tcpdump -i br_a_80 -p tcp -n -X -tt > mim-improved-mptcp-markov-f-xif-mdr--M8--tcpdump-eth0.txt &
        tcpdump -i br_a_81 -p tcp -n -X -tt > mim-improved-mptcp-markov-f-xif-mdr--M8--tcpdump-eth1.txt &
        tcpdump -i br_a_82 -p tcp -n -X -tt > mim-improved-mptcp-markov-f-xif-mdr--M8--tcpdump-eth2.txt &
        tcpdump -i br_a_83 -p tcp -n -X -tt > mim-improved-mptcp-markov-f-xif-mdr--M8--tcpdump-eth3.txt &
    # M1 & M8 发送的有效载荷 (len 1428) 数据包个数 - using nc
        (M1-eth0:1431, M8-eth0:689)
        (M1-eth1:1193, M8-eth1:545)
        (M1-eth2:1435, M8-eth2:690)
        (M1-eth3:1419, M8-eth3:677)
    total    (M1-eth:5478, M8-eth:2601)
        5478×1428÷1024 = 7639 KB
        2601×1428÷1024 = 3627 KB

    # 结果确定 M8 接收的数据 (2601×1428÷1024 = 3627 KB) = 3.6M, 说明,前面的实验中,发生了 tcpdump 丢包问题
    # 因此进行如下抓包试一试
    # transmission time: 95 seconds
        cd /root/tcpdump-on-8-nodes/MPTCP-Markov-F-xIF-MDR
        tcpdump -i br_a_10 -p tcp -n -X -tt -w mim-improved-mptcp-markov-f-xif-mdr--M1--tcpdump-eth0.cap &
        tcpdump -i br_a_11 -p tcp -n -X -tt -w mim-improved-mptcp-markov-f-xif-mdr--M1--tcpdump-eth1.cap &
        tcpdump -i br_a_12 -p tcp -n -X -tt -w mim-improved-mptcp-markov-f-xif-mdr--M1--tcpdump-eth2.cap &
        tcpdump -i br_a_13 -p tcp -n -X -tt -w mim-improved-mptcp-markov-f-xif-mdr--M1--tcpdump-eth3.cap &
        tcpdump -i br_a_20 -p tcp -n -X -tt -w mim-improved-mptcp-markov-f-xif-mdr--M2--tcpdump-eth0.cap &
        tcpdump -i br_a_21 -p tcp -n -X -tt -w mim-improved-mptcp-markov-f-xif-mdr--M2--tcpdump-eth1.cap &
        tcpdump -i br_a_22 -p tcp -n -X -tt -w mim-improved-mptcp-markov-f-xif-mdr--M2--tcpdump-eth2.cap &
        tcpdump -i br_a_23 -p tcp -n -X -tt -w mim-improved-mptcp-markov-f-xif-mdr--M2--tcpdump-eth3.cap &
        tcpdump -i br_a_30 -p tcp -n -X -tt -w mim-improved-mptcp-markov-f-xif-mdr--M3--tcpdump-eth0.cap &
        tcpdump -i br_a_31 -p tcp -n -X -tt -w mim-improved-mptcp-markov-f-xif-mdr--M3--tcpdump-eth1.cap &
        tcpdump -i br_a_32 -p tcp -n -X -tt -w mim-improved-mptcp-markov-f-xif-mdr--M3--tcpdump-eth2.cap &
        tcpdump -i br_a_33 -p tcp -n -X -tt -w mim-improved-mptcp-markov-f-xif-mdr--M3--tcpdump-eth3.cap &
        tcpdump -i br_a_40 -p tcp -n -X -tt -w mim-improved-mptcp-markov-f-xif-mdr--M4--tcpdump-eth0.cap &
        tcpdump -i br_a_41 -p tcp -n -X -tt -w mim-improved-mptcp-markov-f-xif-mdr--M4--tcpdump-eth1.cap &
        tcpdump -i br_a_42 -p tcp -n -X -tt -w mim-improved-mptcp-markov-f-xif-mdr--M4--tcpdump-eth2.cap &
        tcpdump -i br_a_43 -p tcp -n -X -tt -w mim-improved-mptcp-markov-f-xif-mdr--M4--tcpdump-eth3.cap &
        tcpdump -i br_a_50 -p tcp -n -X -tt -w mim-improved-mptcp-markov-f-xif-mdr--M5--tcpdump-eth0.cap &
        tcpdump -i br_a_51 -p tcp -n -X -tt -w mim-improved-mptcp-markov-f-xif-mdr--M5--tcpdump-eth1.cap &
        tcpdump -i br_a_52 -p tcp -n -X -tt -w mim-improved-mptcp-markov-f-xif-mdr--M5--tcpdump-eth2.cap &
        tcpdump -i br_a_53 -p tcp -n -X -tt -w mim-improved-mptcp-markov-f-xif-mdr--M5--tcpdump-eth3.cap &
        tcpdump -i br_a_60 -p tcp -n -X -tt -w mim-improved-mptcp-markov-f-xif-mdr--M6--tcpdump-eth0.cap &
        tcpdump -i br_a_61 -p tcp -n -X -tt -w mim-improved-mptcp-markov-f-xif-mdr--M6--tcpdump-eth1.cap &
        tcpdump -i br_a_62 -p tcp -n -X -tt -w mim-improved-mptcp-markov-f-xif-mdr--M6--tcpdump-eth2.cap &
        tcpdump -i br_a_63 -p tcp -n -X -tt -w mim-improved-mptcp-markov-f-xif-mdr--M6--tcpdump-eth3.cap &
        tcpdump -i br_a_70 -p tcp -n -X -tt -w mim-improved-mptcp-markov-f-xif-mdr--M7--tcpdump-eth0.cap &
        tcpdump -i br_a_71 -p tcp -n -X -tt -w mim-improved-mptcp-markov-f-xif-mdr--M7--tcpdump-eth1.cap &
        tcpdump -i br_a_72 -p tcp -n -X -tt -w mim-improved-mptcp-markov-f-xif-mdr--M7--tcpdump-eth2.cap &
        tcpdump -i br_a_73 -p tcp -n -X -tt -w mim-improved-mptcp-markov-f-xif-mdr--M7--tcpdump-eth3.cap &
        tcpdump -i br_a_80 -p tcp -n -X -tt -w mim-improved-mptcp-markov-f-xif-mdr--M8--tcpdump-eth0.cap &
        tcpdump -i br_a_81 -p tcp -n -X -tt -w mim-improved-mptcp-markov-f-xif-mdr--M8--tcpdump-eth1.cap &
        tcpdump -i br_a_82 -p tcp -n -X -tt -w mim-improved-mptcp-markov-f-xif-mdr--M8--tcpdump-eth2.cap &
        tcpdump -i br_a_83 -p tcp -n -X -tt -w mim-improved-mptcp-markov-f-xif-mdr--M8--tcpdump-eth3.cap &

    # cap 文件转换为 txt 文件,便于统计
    cd /root/tcpdump-on-8-nodes/MPTCP-Markov-F-xIF-MDR
    tcpdump -r mim-improved-mptcp-markov-f-xif-mdr--M1--tcpdump-eth0.cap > mim-improved-mptcp-markov-f-xif-mdr--M1--tcpdump-eth0.txt
    tcpdump -r mim-improved-mptcp-markov-f-xif-mdr--M1--tcpdump-eth1.cap > mim-improved-mptcp-markov-f-xif-mdr--M1--tcpdump-eth1.txt
    tcpdump -r mim-improved-mptcp-markov-f-xif-mdr--M1--tcpdump-eth2.cap > mim-improved-mptcp-markov-f-xif-mdr--M1--tcpdump-eth2.txt
    tcpdump -r mim-improved-mptcp-markov-f-xif-mdr--M1--tcpdump-eth3.cap > mim-improved-mptcp-markov-f-xif-mdr--M1--tcpdump-eth3.txt
    tcpdump -r mim-improved-mptcp-markov-f-xif-mdr--M2--tcpdump-eth0.cap > mim-improved-mptcp-markov-f-xif-mdr--M2--tcpdump-eth0.txt
    tcpdump -r mim-improved-mptcp-markov-f-xif-mdr--M2--tcpdump-eth1.cap > mim-improved-mptcp-markov-f-xif-mdr--M2--tcpdump-eth1.txt
    tcpdump -r mim-improved-mptcp-markov-f-xif-mdr--M2--tcpdump-eth2.cap > mim-improved-mptcp-markov-f-xif-mdr--M2--tcpdump-eth2.txt
    tcpdump -r mim-improved-mptcp-markov-f-xif-mdr--M2--tcpdump-eth3.cap > mim-improved-mptcp-markov-f-xif-mdr--M2--tcpdump-eth3.txt
    tcpdump -r mim-improved-mptcp-markov-f-xif-mdr--M3--tcpdump-eth0.cap > mim-improved-mptcp-markov-f-xif-mdr--M3--tcpdump-eth0.txt
    tcpdump -r mim-improved-mptcp-markov-f-xif-mdr--M3--tcpdump-eth1.cap > mim-improved-mptcp-markov-f-xif-mdr--M3--tcpdump-eth1.txt
    tcpdump -r mim-improved-mptcp-markov-f-xif-mdr--M3--tcpdump-eth2.cap > mim-improved-mptcp-markov-f-xif-mdr--M3--tcpdump-eth2.txt
    tcpdump -r mim-improved-mptcp-markov-f-xif-mdr--M3--tcpdump-eth3.cap > mim-improved-mptcp-markov-f-xif-mdr--M3--tcpdump-eth3.txt
    tcpdump -r mim-improved-mptcp-markov-f-xif-mdr--M4--tcpdump-eth0.cap > mim-improved-mptcp-markov-f-xif-mdr--M4--tcpdump-eth0.txt
    tcpdump -r mim-improved-mptcp-markov-f-xif-mdr--M4--tcpdump-eth1.cap > mim-improved-mptcp-markov-f-xif-mdr--M4--tcpdump-eth1.txt
    tcpdump -r mim-improved-mptcp-markov-f-xif-mdr--M4--tcpdump-eth2.cap > mim-improved-mptcp-markov-f-xif-mdr--M4--tcpdump-eth2.txt
    tcpdump -r mim-improved-mptcp-markov-f-xif-mdr--M4--tcpdump-eth3.cap > mim-improved-mptcp-markov-f-xif-mdr--M4--tcpdump-eth3.txt
    tcpdump -r mim-improved-mptcp-markov-f-xif-mdr--M5--tcpdump-eth0.cap > mim-improved-mptcp-markov-f-xif-mdr--M5--tcpdump-eth0.txt
    tcpdump -r mim-improved-mptcp-markov-f-xif-mdr--M5--tcpdump-eth1.cap > mim-improved-mptcp-markov-f-xif-mdr--M5--tcpdump-eth1.txt
    tcpdump -r mim-improved-mptcp-markov-f-xif-mdr--M5--tcpdump-eth2.cap > mim-improved-mptcp-markov-f-xif-mdr--M5--tcpdump-eth2.txt
    tcpdump -r mim-improved-mptcp-markov-f-xif-mdr--M5--tcpdump-eth3.cap > mim-improved-mptcp-markov-f-xif-mdr--M5--tcpdump-eth3.txt
    tcpdump -r mim-improved-mptcp-markov-f-xif-mdr--M6--tcpdump-eth0.cap > mim-improved-mptcp-markov-f-xif-mdr--M6--tcpdump-eth0.txt
    tcpdump -r mim-improved-mptcp-markov-f-xif-mdr--M6--tcpdump-eth1.cap > mim-improved-mptcp-markov-f-xif-mdr--M6--tcpdump-eth1.txt
    tcpdump -r mim-improved-mptcp-markov-f-xif-mdr--M6--tcpdump-eth2.cap > mim-improved-mptcp-markov-f-xif-mdr--M6--tcpdump-eth2.txt
    tcpdump -r mim-improved-mptcp-markov-f-xif-mdr--M6--tcpdump-eth3.cap > mim-improved-mptcp-markov-f-xif-mdr--M6--tcpdump-eth3.txt
    tcpdump -r mim-improved-mptcp-markov-f-xif-mdr--M7--tcpdump-eth0.cap > mim-improved-mptcp-markov-f-xif-mdr--M7--tcpdump-eth0.txt
    tcpdump -r mim-improved-mptcp-markov-f-xif-mdr--M7--tcpdump-eth1.cap > mim-improved-mptcp-markov-f-xif-mdr--M7--tcpdump-eth1.txt
    tcpdump -r mim-improved-mptcp-markov-f-xif-mdr--M7--tcpdump-eth2.cap > mim-improved-mptcp-markov-f-xif-mdr--M7--tcpdump-eth2.txt
    tcpdump -r mim-improved-mptcp-markov-f-xif-mdr--M7--tcpdump-eth3.cap > mim-improved-mptcp-markov-f-xif-mdr--M7--tcpdump-eth3.txt
    tcpdump -r mim-improved-mptcp-markov-f-xif-mdr--M8--tcpdump-eth0.cap > mim-improved-mptcp-markov-f-xif-mdr--M8--tcpdump-eth0.txt
    tcpdump -r mim-improved-mptcp-markov-f-xif-mdr--M8--tcpdump-eth1.cap > mim-improved-mptcp-markov-f-xif-mdr--M8--tcpdump-eth1.txt
    tcpdump -r mim-improved-mptcp-markov-f-xif-mdr--M8--tcpdump-eth2.cap > mim-improved-mptcp-markov-f-xif-mdr--M8--tcpdump-eth2.txt
    tcpdump -r mim-improved-mptcp-markov-f-xif-mdr--M8--tcpdump-eth3.cap > mim-improved-mptcp-markov-f-xif-mdr--M8--tcpdump-eth3.txt

    # 统计数据包数
        cd /root/tcpdump-on-8-nodes/MPTCP-Markov-F-xIF-MDR
        grep "len 1428" mim-improved-mptcp-markov-f-xif-mdr--M1--tcpdump-eth0.txt | wc -l
        grep "len 1428" mim-improved-mptcp-markov-f-xif-mdr--M1--tcpdump-eth1.txt | wc -l
        grep "len 1428" mim-improved-mptcp-markov-f-xif-mdr--M1--tcpdump-eth2.txt | wc -l
        grep "len 1428" mim-improved-mptcp-markov-f-xif-mdr--M1--tcpdump-eth3.txt | wc -l
        grep "len 1428" mim-improved-mptcp-markov-f-xif-mdr--M2--tcpdump-eth0.txt | wc -l
        grep "len 1428" mim-improved-mptcp-markov-f-xif-mdr--M2--tcpdump-eth1.txt | wc -l
        grep "len 1428" mim-improved-mptcp-markov-f-xif-mdr--M2--tcpdump-eth2.txt | wc -l
        grep "len 1428" mim-improved-mptcp-markov-f-xif-mdr--M2--tcpdump-eth3.txt | wc -l
        grep "len 1428" mim-improved-mptcp-markov-f-xif-mdr--M3--tcpdump-eth0.txt | wc -l
        grep "len 1428" mim-improved-mptcp-markov-f-xif-mdr--M3--tcpdump-eth1.txt | wc -l
        grep "len 1428" mim-improved-mptcp-markov-f-xif-mdr--M3--tcpdump-eth2.txt | wc -l
        grep "len 1428" mim-improved-mptcp-markov-f-xif-mdr--M3--tcpdump-eth3.txt | wc -l
        grep "len 1428" mim-improved-mptcp-markov-f-xif-mdr--M4--tcpdump-eth0.txt | wc -l
        grep "len 1428" mim-improved-mptcp-markov-f-xif-mdr--M4--tcpdump-eth1.txt | wc -l
        grep "len 1428" mim-improved-mptcp-markov-f-xif-mdr--M4--tcpdump-eth2.txt | wc -l
        grep "len 1428" mim-improved-mptcp-markov-f-xif-mdr--M4--tcpdump-eth3.txt | wc -l
        grep "len 1428" mim-improved-mptcp-markov-f-xif-mdr--M5--tcpdump-eth0.txt | wc -l
        grep "len 1428" mim-improved-mptcp-markov-f-xif-mdr--M5--tcpdump-eth1.txt | wc -l
        grep "len 1428" mim-improved-mptcp-markov-f-xif-mdr--M5--tcpdump-eth2.txt | wc -l
        grep "len 1428" mim-improved-mptcp-markov-f-xif-mdr--M5--tcpdump-eth3.txt | wc -l
        grep "len 1428" mim-improved-mptcp-markov-f-xif-mdr--M6--tcpdump-eth0.txt | wc -l
        grep "len 1428" mim-improved-mptcp-markov-f-xif-mdr--M6--tcpdump-eth1.txt | wc -l
        grep "len 1428" mim-improved-mptcp-markov-f-xif-mdr--M6--tcpdump-eth2.txt | wc -l
        grep "len 1428" mim-improved-mptcp-markov-f-xif-mdr--M6--tcpdump-eth3.txt | wc -l
        grep "len 1428" mim-improved-mptcp-markov-f-xif-mdr--M7--tcpdump-eth0.txt | wc -l
        grep "len 1428" mim-improved-mptcp-markov-f-xif-mdr--M7--tcpdump-eth1.txt | wc -l
        grep "len 1428" mim-improved-mptcp-markov-f-xif-mdr--M7--tcpdump-eth2.txt | wc -l
        grep "len 1428" mim-improved-mptcp-markov-f-xif-mdr--M7--tcpdump-eth3.txt | wc -l
        grep "len 1428" mim-improved-mptcp-markov-f-xif-mdr--M8--tcpdump-eth0.txt | wc -l
        grep "len 1428" mim-improved-mptcp-markov-f-xif-mdr--M8--tcpdump-eth1.txt | wc -l
        grep "len 1428" mim-improved-mptcp-markov-f-xif-mdr--M8--tcpdump-eth2.txt | wc -l
        grep "len 1428" mim-improved-mptcp-markov-f-xif-mdr--M8--tcpdump-eth3.txt | wc -l
        grep "len 1428" mim-improved-mptcp-markov-f-xif-mdr--M1* | wc -l
        grep "len 1428" mim-improved-mptcp-markov-f-xif-mdr--M2* | wc -l
        grep "len 1428" mim-improved-mptcp-markov-f-xif-mdr--M3* | wc -l
        grep "len 1428" mim-improved-mptcp-markov-f-xif-mdr--M4* | wc -l
        grep "len 1428" mim-improved-mptcp-markov-f-xif-mdr--M5* | wc -l
        grep "len 1428" mim-improved-mptcp-markov-f-xif-mdr--M6* | wc -l
        grep "len 1428" mim-improved-mptcp-markov-f-xif-mdr--M7* | wc -l
        grep "len 1428" mim-improved-mptcp-markov-f-xif-mdr--M8* | wc -l
    #---------------------------------------------------------------------------------------------- end



  • 相关阅读:
    CSS 按类查看的常用样式属性
    html5前端准备资料
    编译和链接一些错误和警告
    [转]assert()函数用法总结
    [转]C++ 函数模板特化导致的多重定义链接错误
    [转]退出线程的几种方法
    [总结]编程中遇到的vc提示的一些警告
    [转]__declspec(dllexport) 和 __declspec(dllimport)
    [转]PROCESS_INFOMATION
    [转载] STARTUPINFO结构体
  • 原文地址:https://www.cnblogs.com/ztguang/p/12644450.html
Copyright © 2020-2023  润新知