{"id":820,"date":"2019-09-19T03:55:27","date_gmt":"2019-09-19T03:55:27","guid":{"rendered":"https:\/\/www.jayjaydream.com\/?p=820"},"modified":"2019-09-19T03:55:40","modified_gmt":"2019-09-19T03:55:40","slug":"%e5%8d%8e%e4%b8%ba%e8%b7%af%e7%94%b1%e5%99%a8%e9%85%8d%e7%bd%aedhcp%e5%92%8cnat%ef%bc%8c%e5%ae%9e%e7%8e%b0%e7%94%a8%e6%88%b7%e8%ae%bf%e9%97%ae%e5%85%ac%e7%bd%91","status":"publish","type":"post","link":"https:\/\/www.jayjaydream.com\/?p=820","title":{"rendered":"\u534e\u4e3a\u8def\u7531\u5668\u914d\u7f6eDHCP\u548cNAT\uff0c\u5b9e\u73b0\u7528\u6237\u8bbf\u95eeInternet\u516c\u7f51"},"content":{"rendered":"<div id=\"img-content\">\n<h2 id=\"js_content\" class=\"rich_media_content \">\u7ec4\u7f51\u9700\u6c42<\/h2>\n<p class=\"rich_media_content \">Router\u4f5c\u4e3a\u67d0\u4f01\u4e1a\u51fa\u53e3\u7f51\u5173,\u914d\u7f6eDHCP\u548cNAT\uff0c\u5b9e\u73b0\u7528\u6237\u52a8\u6001\u83b7\u53d6IP\u5730\u5740\u5e76\u8bbf\u95eeInternet\u516c\u7f51\u3002<\/p>\n<h2>\u7f51\u7edc\u89c4\u5212<\/h2>\n<p class=\"rich_media_content \">\u8be5\u4f01\u4e1a\u5305\u62ec\u4e24\u4e2a\u90e8\u95e8A\u548cB\uff0c\u5206\u522b\u4e3a\u90e8\u95e8A\u548cB\u5185\u7ec8\u7aef\u89c4\u5212\u4e24\u4e2a\u5730\u5740\u7f51\u6bb5\uff1a10.10.1.0\/25\u548c10.10.1.128\/25\uff0c\u7f51\u5173\u5730\u5740\u5206\u522b\u4e3a10.10.1.1\/25\u548c10.10.1.129\/25\u3002<\/p>\n<p class=\"rich_media_content \">\u90e8\u95e8A\u5185PC\u4e3a\u529e\u516c\u7ec8\u7aef\uff0c\u5730\u5740\u79df\u7528\u671f\u9650\u4e3a30\u5929\uff0c\u57df\u540d\u4e3ahuawei.com\uff0cDNS\u670d\u52a1\u5668\u5730\u5740\u4e3a10.10.1.2\u3002<\/p>\n<p class=\"rich_media_content \">\u90e8\u95e8B\u5185\u5927\u90e8\u5206\u662f\u51fa\u5dee\u4eba\u5458\u6240\u7528\u4fbf\u643a\u673a\uff0c\u5730\u5740\u79df\u7528\u671f\u9650\u4e3a2\u5929\uff0c\u57df\u540d\u4e3ahuawei.com\uff0cDNS\u670d\u52a1\u5668\u5730\u5740\u4e3a10.10.1.2\u3002<\/p>\n<p class=\"rich_media_content \">\u4f01\u4e1a\u5185\u5730\u5740\u89c4\u5212\u4e3a\u79c1\u7f51\u5730\u5740\uff0c\u4e14\u9700\u8981\u8bbf\u95eeInternet\u516c\u7f51\uff0c\u56e0\u6b64\uff0c\u9700\u8981\u901a\u8fc7\u914d\u7f6eNAT\u5b9e\u73b0\u79c1\u7f51\u5730\u5740\u5230\u516c\u7f51\u5730\u5740\u7684\u8f6c\u6362\u3002<\/p>\n<p class=\"rich_media_content \">\u8fde\u63a5Router\u51fa\u63a5\u53e3GE0\/0\/3\u7684\u5bf9\u7aefIP\u5730\u5740\u4e3a200.100.1.1\/24\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"\u534e\u4e3a\u8def\u7531\u5668\u914d\u7f6eDHCP\u548cNAT\uff0c\u5b9e\u73b0\u7528\u6237\u8bbf\u95eeInternet\u516c\u7f51 - \u7b2c1\u5f20  | \u9e7f\u9e23\u5929\u6daf\" alt=\"\u534e\u4e3a\u8def\u7531\u5668\u914d\u7f6eDHCP\u548cNAT\uff0c\u5b9e\u73b0\u7528\u6237\u8bbf\u95eeInternet\u516c\u7f51 - \u7b2c1\u5f20  | \u9e7f\u9e23\u5929\u6daf\" class=\"size-full wp-image-821 alignnone\" src=\"https:\/\/www.jayjaydream.com\/wp-content\/uploads\/2019\/09\/router.jpg\" alt=\"\" width=\"560\" height=\"266\" srcset=\"https:\/\/www.jayjaydream.com\/wp-content\/uploads\/2019\/09\/router.jpg 560w, https:\/\/www.jayjaydream.com\/wp-content\/uploads\/2019\/09\/router-150x71.jpg 150w, https:\/\/www.jayjaydream.com\/wp-content\/uploads\/2019\/09\/router-300x143.jpg 300w\" sizes=\"auto, (max-width: 560px) 100vw, 560px\" \/><\/p>\n<h2 class=\"rich_media_content \">\u64cd\u4f5c\u6b65\u9aa4<\/h2>\n<p class=\"rich_media_content \">Router\u4e0a\u7684\u914d\u7f6e<br \/>\n#<br \/>\nsysname Router\u00a0\u00a0\/\/\u4fee\u6539\u8bbe\u5907\u540d\u79f0<br \/>\n#<br \/>\ndhcp enable \/\/\u4f7f\u80fdDHCP\u529f\u80fd<br \/>\n#<br \/>\nacl number 2000\u00a0\u00a0\/\/\u914d\u7f6e\u5141\u8bb8\u8fdb\u884cNAT\u8f6c\u6362\u7684\u5185\u7f51\u5730\u5740\u6bb510.10.1.0\/24<br \/>\nrule 5 permit source 10.10.1.0 0.0.0.255<br \/>\n#<br \/>\nip pool ip-pool1<br \/>\ngateway-list 10.10.1.1 \/\/\u914d\u7f6e\u7f51\u5173\u5730\u5740<br \/>\nnetwork 10.10.1.0 mask 255.255.255.128 \/\/\u914d\u7f6e\u5168\u5c40\u5730\u5740\u6c60\u53ef\u52a8\u6001\u5206\u914d\u7684IP\u5730\u5740\u8303\u56f4<br \/>\nexcluded-ip-address 10.10.1.2 \/\/\u914d\u7f6e\u5730\u5740\u6c60\u4e2d10.10.1.2\u4e0d\u53c2\u4e0e\u81ea\u52a8\u5206\u914d<br \/>\ndns-list 10.10.1.2 \/\/\u914d\u7f6eDHCP\u5ba2\u6237\u7aef\u4f7f\u7528\u7684DNS\u670d\u52a1\u5668\u7684IP\u5730\u5740<br \/>\nlease day 30 hour 0 minute 0 \/\/\u914d\u7f6eIP\u5730\u5740\u79df\u671f\u4e3a30\u5929<br \/>\ndomain-name huawei.com \/\/\u914d\u7f6e\u57df\u540d\u4e3ahuawei.com<br \/>\n#<br \/>\nip pool ip-pool2<br \/>\ngateway-list 10.10.1.129 \/\/\u914d\u7f6e\u7f51\u5173\u5730\u5740<br \/>\nnetwork 10.10.1.128 mask 255.255.255.128 \/\/\u914d\u7f6e\u5168\u5c40\u5730\u5740\u6c60\u53ef\u52a8\u6001\u5206\u914d\u7684IP\u5730\u5740\u8303\u56f4<br \/>\ndns-list 10.10.1.2 \/\/\u914d\u7f6eDHCP\u5ba2\u6237\u7aef\u4f7f\u7528\u7684DNS\u670d\u52a1\u5668\u7684IP\u5730\u5740<br \/>\nlease day 2 hour 0 minute 0 \/\/\u914d\u7f6eIP\u5730\u5740\u79df\u671f\u4e3a2\u5929<br \/>\ndomain-name huawei.com \/\/\u914d\u7f6e\u57df\u540d\u4e3ahuawei.com<br \/>\n#<br \/>\ninterface GigabitEthernet0\/0\/1<br \/>\nip address 10.10.1.1 255.255.255.128<br \/>\ndhcp select global \/\/\u63a5\u53e3\u5de5\u4f5c\u5728\u5168\u5c40\u5730\u5740\u6c60\u6a21\u5f0f<br \/>\n#<br \/>\ninterface GigabitEthernet0\/0\/2<br \/>\nip address 10.10.1.129 255.255.255.128<br \/>\ndhcp select global \/\/\u63a5\u53e3\u5de5\u4f5c\u5728\u5168\u5c40\u5730\u5740\u6c60\u6a21\u5f0f<br \/>\n#<br \/>\ninterface GigabitEthernet0\/0\/3<br \/>\nip address 200.100.1.2 255.255.255.0<br \/>\nnat outbound 2000\u00a0\u00a0\/\/\u5728\u51fa\u63a5\u53e3GE0\/0\/3\u4e0a\u505aEasy IP\u65b9\u5f0f\u7684NAT\uff0c\u5b9e\u73b0\u79c1\u7f51\u5730\u5740\u5230\u516c\u7f51\u5730\u5740\u7684\u8f6c\u6362<br \/>\n#<br \/>\nip route-static 0.0.0.0 0.0.0.0 200.100.1.1\u00a0\u00a0\/\/\u914d\u7f6e\u9ed8\u8ba4\u8def\u7531\uff0c\u4fdd\u8bc1\u51fa\u63a5\u53e3\u5230\u5bf9\u7aef\u8def\u7531\u53ef\u8fbe<br \/>\n#<br \/>\nreturn<\/p>\n<h2 class=\"rich_media_content \">\u9a8c\u8bc1\u914d\u7f6e\u7ed3\u679c<\/h2>\n<p class=\"rich_media_content \"># \u5728Router\u4e0a\u6267\u884c\u547d\u4ee4display ip pool\uff0c\u53ef\u4ee5\u67e5\u770bIP\u5730\u5740\u6c60\u7684\u5206\u914d\u60c5\u51b5\u3002<\/p>\n<p class=\"rich_media_content \">\u6267\u884c\u547d\u4ee4display nat outbound\uff0c\u53ef\u4ee5\u67e5\u770bGE0\/0\/3\u4e0aNAT\u7684\u914d\u7f6e\u4fe1\u606f\u3002<\/p>\n<p class=\"rich_media_content \">\u914d\u7f6e\u6210\u529f\u540e\uff0c\u7ec8\u7aef\u53ef\u4ee5\u52a8\u6001\u83b7\u53d6IP\u5730\u5740\uff0c\u5e76\u80fd\u8bbf\u95eeInternet\u3002<\/p>\n<\/div>\n<div id=\"js_toobar3\" class=\"rich_media_tool\">\n<div class=\"weui-flex\">\n<p class=\"weui-flex__item\">\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u7ec4\u7f51\u9700\u6c42 Router\u4f5c\u4e3a\u67d0\u4f01\u4e1a\u51fa\u53e3\u7f51\u5173,\u914d\u7f6eDHCP\u548cNAT\uff0c\u5b9e\u73b0\u7528\u6237\u52a8\u6001\u83b7\u53d6 &hellip; <a href=\"https:\/\/www.jayjaydream.com\/?p=820\">\u7ee7\u7eed\u9605\u8bfb <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27],"tags":[63],"class_list":["post-820","post","type-post","status-publish","format-standard","hentry","category-27","tag-63"],"_links":{"self":[{"href":"https:\/\/www.jayjaydream.com\/index.php?rest_route=\/wp\/v2\/posts\/820","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jayjaydream.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jayjaydream.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jayjaydream.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jayjaydream.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=820"}],"version-history":[{"count":2,"href":"https:\/\/www.jayjaydream.com\/index.php?rest_route=\/wp\/v2\/posts\/820\/revisions"}],"predecessor-version":[{"id":823,"href":"https:\/\/www.jayjaydream.com\/index.php?rest_route=\/wp\/v2\/posts\/820\/revisions\/823"}],"wp:attachment":[{"href":"https:\/\/www.jayjaydream.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=820"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jayjaydream.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=820"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jayjaydream.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=820"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}