{"id":1519,"date":"2024-07-11T10:43:53","date_gmt":"2024-07-11T02:43:53","guid":{"rendered":"https:\/\/www.nanoexpress.com\/?p=1519"},"modified":"2024-07-11T11:15:50","modified_gmt":"2024-07-11T03:15:50","slug":"tcpdump%e6%8a%93%e5%8c%85%e6%8a%93%e5%88%b0%e8%b6%85%e8%bf%87mtu%e5%a4%a7%e5%b0%8f%e7%9a%84%e6%95%b0%e6%8d%ae%e5%8c%85%e6%98%af%e6%80%8e%e4%b9%88%e5%9b%9e%e4%ba%8b%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/www.nanoexpress.com\/?p=1519","title":{"rendered":"tcpdump\u6293\u5305\u6293\u5230\u8d85\u8fc7MTU\u5927\u5c0f\u7684\u6570\u636e\u5305\u662f\u600e\u4e48\u56de\u4e8b\uff1f"},"content":{"rendered":"\n<p>\u4f7f\u7528tcpdump\u6293\u5305\u65f6\uff0c\u4f1a\u6293\u5230\u957f\u5ea6\u8d85\u8fc7MTU(\u9ed8\u8ba4\u8bbe\u7f6e1500\uff09\u7684\u6570\u636e\u5305\uff0c\u5982\u4e0b\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"129\" src=\"https:\/\/www.nanoexpress.com\/wp-content\/uploads\/2024\/07\/image-2-1024x129.png\" alt=\"\" class=\"wp-image-1522\" style=\"width:937px;height:auto\" srcset=\"https:\/\/www.nanoexpress.com\/wp-content\/uploads\/2024\/07\/image-2-1024x129.png 1024w, https:\/\/www.nanoexpress.com\/wp-content\/uploads\/2024\/07\/image-2-300x38.png 300w, https:\/\/www.nanoexpress.com\/wp-content\/uploads\/2024\/07\/image-2-768x96.png 768w, https:\/\/www.nanoexpress.com\/wp-content\/uploads\/2024\/07\/image-2.png 1059w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u8fd9\u662f\u7531\u4e8e\u67d0\u4e9b\u7f51\u5361\u652f\u6301\u4e00\u4e9b\u7279\u6027\u4f1a\u5c06\u6570\u636e\u5305\u6c47\u805a\u540e\u7edf\u4e00\u4e0a\u9001\uff0c\u51cf\u5c11cpu\u7684\u538b\u529b\u3002\u5b9e\u9645\u4e0a\u8be5\u6570\u636e\u5305\u5728\u7f51\u7edc\u4e2d\u4f20\u8f93\u65f6\uff0c\u4ecd\u7136\u662f\u4fdd\u6301\u4f4e\u4e8eMTU\u5927\u5c0f\u5728\u4f20\u8f93\u7684\u3002\u90a3\u4e48\u5982\u4f55\u4f7ftcpdump\u6293\u5230\u771f\u5b9e\u7684\u6570\u636e\uff0c\u4e0d\u8ba9\u7f51\u5361\u5c06\u6570\u636e\u5305\u6c47\u805a\u540e\u518d\u4e0a\u4f20\u5462\uff1f<\/p>\n\n\n\n<p>\u9996\u5148\u4ecb\u7ecd\u4e0b\u7f51\u5361\u786c\u4ef6\u901a\u5e38\u652f\u6301\u7684\u51e0\u79cd\u7279\u6027\uff1a<\/p>\n\n\n\n<p>1.TSO<br>TSO(TCP Segmentation Offload)\uff0c\u662f\u4e00\u79cd\u5229\u7528\u7f51\u5361\u5bf9TCP\u6570\u636e\u5305\u5206\u7247\uff0c\u51cf\u8f7bCPU\u8d1f\u8377\u7684\u4e00\u79cd\u6280\u672f\uff0c\u6709\u65f6\u4e5f\u88ab\u53eb\u505a LSO (Large segment offload) \uff1b<br>TSO\u662f\u9488\u5bf9TCP\u7684\uff0cUFO\u662f\u9488\u5bf9UDP\u7684\u3002\u5982\u679c\u786c\u4ef6\u652f\u6301 TSO\u529f\u80fd\uff0c\u540c\u65f6\u4e5f\u9700\u8981\u786c\u4ef6\u652f\u6301\u7684TCP\u6821\u9a8c\u8ba1\u7b97\u548c\u5206\u6563\/\u805a\u96c6 (Scatter Gather) \u529f\u80fd\u3002<\/p>\n\n\n\n<p>2.GSO<br>GSO(Generic Segmentation Offload)\uff0c\u5b83\u6bd4TSO\u66f4\u901a\u7528\uff0c\u57fa\u672c\u601d\u60f3\u5c31\u662f\u5c3d\u53ef\u80fd\u7684\u63a8\u8fdf\u6570\u636e\u5206\u7247\u76f4\u81f3\u53d1\u9001\u5230\u7f51\u5361\u9a71\u52a8\u4e4b\u524d\uff0c\u6b64\u65f6\u4f1a\u68c0\u67e5\u7f51\u5361\u662f\u5426\u652f\u6301\u5206\u7247\u529f\u80fd\uff08\u5982TSO\u3001UFO\uff09\uff1a<br>\u5982\u679c\u652f\u6301\u76f4\u63a5\u53d1\u9001\u5230\u7f51\u5361\uff0c\u5982\u679c\u4e0d\u652f\u6301\u5c31\u8fdb\u884c\u5206\u7247\u540e\u518d\u53d1\u5f80\u7f51\u5361\u3002\u8fd9\u6837\u5927\u6570\u636e\u5305\u53ea\u9700\u8d70\u4e00\u6b21\u534f\u8bae\u6808\uff0c\u800c\u4e0d\u662f\u88ab\u5206\u5272\u6210\u51e0\u4e2a\u6570\u636e\u5305\u5206\u522b\u8d70\uff0c\u8fd9\u5c31\u63d0\u9ad8\u4e86\u6548\u7387\u3002<\/p>\n\n\n\n<p>3.LRO<br>LRO(Large Receive Offload)\uff0c\u901a\u8fc7\u5c06\u63a5\u6536\u5230\u7684\u591a\u4e2aTCP\u6570\u636e\u805a\u5408\u6210\u4e00\u4e2a\u5927\u7684\u6570\u636e\u5305\uff0c\u7136\u540e\u4f20\u9012\u7ed9\u7f51\u7edc\u534f\u8bae\u6808\u5904\u7406\uff0c\u4ee5\u51cf\u5c11\u4e0a\u5c42\u534f\u8bae\u6808\u5904\u7406 \u5f00\u9500\uff0c\u63d0\u9ad8\u7cfb\u7edf\u63a5\u6536TCP\u6570\u636e\u5305\u7684\u80fd\u529b\u3002<\/p>\n\n\n\n<p>4.GRO<br>GRO(Generic Receive Offload)\uff0c\u57fa\u672c\u601d\u60f3\u8ddfLRO\u7c7b\u4f3c\uff0c\u514b\u670d\u4e86LRO\u7684\u4e00\u4e9b\u7f3a\u70b9\uff0c\u66f4\u901a\u7528\u3002\u540e\u7eed\u7684\u9a71\u52a8\u90fd\u4f7f\u7528GRO\u7684\u63a5\u53e3\uff0c\u800c\u4e0d\u662fLRO\u3002<\/p>\n\n\n\n<p>5.RSS<br>RSS(Receive Side Scaling)\uff0c\u662f\u4e00\u9879\u7f51\u5361\u7684\u65b0\u7279\u6027\uff0c\u4fd7\u79f0\u591a\u961f\u5217\u3002\u5177\u5907\u591a\u4e2aRSS\u961f\u5217\u7684\u7f51\u5361\uff0c\u53ef\u4ee5\u5c06\u4e0d\u540c\u7684\u7f51\u7edc\u6d41\u5206\u6210\u4e0d\u540c\u7684\u961f\u5217\uff0c\u518d\u5206\u522b\u5c06\u8fd9\u4e9b\u961f\u5217\u5206\u914d\u5230\u591a\u4e2aCPU\u6838\u5fc3\u4e0a\u8fdb\u884c\u5904\u7406\uff0c\u4ece\u800c\u5c06\u8d1f\u8377\u5206\u6563\uff0c\u5145\u5206\u5229\u7528\u591a\u6838\u5904\u7406\u5668\u7684\u80fd\u529b\u3002<br><\/p>\n\n\n\n<p>\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u67e5\u770b\u5f53\u524d\u7f51\u5361\u7684\u914d\u7f6e\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ethtool -k eth0<\/code><\/pre>\n\n\n\n<p>\u5982\u679c\u8981\u5173\u6389\u76f8\u5e94\u7684\u529f\u80fd\uff0c\u5219\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ethtool -K eth0 gro off<\/code><\/pre>\n\n\n\n<p>\u5f53\u6211\u4eec\u5173\u6389\u7f51\u5361\u7684\u805a\u5408\u4e0a\u9001\u529f\u80fd\u4e4b\u540e\uff0c\u518d\u6b21tcpdump\u6293\u5305\uff0c\u5c31\u53ef\u4ee5\u770b\u5230\u771f\u5b9e\u6b63\u5e38\u7684\u6570\u636e\u5305\u4e86<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1017\" height=\"752\" src=\"https:\/\/www.nanoexpress.com\/wp-content\/uploads\/2024\/07\/image-3.png\" alt=\"\" class=\"wp-image-1523\" srcset=\"https:\/\/www.nanoexpress.com\/wp-content\/uploads\/2024\/07\/image-3.png 1017w, https:\/\/www.nanoexpress.com\/wp-content\/uploads\/2024\/07\/image-3-300x222.png 300w, https:\/\/www.nanoexpress.com\/wp-content\/uploads\/2024\/07\/image-3-768x568.png 768w\" sizes=\"auto, (max-width: 1017px) 100vw, 1017px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>\u4f7f\u7528tcpdump\u6293\u5305\u65f6\uff0c\u4f1a\u6293\u5230\u957f\u5ea6\u8d85\u8fc7MTU(\u9ed8\u8ba4\u8bbe\u7f6e1500\uff09\u7684\u6570\u636e\u5305\uff0c\u5982\u4e0b\u56fe\uff1a \u8fd9\u662f\u7531\u4e8e\u67d0\u4e9b\u7f51\u5361\u652f\u6301\u4e00\u4e9b [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1519","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/www.nanoexpress.com\/index.php?rest_route=\/wp\/v2\/posts\/1519","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.nanoexpress.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nanoexpress.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nanoexpress.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nanoexpress.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1519"}],"version-history":[{"count":4,"href":"https:\/\/www.nanoexpress.com\/index.php?rest_route=\/wp\/v2\/posts\/1519\/revisions"}],"predecessor-version":[{"id":1526,"href":"https:\/\/www.nanoexpress.com\/index.php?rest_route=\/wp\/v2\/posts\/1519\/revisions\/1526"}],"wp:attachment":[{"href":"https:\/\/www.nanoexpress.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1519"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nanoexpress.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1519"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nanoexpress.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1519"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}