{"id":123159,"date":"2018-10-10T08:47:43","date_gmt":"2018-10-10T00:47:43","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=123159"},"modified":"2018-10-08T08:49:19","modified_gmt":"2018-10-08T00:49:19","slug":"udp-protocol","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/udp-protocol.html","title":{"rendered":"TCP\/IP\u5b66\u4e60\u7b14\u8bb0\uff086\uff09-UDP\u534f\u8bae"},"content":{"rendered":"
UDP\u662f\u4f20\u8f93\u5c42\u534f\u8bae\uff0c\u548cTCP\u534f\u8bae\u5904\u4e8e\u4e00\u4e2a\u5206\u5c42\u4e2d\uff0c\u4f46\u662f\u4e0eTCP\u534f\u8bae\u4e0d\u540c\uff0cUDP\u534f\u8bae\u5e76\u4e0d\u63d0\u4f9b\u8d85\u65f6\u91cd\u4f20\uff0c\u51fa\u9519\u91cd\u4f20\u7b49\u529f\u80fd\uff0c\u4e5f\u5c31\u662f\u8bf4\u5176\u662f\u4e0d\u53ef\u9760\u7684\u534f\u8bae\u3002<\/p>\n
\u7531\u4e8e\u5f88\u591a\u8f6f\u4ef6\u9700\u8981\u7528\u5230UDP\u534f\u8bae\uff0c\u6240\u4ee5UDP\u534f\u8bae\u5fc5\u987b\u901a\u8fc7\u67d0\u4e2a\u6807\u5fd7\u7528\u4ee5\u533a\u5206\u4e0d\u540c\u7684\u7a0b\u5e8f\u6240\u9700\u8981\u7684\u6570\u636e\u5305\u3002\u7aef\u53e3\u53f7\u7684\u529f\u80fd\u5c31\u5728\u4e8e\u6b64\uff0c\u4f8b\u5982\u67d0\u4e00\u4e2aUDP\u7a0b\u5e8fA\u5728\u7cfb\u7edf\u4e2d\u6ce8\u518c\u4e863000\u7aef\u53e3\uff0c\u90a3\u4e48\uff0c\u4ee5\u540e\u4ece\u5916\u9762\u4f20\u8fdb\u6765\u7684\u76ee\u7684\u7aef\u53e3\u53f7\u4e3a3000\u7684UDP\u5305\u90fd\u4f1a\u4ea4\u7ed9\u8be5\u7a0b\u5e8f\u3002\u7aef\u53e3\u53f7\u7406\u8bba\u4e0a\u53ef\u4ee5\u67092^16\u8fd9\u4e48\u591a\u3002\u56e0\u4e3a\u5b83\u7684\u957f\u5ea6\u662f16\u4e2abit\u3002<\/p>\n
\u8fd9\u662f\u4e00\u4e2a\u53ef\u9009\u7684\u9009\u9879\uff0c\u5e76\u4e0d\u662f\u6240\u6709\u7684\u7cfb\u7edf\u90fd\u5bf9UDP\u6570\u636e\u5305\u52a0\u4ee5\u68c0\u9a8c\u548c\u6570\u636e(\u76f8\u5bf9TCP\u534f\u8bae\u7684\u5fc5\u987b\u6765\u8bf4)\uff0c\u4f46\u662fRFC\u4e2d\u6807\u51c6\u8981\u6c42\uff0c\u53d1\u9001\u7aef\u5e94\u8be5\u8ba1\u7b97\u68c0\u9a8c\u548c\u3002
\nUDP\u68c0\u9a8c\u548c\u8986\u76d6UDP\u534f\u8bae\u5934\u548c\u6570\u636e\uff0c\u8fd9\u548cIP\u7684\u68c0\u9a8c\u548c\u662f\u4e0d\u540c\u7684\uff0cIP\u534f\u8bae\u7684\u68c0\u9a8c\u548c\u53ea\u662f\u8986\u76d6IP\u6570\u636e\u5934\uff0c\u5e76\u4e0d\u8986\u76d6\u6240\u6709\u7684\u6570\u636e\u3002UDP\u548cTCP\u90fd\u5305\u542b\u4e00\u4e2a\u4f2a\u9996\u90e8\uff0c\u8fd9\u662f\u4e3a\u4e86\u8ba1\u7b97\u68c0\u9a8c\u548c\u800c\u8bbe\u7f6e\u7684\u3002\u4f2a\u9996\u90e8\u751a\u81f3\u8fd8\u5305\u542bIP\u5730\u5740\u8fd9\u6837\u7684IP\u534f\u8bae\u91cc\u9762\u90fd\u6709\u7684\u4fe1\u606f\uff0c\u76ee\u7684\u662f\u8ba9UDP\u4e24\u6b21\u68c0\u67e5\u6570\u636e\u662f\u5426\u5df2\u7ecf\u6b63\u786e\u5230\u8fbe\u76ee\u7684\u5730\u3002\u5982\u679c\u53d1\u9001\u7aef\u6ca1\u6709\u6253\u5f00\u68c0\u9a8c\u548c\u9009\u9879\uff0c\u800c\u63a5\u6536\u7aef\u8ba1\u7b97\u68c0\u9a8c\u548c\u6709\u5dee\u9519\uff0c\u90a3\u4e48UDP\u6570\u636e\u5c06\u4f1a\u88ab\u6084\u6084\u7684\u4e22\u6389\uff08\u4e0d\u4fdd\u8bc1\u9001\u8fbe\uff09\uff0c\u800c\u4e0d\u4ea7\u751f\u4efb\u4f55\u5dee\u9519\u62a5\u6587\u3002<\/p>\n
UDP\u53ef\u4ee5\u5f88\u957f\u5f88\u957f\uff0c\u53ef\u4ee5\u670965535\u5b57\u8282\u90a3\u4e48\u957f\u3002\u4f46\u662f\u4e00\u822c\u7f51\u7edc\u5728\u4f20\u9001\u7684\u65f6\u5019\uff0c\u4e00\u6b21\u4e00\u822c\u4f20\u9001\u4e0d\u4e86\u90a3\u4e48\u957f\u7684\u534f\u8bae\uff08\u6d89\u53ca\u5230MTU\u7684\u95ee\u9898\uff09\uff0c\u5c31\u53ea\u597d\u5bf9\u6570\u636e\u5206\u7247\uff0c\u5f53\u7136\uff0c\u8fd9\u4e9b\u662f\u5bf9UDP\u7b49\u4e0a\u7ea7\u534f\u8bae\u900f\u660e\u7684\uff0cUDP\u4e0d\u9700\u8981\u5173\u5fc3IP\u534f\u8bae\u5c42\u5bf9\u6570\u636e\u5982\u4f55\u5206\u7247\uff0c\u4e0b\u4e00\u4e2a\u7ae0\u8282\u5c06\u4f1a\u7a0d\u5fae\u8ba8\u8bba\u4e00\u4e9b\u5206\u7247\u7684\u7b56\u7565\u3002<\/p>\n
IP\u5728\u4ece\u4e0a\u5c42\u63a5\u5230\u6570\u636e\u4ee5\u540e\uff0c\u8981\u6839\u636eIP\u5730\u5740\u6765\u5224\u65ad\u4ece\u90a3\u4e2a\u63a5\u53e3\u53d1\u9001\u6570\u636e\uff08\u901a\u8fc7\u9009\u8def\uff09\uff0c\u5e76\u8fdb\u884cMTU\u7684\u67e5\u8be2\uff0c\u5982\u679c\u6570\u636e\u5927\u5c0f\u8d85\u8fc7MTU\u5c31\u8fdb\u884c\u6570\u636e\u5206\u7247\u3002\u6570\u636e\u7684\u5206\u7247\u662f\u5bf9\u4e0a\u5c42\u548c\u4e0b\u5c42\u900f\u660e\uff0c\u800c\u6570\u636e\u4e5f\u53ea\u662f\u5230\u8fbe\u76ee\u7684\u5730\u8fd8\u4f1a\u88ab\u91cd\u65b0\u7ec4\u88c5\uff0c\u4e0d\u8fc7\u4e0d\u7528\u62c5\u5fc3\uff0cIP\u5c42\u63d0\u4f9b\u4e86\u8db3\u591f\u7684\u4fe1\u606f\u8fdb\u884c\u6570\u636e\u7684\u518d\u7ec4\u88c5\u3002
\n\u5728IP\u5934\u91cc\u9762\uff0c16bit\u8bc6\u522b\u53f7\u552f\u4e00\u8bb0\u5f55\u4e86\u4e00\u4e2aIP\u5305\u7684ID,\u5177\u6709\u540c\u4e00\u4e2aID\u7684IP\u7247\u5c06\u4f1a\u88ab\u91cd\u65b0\u7ec4\u88c5\uff1b\u800c13\u4f4d\u7247\u504f\u79fb\u5219\u8bb0\u5f55\u4e86\u67d0IP\u7247\u76f8\u5bf9\u6574\u4e2a\u5305\u7684\u4f4d\u7f6e\uff1b\u800c\u8fd9\u4e24\u4e2a\u8868\u793a\u4e2d\u95f4\u76843bit\u6807\u5fd7\u5219\u6807\u793a\u7740\u8be5\u5206\u7247\u540e\u9762\u662f\u5426\u8fd8\u6709\u65b0\u7684\u5206\u7247\u3002\u8fd9\u4e09\u4e2a\u6807\u793a\u5c31\u7ec4\u6210\u4e86IP\u5206\u7247\u7684\u6240\u6709\u4fe1\u606f\uff0c\u63a5\u53d7\u65b9\u5c31\u53ef\u4ee5\u5229\u7528\u8fd9\u4e9b\u4fe1\u606f\u5bf9IP\u6570\u636e\u8fdb\u884c\u91cd\u65b0\u7ec4\u7ec7\uff08\u5c31\u7b97\u662f\u540e\u9762\u7684\u5206\u7247\u6bd4\u524d\u9762\u7684\u5206\u7247\u5148\u5230\uff0c\u8fd9\u4e9b\u4fe1\u606f\u4e5f\u662f\u8db3\u591f\u4e86\uff09\u3002
\n\u56e0\u4e3a\u5206\u7247\u6280\u672f\u5728\u7f51\u7edc\u4e0a\u88ab\u7ecf\u5e38\u7684\u4f7f\u7528\uff0c\u6240\u4ee5\u4f2a\u9020IP\u5206\u7247\u5305\u8fdb\u884c\u6d41\u6c13\u653b\u51fb\u7684\u8f6f\u4ef6\u548c\u4eba\u4e5f\u5c31\u5c42\u51fa\u4e0d\u7a77\u3002
\n\u53ef\u4ee5\u7528Trancdroute\u7a0b\u5e8f\u6765\u8fdb\u884c\u7b80\u5355\u7684MTU\u4fa6\u6d4b\u3002<\/p>\n
\u8fd9\u662f\u4e0d\u5e38\u88ab\u4eba\u6ce8\u610f\u5230\u7684\u4e00\u4e2a\u7ec6\u8282\uff0c\u8fd9\u662f\u9488\u5bf9\u4e00\u4e9b\u7cfb\u7edf\u5730\u5b9e\u73b0\u6765\u8bf4\u7684\u3002\u5f53ARP\u7f13\u5b58\u8fd8\u662f\u7a7a\u7684\u65f6\u5019\u3002UDP\u5728\u88ab\u53d1\u9001\u4e4b\u524d\u4e00\u5b9a\u8981\u53d1\u9001\u4e00\u4e2aARP\u8bf7\u6c42\u6765\u83b7\u5f97\u76ee\u7684\u4e3b\u673a\u7684MAC\u5730\u5740\uff0c\u5982\u679c\u8fd9\u4e2aUDP\u7684\u6570\u636e\u5305\u8db3\u591f\u5927\uff0c\u5927\u5230IP\u5c42\u4e00\u5b9a\u8981\u5bf9\u5176\u8fdb\u884c\u5206\u7247\u7684\u65f6\u5019\uff0c\u60f3\u8c61\u4e2d\uff0c\u8be5UDP\u6570\u636e\u5305\u7684\u7b2c\u4e00\u4e2a\u5206\u7247\u4f1a\u53d1\u51fa\u4e00\u4e2aARP\u67e5\u8be2\u8bf7\u6c42\uff0c\u6240\u6709\u7684\u5206\u7247\u90fd\u8f89\u7b49\u5230\u8fd9\u4e2a\u67e5\u8be2\u5b8c\u6210\u4ee5\u540e\u518d\u53d1\u9001\u3002\u4e8b\u5b9e\u4e0a\u662f\u8fd9\u6837\u5417\uff1f
\n\u7ed3\u679c\u662f\uff0c\u67d0\u4e9b\u7cfb\u7edf\u4f1a\u8ba9\u6bcf\u4e00\u4e2a\u5206\u7247\u90fd\u53d1\u9001\u4e00\u4e2aARP\u67e5\u8be2\uff0c\u6240\u6709\u7684\u5206\u7247\u90fd\u5728\u7b49\u5f85\uff0c\u4f46\u662f\u63a5\u53d7\u5230\u7b2c\u4e00\u4e2a\u56de\u5e94\u7684\u65f6\u5019\uff0c\u4e3b\u673a\u5374\u53ea\u53d1\u9001\u4e86\u6700\u540e\u4e00\u4e2a\u6570\u636e\u7247\u800c\u629b\u5f03\u4e86\u5176\u4ed6\uff0c\u8fd9\u5b9e\u5728\u662f\u8ba9\u4eba\u532a\u5937\u6240\u601d\u3002\u8fd9\u6837\uff0c\u56e0\u4e3a\u5206\u7247\u7684\u6570\u636e\u4e0d\u80fd\u88ab\u53ca\u65f6\u7ec4\u88c5\uff0c\u63a5\u53d7\u4e3b\u673a\u5c06\u4f1a\u5728\u4e00\u6bb5\u65f6\u95f4\u5185\u5c06\u6c38\u8fdc\u65e0\u6cd5\u7ec4\u88c5\u7684IP\u6570\u636e\u5305\u629b\u5f03\uff0c\u5e76\u4e14\u53d1\u9001\u7ec4\u88c5\u8d85\u65f6\u7684ICMP\u62a5\u6587\uff08\u5176\u5b9e\u5f88\u591a\u7cfb\u7edf\u4e0d\u4ea7\u751f\u8fd9\u4e2a\u5dee\u9519\uff09\uff0c\u4ee5\u4fdd\u8bc1\u63a5\u53d7\u4e3b\u673a\u81ea\u5df1\u7684\u63a5\u6536\u7aef\u7f13\u5b58\u4e0d\u88ab\u90a3\u4e9b\u6c38\u8fdc\u5f97\u4e0d\u5230\u7ec4\u88c5\u7684\u5206\u7247\u5145\u6ee1\u3002<\/p>\n
\u5f53\u76ee\u6807\u4e3b\u673a\u7684\u5904\u7406\u901f\u5ea6\u8d76\u4e0d\u4e0a\u6570\u636e\u63a5\u6536\u7684\u901f\u5ea6\uff0c\u56e0\u4e3a\u63a5\u53d7\u4e3b\u673a\u7684IP\u5c42\u7f13\u5b58\u4f1a\u88ab\u5360\u6ee1\uff0c\u6240\u4ee5\u4e3b\u673a\u5c31\u4f1a\u53d1\u51fa\u4e00\u4e2a\u201c\u6211\u53d7\u4e0d\u4e86\u201d\u7684\u4e00\u4e2aICMP\u62a5\u6587\u3002<\/p>\n
UDP\u534f\u8bae\u7684\u67d0\u4e9b\u7279\u6027\u5c06\u4f1a\u5f71\u54cd\u6211\u4eec\u7684\u670d\u52a1\u5668\u7a0b\u5e8f\u8bbe\u8ba1\uff0c\u5927\u81f4\u603b\u7ed3\u5982\u4e0b\uff1a
\n1. \u5173\u4e8e\u5ba2\u6237IP\u548c\u5730\u5740\uff1a\u670d\u52a1\u5668\u5fc5\u987b\u6709\u6839\u636e\u5ba2\u6237IP\u5730\u5740\u548c\u7aef\u53e3\u53f7\u5224\u65ad\u6570\u636e\u5305\u662f\u5426\u5408\u6cd5\u7684\u80fd\u529b\uff08\u8fd9\u4f3c\u4e4e\u8981\u6c42\u6bcf\u4e00\u4e2a\u670d\u52a1\u5668\u90fd\u8981\u5177\u5907\uff09
\n2. \u5173\u4e8e\u76ee\u7684\u5730\u5740\uff1a\u670d\u52a1\u5668\u5fc5\u987b\u8981\u6709\u8fc7\u6ee4\u5e7f\u64ad\u5730\u5740\u7684\u80fd\u529b\u3002
\n3. \u5173\u4e8e\u6570\u636e\u8f93\u5165\uff1a\u901a\u5e38\u670d\u52a1\u5668\u7cfb\u7edf\u7684\u6bcf\u4e00\u4e2a\u7aef\u53e3\u53f7\u90fd\u4f1a\u548c\u4e00\u5757\u8f93\u5165\u7f13\u51b2\u533a\u5bf9\u5e94\uff0c\u8fdb\u6765\u7684\u8f93\u5165\u6839\u636e\u5148\u6765\u540e\u5230\u7684\u539f\u5219\u7b49\u5f85\u670d\u52a1\u5668\u7684\u5904\u7406\uff0c\u6240\u4ee5\u96be\u514d\u4f1a\u51fa\u73b0\u7f13\u51b2\u533a\u6ea2\u51fa\u7684\u95ee\u9898\uff0c\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0cUDP\u6570\u636e\u5305\u53ef\u80fd\u4f1a\u88ab\u4e22\u5f03\uff0c\u800c\u5e94\u7528\u670d\u52a1\u5668\u7a0b\u5e8f\u672c\u8eab\u5e76\u4e0d\u77e5\u9053\u8fd9\u4e2a\u95ee\u9898\u3002
\n4. \u670d\u52a1\u5668\u5e94\u8be5\u9650\u5236\u672c\u5730IP\u5730\u5740\uff0c\u5c31\u662f\u8bf4\u5b83\u5e94\u8be5\u53ef\u4ee5\u628a\u81ea\u5df1\u7ed1\u5b9a\u5230\u67d0\u4e00\u4e2a\u7f51\u7edc\u63a5\u53e3\u7684\u67d0\u4e00\u4e2a\u7aef\u53e3\u4e0a\u3002<\/p>\n
\n\u539f\u6587\u6765\u81ea\uff1ahttp:\/\/www.cnblogs.com\/fengzanfeng\/articles\/1339347.html<\/a><\/p>\n