{"id":7459,"date":"2024-04-03T17:01:01","date_gmt":"2024-04-03T09:01:01","guid":{"rendered":""},"modified":"2024-04-03T17:01:01","modified_gmt":"2024-04-03T09:01:01","slug":"wireshark\u4e2d\u5e26\u6709SLE\u548cSRE\u7684SACK\u5305\u8be6\u89e3\u548c\u5e38\u89c4\u8fc7\u6ee4","status":"publish","type":"post","link":"https:\/\/mushiming.com\/7459.html","title":{"rendered":"wireshark\u4e2d\u5e26\u6709SLE\u548cSRE\u7684SACK\u5305\u8be6\u89e3\u548c\u5e38\u89c4\u8fc7\u6ee4"},"content":{"rendered":"

\u4e00\u3001\u540d\u8bcd\u89e3\u91ca<\/p>\n

SLE: Sequence Left Edge<\/strong> of already acknowledged data when Selective Acknowledgments are used. \u5373\u5df2\u6536\u5230tcp\u6570\u636e\u7684\u5de6\u8fb9\u754c\u3002
SRE: Sequence Right Edge<\/strong> of already acknowledged data when Selective Acknowledgments are used. \u5373\u5df2\u6536\u5230tcp\u6570\u636e\u7684\u53f3\u8fb9\u754c\u3002<\/p>\n

<\/span>
\n<\/span> <\/p>\n

\u4e8c\u3001 \u4f7f\u7528\u573a\u666f<\/p>\n

\"wireshark\u4e2d\u5e26\u6709SLE\u548cSRE\u7684SACK\u5305\u8be6\u89e3\u548c\u5e38\u89c4\u8fc7\u6ee4 <\/p>\n

SACK\u5728\u6570\u636e\u4e22\u5305\u9700\u8981\u91cd\u4f20\u65f6\u8d77\u4f5c\u7528\u3002\u6bd4\u5982\uff0c\u670d\u52a1\u5668\u5df2\u53d1\u9001\u7684\u6570\u636e\u4e3a1~34454\u4e2a\u5305\uff0c\u4f46\u662f\uff0c\u5ba2\u6237\u7aef\u53ea\u6536\u5230\u4e86\u201c1~22774\uff0c28614~34454\u201d\u8fd9\u4e9b\u5e8f\u5217\u7684\u5305\uff0c\u4e5f\u5c31\u662f\u8bf4\u201c22775~28613\u201d\u8fd9\u4e9b\u5305\u5df2\u7ecf\u4e22\u4e86\u3002\u8fd9\u4e2a\u65f6\u5019\uff0c\u5ba2\u6237\u7aef\u4f1a\u5411\u670d\u52a1\u5668\u8bf7\u6c42\u53d1\u9001\u56de\u9988\u5305\uff0c\u8bf4\u6211\u6536\u5230\u4e86seq\u4e3a22774\u7684\u5305\uff0c\u540c\u65f6\u4e5f\u4e71\u5e8f\u6536\u5230\u4e86\"SLE\u4e3a28614\uff0cSRE\u4e3a34454\"\u7684\u5305\u3002\u90a3\u4e48\uff0c\u670d\u52a1\u5668\u5c31\u77e5\u9053\uff0c\u63a5\u7740\u4eceseq=22775\u7684\u5305\u5f00\u59cb\u53d1\u9001\uff0c\u53d1\u9001\u5230seq=28613\u7684\u5305\u7684\u65f6\u5019\uff0c\u5c31\u4e0d\u7528\u5728\u53d1\u9001seq=28614\u7684\u5305\u4e86\uff0c\u56e0\u4e3a\u5ba2\u6237\u7aef\u5df2\u7ecf\u6536\u5230\u4e86\u3002
\u5982\u679cACK\u4e2d\u4e0d\u5e26SLE\u548cSRE\u4f1a\u600e\u6837\u5462\uff1f\u90a3\u670d\u52a1\u5668\u5c31\u4f1a\u91cd\u53d1\u4ece\"22775\"\u5f00\u59cb\u4e4b\u540e\u7684\u6240\u6709\u7684\u5305\uff0c\u5305\u62ec\u5176\u5b9e\u5ba2\u6237\u7aef\u5df2\u7ecf\u6536\u5230\u7684\"28614~34454\"\u5e8f\u53f7\u7684\u5305\uff0c\u90a3\u5c31\u6d6a\u8d39\u7f51\u7edc\u5e26\u5bbd\u4e86\uff0c\u4e0d\u662f\u4e48\u3002<\/p>\n

\u4e09\u3001\u591a\u4e2a\u4e71\u5e8f\u6bb5\u7684\u60c5\u51b5
    \u5b9e\u9645\u60c5\u51b5\u4e2d\u8f83\u5c11\u89c1\uff0c\u56e0\u4e3a\u8fd9\u4ee3\u8868\u7740\u9694\u4e09\u5dee\u4e94\u5c31\u6709\u4e22\u5305\uff0c\u4e22\u5305\u7387\u5e94\u8be5\u5f88\u5927\u3002
    \u5c31\u6211\u4eec\u4f7f\u7528\u7684\u6709\u7ebf\u94fe\u8def\u800c\u8a00\uff0c\u4e22\u5305\u7387\u4e0d\u8db30.1%\uff0c\u65e0\u7ebf\u94fe\u8def\u5927\u7ea6\u57285%\u5de6\u53f3\u3002\u3010\u6ce8 1\u3011
    \u5728RFC2018\u4e2d\u8be6\u8ff0\u4e86SACK\u5305\u683c\u5f0f\u3002
    \u6709\u591a\u4e2a\u6570\u636e\u5757\u4e71\u5e8f\u7684\u60c5\u51b5\u4e0b\uff0cSLE\u548cSRE\u4e5f\u53ef\u4ee5\u6709\u591a\u7ec4\uff0c\u4f46\u56e0\u4e3a\u5934\u90e8\u5b57\u8282\u9650\u5236\uff0c\u6700\u591a\u4e3a4\u7ec4\u3002<\/p>\n

sack\u9009\u9879
   \u9009\u9879\u7c7b\u578b: 5
   \u9009\u9879\u957f\u5ea6: \u53ef\u53d8\uff0c\u4f46\u6574\u4e2aTCP\u9009\u9879\u957f\u5ea6\u4e0d\u8d85\u8fc740\u5b57\u8282\uff0c\u5b9e\u9645\u6700\u591a\u4e0d\u8d85\u8fc74\u7ec4\u8fb9\u754c\u503c\u3002
                         +--------+--------+
                         | Kind=5 | Length |
       +--------+--------+--------+--------+
       |      Left Edge of 1st Block       |
       +--------+--------+--------+--------+
       |      Right Edge of 1st Block      |
       +--------+--------+--------+--------+
       |                                   |
       \/            . . .                  \/
       |                                   |
       +--------+--------+--------+--------+
       |      Left Edge of nth Block       |
       +--------+--------+--------+--------+
       |      Right Edge of nth Block      |
<\/span><\/span>
\n<\/span> <\/p>\n

       +--------+--------+--------+--------+<\/span><\/p>\n

\u56fe2\u662f1\u7ec4\u8fb9\u754c\u7684\u6293\u5305\u622a\u56fe<\/span><\/p>\n

\"wireshark\u4e2d\u5e26\u6709SLE\u548cSRE\u7684SACK\u5305\u8be6\u89e3\u548c\u5e38\u89c4\u8fc7\u6ee4
<\/span><\/p>\n

\u6ce8\uff1a
<\/span>
\n<\/span> <\/p>\n

\u30101\u3011\u65e0\u7ebf\u94fe\u8def\u7684\u4e22\u5305\u7387\u4e0d\u786e\u5b9a\uff0c\u4e5f\u670920%\u7684\u60c5\u51b5<\/p>\n

<\/p>\n

\u53c2\u8003:<\/p>\n

https:\/\/ask.wireshark.org\/questions\/1389\/what-are-sre-and-sle?sort=votes <\/p>\n

http:\/\/blog.chinaunix.NET\/uid-28387257-id-3624060.html<\/p>\n

<\/p>\n

\n

\u4e00\u3001\u57fa\u672c\u8bed\u6cd5\u3002<\/p>\n

a)        ip.src == 192.168.0.2 &&<\/span> ip.dst == 192.168.0.3\u3002\u7ea2\u8272\u90e8\u5206\u53ef\u4ee5\u662f&&\u3001||\u3001\uff01 \u7b49\uff08\u6216\u76f8\u5e94\u7684\u82f1\u6587\uff1aand\u3001or\u3001not\uff09\u3002<\/p>\n

 <\/p>\n

 <\/p>\n

\u4e8c\u3001\u9488\u5bf9\u534f\u8bae\u7684\u8fc7\u6ee4<\/p>\n

\u3000\u3000\uff081\uff09\u4ec5\u4ec5\u9700\u8981\u6355\u83b7\u67d0\u79cd\u534f\u8bae\u7684\u6570\u636e\u5305\uff0c\u8868\u8fbe\u5f0f\u5f88\u7b80\u5355\u4ec5\u4ec5\u9700\u8981\u628a\u534f\u8bae\u7684\u540d\u5b57\u8f93\u5165\u5373\u53ef\u3002<\/p>\n

               \u8868\u8fbe\u5f0f\u4e3a\uff1ahttp<\/p>\n

\u3000\u3000\uff082\uff09\u9700\u8981\u6355\u83b7\u591a\u79cd\u534f\u8bae\u7684\u6570\u636e\u5305\uff0c\u4e5f\u53ea\u9700\u5bf9\u534f\u8bae\u8fdb\u884c\u903b\u8f91\u7ec4\u5408\u5373\u53ef\u3002<\/p>\n

\u3000\u3000         \u8868\u8fbe\u5f0f\u4e3a\uff1ahttp or telnet \uff08\u591a\u79cd\u534f\u8bae\u52a0\u4e0a\u903b\u8f91\u7b26\u53f7\u7684\u7ec4\u5408\u5373\u53ef\uff09<\/p>\n

\u3000\u3000\uff083\uff09\u6392\u9664\u67d0\u79cd\u534f\u8bae\u7684\u6570\u636e\u5305<\/p>\n

\u3000\u3000         \u8868\u8fbe\u5f0f\u4e3a\uff1anot arp     !tcp <\/p>\n

\u3000\u3000\uff084\uff09\u901a\u8fc7\u534f\u8baetype\u6765\u9009\u62e9\u67d0\u79cd\u534f\u8bae\u7684\u6570\u636e\u5305<\/p>\n

\u3000\u3000         \u8868\u8fbe\u5f0f\u4e3a\uff1aeth.type == 0x0800    \/*0x0800\u662fip\u534f\u8bae\u7684\u5305*\/<\/p>\n

\u4e09\u3001\u9488\u5bf9\u7aef\u53e3\u7684\u8fc7\u6ee4\uff08\u89c6\u534f\u8bae\u800c\u5b9a\uff09<\/p>\n

\u3000\u3000\uff081\uff09\u6355\u83b7\u67d0\u4e00\u7aef\u53e3\u7684\u6570\u636e\u5305<\/p>\n

\u3000\u3000         \u8868\u8fbe\u5f0f\u4e3a\uff1atcp.dstport ==80<\/p>\n

\u3000\u3000\uff082\uff09\u6355\u83b7\u591a\u7aef\u53e3\u7684\u6570\u636e\u5305\uff0c\u53ef\u4ee5\u4f7f\u7528and\u6765\u8fde\u63a5\uff0c\u4e0b\u9762\u662f\u6355\u83b7\u9ad8\u7aef\u53e3\u7684\u8868\u8fbe\u5f0f<\/p>\n

\u3000\u3000         \u8868\u8fbe\u5f0f\u4e3a\uff1audp.port >=2048<\/p>\n

 <\/p>\n

\u56db\u3001\u9488\u5bf9\u957f\u5ea6\u548c\u5185\u5bb9\u7684\u8fc7\u6ee4<\/p>\n

\u3000\u3000\uff081\uff09\u9488\u5bf9\u957f\u5ea6\u7684\u8fc7\u8651\uff08\u8fd9\u91cc\u7684\u957f\u5ea6\u6307\u5b9a\u7684\u662f\u6570\u636e\u6bb5\u7684\u957f\u5ea6\uff09<\/p>\n

\u3000\u3000         \u8868\u8fbe\u5f0f\u4e3a\uff1audp.length <30   http.content_length <=20<\/p>\n

\u3000\u3000\uff082\uff09\u9488\u5bf9\u6570\u636e\u5305\u5185\u5bb9\u7684\u8fc7\u6ee4<\/p>\n

\u3000\u3000\u3000\u3000  \u8868\u8fbe\u5f0f\u4e3a\uff1ahttp.request.uri matches \"vipscu\"  \uff08\u5339\u914dhttp\u8bf7\u6c42\u4e2d\u542b\u6709vipscu\u5b57\u6bb5\u7684\u8bf7\u6c42\u4fe1\u606f\uff09<\/p>\n

 <\/p>\n

\u4e94\u3001\u663e\u793a\u8fc7\u6ee4\u5173\u952e\u5b57\u3002<\/p>\n

1\u3001  ip.src == 192.168.0.2 \uff08\u8fc7\u6ee4ip\u6e90\u5730\u5740\u4e3a*\u7684\u5305\uff09<\/p>\n

2\u3001  ip.dst == 192.168.0.3 \uff08\u8fc7\u6ee4ip\u76ee\u7684\u5730\u5740\u4e3a*\u7684\u5305\uff09<\/p>\n

3\u3001  tcp.dstport 80 xor tcp.dstport 1025\uff08\u53ea\u6709\u5f53\u76ee\u7684TCP\u7aef\u53e3\u4e3a80\u6216\u8005\u6765\u6e90\u4e8e\u7aef\u53e31025\uff08\u4f46\u53c8\u4e0d\u80fd\u540c\u65f6\u6ee1\u8db3\u8fd9\u4e24\u70b9\uff09\uff09<\/p>\n

4\u3001  tcp.flags (\u663e\u793a\u5305\u542bTCP\u6807\u5fd7\u7684\u5c01\u5305)<\/p>\n

5\u3001  tcp.flags.syn == 0x02 (\u663e\u793a\u5305\u542bTCP SYN\u6807\u5fd7\u7684\u5c01\u5305)<\/p>\n

 <\/p>\n

\u516d\u3001\u6355\u6349\u8fc7\u6ee4\u5173\u952e\u5b57<\/p>\n

1\u3001  tcp dst port 3128 \uff08\u663e\u793a\u76ee\u7684TCP\u7aef\u53e3\u4e3a3128\u7684\u5c01\u5305\uff09<\/p>\n

         2\u3001ip src host10.1.1.1 (\u663e\u793a\u6765\u6e90IP\u5730\u5740\u4e3a10.1.1.1\u7684\u5c01\u5305)<\/p>\n

2\u3001  host 10.1.2.3 \uff08\u663e\u793a\u76ee\u7684\u6216\u6765\u6e90IP\u5730\u5740\u4e3a10.1.2.3\u7684\u5c01\u5305\uff09<\/p>\n

3\u3001  src portrange 2000-2500 \uff08\u663e\u793a\u6765\u6e90\u4e3aUDP\u6216TCP\uff0c\u5e76\u4e14\u7aef\u53e3\u53f7\u57282000\u81f32500\u8303\u56f4\u5185\u7684\u5c01\u5305\uff09<\/p>\n

4\u3001  not imcp\uff08\u663e\u793a\u9664\u4e86icmp\u4ee5\u5916\u7684\u6240\u6709\u5c01\u5305\u3002\uff08icmp\u901a\u5e38\u88abping\u5de5\u5177\u4f7f\u7528\uff09\uff09<\/p>\n

5\u3001  src host 10.7.2.12 and not dst net 10.200.0.0\/16<\/p>\n

\u6ce8\uff1a\u663e\u793a\u6765\u6e90IP\u5730\u5740\u4e3a10.7.2.12\uff0c\u4f46\u76ee\u7684\u5730\u4e0d\u662f10.200.0.0\/16\u7684\u5c01\u5305\u3002<\/p>\n

6\u3001(src host10.4.1.12 or src net 10.6.0.0\/16) and tcp dst portrange 200-10000 and dst net10.0.0.0\/8<\/p>\n

\u663e\u793a\u6765\u6e90IP\u4e3a10.4.1.12\u6216\u8005\u6765\u6e90\u7f51\u7edc\u4e3a10.6.0.0\/16\uff0c\u76ee\u7684\u5730TCP\u7aef\u53e3\u53f7\u5728200\u81f310000\u4e4b\u95f4\uff0c\u5e76\u4e14\u76ee\u7684\u4f4d\u4e8e\u7f51\u7edc10.0.0.0\/8\u5185\u7684\u6240\u6709\u5c01\u5305<\/p>\n

<\/p>\n","protected":false},"excerpt":{"rendered":"wireshark\u4e2d\u5e26\u6709SLE\u548cSRE\u7684SACK\u5305\u8be6\u89e3\u548c\u5e38\u89c4\u8fc7\u6ee4\u4e00\u3001\u540d\u8bcd\u89e3\u91caSLE:SequenceLeftEdgeofalreadyacknowledgeddatawhenSelectiveAc...","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"_links":{"self":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/7459"}],"collection":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/comments?post=7459"}],"version-history":[{"count":0,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/7459\/revisions"}],"wp:attachment":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/media?parent=7459"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/categories?post=7459"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/tags?post=7459"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}