{"id":120655,"date":"2026-10-31T23:48:45","date_gmt":"2026-10-31T15:48:45","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/120655.html"},"modified":"2026-10-31T23:48:45","modified_gmt":"2026-10-31T15:48:45","slug":"%e3%80%90%e8%ae%a1%e7%ae%97%e6%9c%ba%e7%bd%91%e7%bb%9c%e3%80%91%e7%ac%ac-3-%e7%af%87%ef%bc%9amac-%e5%9c%b0%e5%9d%80%e3%80%81ip-%e5%9c%b0%e5%9d%80%e5%92%8c%e7%ab%af%e5%8f%a3%e6%9c%89%e4%bb%80%e4%b9%88","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/120655.html","title":{"rendered":"\u3010\u8ba1\u7b97\u673a\u7f51\u7edc\u3011\u7b2c 3 \u7bc7\uff1aMAC \u5730\u5740\u3001IP \u5730\u5740\u548c\u7aef\u53e3\u6709\u4ec0\u4e48\u533a\u522b\uff1f\u4e00\u6b21\u8bb2\u6e05\u695a"},"content":{"rendered":"<p>\u7cfb\u5217&#xff1a; \u4ece 0 \u5f00\u59cb\u5b66\u4e60\u8ba1\u7b97\u673a\u7f51\u7edc \u9002\u5408\u8bfb\u8005&#xff1a; \u8ba1\u7b97\u673a\u4e13\u4e1a\u5b66\u751f\u3001\u7f51\u7edc\u57fa\u7840\u8584\u5f31\u7684\u5f00\u53d1\u8005\u3001Java \u540e\u7aef\u5b66\u4e60\u8005 \u672c\u6587\u5173\u952e\u8bcd&#xff1a; MAC \u5730\u5740\u3001IP \u5730\u5740\u3001\u7aef\u53e3\u53f7\u3001TCP \u8fde\u63a5\u3001Java \u540e\u7aef<\/p>\n<h3>\u4e00\u3001\u5f15\u8a00&#xff1a;\u8bbf\u95ee\u4e00\u4e2a\u63a5\u53e3&#xff0c;\u4e3a\u4ec0\u4e48\u4f1a\u51fa\u73b0\u8fd9\u4e48\u591a\u5730\u5740&#xff1f;<\/h3>\n<p>\u5728 Java \u540e\u7aef\u5f00\u53d1\u4e2d&#xff0c;\u6211\u4eec\u7ecf\u5e38\u8bbf\u95ee\u8fd9\u6837\u7684\u5730\u5740&#xff1a;<\/p>\n<p>http:\/\/192.168.1.20:8080\/api\/hello<\/p>\n<p>\u8fd9\u91cc\u80fd\u770b\u5230 IP \u5730\u5740\u548c\u7aef\u53e3\u53f7\u3002\u4e0e\u6b64\u540c\u65f6&#xff0c;\u7535\u8111\u7f51\u5361\u8fd8\u6709 MAC \u5730\u5740\u3002\u5b83\u4eec\u90fd\u50cf\u662f\u5728\u201c\u6807\u8bc6\u67d0\u4e2a\u4e1c\u897f\u201d&#xff0c;\u4f46\u4f5c\u7528\u5e76\u4e0d\u76f8\u540c\u3002<\/p>\n<p>\u5982\u679c\u628a MAC \u5730\u5740\u3001IP \u5730\u5740\u548c\u7aef\u53e3\u6df7\u4e3a\u4e00\u8c08&#xff0c;\u5c31\u5f88\u96be\u7406\u89e3&#xff1a;\u5ba2\u6237\u7aef\u8bbf\u95ee\u8fdc\u7a0b\u670d\u52a1\u5668\u65f6&#xff0c;\u7f51\u7edc\u7a76\u7adf\u6839\u636e\u4ec0\u4e48\u628a\u6570\u636e\u9001\u5230\u6b63\u786e\u7684\u4f4d\u7f6e&#xff1f;<\/p>\n<p>\u672c\u6587\u4f1a\u7528\u4e00\u4e2a\u8bf7\u6c42\u573a\u666f\u89e3\u91ca\u4e09\u8005\u7684\u5206\u5de5&#xff0c;\u5e76\u8bf4\u660e\u4e3a\u4ec0\u4e48\u8bbf\u95ee\u8fdc\u7a0b\u670d\u52a1\u5668\u65f6&#xff0c;\u5ba2\u6237\u7aef\u53d1\u51fa\u7684\u7b2c\u4e00\u5e27\u901a\u5e38\u5e76\u4e0d\u4f1a\u628a\u8fdc\u7aef\u670d\u52a1\u5668\u7684 MAC \u5730\u5740\u4f5c\u4e3a\u76ee\u7684\u5730\u5740\u3002<\/p>\n<h3>\u4e8c\u3001\u5148\u8bb0\u4f4f\u4e09\u8005\u7684\u5206\u5de5<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261031154843-6ae60ddbaf278.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<table>\n<tr>\u540d\u79f0\u4e3b\u8981\u4f5c\u7528\u53ef\u4ee5\u5148\u600e\u4e48\u7406\u89e3<\/tr>\n<tbody>\n<tr>\n<td>MAC \u5730\u5740<\/td>\n<td>\u94fe\u8def\u5c42\u5e27\u5728\u5f53\u524d\u94fe\u8def\u4e0a\u7684\u4ea4\u4ed8<\/td>\n<td>\u5f53\u524d\u8fd9\u4e00\u8df3\u628a\u5e27\u4ea4\u7ed9\u8c01<\/td>\n<\/tr>\n<tr>\n<td>IP \u5730\u5740<\/td>\n<td>\u7f51\u7edc\u5c42\u5bfb\u5740\u548c\u8def\u7531\u8f6c\u53d1<\/td>\n<td>\u6570\u636e\u6700\u7ec8\u8981\u53bb\u54ea\u4e2a\u7f51\u7edc\u5730\u5740<\/td>\n<\/tr>\n<tr>\n<td>\u7aef\u53e3\u53f7<\/td>\n<td>\u533a\u5206\u4f20\u8f93\u5c42\u901a\u4fe1\u7aef\u70b9<\/td>\n<td>\u6570\u636e\u4ea4\u7ed9\u54ea\u4e2a\u670d\u52a1\u6216\u901a\u4fe1\u7aef\u70b9<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u5b83\u4eec\u4e0d\u662f\u4e09\u79cd\u4e92\u76f8\u7ade\u4e89\u7684\u5730\u5740&#xff0c;\u800c\u662f\u5728\u4e0d\u540c\u5c42\u6b21\u534f\u540c\u5de5\u4f5c\u3002<\/p>\n<h3>\u4e09\u3001MAC \u5730\u5740&#xff1a;\u5f53\u524d\u94fe\u8def\u4e0a\u7684\u5e27\u4ea4\u7ed9\u8c01&#xff1f;<\/h3>\n<p>MAC \u5730\u5740\u5e38\u89c1\u4e8e\u4ee5\u592a\u7f51\u548c Wi-Fi \u7b49\u94fe\u8def\u6280\u672f\u4e2d\u3002\u4ee5\u592a\u7f51\u5e27\u9996\u90e8\u5305\u542b\u6e90 MAC \u5730\u5740\u548c\u76ee\u7684 MAC \u5730\u5740&#xff0c;\u5e2e\u52a9\u94fe\u8def\u4e0a\u7684\u8bbe\u5907\u5904\u7406\u5e27\u3002<\/p>\n<p>\u4f8b\u5982&#xff0c;\u5728\u4e00\u4e2a\u5c40\u57df\u7f51\u91cc&#xff1a;<\/p>\n<p>\u5ba2\u6237\u7aef MAC&#xff1a;AA-AA-AA-AA-AA-AA<br \/>\n\u7f51\u5173 MAC&#xff1a;  BB-BB-BB-BB-BB-BB<\/p>\n<p>\u5f53\u5ba2\u6237\u7aef\u8981\u628a IP \u5305\u4ea4\u7ed9\u540c\u4e00\u5c40\u57df\u7f51\u4e2d\u7684\u9ed8\u8ba4\u7f51\u5173\u65f6&#xff0c;\u4ee5\u592a\u7f51\u5e27\u53ef\u4ee5\u4f7f\u7528\u5ba2\u6237\u7aef MAC \u4f5c\u4e3a\u6e90 MAC\u3001\u7f51\u5173 MAC \u4f5c\u4e3a\u76ee\u7684 MAC\u3002<\/p>\n<h4>3.1 MAC \u5730\u5740\u662f\u4e0d\u662f\u8bbe\u5907\u6c38\u8fdc\u4e0d\u53d8\u7684\u8eab\u4efd\u8bc1&#xff1f;<\/h4>\n<p>\u4e0d\u662f\u3002MAC \u5730\u5740\u901a\u5e38\u7531\u7f51\u7edc\u63a5\u53e3\u4f7f\u7528&#xff0c;\u4f46\u5b83\u5e76\u4e0d\u662f\u53ef\u9760\u7684\u5168\u7403\u8bbe\u5907\u8eab\u4efd\u8bc1&#xff1a;<\/p>\n<ul>\n<li>\u7f51\u7edc\u63a5\u53e3\u53ef\u80fd\u6709\u51fa\u5382\u5206\u914d\u7684\u5730\u5740&#xff1b;<\/li>\n<li>\u8f6f\u4ef6\u53ef\u4ee5\u914d\u7f6e\u6216\u4f2a\u88c5 MAC \u5730\u5740&#xff1b;<\/li>\n<li>Wi-Fi \u8bbe\u5907\u53ef\u80fd\u4f7f\u7528\u968f\u673a\u5316 MAC \u5730\u5740\u6765\u51cf\u5c11\u8ddf\u8e2a&#xff1b;<\/li>\n<li>\u865a\u62df\u673a\u3001\u5bb9\u5668\u7f51\u7edc\u548c\u865a\u62df\u7f51\u5361\u4e5f\u53ef\u80fd\u6709\u81ea\u5df1\u7684 MAC \u5730\u5740\u3002<\/li>\n<\/ul>\n<p>\u56e0\u6b64&#xff0c;\u66f4\u51c6\u786e\u7684\u7406\u89e3\u662f&#xff1a;MAC \u5730\u5740\u7528\u4e8e\u7279\u5b9a\u94fe\u8def\u6280\u672f\u4e2d\u7684\u5e27\u4ea4\u4ed8&#xff0c;\u4e0d\u9002\u5408\u76f4\u63a5\u5f53\u4f5c\u67d0\u53f0\u7269\u7406\u8bbe\u5907\u6c38\u4e45\u4e0d\u53d8\u7684\u8eab\u4efd\u3002<\/p>\n<h4>3.2 MAC \u5730\u5740\u80fd\u4e0d\u80fd\u76f4\u63a5\u628a\u6570\u636e\u9001\u5230\u4efb\u4f55\u5730\u65b9&#xff1f;<\/h4>\n<p>\u4e0d\u80fd\u3002MAC \u5730\u5740\u901a\u5e38\u53ea\u5728\u5f53\u524d\u94fe\u8def\u4ea4\u4ed8\u8fc7\u7a0b\u4e2d\u8d77\u4f5c\u7528\u3002\u8de8\u8d8a\u8def\u7531\u5668\u65f6&#xff0c;\u8def\u7531\u5668\u4f1a\u5904\u7406\u6536\u5230\u7684\u94fe\u8def\u5c42\u5e27&#xff0c;\u5e76\u4e3a\u4e0b\u4e00\u6761\u94fe\u8def\u91cd\u65b0\u5c01\u88c5\u6570\u636e\u3002<\/p>\n<p>\u8fd9\u4e5f\u662f\u4e3a\u4ec0\u4e48\u8fdc\u7a0b\u670d\u52a1\u5668\u7684 MAC \u5730\u5740\u901a\u5e38\u4e0d\u4f1a\u51fa\u73b0\u5728\u5ba2\u6237\u7aef\u53d1\u51fa\u7684\u7b2c\u4e00\u8df3\u4ee5\u592a\u7f51\u5e27\u4e2d\u3002<\/p>\n<h3>\u56db\u3001IP \u5730\u5740&#xff1a;\u6570\u636e\u8981\u53bb\u54ea\u4e2a\u7f51\u7edc\u4f4d\u7f6e&#xff1f;<\/h3>\n<p>IP \u5730\u5740\u7528\u4e8e\u7f51\u7edc\u5c42\u5bfb\u5740\u548c\u8def\u7531\u8f6c\u53d1\u3002\u5e38\u89c1\u7248\u672c\u6709 IPv4 \u548c IPv6\u3002<\/p>\n<p>\u4f8b\u5982&#xff1a;<\/p>\n<p>\u5ba2\u6237\u7aef IP&#xff1a;192.168.1.10<br \/>\n\u670d\u52a1\u7aef IP&#xff1a;203.0.113.20<\/p>\n<p>\u5f53\u5ba2\u6237\u7aef\u8bbf\u95ee\u8fdc\u7a0b\u670d\u52a1\u65f6&#xff0c;IP \u5c42\u4f1a\u6839\u636e\u76ee\u6807 IP \u5730\u5740\u8fdb\u884c\u5bfb\u5740\u3002\u8def\u7531\u5668\u67e5\u770b\u8def\u7531\u4fe1\u606f&#xff0c;\u51b3\u5b9a\u5e94\u8be5\u628a IP \u5305\u8f6c\u53d1\u5230\u54ea\u91cc\u3002<\/p>\n<p>\u9700\u8981\u6ce8\u610f&#xff1a;IP \u5730\u5740\u4e0d\u4e00\u5b9a\u662f\u8bbe\u5907\u6c38\u4e45\u56fa\u5b9a\u7684\u3002\u5b83\u53ef\u80fd\u7531 DHCP \u5206\u914d\u3001\u7531\u7ba1\u7406\u5458\u914d\u7f6e&#xff0c;\u4e5f\u53ef\u80fd\u56e0\u7f51\u7edc\u5207\u6362\u800c\u6539\u53d8\u3002\u7ecf\u8fc7 NAT&#xff08;\u7f51\u7edc\u5730\u5740\u8f6c\u6362&#xff09;\u8bbe\u5907\u65f6&#xff0c;IP \u5730\u5740\u6216\u7aef\u53e3\u4e5f\u53ef\u80fd\u88ab\u6539\u5199\u3002<\/p>\n<h4>4.1 \u4e3a\u4ec0\u4e48\u8fd8\u9700\u8981 MAC \u5730\u5740&#xff1f;<\/h4>\n<p>\u56e0\u4e3a IP \u5730\u5740\u548c MAC \u5730\u5740\u89e3\u51b3\u7684\u95ee\u9898\u4e0d\u540c\u3002<\/p>\n<ul>\n<li>IP \u5730\u5740\u652f\u6301\u8de8\u7f51\u7edc\u5bfb\u5740\u548c\u8def\u7531&#xff1b;<\/li>\n<li>MAC \u5730\u5740\u5e2e\u52a9\u5f53\u524d\u94fe\u8def\u628a\u5e27\u4ea4\u7ed9\u4e0b\u4e00\u8df3\u3002<\/li>\n<\/ul>\n<p>\u53ef\u4ee5\u628a\u8de8\u7f51\u6bb5\u53d1\u9001\u7406\u89e3\u4e3a&#xff1a;IP \u5305\u643a\u5e26\u7740\u7aef\u5230\u7aef\u901a\u4fe1\u6240\u9700\u7684\u7f51\u7edc\u5c42\u5730\u5740\u4fe1\u606f&#xff0c;\u800c\u6bcf\u4e00\u8df3\u7684\u94fe\u8def\u5c42\u5e27\u8d1f\u8d23\u628a\u5b83\u9001\u5230\u5f53\u524d\u94fe\u8def\u7684\u4e0b\u4e00\u7ad9\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261031154844-6ae60ddc2d494.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u5047\u8bbe\u5ba2\u6237\u7aef 192.168.1.10 \u8bbf\u95ee\u8fdc\u7aef\u670d\u52a1 203.0.113.20&#xff1a;<\/p>\n<li>\u5ba2\u6237\u7aef\u5224\u65ad\u76ee\u6807\u4e0d\u5728\u672c\u5730\u5b50\u7f51&#xff0c;\u9700\u8981\u4ea4\u7ed9\u9ed8\u8ba4\u7f51\u5173\u3002<\/li>\n<li>\u5ba2\u6237\u7aef\u901a\u8fc7 ARP \u7b49\u673a\u5236\u89e3\u6790\u672c\u5730\u7f51\u5173\u7684 IPv4 \u5730\u5740\u5bf9\u5e94\u7684 MAC \u5730\u5740&#xff08;\u5177\u4f53\u8fc7\u7a0b\u53d6\u51b3\u4e8e\u7f51\u7edc\u73af\u5883&#xff09;\u3002<\/li>\n<li>\u7b2c\u4e00\u8df3\u4ee5\u592a\u7f51\u5e27\u7684\u76ee\u7684 MAC \u901a\u5e38\u662f\u7f51\u5173\u7684 MAC&#xff0c;\u800c IP \u5305\u7684\u76ee\u7684 IP \u4ecd\u662f\u8fdc\u7aef\u670d\u52a1\u5668\u7684 IP\u3002<\/li>\n<li>\u8def\u7531\u5668\u6839\u636e\u8def\u7531\u4fe1\u606f\u8f6c\u53d1 IP \u5305&#xff0c;\u5e76\u4f7f\u7528\u51fa\u53e3\u94fe\u8def\u5bf9\u5e94\u7684\u94fe\u8def\u5c42\u683c\u5f0f\u91cd\u65b0\u5c01\u88c5\u3002<\/li>\n<li>\u5728\u6700\u7ec8\u94fe\u8def\u4e0a&#xff0c;\u5e27\u7684\u76ee\u7684 MAC \u624d\u4f1a\u6307\u5411\u76ee\u6807\u670d\u52a1\u5668\u6240\u5728\u94fe\u8def\u4e0a\u7684\u4e0b\u4e00\u8df3\u63a5\u53e3&#xff1b;\u5728\u76f4\u8fde\u4ee5\u592a\u7f51\u573a\u666f\u4e2d\u901a\u5e38\u662f\u670d\u52a1\u5668\u7f51\u5361\u7684 MAC\u3002<\/li>\n<p>\u5728\u6ca1\u6709 NAT \u7684\u7b80\u5316\u573a\u666f\u4e2d&#xff0c;\u6e90 IP \u548c\u76ee\u7684 IP \u901a\u5e38\u4fdd\u6301\u4e0d\u53d8&#xff1b;\u4f46 IPv4 TTL \u4f1a\u5728\u8def\u7531\u8f6c\u53d1\u65f6\u9012\u51cf\u3002\u771f\u5b9e\u7f51\u7edc\u53ef\u80fd\u8fd8\u6d89\u53ca\u96a7\u9053\u3001NAT\u3001\u9632\u706b\u5899\u548c\u5176\u4ed6\u5904\u7406\u3002<\/p>\n<h3>\u4e94\u3001\u7aef\u53e3\u53f7&#xff1a;\u4e00\u53f0\u673a\u5668\u8fd0\u884c\u591a\u4e2a\u670d\u52a1&#xff0c;\u6570\u636e\u4ea4\u7ed9\u8c01&#xff1f;<\/h3>\n<p>IP \u5730\u5740\u53ef\u4ee5\u628a\u6570\u636e\u9001\u5230\u76ee\u6807\u4e3b\u673a&#xff0c;\u4f46\u4e00\u53f0\u4e3b\u673a\u53ef\u80fd\u540c\u65f6\u8fd0\u884c\u591a\u4e2a\u7f51\u7edc\u670d\u52a1\u3002\u4f20\u8f93\u5c42\u9700\u8981\u8fdb\u4e00\u6b65\u533a\u5206\u901a\u4fe1\u7aef\u70b9&#xff0c;TCP \u548c UDP \u90fd\u4f7f\u7528\u7aef\u53e3\u53f7\u3002<\/p>\n<p>\u4f8b\u5982&#xff0c;\u4e00\u53f0\u670d\u52a1\u5668\u53ef\u80fd\u63d0\u4f9b&#xff1a;<\/p>\n<table>\n<tr>\u670d\u52a1\u793a\u4f8b\u7aef\u53e3\u5e38\u89c1\u7528\u9014<\/tr>\n<tbody>\n<tr>\n<td>HTTP \u670d\u52a1<\/td>\n<td align=\"right\">80<\/td>\n<td>\u5e38\u89c1 HTTP \u9ed8\u8ba4\u7aef\u53e3<\/td>\n<\/tr>\n<tr>\n<td>HTTPS \u670d\u52a1<\/td>\n<td align=\"right\">443<\/td>\n<td>\u5e38\u89c1 HTTPS \u9ed8\u8ba4\u7aef\u53e3<\/td>\n<\/tr>\n<tr>\n<td>\u81ea\u5b9a\u4e49 Spring Boot \u670d\u52a1<\/td>\n<td align=\"right\">8080<\/td>\n<td>\u5f00\u53d1\u6216\u90e8\u7f72\u4e2d\u5e38\u89c1\u7684\u5e94\u7528\u7aef\u53e3<\/td>\n<\/tr>\n<tr>\n<td>MySQL \u670d\u52a1<\/td>\n<td align=\"right\">3306<\/td>\n<td>\u5e38\u89c1\u9ed8\u8ba4\u7aef\u53e3<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u8fd9\u4e9b\u53ea\u662f\u5e38\u89c1\u7ea6\u5b9a&#xff0c;\u670d\u52a1\u53ef\u4ee5\u914d\u7f6e\u4e3a\u76d1\u542c\u5176\u4ed6\u7aef\u53e3\u3002\u7aef\u53e3\u53f7\u8303\u56f4\u4e3a 0&#xff5e;65535&#xff0c;\u5176\u4e2d 0 \u901a\u5e38\u4fdd\u7559\u4f5c\u7279\u6b8a\u7528\u9014&#xff1b;\u5b9e\u9645\u5e94\u7528\u4e00\u822c\u4e0d\u4f1a\u628a 0 \u5f53\u4f5c\u666e\u901a\u670d\u52a1\u7aef\u53e3\u6765\u76d1\u542c\u3002<\/p>\n<h4>5.1 \u6e90\u7aef\u53e3\u548c\u76ee\u7684\u7aef\u53e3<\/h4>\n<p>\u5f53\u5ba2\u6237\u7aef\u5411\u670d\u52a1\u5668\u53d1\u8d77 TCP \u8fde\u63a5\u65f6&#xff0c;\u901a\u4fe1\u4e24\u7aef\u90fd\u6709\u7aef\u53e3\u4fe1\u606f&#xff1a;<\/p>\n<p>\u5ba2\u6237\u7aef&#xff1a;192.168.1.10:53124<br \/>\n\u670d\u52a1\u7aef&#xff1a;203.0.113.20:8080<\/p>\n<p>\u8fd9\u91cc&#xff1a;<\/p>\n<ul>\n<li>53124 \u662f\u793a\u4f8b\u5ba2\u6237\u7aef\u6e90\u7aef\u53e3&#xff0c;\u901a\u5e38\u7531\u64cd\u4f5c\u7cfb\u7edf\u4ece\u53ef\u7528\u7684\u4e34\u65f6\u7aef\u53e3\u8303\u56f4\u4e2d\u9009\u62e9&#xff1b;<\/li>\n<li>8080 \u662f\u793a\u4f8b\u670d\u52a1\u7aef\u53e3&#xff0c;\u5e94\u7528\u670d\u52a1\u53ef\u4ee5\u76d1\u542c\u5b83&#xff1b;<\/li>\n<li>\u8fd9\u4e9b\u7aef\u53e3\u503c\u4ec5\u7528\u4e8e\u8bf4\u660e&#xff0c;\u4e0d\u4ee3\u8868\u67d0\u6b21\u771f\u5b9e\u6293\u5305\u7ed3\u679c\u3002<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261031154844-6ae60ddc7fc30.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u7aef\u53e3\u53f7\u4e0d\u662f\u67d0\u4e2a\u8fdb\u7a0b\u6c38\u4e45\u4e0d\u53d8\u7684\u8eab\u4efd\u8bc1\u3002\u7aef\u53e3\u7684\u5206\u914d\u548c\u4f7f\u7528\u53d7\u64cd\u4f5c\u7cfb\u7edf\u3001\u4f20\u8f93\u534f\u8bae\u53ca\u5e94\u7528\u884c\u4e3a\u5f71\u54cd&#xff1b;TCP \u548c UDP \u7684\u7aef\u53e3\u7a7a\u95f4\u4e5f\u9700\u8981\u7ed3\u5408\u5404\u81ea\u534f\u8bae\u7406\u89e3\u3002<\/p>\n<h4>5.2 \u4e3a\u4ec0\u4e48 TCP \u8fde\u63a5\u4e0d\u53ea\u770b\u7aef\u53e3\u53f7&#xff1f;<\/h4>\n<p>\u540c\u4e00\u53f0\u670d\u52a1\u5668\u7684 TCP 8080 \u7aef\u53e3\u53ef\u4ee5\u540c\u65f6\u5904\u7406\u591a\u4e2a\u5ba2\u6237\u7aef\u8fde\u63a5\u3002\u64cd\u4f5c\u7cfb\u7edf\u548c TCP \u534f\u8bae\u6808\u4f1a\u7ed3\u5408\u8fde\u63a5\u4e24\u7aef\u7684\u5730\u5740\u548c\u7aef\u53e3\u7b49\u4fe1\u606f\u533a\u5206\u8fde\u63a5\u3002<\/p>\n<p>\u4e00\u4e2a TCP \u8fde\u63a5\u901a\u5e38\u53ef\u7528\u4ee5\u4e0b\u56db\u5143\u7ec4\u63cf\u8ff0&#xff1a;<\/p>\n<p>\u6e90 IP &#043; \u6e90\u7aef\u53e3 &#043; \u76ee\u7684 IP &#043; \u76ee\u7684\u7aef\u53e3<\/p>\n<p>\u5982\u679c\u628a\u4f20\u8f93\u5c42\u534f\u8bae\u4e5f\u7eb3\u5165\u533a\u5206&#xff0c;\u5219\u5e38\u8bf4\u7684\u4e94\u5143\u7ec4\u662f&#xff1a;<\/p>\n<p>\u4f20\u8f93\u5c42\u534f\u8bae &#043; \u6e90 IP &#043; \u6e90\u7aef\u53e3 &#043; \u76ee\u7684 IP &#043; \u76ee\u7684\u7aef\u53e3<\/p>\n<p>\u8fd9\u6709\u52a9\u4e8e\u7406\u89e3\u4e3a\u4ec0\u4e48\u591a\u4e2a\u5ba2\u6237\u7aef\u53ef\u4ee5\u540c\u65f6\u8bbf\u95ee\u540c\u4e00\u4e2a\u670d\u52a1\u7aef\u53e3&#xff0c;\u800c\u4e0d\u4f1a\u56e0\u4e3a\u76ee\u7684\u7aef\u53e3\u76f8\u540c\u5c31\u88ab\u89c6\u4e3a\u540c\u4e00\u6761 TCP \u8fde\u63a5\u3002<\/p>\n<h3>\u516d\u3001\u628a\u4e09\u8005\u653e\u8fdb\u4e00\u6b21 Java HTTP \u8bf7\u6c42\u91cc<\/h3>\n<p>\u4e0b\u9762\u4f7f\u7528 Java 11 \u53ca\u4ee5\u4e0a\u7248\u672c\u7684 HttpClient \u8bbf\u95ee\u4e00\u4e2a HTTP\/1.1 \u670d\u52a1&#xff1a;<\/p>\n<p><span class=\"token keyword\">import<\/span> <span class=\"token import\"><span class=\"token namespace\">java<span class=\"token punctuation\">.<\/span>net<span class=\"token punctuation\">.<\/span><\/span><span class=\"token class-name\">URI<\/span><\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token keyword\">import<\/span> <span class=\"token import\"><span class=\"token namespace\">java<span class=\"token punctuation\">.<\/span>net<span class=\"token punctuation\">.<\/span>http<span class=\"token punctuation\">.<\/span><\/span><span class=\"token class-name\">HttpClient<\/span><\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token keyword\">import<\/span> <span class=\"token import\"><span class=\"token namespace\">java<span class=\"token punctuation\">.<\/span>net<span class=\"token punctuation\">.<\/span>http<span class=\"token punctuation\">.<\/span><\/span><span class=\"token class-name\">HttpRequest<\/span><\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token keyword\">import<\/span> <span class=\"token import\"><span class=\"token namespace\">java<span class=\"token punctuation\">.<\/span>net<span class=\"token punctuation\">.<\/span>http<span class=\"token punctuation\">.<\/span><\/span><span class=\"token class-name\">HttpResponse<\/span><\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token keyword\">public<\/span> <span class=\"token keyword\">class<\/span> <span class=\"token class-name\">PortDemo<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token keyword\">public<\/span> <span class=\"token keyword\">static<\/span> <span class=\"token keyword\">void<\/span> <span class=\"token function\">main<\/span><span class=\"token punctuation\">(<\/span><span class=\"token class-name\">String<\/span><span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">]<\/span> args<span class=\"token punctuation\">)<\/span> <span class=\"token keyword\">throws<\/span> <span class=\"token class-name\">Exception<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token class-name\">HttpClient<\/span> client <span class=\"token operator\">&#061;<\/span> <span class=\"token class-name\">HttpClient<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">newBuilder<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n                <span class=\"token punctuation\">.<\/span><span class=\"token function\">version<\/span><span class=\"token punctuation\">(<\/span><span class=\"token class-name\">HttpClient<span class=\"token punctuation\">.<\/span>Version<\/span><span class=\"token punctuation\">.<\/span><span class=\"token constant\">HTTP_1_1<\/span><span class=\"token punctuation\">)<\/span><br \/>\n                <span class=\"token punctuation\">.<\/span><span class=\"token function\">build<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>        <span class=\"token class-name\">HttpRequest<\/span> request <span class=\"token operator\">&#061;<\/span> <span class=\"token class-name\">HttpRequest<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">newBuilder<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n                <span class=\"token punctuation\">.<\/span><span class=\"token function\">uri<\/span><span class=\"token punctuation\">(<\/span><span class=\"token constant\">URI<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">create<\/span><span class=\"token punctuation\">(<\/span><br \/>\n                        <span class=\"token string\">&#034;http:\/\/127.0.0.1:8080\/api\/hello&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><br \/>\n                <span class=\"token punctuation\">.<\/span><span class=\"token function\">GET<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n                <span class=\"token punctuation\">.<\/span><span class=\"token function\">build<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>        <span class=\"token class-name\">HttpResponse<\/span><span class=\"token generics\"><span class=\"token punctuation\">&lt;<\/span><span class=\"token class-name\">String<\/span><span class=\"token punctuation\">&gt;<\/span><\/span> response <span class=\"token operator\">&#061;<\/span> client<span class=\"token punctuation\">.<\/span><span class=\"token function\">send<\/span><span class=\"token punctuation\">(<\/span><br \/>\n                request<span class=\"token punctuation\">,<\/span><br \/>\n                <span class=\"token class-name\">HttpResponse<span class=\"token punctuation\">.<\/span>BodyHandlers<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">ofString<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>        <span class=\"token class-name\">System<\/span><span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\u72b6\u6001\u7801&#xff1a;&#034;<\/span> <span class=\"token operator\">&#043;<\/span> response<span class=\"token punctuation\">.<\/span><span class=\"token function\">statusCode<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token class-name\">System<\/span><span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\u54cd\u5e94\u4f53&#xff1a;&#034;<\/span> <span class=\"token operator\">&#043;<\/span> response<span class=\"token punctuation\">.<\/span><span class=\"token function\">body<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<h4>\u8fd0\u884c\u524d\u63d0<\/h4>\n<ul>\n<li>JDK 11 \u6216\u66f4\u9ad8\u7248\u672c&#xff1b;<\/li>\n<li>\u672c\u673a\u5df2\u6709\u4e00\u4e2a\u53ef\u8bbf\u95ee\u7684 HTTP \u670d\u52a1\u76d1\u542c 127.0.0.1:8080&#xff1b;<\/li>\n<li>\u670d\u52a1\u7aef\u5b58\u5728 \/api\/hello \u8def\u5f84&#xff1b;<\/li>\n<li>\u793a\u4f8b\u4e2d\u7684\u5730\u5740\u53ea\u662f\u672c\u673a\u6d4b\u8bd5\u5730\u5740&#xff0c;\u4e0d\u4fdd\u8bc1\u4f60\u7684\u7535\u8111\u4e0a\u5df2\u6709\u5bf9\u5e94\u670d\u52a1\u3002<\/li>\n<\/ul>\n<p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u91cc&#xff1a;<\/p>\n<ul>\n<li>127.0.0.1 \u662f\u56de\u73af\u5730\u5740&#xff0c;\u8868\u793a\u672c\u673a&#xff1b;<\/li>\n<li>8080 \u662f URL \u4e2d\u660e\u786e\u6307\u5b9a\u7684\u76ee\u7684\u7aef\u53e3&#xff1b;<\/li>\n<li>\u5ba2\u6237\u7aef\u8fde\u63a5\u901a\u5e38\u8fd8\u4f1a\u4f7f\u7528\u4e00\u4e2a\u6e90\u7aef\u53e3&#xff1b;<\/li>\n<li>\u5bf9\u4e8e\u56de\u73af\u901a\u4fe1&#xff0c;\u5b9e\u9645\u94fe\u8def\u5904\u7406\u65b9\u5f0f\u4e0e\u901a\u8fc7\u7269\u7406\u7f51\u5361\u8bbf\u95ee\u8fdc\u7a0b\u4e3b\u673a\u4e0d\u540c&#xff0c;\u56e0\u6b64\u4e0d\u8981\u7528\u8fd9\u4e2a\u4f8b\u5b50\u6765\u63a8\u65ad\u8fdc\u7a0b\u901a\u4fe1\u7684 MAC \u5730\u5740\u53d8\u5316\u3002<\/li>\n<\/ul>\n<p>\u5982\u679c\u628a URL \u6539\u4e3a\u8fdc\u7a0b\u670d\u52a1\u5668\u5730\u5740&#xff0c;\u64cd\u4f5c\u7cfb\u7edf\u7f51\u7edc\u6808\u4f1a\u6839\u636e\u8def\u7531\u548c\u94fe\u8def\u60c5\u51b5\u5904\u7406 IP \u5305\u53ca\u94fe\u8def\u5c42\u5e27\u3002\u4e1a\u52a1\u4ee3\u7801\u4e00\u822c\u4e0d\u9700\u8981\u624b\u52a8\u586b\u5199 TCP \u9996\u90e8\u6216 MAC \u5730\u5740\u3002<\/p>\n<h3>\u4e03\u3001\u5e38\u89c1\u8bef\u533a<\/h3>\n<h4>\u8bef\u533a 1&#xff1a;IP \u5730\u5740\u5c31\u662f MAC \u5730\u5740<\/h4>\n<p>\u4e0d\u662f\u3002IP \u5730\u5740\u7528\u4e8e\u7f51\u7edc\u5c42\u5bfb\u5740\u548c\u8def\u7531&#xff1b;MAC \u5730\u5740\u7528\u4e8e\u5f53\u524d\u94fe\u8def\u4e0a\u7684\u5e27\u4ea4\u4ed8\u3002\u5b83\u4eec\u7684\u683c\u5f0f\u3001\u4f5c\u7528\u8303\u56f4\u548c\u5de5\u4f5c\u5c42\u6b21\u4e0d\u540c\u3002<\/p>\n<h4>\u8bef\u533a 2&#xff1a;\u53d1\u9001\u7ed9\u8fdc\u7a0b\u670d\u52a1\u5668\u65f6&#xff0c;\u76ee\u7684 MAC \u5c31\u662f\u8fdc\u7a0b\u670d\u52a1\u5668\u7684 MAC<\/h4>\n<p>\u901a\u5e38\u4e0d\u662f\u3002\u7b2c\u4e00\u8df3\u5e27\u7684\u76ee\u7684 MAC \u4e00\u822c\u662f\u9ed8\u8ba4\u7f51\u5173\u7684 MAC\u3002\u8def\u7531\u5668\u4f1a\u5728\u4e0b\u4e00\u6761\u94fe\u8def\u91cd\u65b0\u5c01\u88c5\u5e27\u3002<\/p>\n<h4>\u8bef\u533a 3&#xff1a;\u7aef\u53e3\u53f7\u53ef\u4ee5\u5355\u72ec\u5b9a\u4f4d\u5168\u7403\u552f\u4e00\u7684\u670d\u52a1<\/h4>\n<p>\u4e0d\u884c\u3002\u7aef\u53e3\u53f7\u53ea\u6709\u7ed3\u5408\u4e3b\u673a\u5730\u5740\u3001\u4f20\u8f93\u5c42\u534f\u8bae\u548c\u901a\u4fe1\u65b9\u5411\u7b49\u4e0a\u4e0b\u6587\u624d\u6709\u610f\u4e49\u3002\u4e0d\u540c\u4e3b\u673a\u53ef\u4ee5\u540c\u65f6\u4f7f\u7528 8080 \u7aef\u53e3\u3002<\/p>\n<h4>\u8bef\u533a 4&#xff1a;\u4e00\u4e2a\u7aef\u53e3\u53ea\u5bf9\u5e94\u4e00\u4e2a\u5ba2\u6237\u7aef<\/h4>\n<p>\u4e0d\u5bf9\u3002\u670d\u52a1\u5668\u540c\u4e00\u4e2a TCP \u76d1\u542c\u7aef\u53e3\u53ef\u4ee5\u63a5\u6536\u591a\u4e2a\u5ba2\u6237\u7aef\u8fde\u63a5&#xff0c;\u8fde\u63a5\u901a\u8fc7\u4e24\u7aef\u5730\u5740\u548c\u7aef\u53e3\u7b49\u4fe1\u606f\u533a\u5206\u3002<\/p>\n<h4>\u8bef\u533a 5&#xff1a;\u7aef\u53e3\u53f7\u4e00\u5b9a\u5bf9\u5e94\u4e00\u4e2a\u56fa\u5b9a\u8fdb\u7a0b<\/h4>\n<p>\u4e0d\u51c6\u786e\u3002\u7aef\u53e3\u7531\u64cd\u4f5c\u7cfb\u7edf\u548c\u5e94\u7528\u6309\u7f51\u7edc\u901a\u4fe1\u89c4\u5219\u4f7f\u7528&#xff1b;\u670d\u52a1\u53ef\u4ee5\u542f\u52a8\u3001\u505c\u6b62\u6216\u6539\u53d8\u76d1\u542c\u7aef\u53e3&#xff0c;\u5ba2\u6237\u7aef\u6e90\u7aef\u53e3\u4e5f\u5e38\u7531\u7cfb\u7edf\u52a8\u6001\u5206\u914d\u3002<\/p>\n<h3>\u516b\u3001\u672c\u7bc7\u603b\u7ed3<\/h3>\n<p>\u8bb0\u4f4f\u8fd9\u4e09\u53e5\u8bdd\u5373\u53ef&#xff1a;<\/p>\n<li>MAC \u5730\u5740&#xff1a; \u89e3\u51b3\u5f53\u524d\u94fe\u8def\u4e0a\u7684\u5e27\u4ea4\u4ed8\u95ee\u9898\u3002<\/li>\n<li>IP \u5730\u5740&#xff1a; \u89e3\u51b3\u7f51\u7edc\u5c42\u5bfb\u5740\u548c\u8de8\u7f51\u7edc\u8f6c\u53d1\u95ee\u9898\u3002<\/li>\n<li>\u7aef\u53e3\u53f7&#xff1a; \u5e2e\u52a9\u4f20\u8f93\u5c42\u533a\u5206\u901a\u4fe1\u7aef\u70b9\u548c\u670d\u52a1\u3002<\/li>\n<p>\u8bbf\u95ee\u8fdc\u7a0b Java \u670d\u52a1\u65f6&#xff0c;\u8fd9\u4e09\u8005\u4e0d\u662f\u4e92\u76f8\u66ff\u4ee3&#xff0c;\u800c\u662f\u5171\u540c\u5b8c\u6210\u901a\u4fe1\u3002IP \u5730\u5740\u544a\u8bc9\u7f51\u7edc\u5c42\u6570\u636e\u8981\u53bb\u54ea\u91cc&#xff0c;\u7aef\u53e3\u8ba9\u4f20\u8f93\u5c42\u77e5\u9053\u8981\u4ea4\u7ed9\u54ea\u4e2a\u901a\u4fe1\u7aef\u70b9&#xff0c;\u800c\u94fe\u8def\u5c42 MAC \u5730\u5740\u8d1f\u8d23\u5f53\u524d\u8fd9\u4e00\u8df3\u7684\u5e27\u4ea4\u4ed8\u3002<\/p>\n<p>\u4e0b\u4e00\u7bc7\u9884\u544a&#xff1a;\u300a\u3010\u8ba1\u7b97\u673a\u7f51\u7edc\u3011\u7b2c 4 \u7bc7&#xff1a;ARP\u3001DHCP\u3001\u5b50\u7f51\u63a9\u7801\u548c\u8def\u7531\u5230\u5e95\u5728\u505a\u4ec0\u4e48&#xff1f;\u300b\u3002\u6211\u4eec\u4f1a\u7ee7\u7eed\u6cbf\u7740\u201c\u5ba2\u6237\u7aef\u5982\u4f55\u627e\u5230\u5e76\u8bbf\u95ee\u670d\u52a1\u5668\u201d\u7684\u8def\u5f84&#xff0c;\u89e3\u91ca IP \u5730\u5740\u5982\u4f55\u914d\u7f6e\u3001\u7f51\u5173\u5982\u4f55\u9009\u62e9&#xff0c;\u4ee5\u53ca\u8bbe\u5907\u5982\u4f55\u77e5\u9053\u4e0b\u4e00\u8df3\u7684 MAC \u5730\u5740\u3002<\/p>\n<p>\u6211\u662f\u7a0b\u5e8f\u5458\u5927\u6d77,\u4e0b\u4e00\u671f\u89c1.<\/p>\n<h3>\u53c2\u8003\u8d44\u6599<\/h3>\n<li>RFC 791&#xff1a;Internet Protocol (IPv4)<\/li>\n<li>RFC 826&#xff1a;An Ethernet Address Resolution Protocol<\/li>\n<li>RFC 9293&#xff1a;Transmission Control Protocol (TCP)<\/li>\n<li>RFC 768&#xff1a;User Datagram Protocol<\/li>\n<li>IANA&#xff1a;Service Name and Transport Protocol Port Number Registry<\/li>\n<p>\u672c\u6587\u4e2d\u7684 IP\u3001MAC \u548c\u7aef\u53e3\u793a\u4f8b\u7528\u4e8e\u6559\u5b66\u8bf4\u660e&#xff0c;\u4e0d\u4ee3\u8868\u771f\u5b9e\u8bbe\u5907\u6216\u5b9e\u9645\u6293\u5305\u7ed3\u679c\u3002\u771f\u5b9e\u7f51\u7edc\u4e2d\u7684\u5730\u5740\u3001\u7aef\u53e3\u548c\u8f6c\u53d1\u884c\u4e3a\u4f1a\u53d7\u7f51\u7edc\u914d\u7f6e\u3001NAT\u3001\u9632\u706b\u5899\u3001\u865a\u62df\u7f51\u7edc\u7b49\u56e0\u7d20\u5f71\u54cd\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7cfb\u5217&#xff1a; \u4ece 0 \u5f00\u59cb\u5b66\u4e60\u8ba1\u7b97\u673a\u7f51\u7edc \u9002\u5408\u8bfb\u8005&#xff1a; \u8ba1\u7b97\u673a\u4e13\u4e1a\u5b66\u751f\u3001\u7f51\u7edc\u57fa\u7840\u8584\u5f31\u7684\u5f00\u53d1\u8005\u3001Java \u540e\u7aef\u5b66\u4e60\u8005 \u672c\u6587\u5173\u952e\u8bcd&#xff1a; MAC \u5730\u5740\u3001IP \u5730\u5740\u3001\u7aef\u53e3\u53f7\u3001TCP \u8fde\u63a5\u3001Java \u540e\u7aef<br \/>\n\u4e00\u3001\u5f15\u8a00&#xff1a;\u8bbf\u95ee\u4e00\u4e2a\u63a5\u53e3&#xff0c;\u4e3a\u4ec0\u4e48\u4f1a\u51fa\u73b0\u8fd9\u4e48\u591a\u5730\u5740&#xff1f;<br \/>\n\u5728 Java \u540e\u7aef\u5f00\u53d1\u4e2d&#xff0c;\u6211\u4eec\u7ecf\u5e38\u8bbf\u95ee\u8fd9\u6837\u7684\u5730\u5740&#xff1a;<br \/>\nhttp:\/\/192.168.1.20:8080\/api\/hello\u8fd9\u91cc\u80fd<\/p>\n","protected":false},"author":2,"featured_media":120652,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[13759,99,292,371,211],"topic":[],"class_list":["post-120655","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-13759","tag-java","tag-292","tag-371","tag-211"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u3010\u8ba1\u7b97\u673a\u7f51\u7edc\u3011\u7b2c 3 \u7bc7\uff1aMAC \u5730\u5740\u3001IP \u5730\u5740\u548c\u7aef\u53e3\u6709\u4ec0\u4e48\u533a\u522b\uff1f\u4e00\u6b21\u8bb2\u6e05\u695a - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/120655.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u3010\u8ba1\u7b97\u673a\u7f51\u7edc\u3011\u7b2c 3 \u7bc7\uff1aMAC \u5730\u5740\u3001IP \u5730\u5740\u548c\u7aef\u53e3\u6709\u4ec0\u4e48\u533a\u522b\uff1f\u4e00\u6b21\u8bb2\u6e05\u695a - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u7cfb\u5217&#xff1a; \u4ece 0 \u5f00\u59cb\u5b66\u4e60\u8ba1\u7b97\u673a\u7f51\u7edc \u9002\u5408\u8bfb\u8005&#xff1a; \u8ba1\u7b97\u673a\u4e13\u4e1a\u5b66\u751f\u3001\u7f51\u7edc\u57fa\u7840\u8584\u5f31\u7684\u5f00\u53d1\u8005\u3001Java \u540e\u7aef\u5b66\u4e60\u8005 \u672c\u6587\u5173\u952e\u8bcd&#xff1a; MAC \u5730\u5740\u3001IP \u5730\u5740\u3001\u7aef\u53e3\u53f7\u3001TCP \u8fde\u63a5\u3001Java \u540e\u7aef \u4e00\u3001\u5f15\u8a00&#xff1a;\u8bbf\u95ee\u4e00\u4e2a\u63a5\u53e3&#xff0c;\u4e3a\u4ec0\u4e48\u4f1a\u51fa\u73b0\u8fd9\u4e48\u591a\u5730\u5740&#xff1f; \u5728 Java \u540e\u7aef\u5f00\u53d1\u4e2d&#xff0c;\u6211\u4eec\u7ecf\u5e38\u8bbf\u95ee\u8fd9\u6837\u7684\u5730\u5740&#xff1a; http:\/\/192.168.1.20:8080\/api\/hello\u8fd9\u91cc\u80fd\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/120655.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-31T15:48:45+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261031154843-6ae60ddbaf278.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/120655.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/120655.html\",\"name\":\"\u3010\u8ba1\u7b97\u673a\u7f51\u7edc\u3011\u7b2c 3 \u7bc7\uff1aMAC \u5730\u5740\u3001IP \u5730\u5740\u548c\u7aef\u53e3\u6709\u4ec0\u4e48\u533a\u522b\uff1f\u4e00\u6b21\u8bb2\u6e05\u695a - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-10-31T15:48:45+00:00\",\"dateModified\":\"2026-10-31T15:48:45+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/120655.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/120655.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/120655.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010\u8ba1\u7b97\u673a\u7f51\u7edc\u3011\u7b2c 3 \u7bc7\uff1aMAC \u5730\u5740\u3001IP \u5730\u5740\u548c\u7aef\u53e3\u6709\u4ec0\u4e48\u533a\u522b\uff1f\u4e00\u6b21\u8bb2\u6e05\u695a\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u3010\u8ba1\u7b97\u673a\u7f51\u7edc\u3011\u7b2c 3 \u7bc7\uff1aMAC \u5730\u5740\u3001IP \u5730\u5740\u548c\u7aef\u53e3\u6709\u4ec0\u4e48\u533a\u522b\uff1f\u4e00\u6b21\u8bb2\u6e05\u695a - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/120655.html","og_locale":"zh_CN","og_type":"article","og_title":"\u3010\u8ba1\u7b97\u673a\u7f51\u7edc\u3011\u7b2c 3 \u7bc7\uff1aMAC \u5730\u5740\u3001IP \u5730\u5740\u548c\u7aef\u53e3\u6709\u4ec0\u4e48\u533a\u522b\uff1f\u4e00\u6b21\u8bb2\u6e05\u695a - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u7cfb\u5217&#xff1a; \u4ece 0 \u5f00\u59cb\u5b66\u4e60\u8ba1\u7b97\u673a\u7f51\u7edc \u9002\u5408\u8bfb\u8005&#xff1a; \u8ba1\u7b97\u673a\u4e13\u4e1a\u5b66\u751f\u3001\u7f51\u7edc\u57fa\u7840\u8584\u5f31\u7684\u5f00\u53d1\u8005\u3001Java \u540e\u7aef\u5b66\u4e60\u8005 \u672c\u6587\u5173\u952e\u8bcd&#xff1a; MAC \u5730\u5740\u3001IP \u5730\u5740\u3001\u7aef\u53e3\u53f7\u3001TCP \u8fde\u63a5\u3001Java \u540e\u7aef \u4e00\u3001\u5f15\u8a00&#xff1a;\u8bbf\u95ee\u4e00\u4e2a\u63a5\u53e3&#xff0c;\u4e3a\u4ec0\u4e48\u4f1a\u51fa\u73b0\u8fd9\u4e48\u591a\u5730\u5740&#xff1f; \u5728 Java \u540e\u7aef\u5f00\u53d1\u4e2d&#xff0c;\u6211\u4eec\u7ecf\u5e38\u8bbf\u95ee\u8fd9\u6837\u7684\u5730\u5740&#xff1a; http:\/\/192.168.1.20:8080\/api\/hello\u8fd9\u91cc\u80fd","og_url":"https:\/\/www.wsisp.com\/helps\/120655.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-10-31T15:48:45+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261031154843-6ae60ddbaf278.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/120655.html","url":"https:\/\/www.wsisp.com\/helps\/120655.html","name":"\u3010\u8ba1\u7b97\u673a\u7f51\u7edc\u3011\u7b2c 3 \u7bc7\uff1aMAC \u5730\u5740\u3001IP \u5730\u5740\u548c\u7aef\u53e3\u6709\u4ec0\u4e48\u533a\u522b\uff1f\u4e00\u6b21\u8bb2\u6e05\u695a - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-10-31T15:48:45+00:00","dateModified":"2026-10-31T15:48:45+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/120655.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/120655.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/120655.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u3010\u8ba1\u7b97\u673a\u7f51\u7edc\u3011\u7b2c 3 \u7bc7\uff1aMAC \u5730\u5740\u3001IP \u5730\u5740\u548c\u7aef\u53e3\u6709\u4ec0\u4e48\u533a\u522b\uff1f\u4e00\u6b21\u8bb2\u6e05\u695a"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/120655","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=120655"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/120655\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/120652"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=120655"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=120655"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=120655"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=120655"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}