{"id":36,"date":"2024-08-28T20:46:37","date_gmt":"2024-08-28T12:46:37","guid":{"rendered":"http:\/\/192.168.31.11:8000\/?p=36"},"modified":"2024-08-28T20:46:37","modified_gmt":"2024-08-28T12:46:37","slug":"%e5%85%b3%e4%ba%8e%e9%98%b2%e7%81%ab%e5%a2%99ipv6%e9%85%8d%e7%bd%ae%e7%9a%84%e9%97%ae%e9%a2%98","status":"publish","type":"post","link":"https:\/\/blogwp.htcloudstation.com\/?p=36","title":{"rendered":"\u5173\u4e8e\u9632\u706b\u5899IPV6\u914d\u7f6e\u7684\u95ee\u9898"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u60a8\u63d0\u51fa\u4e86\u4e00\u4e2a\u5f88\u597d\u7684\u95ee\u9898\u3002\u786e\u5b9e\uff0c\u5982\u679c\u5149\u732b\u53ea\u8fde\u63a5\u5230\u9632\u706b\u5899\u76844\u53e3\uff0c\u5e76\u4e14\u53ea\u653e\u901a\u4e86VLAN20\uff0c\u90a3\u4e48VLAN40\u5c31\u65e0\u6cd5\u76f4\u63a5\u4e0e\u5149\u732b\u901a\u4fe1\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u6211\u4eec\u9700\u8981\u901a\u8fc7\u4e00\u4e9b\u7f51\u7edc\u914d\u7f6e\u6765\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u53ef\u80fd\u7684\u89e3\u51b3\u65b9\u6848\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u4f7f\u7528\u7b56\u7565\u8def\u7531\u6216 PBR\uff08Policy-Based Routing\uff09<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">\u6211\u4eec\u53ef\u4ee5\u5728\u9632\u706b\u5899\u4e0a\u914d\u7f6e\u7b56\u7565\u8def\u7531\uff0c\u5c06 VLAN40 \u7684\u6d41\u91cf\u901a\u8fc7 VLAN20 \u8f6c\u53d1\u5230\u5149\u732b\u3002\u8fd9\u6837\u53ef\u4ee5\u5b9e\u73b0 VLAN40 \u4f7f\u7528 VLAN20 \u4f5c\u4e3a\u51fa\u53e3\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u914d\u7f6e\u793a\u4f8b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u521b\u5efa ACL \u6765\u5339\u914d VLAN40 \u7684\u6d41\u91cf\nacl ipv6 number 3000\n rule 10 permit ipv6 source 240e:666:0:333::\/64\n\n# \u521b\u5efa\u7b56\u7565\u8def\u7531\nipv6 policy-based-route pbr-vlan40 permit node 10\n if-match acl 3000\n apply output-interface Vlan-interface20\n\n# \u5728 VLAN40 \u63a5\u53e3\u4e0a\u5e94\u7528\u7b56\u7565\u8def\u7531\ninterface Vlan-interface40\n ipv6 policy-based-route pbr-vlan40<\/code><\/pre>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li>\u914d\u7f6e\u9759\u6001\u8def\u7531<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">\u6211\u4eec\u53ef\u4ee5\u914d\u7f6e\u4e00\u6761\u9759\u6001\u8def\u7531\uff0c\u5c06 VLAN40 \u7684\u6d41\u91cf\u901a\u8fc7 VLAN20 \u63a5\u53e3\u8f6c\u53d1\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ipv6 route-static 240e:666:0:333::\/64 Vlan-interface20 240e:644:0:323::1<\/code><\/pre>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li>\u4f7f\u7528 NAT66<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c\u60a8\u7684\u9632\u706b\u5899\u652f\u6301 NAT66\uff0c\u6211\u4eec\u53ef\u4ee5\u5c06 VLAN40 \u7684 IPv6 \u5730\u5740\u8f6c\u6362\u4e3a VLAN20 \u7684\u5730\u5740\u8303\u56f4\uff0c\u7136\u540e\u901a\u8fc7 VLAN20 \u8bbf\u95ee\u5916\u7f51\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u521b\u5efa NAT66 \u5730\u5740\u7ec4\nipv6 nat address-group 1 240e:644:0:323::100 240e:644:0:323::200\n\n# \u914d\u7f6e NAT66 \u89c4\u5219\ninterface Vlan-interface20\n ipv6 nat outbound 3000 address-group 1\n\n# \u521b\u5efa ACL \u6765\u5339\u914d VLAN40 \u7684\u6d41\u91cf\nacl ipv6 number 3000\n rule 10 permit ipv6 source 240e:666:0:333::\/64<\/code><\/pre>\n\n\n\n<ol start=\"4\" class=\"wp-block-list\">\n<li>\u4fee\u6539\u5149\u732b\u914d\u7f6e<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c\u53ef\u80fd\u7684\u8bdd\uff0c\u6700\u76f4\u63a5\u7684\u65b9\u6cd5\u662f\u4fee\u6539\u5149\u732b\u7684\u914d\u7f6e\uff0c\u8ba9\u5b83\u4e5f\u653e\u901a VLAN40\u3002\u8fd9\u6837 VLAN40 \u5c31\u53ef\u4ee5\u76f4\u63a5\u4e0e\u5149\u732b\u901a\u4fe1\u4e86\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8bf7\u6ce8\u610f\uff0c\u8fd9\u4e9b\u89e3\u51b3\u65b9\u6848\u53ef\u80fd\u4f1a\u5f71\u54cd\u7f51\u7edc\u6027\u80fd\u548c\u5b89\u5168\u6027\u3002\u5728\u5b9e\u65bd\u4e4b\u524d\uff0c\u8bf7\u4ed4\u7ec6\u8bc4\u4f30\u6bcf\u79cd\u65b9\u6848\u7684\u4f18\u7f3a\u70b9\uff0c\u5e76\u9009\u62e9\u6700\u9002\u5408\u60a8\u7f51\u7edc\u73af\u5883\u7684\u89e3\u51b3\u65b9\u6848\u3002\u6b64\u5916\uff0c\u5177\u4f53\u7684\u914d\u7f6e\u547d\u4ee4\u53ef\u80fd\u56e0\u8bbe\u5907\u578b\u53f7\u548c\u8f6f\u4ef6\u7248\u672c\u800c\u6709\u6240\u4e0d\u540c\uff0c\u5efa\u8bae\u53c2\u8003\u534e\u4e09\u9632\u706b\u5899\u7684\u5b98\u65b9\u6587\u6863\u8fdb\u884c\u914d\u7f6e\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u60a8\u63d0\u51fa\u4e86\u4e00\u4e2a\u5f88\u597d\u7684\u95ee\u9898\u3002\u786e\u5b9e\uff0c\u5982\u679c\u5149\u732b\u53ea\u8fde\u63a5\u5230\u9632\u706b\u5899\u76844\u53e3\uff0c\u5e76\u4e14\u53ea\u653e\u901a\u4e86VLAN20\uff0c\u90a3\u4e48VLAN40\u5c31\u65e0\u6cd5\u76f4 [&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-36","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogwp.htcloudstation.com\/index.php?rest_route=\/wp\/v2\/posts\/36","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogwp.htcloudstation.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogwp.htcloudstation.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogwp.htcloudstation.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blogwp.htcloudstation.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=36"}],"version-history":[{"count":1,"href":"https:\/\/blogwp.htcloudstation.com\/index.php?rest_route=\/wp\/v2\/posts\/36\/revisions"}],"predecessor-version":[{"id":37,"href":"https:\/\/blogwp.htcloudstation.com\/index.php?rest_route=\/wp\/v2\/posts\/36\/revisions\/37"}],"wp:attachment":[{"href":"https:\/\/blogwp.htcloudstation.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=36"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogwp.htcloudstation.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=36"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogwp.htcloudstation.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=36"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}