{"id":476204,"date":"2023-08-09T07:26:52","date_gmt":"2023-08-09T07:26:52","guid":{"rendered":""},"modified":"2023-09-05T11:12:15","modified_gmt":"2023-09-05T11:12:15","slug":"cgnat","status":"publish","type":"wiki","link":"https:\/\/oneproxy.pro\/cn\/wiki\/cgnat\/","title":{"rendered":"\u4e2d\u592e\u56fd\u5bb6\u673a\u5173\u4e8b\u52a1\u7ba1\u7406\u5c40"},"content":{"rendered":"<p>\u8fd0\u8425\u5546\u7ea7\u7f51\u7edc\u5730\u5740\u8f6c\u6362\uff08\u901a\u5e38\u7f29\u5199\u4e3a CGNAT\uff09\u662f IP \u5730\u5740\u7ba1\u7406\u9886\u57df\u7684\u4e00\u9879\u5173\u952e\u521b\u65b0\u3002\u5b83\u662f\u4e92\u8054\u7f51\u5de5\u7a0b\u4efb\u52a1\u7ec4 (IETF) \u6807\u51c6\uff0c\u4e13\u95e8\u7528\u4e8e\u89e3\u51b3 IPv4 \u5730\u5740\u8017\u5c3d\u95ee\u9898\u3002<\/p>\n<h2>\u8ffd\u6eaf CGNAT \u7684\u8d77\u6e90\u548c\u6f14\u8fdb<\/h2>\n<p>CGNAT \u7684\u8bde\u751f\u53ef\u4ee5\u8ffd\u6eaf\u5230 21 \u4e16\u7eaa\u521d\u3002\u5b83\u6700\u521d\u7531 IETF \u4e8e 2011 \u5e74\u6839\u636e RFC 6264 \u63d0\u51fa\uff0c\u968f\u540e\u4e8e 2012 \u5e74\u901a\u8fc7 RFC 6888 \u8fdb\u884c\u4e86\u6807\u51c6\u5316\u3002\u5176\u521b\u5efa\u7684\u4e3b\u8981\u9a71\u52a8\u56e0\u7d20\u662f IPv4 \u5730\u5740\u7684\u8017\u5c3d\u548c IPv6 \u7684\u7f13\u6162\u91c7\u7528\u3002<\/p>\n<p>IPv4 \u4f7f\u7528 32 \u4f4d\u5730\u5740\uff0c\u6700\u5927\u552f\u4e00\u5730\u5740\u6570\u9650\u5236\u7ea6\u4e3a 43 \u4ebf\u3002\u968f\u7740\u8fde\u63a5\u5230\u4e92\u8054\u7f51\u7684\u8bbe\u5907\u6570\u91cf\u5f00\u59cb\u8d85\u8fc7\u6b64\u9650\u5236\uff0cCGNAT \u5e94\u8fd0\u800c\u751f\uff0c\u6210\u4e3a\u4e00\u79cd\u53ef\u884c\u7684\u89e3\u51b3\u65b9\u6848\uff0c\u4f7f\u591a\u53f0\u8bbe\u5907\u80fd\u591f\u5171\u4eab\u4e00\u4e2a\u516c\u5171 IPv4 \u5730\u5740\u3002<\/p>\n<h2>\u89e3\u6790 CGNAT \u7684\u6982\u5ff5<\/h2>\n<p>CGNAT \u662f\u4e00\u79cd\u901a\u8fc7\u5141\u8bb8\u591a\u53f0\u8bbe\u5907\u5171\u4eab\u4e00\u4e2a\u516c\u5171 IPv4 \u5730\u5740\u6765\u5ef6\u957f IPv4 \u5730\u5740\u7a7a\u95f4\u4f7f\u7528\u5bff\u547d\u7684\u6280\u672f\u3002\u5b83\u662f\u4e00\u79cd\u7f51\u7edc\u5730\u5740\u8f6c\u6362 (NAT)\uff0c\u662f\u4e00\u79cd\u5c06\u4e00\u4e2a IP \u5730\u5740\u7a7a\u95f4\u91cd\u65b0\u6620\u5c04\u5230\u53e6\u4e00\u4e2a IP \u5730\u5740\u7a7a\u95f4\u7684\u65b9\u6cd5\u3002<\/p>\n<p>\u5728\u4f20\u7edf\u7684 NAT \u73af\u5883\u4e2d\uff0c\u672c\u5730\u7f51\u7edc\u4e2d\u7684\u8bbe\u5907\u5171\u4eab\u4e00\u4e2a\u516c\u5171 IP \u5730\u5740\uff0c\u4ee5\u4fbf\u4e0e\u4e92\u8054\u7f51\u8fdb\u884c\u901a\u4fe1\u3002CGNAT \u66f4\u8fdb\u4e00\u6b65\uff0c\u5728\u4e92\u8054\u7f51\u670d\u52a1\u63d0\u4f9b\u5546 (ISP) \u7ea7\u522b\u91c7\u7528\u7b2c\u4e8c\u5c42 NAT\u3002\u8fd9\u610f\u5473\u7740\u591a\u4e2a\u5ba2\u6237\uff08\u6bcf\u4e2a\u5ba2\u6237\u90fd\u6709\u81ea\u5df1\u7684\u672c\u5730 NAT\uff09\u53ef\u4ee5\u5171\u4eab\u4e00\u4e2a\u516c\u5171 IP \u5730\u5740\u3002<\/p>\n<h2>\u63a2\u7d22 CGNAT \u7684\u529f\u80fd<\/h2>\n<p>CGNAT \u7684\u6838\u5fc3\u5de5\u4f5c\u539f\u7406\u4e0e\u4f20\u7edf NAT \u76f8\u540c\uff0c\u4f46\u591a\u4e86\u4e00\u4e2a\u8f6c\u6362\u5c42\u3002\u5f53\u6570\u636e\u5305\u4ece\u672c\u5730\u7f51\u7edc\u4f20\u8f93\u5230\u4e92\u8054\u7f51\u65f6\uff0c\u5b83\u4eec\u4f1a\u7ecf\u8fc7\u672c\u5730 NAT\uff0c\u672c\u5730 NAT \u4f1a\u5c06\u79c1\u6709 IP \u5730\u5740\u8f6c\u6362\u4e3a\u516c\u6709 IP \u5730\u5740\u3002\u7136\u540e\uff0c\u8fd9\u4e9b\u6570\u636e\u5305\u4f1a\u5230\u8fbe ISP \u7684 CGNAT\uff0c\u540e\u8005\u4f1a\u518d\u6b21\u66f4\u6539\u516c\u6709 IP \u5730\u5740\u3002\u5bf9\u4e8e\u4f20\u5165\u6570\u636e\u5305\uff0c\u6b64\u8fc7\u7a0b\u5219\u76f8\u53cd\u3002<\/p>\n<p>CGNAT \u7cfb\u7edf\u7684\u5173\u952e\u7ec4\u4ef6\u5305\u62ec\uff1a<\/p>\n<ol>\n<li>CGNAT \u8bbe\u5907\u672c\u8eab\uff0c\u6267\u884c\u8f6c\u6362\u3002<\/li>\n<li>\u5206\u914d\u7ed9 CGNAT \u7684\u516c\u7f51 IP \u5730\u5740\u6c60\u3002<\/li>\n<li>\u5185\u90e8\u79c1\u6709IP\u5730\u5740\u5230\u5916\u90e8\u516c\u6709IP\u5730\u5740\u7684\u6620\u5c04\u3002<\/li>\n<\/ol>\n<h2>CGNAT \u7684\u4e3b\u8981\u7279\u70b9<\/h2>\n<p>CGNAT \u5177\u6709\u51e0\u4e2a\u503c\u5f97\u6ce8\u610f\u7684\u7279\u70b9\uff1a<\/p>\n<ol>\n<li><strong>\u89e3\u51b3\u4fdd\u62a4\u95ee\u9898<\/strong>\uff1a\u901a\u8fc7\u5141\u8bb8\u591a\u53f0\u8bbe\u5907\u5171\u4eab\u4e00\u4e2a\u516c\u5171 IP \u5730\u5740\uff0cCGNAT \u5ef6\u957f\u4e86 IPv4 \u5730\u5740\u7a7a\u95f4\u7684\u5bff\u547d\u3002<\/li>\n<li><strong>\u900f\u660e\u5ea6<\/strong>\uff1a\u5bf9\u4e8e\u5927\u591a\u6570\u7528\u6237\u548c\u5e94\u7528\u7a0b\u5e8f\u6765\u8bf4\uff0cCGNAT\u7684\u5b58\u5728\u662f\u5b8c\u5168\u900f\u660e\u7684\u3002<\/li>\n<li><strong>\u517c\u5bb9\u6027<\/strong>\uff1aCGNAT \u53ef\u4ee5\u540c\u65f6\u4f7f\u7528 IPv4 \u548c IPv6 \u5730\u5740\uff0c\u4ece\u800c\u4e0e\u6240\u6709\u7c7b\u578b\u7684\u7f51\u7edc\u517c\u5bb9\u3002<\/li>\n<li><strong>\u53ef\u6269\u5c55\u6027<\/strong>\uff1aCGNAT\u53ef\u4ee5\u5904\u7406\u5927\u91cfIP\u5730\u5740\u8f6c\u6362\uff0c\u9002\u5408\u5927\u578bISP\u3002<\/li>\n<\/ol>\n<h2>CGNAT \u7684\u7c7b\u522b<\/h2>\n<p>\u6839\u636e\u529f\u80fd\u548c\u5e94\u7528\u8303\u56f4\uff0cCGNAT\u5927\u81f4\u53ef\u5206\u4e3a\u4e24\u7c7b\uff1a<\/p>\n<ol>\n<li><strong>\u57fa\u672c CGNAT<\/strong>\uff1a\u6267\u884c\u4ece\u516c\u6709 IP \u5730\u5740\u5230\u79c1\u6709 IP \u5730\u5740\u7684\u7b80\u5355\u7684\u4e00\u5bf9\u4e00\u8f6c\u6362\u3002<\/li>\n<li><strong>\u9ad8\u7ea7 CGNAT<\/strong>\uff1a\u9664\u4e86\u4e00\u5bf9\u4e00\u7ffb\u8bd1\uff0c\u5b83\u8fd8\u652f\u6301\u7aef\u53e3\u963b\u6b62\u3001\u4f1a\u8bdd\u9650\u5236\u548c\u65e5\u5fd7\u8bb0\u5f55\u7b49\u9ad8\u7ea7\u529f\u80fd\u3002<\/li>\n<\/ol>\n<h2>CGNAT \u7684\u4f7f\u7528\u3001\u95ee\u9898\u548c\u89e3\u51b3\u65b9\u6848<\/h2>\n<p>CGNAT \u4e3b\u8981\u7531 ISP \u4f7f\u7528\uff0c\u7528\u4e8e\u7ba1\u7406 IPv4 \u5730\u5740\u7684\u7a00\u7f3a\u6027\u3002\u4e0d\u8fc7\uff0c\u5927\u578b\u7ec4\u7ec7\u4e5f\u53ef\u4ee5\u4f7f\u7528\u5b83\u6765\u6574\u5408\u5176\u516c\u5171 IP \u5730\u5740\u7684\u4f7f\u7528\u3002<\/p>\n<p>\u5c3d\u7ba1 CGNAT \u6709\u8bf8\u591a\u597d\u5904\uff0c\u4f46\u5b83\u4e5f\u5e26\u6765\u4e00\u4e9b\u6311\u6218\uff1a<\/p>\n<ul>\n<li>\u5b83\u53ef\u4ee5\u963b\u788d\u67d0\u4e9b\u70b9\u5bf9\u70b9 (P2P) \u670d\u52a1\u548c\u5728\u7ebf\u6e38\u620f\u5e94\u7528\u7a0b\u5e8f\u3002<\/li>\n<li>\u5b83\u53ef\u4ee5\u4f7f\u5730\u7406\u4f4d\u7f6e\u548c\u57fa\u4e8e IP \u7684\u8bc6\u522b\u53d8\u5f97\u590d\u6742\u3002<\/li>\n<li>\u8fd9\u53ef\u80fd\u4f1a\u5f71\u54cd\u9700\u8981\u7aef\u53e3\u8f6c\u53d1\u7684\u670d\u52a1\u3002<\/li>\n<\/ul>\n<p>\u89e3\u51b3\u8fd9\u4e9b\u95ee\u9898\u901a\u5e38\u6d89\u53ca\u4f7f\u7528\u9ad8\u7ea7 CGNAT \u529f\u80fd\u6216\u4f7f\u7528\u66ff\u4ee3\u6280\u672f\uff0c\u5982 IPv6 \u6216\u5e94\u7528\u5c42\u7f51\u5173 (ALG)\u3002<\/p>\n<h2>CGNAT \u4e0e\u7c7b\u4f3c\u6982\u5ff5\u7684\u6bd4\u8f83\u6982\u8ff0<\/h2>\n<table>\n<thead>\n<tr>\n<th>\u6982\u5ff5<\/th>\n<th>\u7b80\u8981\u8bf4\u660e<\/th>\n<th>\u4e3b\u8981\u4f18\u52bf<\/th>\n<th>\u4e3b\u8981\u9650\u5236<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u4e2d\u592e\u56fd\u5bb6\u673a\u5173\u4e8b\u52a1\u7ba1\u7406\u5c40<\/td>\n<td>\u591a\u5c42 NAT\uff0c\u4e3b\u8981\u7528\u4e8e IPv4 \u5730\u5740\u4fdd\u62a4<\/td>\n<td>\u6700\u5927\u9650\u5ea6\u5730\u5229\u7528 IPv4 \u5730\u5740<\/td>\n<td>\u53ef\u80fd\u4f1a\u5bfc\u81f4\u67d0\u4e9b\u5e94\u7528\u7a0b\u5e8f\u51fa\u73b0\u95ee\u9898<\/td>\n<\/tr>\n<tr>\n<td>\u6807\u51c6 NAT<\/td>\n<td>\u672c\u5730\u7f51\u7edc\u4e2d\u4f7f\u7528\u7684\u4e00\u5c42 NAT<\/td>\n<td>\u7b80\u5316\u5185\u90e8\u7f51\u7edc\u7ba1\u7406<\/td>\n<td>\u65e0\u6cd5\u89e3\u51b3 IPv4 \u5730\u5740\u8017\u5c3d\u95ee\u9898<\/td>\n<\/tr>\n<tr>\n<td>IPv6<\/td>\n<td>\u5177\u6709\u66f4\u5927\u5730\u5740\u7a7a\u95f4\u7684\u8f83\u65b0\u7684 IP \u5730\u5740\u6807\u51c6<\/td>\n<td>\u89e3\u51b3 IPv4 \u5730\u5740\u8017\u5c3d\u95ee\u9898<\/td>\n<td>\u7f13\u6162\u800c\u590d\u6742\u7684\u91c7\u7528\u8fc7\u7a0b<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>\u4e0e CGNAT \u76f8\u5173\u7684\u672a\u6765\u524d\u666f\u548c\u6280\u672f<\/h2>\n<p>\u968f\u7740\u4e92\u8054\u7f51\u7684\u53d1\u5c55\uff0cCGNAT \u4e5f\u5728\u4e0d\u65ad\u53d1\u5c55\u3002\u5b83\u7684\u672a\u6765\u4f3c\u4e4e\u4e0e\u6700\u7ec8\u5411 IPv6 \u7684\u8fc7\u6e21\u606f\u606f\u76f8\u5173\u3002\u867d\u7136 CGNAT \u4e3a IPv4 \u8017\u5c3d\u63d0\u4f9b\u4e86\u89e3\u51b3\u65b9\u6848\uff0c\u4f46\u8fd9\u53ea\u662f\u6682\u65f6\u7684\u3002\u968f\u7740 IPv6 \u8d8a\u6765\u8d8a\u666e\u904d\u5730\u91c7\u7528\uff0c\u5bf9 CGNAT \u7684\u4f9d\u8d56\u53ef\u80fd\u4f1a\u51cf\u5c11\u3002<\/p>\n<p>\u53e6\u4e00\u65b9\u9762\uff0cCGNAT \u7684\u9ad8\u7ea7\u5f62\u5f0f\u6b63\u5728\u4e0d\u65ad\u53d1\u5c55\uff0c\u4ee5\u66f4\u597d\u5730\u5e94\u5bf9\u76f8\u5173\u6311\u6218\u3002\u8fd9\u5305\u62ec\u6539\u8fdb\u7684\u65e5\u5fd7\u8bb0\u5f55\u3001\u66f4\u597d\u5730\u5904\u7406 P2P \u5e94\u7528\u7a0b\u5e8f\u548c\u9ad8\u7ea7\u4f1a\u8bdd\u7ba1\u7406\u3002<\/p>\n<h2>\u4ee3\u7406\u670d\u52a1\u5668\u548c CGNAT<\/h2>\n<p>\u4ee3\u7406\u670d\u52a1\u5668\u548c CGNAT \u6709\u4e00\u4e2a\u5171\u540c\u70b9\uff1a\u5b83\u4eec\u90fd\u6d89\u53ca\u4e00\u4e2a IP \u5730\u5740\u4ee3\u8868\u591a\u4e2a\u8bbe\u5907\u7684\u6982\u5ff5\u3002\u867d\u7136\u4ee3\u7406\u670d\u52a1\u5668\u53ef\u4ee5\u63d0\u4f9b\u533f\u540d\u6027\u5e76\u5141\u8bb8\u7ed5\u8fc7\u5185\u5bb9\u9650\u5236\uff0c\u4f46\u5b83\u4eec\u65e0\u6cd5\u89e3\u51b3 IPv4 \u5730\u5740\u8017\u5c3d\u7684\u95ee\u9898\u3002\u8fd9\u5c31\u662f CGNAT \u53d1\u6325\u4f5c\u7528\u7684\u5730\u65b9\u3002\u4ee3\u7406\u670d\u52a1\u5668\u4e0e CGNAT \u7684\u4ea4\u4e92\u53ef\u80fd\u56e0\u5177\u4f53\u8bbe\u7f6e\u800c\u5f02\uff0c\u4f46\u4e00\u822c\u6765\u8bf4\uff0c\u5b83\u4eec\u53ef\u4ee5\u5728\u7f51\u7edc\u73af\u5883\u4e2d\u65e0\u7f1d\u534f\u540c\u5de5\u4f5c\u3002<\/p>\n<h2>\u76f8\u5173\u94fe\u63a5<\/h2>\n<ol>\n<li><a href=\"https:\/\/tools.ietf.org\/html\/rfc6888\" target=\"_new\" rel=\"noopener nofollow\">RFC 6888 \u2013 IETF<\/a><\/li>\n<li><a href=\"https:\/\/blogs.cisco.com\/sp\/cgn-the-dos-and-donts\" target=\"_new\" rel=\"noopener nofollow\">CGNAT\uff1aIPv4 \u8017\u5c3d\u7684\u77ed\u671f\u89e3\u51b3\u65b9\u6848 \u2013 \u601d\u79d1\u535a\u5ba2<\/a><\/li>\n<li><a href=\"https:\/\/tools.ietf.org\/html\/rfc8200\" target=\"_new\" rel=\"noopener nofollow\">IPv6 \u2013 IETF<\/a><\/li>\n<li><a href=\"https:\/\/www.juniper.net\/documentation\/en_US\/junos\/topics\/concept\/nat-overview.html\" target=\"_new\" rel=\"noopener nofollow\">\u4e86\u89e3\u7f51\u7edc\u5730\u5740\u8f6c\u6362 \u2013 \u77bb\u535a\u7f51\u7edc<\/a><\/li>\n<\/ol>\n<p>\u672c\u6587\u4e2d\u7684\u4fe1\u606f\u63d0\u4f9b\u4e86\u5bf9 CGNAT \u7684\u5168\u9762\u4e86\u89e3\uff0c\u5305\u62ec\u5176\u8d77\u6e90\u3001\u5e94\u7528\u3001\u5c40\u9650\u6027\u548c\u6f5c\u5728\u672a\u6765\u3002\u5b83\u8fd8\u7814\u7a76\u4e86\u4ee3\u7406\u670d\u52a1\u5668\uff08\u4f8b\u5982 OneProxy \u63d0\u4f9b\u7684\u4ee3\u7406\u670d\u52a1\u5668\uff09\u5982\u4f55\u4e0e CGNAT \u4ea4\u4e92\uff0c\u4ece\u800c\u63d0\u4f9b\u4e86\u5bf9\u8fd9\u4e9b\u4e92\u8fde\u7f51\u7edc\u6280\u672f\u7684\u6574\u4f53\u89c6\u89d2\u3002<\/p>","protected":false},"featured_media":476205,"menu_order":0,"template":"","meta":{"_acf_changed":false,"content-type":"","inline_featured_image":false,"footnotes":""},"class_list":["post-476204","wiki","type-wiki","status-publish","has-post-thumbnail","hentry"],"acf":{"faq_title":"Frequently Asked Questions about <mark>Carrier-Grade Network Address Translation (CGNAT): An In-depth Look<\/mark>","faq_items":[{"question":"What is Carrier-Grade Network Address Translation (CGNAT)?","answer":"<p>CGNAT is an Internet Engineering Task Force (IETF) standard specifically designed to mitigate the problem of IPv4 address exhaustion. It allows multiple devices to share a single public IPv4 address, effectively extending the lifespan of the IPv4 address space.<\/p>"},{"question":"When was CGNAT first introduced?","answer":"<p>CGNAT was initially proposed by the IETF in 2011 and later standardized in 2012. Its introduction was driven by the rapidly depleting pool of IPv4 addresses and the slow adoption of IPv6.<\/p>"},{"question":"How does CGNAT work?","answer":"<p>CGNAT operates much like a traditional NAT, but with an extra layer of translation. When data packets move from a local network to the Internet, they pass through the local NAT, which converts the private IP address to a public one. These packets then reach the CGNAT at the ISP, which once again changes the public IP address. The process is reversed for inbound data packets.<\/p>"},{"question":"What are some key features of CGNAT?","answer":"<p>Key features of CGNAT include address conservation (allowing many devices to share a single public IP address), transparency (being unnoticeable to most users and applications), compatibility (working with both IPv4 and IPv6 addresses), and scalability (handling a large number of IP address translations).<\/p>"},{"question":"What types of CGNAT exist?","answer":"<p>There are two broad categories of CGNAT: Basic CGNAT, which performs simple one-to-one translation of public IP addresses to private ones, and Advanced CGNAT, which supports additional features like port blocking, session limiting, and logging.<\/p>"},{"question":"What are some issues with CGNAT and how can they be solved?","answer":"<p>CGNAT can pose problems for certain peer-to-peer (P2P) services and online gaming applications, complicate geo-location and IP-based identification, and impact services that require port forwarding. These issues can be tackled by using advanced CGNAT features or alternative technologies like IPv6 or Application Layer Gateways (ALGs).<\/p>"},{"question":"What is the future of CGNAT?","answer":"<p>The future of CGNAT is likely intertwined with the adoption of IPv6. While CGNAT provides a temporary solution to IPv4 exhaustion, as IPv6 becomes more universally adopted, the reliance on CGNAT may diminish. However, advanced forms of CGNAT continue to evolve to better handle the associated challenges.<\/p>"},{"question":"How do proxy servers interact with CGNAT?","answer":"<p>Proxy servers and CGNAT share a common thread in that they both involve the concept of one IP address representing multiple devices. While proxy servers can provide anonymity and bypass content restrictions, they don't solve the issue of IPv4 address exhaustion. Generally, proxy servers and CGNAT can function together seamlessly in a network environment.<\/p>"}]},"_links":{"self":[{"href":"https:\/\/oneproxy.pro\/cn\/wp-json\/wp\/v2\/wiki\/476204","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oneproxy.pro\/cn\/wp-json\/wp\/v2\/wiki"}],"about":[{"href":"https:\/\/oneproxy.pro\/cn\/wp-json\/wp\/v2\/types\/wiki"}],"version-history":[{"count":0,"href":"https:\/\/oneproxy.pro\/cn\/wp-json\/wp\/v2\/wiki\/476204\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/oneproxy.pro\/cn\/wp-json\/wp\/v2\/media\/476205"}],"wp:attachment":[{"href":"https:\/\/oneproxy.pro\/cn\/wp-json\/wp\/v2\/media?parent=476204"}],"curies":[{"name":"\u53ef\u6e7f\u6027\u7c89\u5242","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}