{"id":10,"date":"2023-08-12T18:56:25","date_gmt":"2023-08-12T10:56:25","guid":{"rendered":"http:\/\/8.130.131.184\/wordpress\/?p=10"},"modified":"2023-08-31T10:38:40","modified_gmt":"2023-08-31T02:38:40","slug":"natdzzh","status":"publish","type":"post","link":"https:\/\/xianyijitan.top\/?p=10","title":{"rendered":"NAT\u7f51\u7edc\u5730\u5740\u8f6c\u6362"},"content":{"rendered":"<h2>NAT\u4ecb\u7ecd<\/h2>\n<p>NAT\uff08Network Address Translation\uff0c\u7f51\u7edc\u5730\u5740\u8f6c\u6362\uff09\u662f\u4e00\u79cd\u5730\u5740\u8f6c\u6362\u6280\u672f\uff0c\u5b83\u53ef\u4ee5\u5c06 IP \u6570\u636e\u62a5\u6587\u5934\u4e2d\u7684 IP \u5730\u5740\u8f6c\u6362\u4e3a\u53e6\u4e00\u4e2a IP \u5730\u5740\uff0c\u5e76\u901a\u8fc7\u8f6c\u6362\u7aef\u53e3\u53f7\u8fbe\u5230\u5730\u5740\u91cd\u7528\u7684\u76ee\u7684\u3002NAT \u4f5c\u4e3a\u4e00\u79cd\u7f13\u89e3 IPv4 \u516c\u7f51\u5730\u5740\u67af\u7aed\u7684\u8fc7\u6e21\u6280\u672f\uff0c\u7531\u4e8e\u5b9e\u73b0\u7b80\u5355\uff0c\u5f97\u5230\u4e86\u5e7f\u6cdb\u5e94\u7528\u3002<\/p>\n<p><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/xianyijitan.top\/wp-blog\/typora-user-images\/image-20230810093435281.png?w=960&#038;ssl=1\" alt=\"image-20230810093435281\" \/><\/p>\n<h2>NAT\u7c7b\u578b<\/h2>\n<p>\u6839\u636e NAT \u8f6c\u6362\u662f\u5bf9\u62a5\u6587\u4e2d\u7684\u6e90\u5730\u5740\u8fdb\u884c\u8f6c\u6362\u8fd8\u662f\u5bf9\u76ee\u7684\u5730\u5740\u8fdb\u884c\u8f6c\u6362\uff0cNAT \u53ef\u4ee5\u5206\u4e3a\uff1a<\/p>\n<ul>\n<li>\n<p><strong>\u9759\u6001 NAT\uff1a<\/strong><\/p>\n<p>\u9759\u6001 NAT\uff08 Static NAT \uff09\u662f\u6307 NAT \u8f6c\u6362\u524d\u7684\u5730\u5740\u548c NAT \u8f6c\u6362\u540e\u7684\u5730\u5740\u662f\u4e00\u5bf9\u4e00\u7684\u5bf9\u5e94\u5173\u7cfb\uff0c\u901a\u5e38\u662f\u4e00\u4e2a\u79c1\u7f51\u5730\u5740\u5bf9\u5e94\u4e00\u4e2a\u516c\u7f51\u5730\u5740\uff0c\u624b\u52a8\u5c06\u5bf9\u5e94\u4fe1\u606f\u914d\u7f6e\u5230\u7f51\u5173\u4e2d\u3002<\/p>\n<p><strong><em>\u8bed\u6cd5\uff1a<\/em><\/strong><\/p>\n<pre><code>    \u8fdb\u5165\u8def\u7531\u5668\u76f8\u5e94\u7aef\u53e3\n\n    nat static global \u8f6c\u5316\u540e\u5730\u5740 inside \u8f6c\u6362\u524d\u5730\u5740<\/code><\/pre>\n<p><strong><em>\u5b9e\u4f8b\uff1a<\/em><\/strong><\/p>\n<p>\u8981\u6c42:\u5c06\u5185\u90e8\u5730\u574010.1.1.11\/24\u300110.1.1.12\/24\u9759\u6001\u8f6c\u6362\u4e3a\u516c\u7f51\u5730\u574020.20.20.11\/28\u300120.20.20.12\/28\uff0c\u4ee5\u4fbf\u8bbf\u95ee\u5916\u7f51\uff08Server3\uff09\u6216\u88ab\u5916\u7f51\uff08Server3\uff09\u8bbf\u95ee\uff0c\u7136\u540e\u9a8c\u8bc1\u9759\u6001NAT\u5e76\u6293\u5305\u5206\u6790\u3002<\/p>\n<p>\u642d\u5efa\u7f51\u7edc\u62d3\u6251\u7ed3\u6784\uff1a<\/p>\n<p><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/xianyijitan.top\/wp-blog\/typora-user-images\/image-20230810100802346.png?w=960&#038;ssl=1\" alt=\"image-20230810100802346\" \/><\/p>\n<p>\u7b2c\u4e00\u6b65\uff1a\u914d\u7f6e\u5ba2\u6237\u673a\u3001\u670d\u52a1\u5668\u3001\u4e3b\u673a\u3001\u8def\u7531\u5668\u5bf9\u5e94\u7684ip\u5730\u5740\u3001\u8def\u7531\u53ca\u7f51\u7ba1\uff1b<\/p>\n<p>AR2:<\/p>\n<pre><code class=\"language-&lt;Huawei&gt;un\">Info: Current terminal monitor is off.\n<Huawei>sys\nEnter system view, return user view with Ctrl+Z.\n[Huawei]int g0\/0\/0\n[Huawei-GigabitEthernet0\/0\/0]ip address 10.1.1.254 24\n[Huawei-GigabitEthernet0\/0\/0]int g0\/0\/1\n[Huawei-GigabitEthernet0\/0\/1]ip address 20.20.20.1 24\n[Huawei-GigabitEthernet0\/0\/1]q\n[Huawei]ip route-static 0.0.0.0 0.0.0.0 20.20.20.2<\/code><\/pre>\n<p>AR1\uff1a<\/p>\n<pre><code><Huawei>un t m\nInfo: Current terminal monitor is off.\n<Huawei>sys\nEnter system view, return user view with Ctrl+Z.\n[Huawei]int g0\/0\/0\n[Huawei-GigabitEthernet0\/0\/0]ip address 20.20.20.2 24\n[Huawei-GigabitEthernet0\/0\/0]int g0\/0\/1\n[Huawei-GigabitEthernet0\/0\/1]ip address 200.1.1.14 24\n[Huawei-GigabitEthernet0\/0\/1]int g0\/0\/2\n[Huawei-GigabitEthernet0\/0\/2]ip address 100.1.1.254 24\n[Huawei-GigabitEthernet0\/0\/2]q<\/code><\/pre>\n<p>\u7b2c\u4e8c\u6b65\uff1a\u5728AR2\u4e2d\u914d\u7f6e\u9759\u6001NAT<\/p>\n<pre><code>[Huawei]int g0\/0\/1\n[Huawei-GigabitEthernet0\/0\/1]nat static global 20.20.20.11 inside 10.1.1.11\n[Huawei-GigabitEthernet0\/0\/1]nat static global 20.20.20.12 inside 10.1.1.12\n[Huawei-GigabitEthernet0\/0\/1]q<\/code><\/pre>\n<p>\u7b2c\u4e09\u6b65\uff1a\u8fdb\u884c\u6d4b\u8bd5<\/p>\n<p>server1\uff1a<\/p>\n<p><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/xianyijitan.top\/wp-blog\/typora-user-images\/image-20230810103007350.png?w=960&#038;ssl=1\" alt=\"image-20230810103007350\" \/><\/p>\n<p>\u6293\u5305\u5206\u6790\uff1a<\/p>\n<p>\u6293\u5305\u4f4d\u7f6e\uff1a<\/p>\n<p><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/xianyijitan.top\/wp-blog\/typora-user-images\/image-20230810103511862.png?w=960&#038;ssl=1\" alt=\"image-20230810103511862\" \/><\/p>\n<p><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/xianyijitan.top\/wp-blog\/typora-user-images\/image-20230810103107991.png?w=960&#038;ssl=1\" alt=\"image-20230810103107991\" \/><\/p>\n<p>server2\uff1a<\/p>\n<p><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/xianyijitan.top\/wp-blog\/typora-user-images\/image-20230810103300676.png?w=960&#038;ssl=1\" alt=\"image-20230810103300676\" \/><\/p>\n<p>\u6293\u5305\u5206\u6790\uff1a<\/p>\n<p><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/xianyijitan.top\/wp-blog\/typora-user-images\/image-20230810103349228.png?w=960&#038;ssl=1\" alt=\"image-20230810103349228\" \/><\/p>\n<\/li>\n<li>\n<p><strong>\u52a8\u6001 NAT\uff1a<\/strong><\/p>\n<p>\u52a8\u6001 NAT\uff08 Dynamic NAT \uff09\u662f\u5728\u7f51\u5173\u914d\u7f6e\u4e00\u4e2a IP \u5730\u5740\u6c60\uff08 IP address pool \uff09\uff0c\u5730\u5740\u6c60\u91cc\u9762\u5305\u542b\u591a\u4e2a IP \u5730\u5740\u3002\u5728 NAT \u5efa\u7acb\u4f1a\u8bdd\u65f6\uff0c\u5728\u5730\u5740\u6c60\u5185\u7684 IP \u5730\u5740\u6309\u987a\u5e8f\u5206\u914d\u4e00\u4e2a\u8f6c\u6362\u540e\u7684 IP \u5730\u5740\u3002\u7531\u4e8e\u5730\u5740\u8303\u56f4\u80fd\u591f\u624b\u52a8\u8fdb\u884c\u8bbe\u7f6e\u548c\u66f4\u6539\uff0c\u56e0\u6b64\u8fd9\u79cd\u65b9\u5f0f\u5e94\u7528\u7684\u6bd4\u8f83\u591a\u3002<\/p>\n<p>\u867d\u7136\u548c\u9759\u6001 NAT \u6709\u70b9\u7c7b\u4f3c\uff0c\u79c1\u6709\u5730\u5740\u548c\u516c\u7f51\u5730\u5740\u662f\u4e00\u5bf9\u4e00\u7684\u6620\u5c04\u5173\u7cfb\uff0c\u4f46\u4e0d\u662f\u6307\u5b9a\u7684 NAT \u8f6c\u6362\u540e\u5730\u5740\uff0c\u800c\u662f\u52a8\u6001\u5206\u914d\u7684\u3001\u5728 IP \u5730\u5740\u6c60\u4e2d\u6392\u5e8f\u9760\u524d\u7684\u6709\u6548\u5730\u5740\u3002<\/p>\n<p><strong><em>\u8bed\u6cd5\uff1a<\/em><\/strong><\/p>\n<pre><code>\u7b2c\u4e00\u6b65\uff1a\u5b9a\u4e49\u8bbf\u95ee\u63a7\u5236\u5217\u8868<\/code><\/pre>\n<pre><code>[Huawei]acl 2000\n[Huawei-acl-basic-2000]rule 5 permit source 10.1.1.0 0.0.0.255\n[Huawei-acl-basic-2000]quit<\/code><\/pre>\n<pre><code>\u7b2c\u4e8c\u6b65\uff1a\u5b9a\u4e49\u5730\u5740\u6c60<\/code><\/pre>\n<pre><code>[Huawei]nat address-group 1 20.20.20.10 20.20.20.20<\/code><\/pre>\n<pre><code>\u7b2c\u4e09\u6b65\uff1a\u5728\u5916\u90e8\u63a5\u53e3\u4e0a\u542f\u7528NAT<\/code><\/pre>\n<pre><code>[Huawei]int g0\/0\/1\n[Huawei-GigabitEthernet0\/0\/1]nat outbound 2000 address-group 1 no-pat\n[Huawei-GigabitEthernet0\/0\/1]q<\/code><\/pre>\n<pre><code>\u7b2c\u56db\u6b65\uff1a\u67e5\u770bNAT\u914d\u7f6e\uff1a<\/code><\/pre>\n<pre><code>[Huawei]dis nat outbound \nNAT Outbound Information:\n--------------------------------------------------------------------------\nInterface                     Acl     Address-group\/IP\/Interface      Type\n--------------------------------------------------------------------------\nGigabitEthernet0\/0\/1         2000                              1    no-pat\n--------------------------------------------------------------------------\nTotal : 1<\/code><\/pre>\n<p><strong><em>\u5b9e\u4f8b\uff1a<\/em><\/strong><\/p>\n<p>\u8981\u6c42:\u5c06\u5185\u90e8\u5730\u574010.1.1.0\/24\u52a8\u6001\u8f6c\u6362\u4e3a\u516c\u7f51\u5730\u574020.20.20.10 ~ 20.20.20.20\/24\uff0c\u4ee5\u4fbf\u8bbf\u95ee\u5916\u7f51\uff08Server3\uff09\u6216\u88ab\u5916\u7f51\uff08Server3\uff09\u8bbf\u95ee\uff0c\u7136\u540e\u9a8c\u8bc1\u52a8\u6001NAT\u6293\u5305\u5206\u6790\u3002<\/p>\n<p>\u642d\u5efa\u7f51\u7edc\u62d3\u6251\u7ed3\u6784\uff1a<\/p>\n<p><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/xianyijitan.top\/wp-blog\/typora-user-images\/image-20230810100802346.png?w=960&#038;ssl=1\" alt=\"image-20230810100802346\" \/><\/p>\n<p>\u7b2c\u4e00\u6b65\uff1a\u914d\u7f6e\u5ba2\u6237\u673a\u3001\u670d\u52a1\u5668\u3001\u4e3b\u673a\u3001\u8def\u7531\u5668\u5bf9\u5e94\u7684ip\u5730\u5740\u3001\u8def\u7531\u53ca\u7f51\u7ba1\uff1b<\/p>\n<p>AR2:<\/p>\n<pre><code class=\"language-&lt;Huawei&gt;un\">Info: Current terminal monitor is off.\n<Huawei>sys\nEnter system view, return user view with Ctrl+Z.\n[Huawei]int g0\/0\/0\n[Huawei-GigabitEthernet0\/0\/0]ip address 10.1.1.254 24\n[Huawei-GigabitEthernet0\/0\/0]int g0\/0\/1\n[Huawei-GigabitEthernet0\/0\/1]ip address 20.20.20.1 24\n[Huawei-GigabitEthernet0\/0\/1]q\n[Huawei]ip route-static 0.0.0.0 0.0.0.0 20.20.20.2<\/code><\/pre>\n<p>AR1\uff1a<\/p>\n<pre><code><Huawei>un t m\nInfo: Current terminal monitor is off.\n<Huawei>sys\nEnter system view, return user view with Ctrl+Z.\n[Huawei]int g0\/0\/0\n[Huawei-GigabitEthernet0\/0\/0]ip address 20.20.20.2 24\n[Huawei-GigabitEthernet0\/0\/0]int g0\/0\/1\n[Huawei-GigabitEthernet0\/0\/1]ip address 200.1.1.14 24\n[Huawei-GigabitEthernet0\/0\/1]int g0\/0\/2\n[Huawei-GigabitEthernet0\/0\/2]ip address 100.1.1.254 24\n[Huawei-GigabitEthernet0\/0\/2]q<\/code><\/pre>\n<p>\u7b2c\u4e8c\u6b65\uff1a\u5728AR2\u4e2d\u914d\u7f6e\u9759\u6001NAT<\/p>\n<pre><code>\/\/\u5b9a\u4e49\u8bbf\u95ee\u63a7\u5236\u5217\u8868\n[Huawei]acl 2000\n[Huawei-acl-basic-2000]rule 5 permit source 10.1.1.0 0.0.0.255\n[Huawei-acl-basic-2000]quit\n\/\/\u5b9a\u4e49\u5730\u5740\u6c60\uff0c\u5730\u5740\u6c60\u7f16\u53f7\u4e3a1\n[Huawei]nat address-group 1 20.20.20.10 20.20.20.20\n\/\/\u5728\u5916\u90e8\u63a5\u53e3\u542f\u7528NAT\n[Huawei]int g0\/0\/1    \n[Huawei-GigabitEthernet0\/0\/1]nat outbound 2000 address-group 1 no-pat\n[Huawei-GigabitEthernet0\/0\/1]q\n\/\/\u67e5\u770bNAT\u914d\u7f6e\n[Huawei]dis nat outbound \nNAT Outbound Information:\n--------------------------------------------------------------------------\nInterface                     Acl     Address-group\/IP\/Interface      Type\n--------------------------------------------------------------------------\nGigabitEthernet0\/0\/1         2000                              1    no-pat\n--------------------------------------------------------------------------\nTotal : 1<\/code><\/pre>\n<p>\u7b2c\u4e09\u6b65\uff1a\u8fdb\u884c\u6d4b\u8bd5<\/p>\n<p>PC1\uff1a<\/p>\n<p><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/xianyijitan.top\/wp-blog\/typora-user-images\/image-20230810111524920.png?w=960&#038;ssl=1\" alt=\"image-20230810111524920\" \/><\/p>\n<p>\u6293\u5305\u4f4d\u7f6e\uff1a<\/p>\n<p><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/xianyijitan.top\/wp-blog\/typora-user-images\/image-20230810103511862.png?w=960&#038;ssl=1\" alt=\"image-20230810103511862\" \/><\/p>\n<p>\u6293\u5305\u5206\u6790\uff1a<\/p>\n<p><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/xianyijitan.top\/wp-blog\/typora-user-images\/image-20230810111542208.png?w=960&#038;ssl=1\" alt=\"image-20230810111542208\" \/><\/p>\n<p>client1\uff1a<\/p>\n<p><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/xianyijitan.top\/wp-blog\/typora-user-images\/image-20230810111635992.png?w=960&#038;ssl=1\" alt=\"image-20230810111635992\" \/><\/p>\n<p>\u6293\u5305\u5206\u6790\uff1a<\/p>\n<p><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/xianyijitan.top\/wp-blog\/typora-user-images\/image-20230810111652482.png?w=960&#038;ssl=1\" alt=\"image-20230810111652482\" \/><\/p>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>NAT\u4ecb\u7ecd NAT\uff08Network Address Translation\uff0c\u7f51\u7edc\u5730\u5740\u8f6c\u6362\uff09\u662f\u4e00\u79cd\u5730\u5740\u8f6c\u6362\u6280\u672f\uff0c\u5b83\u53ef\u4ee5\u5c06 IP \u6570\u636e\u62a5\u6587\u5934\u4e2d\u7684 IP \u5730\u5740\u8f6c\u6362\u4e3a\u53e6\u4e00\u4e2a IP \u5730\u5740\uff0c\u5e76\u901a\u8fc7\u8f6c\u6362\u7aef\u53e3\u53f7\u8fbe\u5230\u5730\u5740\u91cd\u7528\u7684\u76ee\u7684\u3002NAT \u4f5c\u4e3a\u4e00\u79cd\u7f13\u89e3 IPv4 \u516c\u7f51\u5730\u5740\u67af\u7aed\u7684\u8fc7\u6e21\u6280\u672f\uff0c\u7531\u4e8e\u5b9e\u73b0\u7b80\u5355\uff0c\u5f97\u5230\u4e86\u5e7f\u6cdb\u5e94\u7528\u3002 NAT\u7c7b\u578b \u6839\u636e NAT \u8f6c\u6362\u662f\u5bf9\u62a5\u6587\u4e2d\u7684\u6e90\u5730\u5740\u8fdb\u884c\u8f6c\u6362\u8fd8\u662f\u5bf9\u76ee\u7684\u5730\u5740\u8fdb\u884c\u8f6c\u6362\uff0cNAT \u53ef\u4ee5\u5206\u4e3a\uff1a \u9759\u6001 NAT\uff1a \u9759\u6001 NAT\uff08 Static NAT \uff09\u662f\u6307 NAT \u8f6c\u6362\u524d\u7684\u5730\u5740\u548c NAT \u8f6c\u6362\u540e\u7684\u5730\u5740\u662f\u4e00\u5bf9\u4e00\u7684\u5bf9\u5e94\u5173\u7cfb\uff0c\u901a\u5e38\u662f\u4e00\u4e2a\u79c1\u7f51\u5730\u5740\u5bf9\u5e94\u4e00\u4e2a\u516c\u7f51\u5730\u5740\uff0c\u624b\u52a8\u5c06\u5bf9\u5e94\u4fe1\u606f\u914d\u7f6e\u5230\u7f51\u5173\u4e2d\u3002 \u8bed\u6cd5\uff1a \u8fdb\u5165\u8def\u7531\u5668\u76f8\u5e94\u7aef\u53e3 nat static global \u8f6c\u5316\u540e\u5730\u5740 inside \u8f6c\u6362\u524d\u5730\u5740 \u5b9e\u4f8b\uff1a \u8981\u6c42:\u5c06\u5185\u90e8\u5730\u574010.1.1.11\/24\u300110.1.1.12\/24\u9759\u6001\u8f6c\u6362\u4e3a\u516c\u7f51\u5730\u574020.20.20.11\/28\u300120.20.20.12\/28\uff0c\u4ee5\u4fbf\u8bbf\u95ee\u5916\u7f51\uff08Server3\uff09\u6216\u88ab\u5916\u7f51\uff08Server3\uff09\u8bbf\u95ee\uff0c\u7136\u540e\u9a8c\u8bc1\u9759\u6001NAT\u5e76\u6293\u5305\u5206\u6790\u3002 \u642d\u5efa\u7f51\u7edc\u62d3\u6251\u7ed3\u6784\uff1a \u7b2c\u4e00\u6b65\uff1a\u914d\u7f6e\u5ba2\u6237\u673a\u3001\u670d\u52a1\u5668\u3001\u4e3b\u673a\u3001\u8def\u7531\u5668\u5bf9\u5e94\u7684ip\u5730\u5740\u3001\u8def\u7531\u53ca\u7f51\u7ba1\uff1b AR2: Info: Current terminal monitor is off. sys Enter system view, return user view with Ctrl+Z. [Huawei]int g0\/0\/0 [Huawei-GigabitEthernet0\/0\/0]ip address 10.1.1.254 24 [Huawei-GigabitEthernet0\/0\/0]int g0\/0\/1 [Huawei-GigabitEthernet0\/0\/1]ip address 20.20.20.1 24 [Huawei-GigabitEthernet0\/0\/1]q [Huawei]ip route-static 0.0.0.0 0.0.0.0 20.20.20.2 AR1\uff1a un t m Info: Current terminal monitor is off. sys Enter system view, return user view with Ctrl+Z. [Huawei]int g0\/0\/0 [Huawei-GigabitEthernet0\/0\/0]ip address 20.20.20.2 24 [Huawei-GigabitEthernet0\/0\/0]int g0\/0\/1 [Huawei-GigabitEthernet0\/0\/1]ip address 200.1.1.14 24 [Huawei-GigabitEthernet0\/0\/1]int g0\/0\/2 [Huawei-GigabitEthernet0\/0\/2]ip address 100.1.1.254 24 [Huawei-GigabitEthernet0\/0\/2]q \u7b2c\u4e8c\u6b65\uff1a\u5728AR2\u4e2d\u914d\u7f6e\u9759\u6001NAT [Huawei]int g0\/0\/1 [Huawei-GigabitEthernet0\/0\/1]nat static global 20.20.20.11 inside 10.1.1.11 [Huawei-GigabitEthernet0\/0\/1]nat static global 20.20.20.12 inside 10.1.1.12 [Huawei-GigabitEthernet0\/0\/1]q \u7b2c\u4e09\u6b65\uff1a\u8fdb\u884c\u6d4b\u8bd5 server1\uff1a \u6293\u5305\u5206\u6790\uff1a \u6293\u5305\u4f4d\u7f6e\uff1a server2\uff1a \u6293\u5305\u5206\u6790\uff1a \u52a8\u6001 NAT\uff1a \u52a8\u6001 NAT\uff08 Dynamic NAT \uff09\u662f\u5728\u7f51\u5173\u914d\u7f6e\u4e00\u4e2a IP \u5730\u5740\u6c60\uff08 IP address pool \uff09\uff0c\u5730\u5740\u6c60\u91cc\u9762\u5305\u542b\u591a\u4e2a IP \u5730\u5740\u3002\u5728 NAT \u5efa\u7acb\u4f1a\u8bdd\u65f6\uff0c\u5728\u5730\u5740\u6c60\u5185\u7684 IP \u5730\u5740\u6309\u987a\u5e8f\u5206\u914d\u4e00\u4e2a\u8f6c\u6362\u540e\u7684 IP \u5730\u5740\u3002\u7531\u4e8e\u5730\u5740\u8303\u56f4\u80fd\u591f\u624b\u52a8\u8fdb\u884c\u8bbe\u7f6e\u548c\u66f4\u6539\uff0c\u56e0\u6b64\u8fd9\u79cd\u65b9\u5f0f\u5e94\u7528\u7684\u6bd4\u8f83\u591a\u3002 \u867d\u7136\u548c\u9759\u6001 NAT \u6709\u70b9\u7c7b\u4f3c\uff0c\u79c1\u6709\u5730\u5740\u548c\u516c\u7f51\u5730\u5740\u662f\u4e00\u5bf9\u4e00\u7684\u6620\u5c04\u5173\u7cfb\uff0c\u4f46\u4e0d\u662f\u6307\u5b9a\u7684 NAT \u8f6c\u6362\u540e\u5730\u5740\uff0c\u800c\u662f\u52a8\u6001\u5206\u914d\u7684\u3001\u5728 IP \u5730\u5740\u6c60\u4e2d\u6392\u5e8f\u9760\u524d\u7684\u6709\u6548\u5730\u5740\u3002 \u8bed\u6cd5\uff1a \u7b2c\u4e00\u6b65\uff1a\u5b9a\u4e49\u8bbf\u95ee\u63a7\u5236\u5217\u8868 [Huawei]acl 2000 [Huawei-acl-basic-2000]rule 5 permit source 10.1.1.0 0.0.0.255 [Huawei-acl-basic-2000]quit \u7b2c\u4e8c\u6b65\uff1a\u5b9a\u4e49\u5730\u5740\u6c60 [Huawei]nat address-group 1 20.20.20.10 20.20.20.20 \u7b2c\u4e09\u6b65\uff1a\u5728\u5916\u90e8\u63a5\u53e3\u4e0a\u542f\u7528NAT [Huawei]int g0\/0\/1 [Huawei-GigabitEtherne&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[7],"tags":[],"class_list":["post-10","post","type-post","status-publish","format-standard","hentry","category-wlxx"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/xianyijitan.top\/index.php?rest_route=\/wp\/v2\/posts\/10","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xianyijitan.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xianyijitan.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xianyijitan.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xianyijitan.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10"}],"version-history":[{"count":2,"href":"https:\/\/xianyijitan.top\/index.php?rest_route=\/wp\/v2\/posts\/10\/revisions"}],"predecessor-version":[{"id":247,"href":"https:\/\/xianyijitan.top\/index.php?rest_route=\/wp\/v2\/posts\/10\/revisions\/247"}],"wp:attachment":[{"href":"https:\/\/xianyijitan.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xianyijitan.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xianyijitan.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}