{"id":2198,"date":"2023-04-22T17:11:33","date_gmt":"2023-04-22T09:11:33","guid":{"rendered":"https:\/\/cocozq.com\/?p=2198"},"modified":"2023-04-22T17:11:33","modified_gmt":"2023-04-22T09:11:33","slug":"openwrt%e6%b7%bb%e5%8a%a0%e9%9d%99%e6%80%81%e8%b7%af%e7%94%b1%e7%9a%84%e5%9d%91","status":"publish","type":"post","link":"https:\/\/cocozq.com\/?p=2198","title":{"rendered":"openwrt\u6dfb\u52a0\u9759\u6001\u8def\u7531\u7684\u5751"},"content":{"rendered":"<p>\u5bb6\u91cc\u76ee\u524d\u662f\u591a\u4e2a\u8def\u7531\u7ec4\u7f51\uff0c\u8054\u901a\u6c83\u5bb6\u7684\u5149\u732b\u8def\u7531\u4e00\u4f53\u673a\u4f5c\u4e3a\u5165\u53e3\uff0cLAN\u53e3\u5206\u522b\u63a5\u7f51\u4ef6<code>R8000<\/code>\u548c\u534e\u7855\u7684<code>AC68U<\/code>\uff0c\u8fd9\u4e24\u4e2a\u90fd\u662f\u4e4b\u524d\u5237\u7684\u6885\u6797\u56fa\u4ef6\uff0c\u6700\u8fd1\u95f2\u7f6e\u4e86\u4e00\u4e2a\u5c0f\u7c73\u8def\u75314a\uff0c\u9274\u4e8e\u81ea\u5e26\u7684\u7cfb\u7edf\u592a\u5f31\uff0c\u6211\u7ed9\u5237\u6210\u4e86<code>openwrt<\/code>\uff0c\u8fd9\u4e2a\u7cfb\u7edf\u5f88\u5f3a\u5927\uff0c\u4f46\u4e5f\u6bd4\u8f83\u5751\uff0c\u5f53\u5e74R8000\u4e70\u56de\u6765\u7684\u65f6\u5019\u6211\u5c31\u5237\u7684<code>openwrt<\/code>\uff0c\u7ed3\u679c\u5185\u6838\u6709bug\uff0c\u5bfc\u81f4\u65e0\u9650\u91cd\u542f\uff0c\u6700\u540e\u7528TTL\u7ebf\u624d\u5237\u56de\u6765\uff0c\u56e0\u6b64\u6362\u6210\u6885\u6797\u4e86\u3002<\/p>\n<p>\u5c0f\u7c734a\u5237\u5b8c\u4e4b\u540e\u6211\u662f\u901a\u8fc7\u65e0\u7ebf\u7f51\u7edc\u8fde\u63a5\u8054\u901a\u7684\u4e00\u4f53\u673a\uff0c\u4e5f\u5c31\u662f\u8ddf\u53e6\u5916\u4e24\u4e2a\u5b50\u8def\u7531\u5728\u540c\u4e00\u7ea7\u522b\uff0c\u4f46\u662f\u53d1\u73b0\u5728\u6dfb\u52a0\u9759\u6001\u8def\u7531\u8bbf\u95ee\u5176\u4ed6\u4e24\u4e2a\u5b50\u7f51\u65f6\u4e00\u76f4\u4e0d\u6210\u529f\uff0c\u6bcf\u4e2a\u5730\u65b9\u7684\u8bbe\u7f6e\u90fd\u68c0\u67e5\u4e86\u4e00\u904d\u6ca1\u770b\u51fa\u4ec0\u4e48\u95ee\u9898\uff0c\u5c31\u5f88\u7eb3\u95f7\uff0c\u67e5\u770b\u8def\u7531\u8868\u53d1\u73b0\u6ca1\u6709\u6dfb\u52a0\u6210\u529f\uff0c\u7136\u540e\u6211\u5e72\u8106\u653e\u5f03\u5728\u540e\u53f0\u7ba1\u7406\u9875\u9762\u64cd\u4f5c\u4e86\uff0c\u76f4\u63a5<code>ssh<\/code>\u5230\u8def\u7531\u5668\u4e0a\u7528route\u64cd\u4f5c\uff0c\u6267\u884c<\/p>\n<pre><code class=\"language-shell line-numbers\">route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.1.2\nroute: SIOCADDRT: Network unreachable\n<\/code><\/pre>\n<p>\u63d0\u793a\u7f51\u7edc\u4e0d\u901a\uff0c\u592a\u5947\u602a\u4e86\uff0c\u8def\u7531\u4e4b\u95f4\u90fd\u80fd\u4e92\u76f8\u8bbf\u95ee\u4e86\uff0c\u65e0\u5948\u4e4b\u4e0b\u91cd\u542f\u4e86\u4e00\u4e0b\u8def\u7531\uff0c\u7136\u540e\u518d\u5c1d\u8bd5\u4e86\u4e00\u6b21\uff0c\u6ca1\u6709\u9519\u8bef\u63d0\u793a\uff0cping\u4e86\u4e00\u4e0b\u76ee\u6807\u673a\u5668\uff0c\u53ef\u4ee5ping\u901a\uff0c\u771f\u662f\u6d3b\u89c1\u9b3c\u4e86\uff0c\u770b\u6765\u9047\u4e8b\u4e0d\u51b3\u8fd8\u5f97\u662f\u91cd\u542f\u5927\u6cd5<\/p>\n<pre><code class=\"line-numbers\">root@Mi-4a-openwrt:~# route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.1.2\nroot@Mi-4a-openwrt:~# route -n\nKernel IP routing table\nDestination     Gateway         Genmask         Flags Metric Ref    Use Iface\n0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 wlan1\n192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 wlan1\n192.168.2.0     192.168.1.2     255.255.255.0   UG    0      0        0 wlan1\n192.168.31.0    0.0.0.0         255.255.255.0   U     0      0        0 br-lan\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u5bb6\u91cc\u76ee\u524d\u662f\u591a\u4e2a\u8def\u7531\u7ec4\u7f51\uff0c\u8054\u901a\u6c83\u5bb6\u7684\u5149\u732b\u8def\u7531\u4e00\u4f53\u673a\u4f5c\u4e3a\u5165\u53e3\uff0cLAN\u53e3\u5206\u522b\u63a5\u7f51\u4ef6R8000\u548c\u534e\u7855\u7684AC68U\uff0c\u8fd9\u4e24 &hellip; <a href=\"https:\/\/cocozq.com\/?p=2198\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;openwrt\u6dfb\u52a0\u9759\u6001\u8def\u7531\u7684\u5751&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[136],"class_list":["post-2198","post","type-post","status-publish","format-standard","hentry","category-computer","tag-136","hfeed"],"_links":{"self":[{"href":"https:\/\/cocozq.com\/index.php?rest_route=\/wp\/v2\/posts\/2198","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cocozq.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cocozq.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cocozq.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cocozq.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2198"}],"version-history":[{"count":1,"href":"https:\/\/cocozq.com\/index.php?rest_route=\/wp\/v2\/posts\/2198\/revisions"}],"predecessor-version":[{"id":2199,"href":"https:\/\/cocozq.com\/index.php?rest_route=\/wp\/v2\/posts\/2198\/revisions\/2199"}],"wp:attachment":[{"href":"https:\/\/cocozq.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2198"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cocozq.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2198"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cocozq.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2198"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}