{"id":209,"date":"2018-07-29T11:40:37","date_gmt":"2018-07-29T03:40:37","guid":{"rendered":"https:\/\/pfsense.freeddns.org\/wp\/?p=209"},"modified":"2020-08-24T22:10:58","modified_gmt":"2020-08-24T14:10:58","slug":"pfsense-book%e4%b9%8b%e9%ab%98%e5%8f%af%e7%94%a8%e6%80%a7%e9%9b%86%e7%be%a4ha","status":"publish","type":"post","link":"https:\/\/blog.pfchina.org\/?p=209","title":{"rendered":"pfSense book\u4e4b\u9ad8\u53ef\u7528\u96c6\u7fa4(HA)"},"content":{"rendered":"<h1 style=\"text-align: justify;\">\u9ad8\u53ef\u7528\u96c6\u7fa4<\/h1>\n<ul class=\" list-paddingleft-2\" style=\"text-align: justify;\">\n<li>pfsync\u6982\u8ff0<\/li>\n<li>pfSense XML-RPC\u914d\u7f6e\u540c\u6b65\u6982\u8ff0<\/li>\n<li>\u5197\u4f59\u914d\u7f6e\u793a\u4f8b<\/li>\n<li>HA\u4e0e\u591aWAN<\/li>\n<li>\u9a8c\u8bc1\u6545\u969c\u8f6c\u79fb\u529f\u80fd<\/li>\n<li>\u63d0\u4f9b\u65e0NAT\u7684\u5197\u4f59<\/li>\n<li>\u7b2c2\u5c42\u5197\u4f59<\/li>\n<li>\u9ad8\u53ef\u7528\u4e0e\u6865\u63a5<\/li>\n<li>\u4f7f\u7528IP\u522b\u540d\u51cf\u5c11\u5fc3\u8df3\u6d41\u91cf<\/li>\n<li>\u63a5\u53e3<\/li>\n<li>\u6545\u969c\u6392\u67e5<\/li>\n<\/ul>\n<p style=\"text-align: justify;\">pfSense\u7684\u9ad8\u53ef\u7528\u901a\u8fc7\u4ee5\u4e0b\u7279\u6027\u7684\u7ec4\u5408\u6765\u5b9e\u73b0\uff1a<\/p>\n<ul class=\" list-paddingleft-2\" style=\"text-align: justify;\">\n<li>CARP\u7528\u4e8eIP\u5730\u5740\u5197\u4f59<\/li>\n<li>XMLRPC\u7528\u4e8e\u914d\u7f6e\u540c\u6b65<\/li>\n<li>pfsync\u7528\u4e8e\u72b6\u6001\u8868\u540c\u6b65<\/li>\n<\/ul>\n<p style=\"text-align: justify;\">\u901a\u8fc7\u8fd9\u79cd\u914d\u7f6e\uff0c\u5355\u5143\u5145\u5f53\u201c\u4e3b\u52a8\/\u88ab\u52a8\u201d\u7fa4\u96c6\uff0c\u4e3b\u8282\u70b9\u4f5c\u4e3a\u4e3b\u5355\u5143\uff0c\u8f85\u52a9\u8282\u70b9\u4f5c\u4e3a\u5907\u7528\u89d2\u8272\uff0c\u5982\u679c\u4e3b\u8282\u70b9\u53d1\u751f\u6545\u969c\uff0c\u5219\u4f1a\u6839\u636e\u9700\u8981\u63a5\u7ba1\u3002<\/p>\n<p style=\"text-align: justify;\">\u867d\u7136\u7ecf\u5e38\u88ab\u9519\u8bef\u5730\u79f0\u4e3a\u201cCARP\u7fa4\u96c6\u201d\uff0c\u4f46\u7531\u4e8eCARP\u53ea\u662fpfSense\u5b9e\u73b0\u9ad8\u53ef\u7528\u6027\u7684\u51e0\u79cd\u6280\u672f\u4e4b\u4e00\uff0c\u56e0\u6b64\u4e24\u4e2a\u6216\u591a\u4e2a\u5197\u4f59pfSense\u9632\u706b\u5899\u66f4\u9002\u5408\u79f0\u4e3a\u201c\u9ad8\u53ef\u7528\u6027\u7fa4\u96c6\u201d\u6216\u201cHA\u7fa4\u96c6\u201d\uff0c\u672a\u6765\u7684CARP\u53ef\u4ee5\u4ea4\u6362\u4e3a\u4e0d\u540c\u7684\u5197\u4f59\u534f\u8bae\u3002<\/p>\n<p style=\"text-align: justify;\">\u6bcf\u4e2a\u7fa4\u96c6\u8282\u70b9\u4e0a\u7684\u4e00\u4e2a\u63a5\u53e3\u5c06\u4e13\u95e8\u7528\u4e8e\u540c\u6b65\u4efb\u52a1\u3002\u8fd9\u4e2a\u63a5\u53e3\u901a\u5e38\u79f0\u4e3a\u201cSync\u201d\u63a5\u53e3\uff0c\u7528\u4e8e\u914d\u7f6e\u540c\u6b65\u548cpfsync\u72b6\u6001\u540c\u6b65\u3002\u4efb\u4f55\u53ef\u7528\u7684\u63a5\u53e3\u90fd\u53ef\u4ee5\u7528\u4e8e\u201cSync<strong>\u201d<\/strong>\u3002<\/p>\n<p class=\"first admonition-title\" style=\"text-align: justify;\">\u6ce8\u610f\uff1a\u6709\u4eba\u79f0\u4e4b\u4e3a\u201cCARP\u201d\u63a5\u53e3\uff0c\u8fd9\u662f\u4e0d\u6b63\u786e\u7684\uff0c\u800c\u4e14\u975e\u5e38\u5177\u6709\u8bef\u5bfc\u6027\u3002 CARP\u5fc3\u8df3\u53d1\u751f\u5728\u4e0eCARP VIP\u7684\u6bcf\u4e2a\u63a5\u53e3\u4e0a; CARP\u6d41\u91cf\u548c\u6545\u969c\u8f6c\u79fb\u64cd\u4f5c\u4e0d\u4f7f\u7528Sync\u63a5\u53e3\u3002<\/p>\n<p style=\"text-align: justify;\">\u6700\u5e38\u89c1\u7684\u9ad8\u53ef\u7528\u6027\u7fa4\u96c6\u914d\u7f6e\u4ec5\u5305\u542b\u4e24\u4e2a\u8282\u70b9\u3002 \u7fa4\u96c6\u4e2d\u6709\u66f4\u591a\u7684\u8282\u70b9\u4e5f\u662f\u53ef\u4ee5\u7684\uff0c\u4f46\u5b83\u4eec\u663e\u7136\u4e0d\u5177\u6709\u7279\u522b\u7684\u4f18\u52bf\u3002<\/p>\n<p style=\"text-align: justify;\">\u533a\u5206\u4e09\u79cd\u529f\u80fd\uff08IP\u5730\u5740\u5197\u4f59\uff0c\u914d\u7f6e\u540c\u6b65\u548c\u72b6\u6001\u8868\u540c\u6b65\uff09\u975e\u5e38\u91cd\u8981\uff0c\u56e0\u4e3a\u5b83\u4eec\u53d1\u751f\u5728\u4e0d\u540c\u7684\u5730\u65b9\u3002 \u914d\u7f6e\u540c\u6b65\u548c\u72b6\u6001\u540c\u6b65\u53d1\u751f\u5728\u540c\u6b65\u63a5\u53e3\u4e0a\uff0c\u76f4\u63a5\u5728\u9632\u706b\u5899\u5355\u5143\u4e4b\u95f4\u8fdb\u884c\u901a\u4fe1\u3002 CARP\u5fc3\u8df3\u5728\u6bcf\u4e2a\u63a5\u53e3\u4e0a\u4e0eCARP VIP\u4e00\u8d77\u53d1\u9001\u3002 \u6545\u969c\u8f6c\u79fb\u4fe1\u53f7\u4e0d\u4f1a\u53d1\u751f\u5728\u540c\u6b65\u63a5\u53e3\u4e0a\uff0c\u800c\u662f\u53d1\u751f\u5728\u6bcf\u4e2a\u542f\u7528CARP\u7684\u63a5\u53e3\u4e0a\u3002<\/p>\n<h2 style=\"text-align: justify;\">CARP\u00a0\u6982\u8ff0<\/h2>\n<p style=\"text-align: justify;\">\u5171\u7528\u5730\u5740\u5197\u4f59\u534f\u8bae\uff08CARP\uff09\u7531OpenBSD\u5f00\u53d1\u4eba\u5458\u521b\u5efa\uff0c\u4f5c\u4e3a\u514d\u8d39\u7684\u5f00\u653e\u5f0f\u5197\u4f59\u89e3\u51b3\u65b9\u6848\uff0c\u7528\u4e8e\u5728\u4e00\u7ec4\u7f51\u7edc\u8bbe\u5907\u4e4b\u95f4\u5171\u4eabIP\u5730\u5740\u3002\u5728\u6b64\u4e4b\u524d\u5df2\u7ecf\u6709\u7c7b\u4f3c\u7684\u89e3\u51b3\u65b9\u6848\uff0c\u4e3b\u8981\u662fIETF\u865a\u62df\u8def\u7531\u5668\u5197\u4f59\u534f\u8bae\uff08VRRP\uff09\u6807\u51c6\u3002\u7136\u800c\uff0c\u601d\u79d1\u58f0\u79f0VRRP\u5df2\u7ecf\u88ab\u5b83\u7684\u70ed\u5907\u7528\u8def\u7531\u5668\u534f\u8bae\uff08HSRP\uff09\u7684\u4e13\u5229\u8986\u76d6\uff0c\u5e76\u544a\u77e5OpenBSD\u5f00\u53d1\u4eba\u5458\u5b83\u5c06\u6267\u884c\u5176\u4e13\u5229\u6743\u5229\u3002\u56e0\u6b64\uff0cOpenBSD\u5f00\u53d1\u4eba\u5458\u521b\u5efa\u4e86\u4e00\u4e2a\u65b0\u7684\u514d\u8d39\u5f00\u653e\u534f\u8bae\uff0c\u5728\u4e0d\u4fb5\u72af\u601d\u79d1\u4e13\u5229\u7684\u60c5\u51b5\u4e0b\u5b9e\u73b0\u57fa\u672c\u76f8\u540c\u7684\u6548\u679c\u3002 CARP\u4e8e2003\u5e7410\u6708\u5728OpenBSD\u4e0a\u6295\u5165\u4f7f\u7528\uff0c\u540e\u6765\u53c8\u88ab\u6dfb\u52a0\u5230FreeBSD\u4e2d\u3002<\/p>\n<p style=\"text-align: justify;\">CARP\u7c7b\u578b\u865a\u62dfIP\u5730\u5740\uff08VIP\uff09\u5728\u7fa4\u96c6\u7684\u8282\u70b9\u4e4b\u95f4\u5171\u4eab\u3002\u4e00\u4e2a\u8282\u70b9\u662f\u4e3b\u8282\u70b9\uff0c\u63a5\u6536IP\u5730\u5740\u7684\u6d41\u91cf\uff0c\u5176\u4ed6\u8282\u70b9\u4fdd\u6301\u5907\u4efd\u72b6\u6001\u5e76\u76d1\u89c6\u5fc3\u8df3\uff0c\u4ee5\u67e5\u770b\u5e76\u786e\u8ba4\u4e3b\u8282\u70b9\u53d1\u751f\u6545\u969c\u65f6\u662f\u5426\u9700\u8981\u627f\u62c5\u4e3b\u8282\u70b9\u89d2\u8272\u3002\u7531\u4e8e\u4e00\u6b21\u53ea\u6709\u4e00\u4e2a\u7fa4\u96c6\u6210\u5458\u6b63\u5728\u4f7f\u7528IP\u5730\u5740\uff0c\u56e0\u6b64CARP VIP\u4e0d\u4f1a\u53d1\u751fIP\u5730\u5740\u51b2\u7a81\u3002<\/p>\n<p style=\"text-align: justify;\">\u4e3a\u4e86\u4f7f\u6545\u969c\u8f6c\u79fb\u6b63\u5e38\u5de5\u4f5c\uff0c\u5fc5\u987b\u5c06\u8fdb\u5165\u7fa4\u96c6\u7684\u5165\u7ad9\u548c\u51fa\u7ad9\u6d41\u91cf\uff08\u4f8b\u5982\u8def\u7531\u4e0a\u6e38\u6d41\u91cf\uff0cVPN\uff0cNAT\uff0c\u672c\u5730\u5ba2\u6237\u7aef\u7f51\u5173\uff0cDNS\u8bf7\u6c42\u7b49\uff09\u901a\u8fc7CARP VIP\u8fdb\u884c\u4f20\u9012\uff0c\u4f8b\u5982\u51fa\u7ad9NAT\u5c06\u4eceCARP VIP\u53d1\u9001\u3002\u5982\u679c\u6d41\u91cf\u76f4\u63a5\u53d1\u5f80\u67d0\u4e2a\u8282\u70b9\uff0c\u800c\u4e0d\u662fCARP VIP\uff0c\u5219\u8be5\u6d41\u91cf\u4e0d\u4f1a\u88ab\u5176\u4ed6\u8282\u70b9\u63a5\u6536\u3002<\/p>\n<p style=\"text-align: justify;\">CARP\u4e0eVRRP\u548cHSRP\u7c7b\u4f3c\uff0c\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\u6709\u53ef\u80fd\u4f1a\u53d1\u751f\u51b2\u7a81\u3002\u5728\u5305\u542bCARP VIP\u7684\u6bcf\u4e2a\u63a5\u53e3\u4e0a\u53d1\u9001\u5fc3\u8df3\uff0c\u6bcf\u4e2aVIP\u6bcf\u4e2a\u63a5\u53e3\u4e00\u4e2a\u5fc3\u8df3\u3002\u5728\u9ed8\u8ba4\u7684\u504f\u79bb\u503c\u548c\u57fa\u51c6\u503c\u4e0b\uff0cVIP\u6bcf\u79d2\u53d1\u51fa\u4e00\u6b21\u5fc3\u8df3\u3002\u504f\u79bb\u503c\u786e\u5b9a\u54ea\u4e2a\u8282\u70b9\u5728\u7ed9\u5b9a\u65f6\u95f4\u70b9\u662f\u4e3b\u8282\u70b9\u3002\u65e0\u8bba\u54ea\u4e2a\u8282\u70b9\u4f20\u8f93\u5fc3\u8df3\uff0c\u66f4\u5feb\u7684\u90a3\u4e2a\u90fd\u4f1a\u627f\u62c5\u4e3b\u8282\u70b9\u89d2\u8272\u3002\u8f83\u9ad8\u7684\u504f\u79bb\u503c\u4f1a\u5bfc\u81f4\u5fc3\u8df3\u4f20\u8f93\u5ef6\u8fdf\u589e\u52a0\uff0c\u56e0\u6b64\u5177\u6709\u8f83\u4f4e\u504f\u79bb\u503c\u7684\u8282\u70b9\u5c06\u6210\u4e3a\u4e3b\u8282\u70b9\u8bbe\u5907\uff0c\u9664\u975e\u7f51\u7edc\u6216\u5176\u4ed6\u95ee\u9898\u5bfc\u81f4\u5fc3\u8df3\u5ef6\u8fdf\u6216\u4e22\u5931\u3002<\/p>\n<p class=\"first admonition-title\" style=\"text-align: justify;\">\u6ce8\u610f\uff1a\u5207\u52ff\u4f7f\u7528CARP VIP\u8bbf\u95ee\u9632\u706b\u5899GUI\u3001SSH\u6216\u5176\u4ed6\u3002 \u51fa\u4e8e\u7ba1\u7406\u7684\u76ee\u7684\uff0c\u53ea\u80fd\u5728\u6bcf\u4e2a\u5355\u72ec\u8282\u70b9\u7684\u63a5\u53e3\u4e0a\u4f7f\u7528\u5b9e\u9645\u7684IP\u5730\u5740\uff0c\u800c\u4e0d\u8981\u4f7f\u7528VIP\u3002 \u5426\u5219\uff0c\u4e0d\u80fd\u4e8b\u5148\u786e\u5b9a\u6b63\u5728\u8bbf\u95ee\u54ea\u4e2a\u8282\u70b9\u5355\u5143\u3002<\/p>\n<h3 style=\"text-align: justify;\">CARP\u7684IP\u5730\u5740\u8981\u6c42<\/h3>\n<p style=\"text-align: justify;\">\u4f7f\u7528CARP\u7684\u9ad8\u53ef\u7528\u6027\u7fa4\u96c6\u9700\u8981\u6bcf\u4e2a\u5b50\u7f51\u4e2d\u6709\u4e09\u4e2aIP\u5730\u5740\uff0c\u5e76\u4e14Sync\u63a5\u53e3\u9700\u8981\u5355\u72ec\u7684\u672a\u4f7f\u7528\u5b50\u7f51\u3002 \u5bf9\u4e8e\u5e7f\u57df\u7f51\uff0c\u8fd9\u610f\u5473\u7740\u6700\u4f73\u914d\u7f6e\u9700\u8981\u5927\u4e8e\u6216\u7b49\u4e8e29\u4e2a\u5b50\u7f51\u3002 \u6bcf\u4e2a\u8282\u70b9\u4f7f\u7528\u4e00\u4e2aIP\u5730\u5740\uff0c\u53e6\u5916\u8fd8\u6709\u4e00\u4e2a\u5171\u4eab\u7684CARP VIP\u5730\u5740\u7528\u4e8e\u6545\u969c\u8f6c\u79fb\u3002 \u540c\u6b65\u63a5\u53e3\u6bcf\u4e2a\u8282\u70b9\u53ea\u9700\u8981\u4e00\u4e2aIP\u5730\u5740\u3002<\/p>\n<p style=\"text-align: justify;\">\u5728\u6280\u672f\u4e0a\u53ef\u4ee5\u5c06CARP VIP\u63a5\u53e3\u914d\u7f6e\u4e3a\u7ed9\u5b9a\u5b50\u7f51\u4e2d\u552f\u4e00\u7684IP\u5730\u5740\uff0c\u4f46\u901a\u5e38\u4e0d\u5efa\u8bae\u8fd9\u6837\u505a\u3002\u5728WAN\u4e0a\u4f7f\u7528\u65f6\uff0c\u8fd9\u79cd\u7c7b\u578b\u7684\u914d\u7f6e\u5c06\u53ea\u5141\u8bb8\u4ece\u4e3b\u8282\u70b9\u5230WAN\u7684\u901a\u4fe1\uff0c\u8fd9\u4f1a\u4f7f\u4efb\u52a1\uff08\u5982\u66f4\u65b0\u3001\u63d2\u4ef6\u5b89\u88c5\u3001\u7f51\u5173\u76d1\u63a7\u6216\u4efb\u4f55\u9700\u8981\u8f85\u52a9\u8282\u70b9\u7684\u5916\u90e8\u8fde\u63a5\u7684\u4efb\u52a1\uff09\u53d8\u5f97\u975e\u5e38\u590d\u6742\u3002\u5b83\u53ef\u80fd\u66f4\u9002\u5408\u7528\u4e8e\u5185\u90e8\u63a5\u53e3\uff0c\u4f46\u5185\u90e8\u63a5\u53e3\u901a\u5e38\u4e0d\u4f1a\u53d7\u5230\u4e0eWAN\u76f8\u540c\u7684IP\u5730\u5740\u9650\u5236\uff0c\u56e0\u6b64\u4ecd\u7136\u6700\u597d\u5728\u6240\u6709\u8282\u70b9\u4e0a\u914d\u7f6eIP\u5730\u5740\u3002<\/p>\n<h3 style=\"text-align: justify;\">\u4ea4\u6362\u673a\/\u7b2c2\u5c42\u95ee\u9898<\/h3>\n<p style=\"text-align: justify;\">CARP\u5fc3\u8df3\u7ebf\u5229\u7528\u591a\u70b9\u4f20\u9001\uff0c\u5e76\u4e14\u53ef\u80fd\u9700\u8981\u5bf9\u96c6\u7fa4\u6d89\u53ca\u7684\u4ea4\u6362\u673a\u8fdb\u884c\u7279\u6b8a\u5904\u7406\u3002 \u4e00\u4e9b\u4ea4\u6362\u673a\u4f1a\u4ee5\u53ef\u80fd\u5bfc\u81f4CARP\u5931\u8d25\u7684\u65b9\u5f0f\u8fc7\u6ee4\u3001\u9650\u901f\u6216\u4ee5\u5176\u4ed6\u65b9\u5f0f\u5e72\u6270\u7ec4\u64ad\u3002 \u53e6\u5916\uff0c\u4e00\u4e9b\u4ea4\u6362\u673a\u4f7f\u7528\u7aef\u53e3\u9650\u5236\u65b9\u6cd5\uff0c\u8fd9\u4e9b\u65b9\u6cd5\u53ef\u80fd\u5bfc\u81f4CARP\u65e0\u6cd5\u6b63\u5e38\u5de5\u4f5c\u3002<\/p>\n<p style=\"text-align: justify;\">\u56e0\u6b64\u4ea4\u6362\u673a\u5fc5\u987b\uff1a<\/p>\n<ul class=\" list-paddingleft-2\" style=\"text-align: justify;\">\n<li>\u5141\u8bb8\u53d1\u9001\u548c\u63a5\u6536\u591a\u64ad\u6d41\u91cf\uff0c\u4e0d\u80fd\u5e72\u6270\u4f7f\u7528CARP VIP\u7684\u7aef\u53e3\u3002<\/li>\n<li>\u5141\u8bb8\u4f7f\u7528\u591a\u4e2aMAC\u5730\u5740\u53d1\u9001\u548c\u63a5\u6536\u6d41\u91cf\u3002<\/li>\n<li>\u5141\u8bb8CARP VIP MAC\u5730\u5740\u5728\u7aef\u53e3\u4e4b\u95f4\u79fb\u52a8\u3002<\/li>\n<\/ul>\n<p style=\"text-align: justify;\">\u51e0\u4e4e\u6240\u6709CARP\u672a\u80fd\u6b63\u786e\u53cd\u6620\u9884\u671f\u72b6\u6001\u7684\u95ee\u9898\u90fd\u662f\u4ea4\u6362\u673a\u6545\u969c\u6216\u5176\u4ed6\u7b2c2\u5c42\u95ee\u9898\uff0c\u56e0\u6b64\u5728\u7ee7\u7eed\u4e4b\u524d\u8bf7\u786e\u4fdd\u4ea4\u6362\u673a\u5df2\u6b63\u786e\u914d\u7f6e\u3002<\/p>\n<h1 style=\"text-align: justify;\">pfsync\u00a0\u6982\u8ff0<\/h1>\n<p style=\"text-align: justify;\">pfsync\u53ef\u4ee5\u4f7f\u7fa4\u96c6\u8282\u70b9\u4e4b\u95f4\u7684\u9632\u706b\u5899\u72b6\u6001\u8868\u4fdd\u6301\u540c\u6b65\u3002\u4e3b\u9632\u706b\u5899\u4e0a\u72b6\u6001\u8868\u7684\u4fee\u6539\u4f1a\u901a\u8fc7Sync\u63a5\u53e3\u53d1\u9001\u5230\u8f85\u52a9\u9632\u706b\u5899\uff0c\u53cd\u4e4b\u4ea6\u7136\u3002\u5f53pfsync\u5904\u4e8e\u6d3b\u52a8\u72b6\u6001\u5e76\u6b63\u786e\u914d\u7f6e\u65f6\uff0c\u6240\u6709\u8282\u70b9\u90fd\u5c06\u4e86\u89e3\u6d41\u7ecf\u7fa4\u96c6\u7684\u6bcf\u4e2a\u8fde\u63a5\u3002\u5982\u679c\u4e3b\u8282\u70b9\u53d1\u751f\u6545\u969c\uff0c\u5219\u5907\u4efd\u8282\u70b9\u5c06\u63a5\u7ba1\u5e76\u4e14\u5ba2\u6237\u7aef\u4e0d\u4f1a\u6ce8\u610f\u5230\u53d1\u751f\u4e86\u8f6c\u6362\uff0c\u56e0\u4e3a\u4e24\u4e2a\u8282\u70b9\u90fd\u4e8b\u5148\u77e5\u9053\u8fde\u63a5\u3002<\/p>\n<p style=\"text-align: justify;\">pfsync\u5728\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u4f7f\u7528\u591a\u70b9\u4f20\u9001\uff0c\u4f46\u53ef\u4ee5\u5b9a\u4e49IP\u5730\u5740\u4ee5\u5f3a\u5236\u5355\u70b9\u4f20\u9001\u66f4\u65b0\uff0c\u4ee5\u4fbf\u53ea\u6709\u4e24\u4e2a\u9632\u706b\u5899\u7684\u591a\u70b9\u4f20\u9001\u6d41\u91cf\u65e0\u6cd5\u6b63\u5e38\u8fd0\u884c\u3002\u4efb\u4f55\u6d3b\u52a8\u63a5\u53e3\u90fd\u53ef\u7528\u4e8e\u53d1\u9001pfsync\u66f4\u65b0\uff0c\u4f46\u4f7f\u7528\u4e13\u7528\u63a5\u53e3\u66f4\u6709\u5229\u4e8e\u5b89\u5168\u6027\u548c\u6027\u80fd\u3002 pfsync\u4e0d\u652f\u6301\u4efb\u4f55\u8eab\u4efd\u9a8c\u8bc1\u65b9\u6cd5\uff0c\u56e0\u6b64\u5982\u679c\u4f7f\u7528\u9664\u4e13\u7528\u63a5\u53e3\u4ee5\u5916\u7684\u5176\u4ed6\u4efb\u4f55\u65b9\u6cd5\uff0c\u5219\u4efb\u4f55\u5177\u6709\u672c\u5730\u7f51\u7edc\u8bbf\u95ee\u6743\u7684\u7528\u6237\u90fd\u53ef\u4ee5\u5c06\u72b6\u6001\u63d2\u5165\u5230\u72b6\u6001\u8868\u4e2d\u3002\u5728\u4f4e\u5b89\u5168\u6027\u8981\u6c42\u7684\u4f4e\u541e\u5410\u91cf\u73af\u5883\u4e2d\uff0c\u4f7f\u7528LAN\u63a5\u53e3\u662f\u53ef\u4ee5\u63a5\u53d7\u7684\u3002\u8fd9\u79cd\u72b6\u6001\u540c\u6b65\u6240\u9700\u7684\u5e26\u5bbd\u5728\u4e0d\u540c\u73af\u5883\u4e4b\u95f4\u4f1a\u6709\u5f88\u5927\u5dee\u5f02\uff0c\u4f46\u6839\u636e\u7f51\u7edc\u4e2d\u72b6\u6001\u7684\u63d2\u5165\u548c\u5220\u9664\u901f\u7387\uff0c\u53ef\u80fd\u4f1a\u9ad8\u8fbe\u7a7f\u8d8a\u9632\u706b\u5899\u541e\u5410\u91cf\u768410\uff05\u3002<\/p>\n<p style=\"text-align: justify;\">\u6545\u969c\u8f6c\u79fb\u4ecd\u7136\u53ef\u4ee5\u5728\u6ca1\u6709pfsync\u7684\u60c5\u51b5\u4e0b\u8fd0\u884c\uff0c\u4f46\u4e0d\u4f1a\u65e0\u7f1d\u8fde\u63a5\u3002\u6ca1\u6709pfsync\uff0c\u5982\u679c\u4e00\u4e2a\u8282\u70b9\u5931\u8d25\uff0c\u53e6\u4e00\u4e2a\u63a5\u7ba1\uff0c\u7528\u6237\u8fde\u63a5\u5c06\u88ab\u4e22\u5f03\u3002\u7528\u6237\u53ef\u4ee5\u7acb\u5373\u901a\u8fc7\u53e6\u4e00\u4e2a\u8282\u70b9\u91cd\u65b0\u8fde\u63a5\uff0c\u4f46\u5728\u8f6c\u6362\u8fc7\u7a0b\u4e2d\u5b83\u4eec\u4f1a\u4e2d\u65ad\u3002\u6839\u636e\u7279\u5b9a\u73af\u5883\u4e2d\u7684\u4f7f\u7528\u60c5\u51b5\uff0c\u8fd9\u53ef\u80fd\u4f1a\u88ab\u5ffd\u89c6\uff0c\u6216\u8005\u53ef\u80fd\u662f\u4e00\u4e2a\u91cd\u8981\u4f46\u77ed\u6682\u7684\u4e2d\u65ad\u3002<\/p>\n<p style=\"text-align: justify;\">\u5f53\u4f7f\u7528pfsync\u65f6\uff0c\u5fc5\u987b\u5728\u53c2\u4e0e\u72b6\u6001\u540c\u6b65\u7684\u6240\u6709\u8282\u70b9\uff08\u5305\u62ec\u8f85\u52a9\u8282\u70b9\uff09\u4e0a\u542f\u7528pfsync\u8bbe\u7f6e\uff0c\u5426\u5219\u5c06\u65e0\u6cd5\u6b63\u5e38\u8fd0\u884c\u3002<\/p>\n<h2 style=\"text-align: justify;\">pfsync\u548c\u9632\u706b\u5899\u89c4\u5219<\/h2>\n<p style=\"text-align: justify;\">\u5fc5\u987b\u5728Sync\u63a5\u53e3\u4e0a\u5236\u5b9a\u5141\u8bb8pfsync\u901a\u4fe1\u7684\u89c4\u5219\u3002 \u8be5\u89c4\u5219\u5fc5\u987b\u5c06\u6765\u81eaSync\u7f51\u7edc\u6e90\u7684pfsync\u534f\u8bae\u4f20\u9012\u5230\u4efb\u4f55\u76ee\u6807\u3002 \u901a\u8fc7\u4efb\u4f55\u534f\u8bae\u7684\u6240\u6709\u6d41\u91cf\u7684\u89c4\u5219\u4e5f\u5141\u8bb8\u6240\u9700\u7684\u6d41\u91cf\uff0c\u4f46\u4e00\u822c\u6765\u8bf4\uff0c\u66f4\u5177\u4f53\u7684\u89c4\u5219\u4f1a\u66f4\u52a0\u5b89\u5168\u3002<\/p>\n<h2 style=\"text-align: justify;\">pfsync\u548c\u7269\u7406\u63a5\u53e3<\/h2>\n<p style=\"text-align: justify;\">pfSense\u4e2d\u7684\u72b6\u6001\u7ed1\u5b9a\u5230\u7279\u5b9a\u7684\u7cfb\u7edf\u63a5\u53e3\u3002 \u4f8b\u5982\uff0c\u5982\u679cWAN\u662fem0\uff0c\u90a3\u4e48WAN\u4e0a\u7684\u72b6\u6001\u5c06\u4e0eem0\u7ed1\u5b9a\u3002 \u5982\u679c\u7fa4\u96c6\u8282\u70b9\u5177\u6709\u76f8\u540c\u7684\u786c\u4ef6\u548c\u63a5\u53e3\u5206\u914d\uff0c\u5219\u6309\u9884\u671f\u5de5\u4f5c\u3002 \u5728\u4f7f\u7528\u4e0d\u540c\u786c\u4ef6\u7684\u60c5\u51b5\u4e0b\uff0c\u53ef\u80fd\u4f1a\u6709\u95ee\u9898\u3002 \u5982\u679c\u4e00\u4e2a\u8282\u70b9\u4e0a\u7684WAN\u662fem0\uff0c\u4f46\u53e6\u4e00\u4e2a\u8282\u70b9\u4e0a\u7684WAN\u662figb0\uff0c\u90a3\u4e48\u8fd9\u4e9b\u72b6\u6001\u5c06\u4e0d\u5339\u914d\uff0c\u5e76\u4e14\u5b83\u4eec\u4e0d\u4f1a\u88ab\u89c6\u4e3a\u76f8\u540c\u3002<\/p>\n<p style=\"text-align: justify;\">\u6700\u597d\u4f7f\u7528\u76f8\u540c\u7684\u786c\u4ef6\uff0c\u4f46\u4e5f\u53ef\u80fd\u4e0d\u80fd\u6ee1\u8db3\u5b9e\u9645\u7684\u9700\u8981\u3002\u6709\u4e00\u4e2a\u89e3\u51b3\u65b9\u6cd5\uff1a\u5c06\u63a5\u53e3\u6dfb\u52a0\u5230LAGG\uff0c\u8131\u79bb\u5e95\u5c42\u7269\u7406\u63a5\u53e3\uff0c\u56e0\u6b64\u5728\u4e0a\u9762\u7684\u793a\u4f8b\u4e2d\uff0c\u5e7f\u57df\u7f51\u5c06\u5728\u4e24\u8005\u4e0a\u90fd\u662flagg0\uff0c\u72b6\u6001\u5c06\u88ab\u7ed1\u5b9a \u5230lagg0\uff0c\u5c3d\u7ba1lagg0\u5728\u4e00\u4e2a\u8282\u70b9\u4e0a\u5305\u542bem0\uff0c\u5e76\u4e14\u5728\u53e6\u4e00\u4e2a\u8282\u70b9\u4e0a\u5305\u542bigb0\u3002<\/p>\n<h2 style=\"text-align: justify;\">pfsync\u548c\u5347\u7ea7<\/h2>\n<p style=\"text-align: justify;\">\u901a\u5e38pfSense\u90fd\u5141\u8bb8\u9632\u706b\u5899\u5728\u7ebf\u5347\u7ea7\uff0c\u800c\u4e0d\u4f1a\u9020\u6210\u7f51\u7edc\u4e2d\u65ad\u3002\u00a0\u4f46\u4e0d\u662f\u6bcf\u6b21\u5347\u7ea7\u90fd\u662f\u5982\u6b64\uff0c\u56e0\u4e3apfsync\u534f\u8bae\u53ef\u4ee5\u66f4\u6539\u4ee5\u9002\u5e94\u5176\u4ed6\u529f\u80fd\u3002 \u5728\u5347\u7ea7\u4e4b\u524d\uff0c\u59cb\u7ec8\u68c0\u67e5\u6240\u6709\u53d1\u5e03\u901a\u544a\u4e2d\u94fe\u63a5\u7684\u5347\u7ea7\u6307\u5357\uff0c\u4ee5\u67e5\u770b\u662f\u5426\u6709\u4efb\u4f55CARP\u7528\u6237\u7684\u7279\u6b8a\u6ce8\u610f\u4e8b\u9879\u3002<\/p>\n<h1 style=\"text-align: justify;\">XML-RPC\u914d\u7f6e\u540c\u6b65\u6982\u8ff0<\/h1>\n<p style=\"text-align: justify;\">\u4e3a\u4e86\u5c06\u7ef4\u62a4\u9632\u706b\u5899\u8282\u70b9\u7684\u5de5\u4f5c\u53d8\u5f97\u66f4\u5bb9\u6613\uff0c\u53ef\u4ee5\u4f7f\u7528XML-RPC\u8fdb\u884c\u914d\u7f6e\u540c\u6b65\u3002\u542f\u7528XML-RPC\u540c\u6b65\u65f6\uff0c\u652f\u6301\u533a\u57df\u7684\u8bbe\u7f6e\u5c06\u540c\u6b65\u590d\u5236\u5230\u8f85\u52a9\u8bbe\u5907\uff0c\u5e76\u5728\u6bcf\u6b21\u66f4\u6539\u914d\u7f6e\u540e\u6fc0\u6d3b\u3002 XMLRPC\u540c\u6b65\u662f\u53ef\u9009\u7684\uff0c\u4f46\u5982\u679c\u6ca1\u6709\u5b83\uff0c\u7ef4\u62a4\u4e00\u4e2a\u96c6\u7fa4\u7684\u5de5\u4f5c\u91cf\u8981\u5927\u7684\u591a\u3002<\/p>\n<p style=\"text-align: justify;\">\u67d0\u4e9b\u533a\u57df\u8bbe\u7f6e\u65e0\u6cd5\u540c\u6b65\uff0c\u5982\u63a5\u53e3\u914d\u7f6e\uff0c\u4f46\u66f4\u591a\u7684\u533a\u57df\u90fd\u53ef\u4ee5\u540c\u6b65\uff1a\u5305\u62ec\u9632\u706b\u5899\u89c4\u5219\u3001\u522b\u540d\u3001\u7528\u6237\u3001\u8bc1\u4e66\u3001***\u3001DHCP\u3001\u8def\u7531\u3001\u7f51\u5173\u7b49\u3002\u4f5c\u4e3a\u4e00\u822c\u89c4\u5219\uff0c\u7279\u5b9a\u4e8e\u786c\u4ef6\u6216\u7279\u5b9a\u5b89\u88c5\u7684\u9879\u76ee\uff08\u4f8b\u5982\u7cfb\u7edf&gt;\u5e38\u89c4\u6216\u7cfb\u7edf&gt;\u9ad8\u7ea7\u8bbe\u7f6e\u4e0b\u7684\u63a5\u53e3\u6216\u503c\uff09\u4e0d\u4f1a\u540c\u6b65\u3002\u53d7\u652f\u6301\u533a\u57df\u7684\u5217\u8868\u53ef\u80fd\u56e0\u4f7f\u7528\u7684pfSense\u7248\u672c\u800c\u6709\u6240\u5dee\u522b\u3002\u5927\u591a\u6570\u63d2\u4ef6\u4e0d\u4f1a\u540c\u6b65\uff0c\u4f46\u6709\u4e9b\u63d2\u4ef6\u5305\u542b\u81ea\u5df1\u7684\u540c\u6b65\u8bbe\u7f6e\u3002\u6709\u5173\u66f4\u591a\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u76f8\u5173\u6587\u6863\u3002<\/p>\n<p style=\"text-align: justify;\">\u914d\u7f6e\u540c\u6b65\u5e94\u4f7f\u7528Sync\u63a5\u53e3\uff0c\u5982\u679c\u6ca1\u6709\u4e13\u7528\u7684Sync\u63a5\u53e3\uff0c\u8bf7\u4f7f\u7528\u4e3apfsync\u914d\u7f6e\u7684\u76f8\u540c\u63a5\u53e3\u3002<\/p>\n<p style=\"text-align: justify;\">\u5728\u53cc\u8282\u70b9\u7fa4\u96c6\u4e2d\uff0c\u53ea\u80fd\u5728\u4e3b\u8282\u70b9\u4e0a\u542f\u7528XML-RPC\u8bbe\u7f6e\uff0c\u8f85\u52a9\u8282\u70b9\u5fc5\u987b\u7981\u7528XML-RPC\u8bbe\u7f6e\u3002<\/p>\n<p style=\"text-align: justify;\">\u4e3a\u4f7fXML-RPC\u6b63\u5e38\u5de5\u4f5c\uff0c\u4e24\u4e2a\u8282\u70b9\u90fd\u5fc5\u987b\u4f7fGUI\u8fd0\u884c\u5728\u76f8\u540c\u7684\u7aef\u53e3\u548c\u534f\u8bae\u4e0a\uff0c\u4f8b\u5982\uff1a\u7aef\u53e3443\u4e0a\u7684HTTPS\uff08\u9ed8\u8ba4\u8bbe\u7f6e\uff09\u3002\u7ba1\u7406\u5458\u5e10\u6237\u4e0d\u80fd\u88ab\u7981\u7528\uff0c\u5e76\u4e14\u4e24\u4e2a\u8282\u70b9\u5fc5\u987b\u5177\u6709\u76f8\u540c\u7684\u7ba1\u7406\u5458\u5e10\u6237\u5bc6\u7801\u3002<\/p>\n<h1 style=\"text-align: justify;\">\u5197\u4f59\u914d\u7f6e\u793a\u4f8b<\/h1>\n<p style=\"text-align: justify;\">\u672c\u8282\u4ecb\u7ecd\u4e00\u4e2a\u7b80\u5355\u7684\u4e09\u63a5\u53e3HA\u914d\u7f6e\u3002 \u8fd9\u4e09\u4e2a\u63a5\u53e3\u662fLAN\uff0cWAN\u548cSync\u3002 \u8fd9\u5728\u529f\u80fd\u4e0a\u7b49\u540c\u4e8e\u4e24\u4e2a\u63a5\u53e3LAN\u548cWAN\u90e8\u7f72\uff0cpfsync\u63a5\u53e3\u4ec5\u7528\u4e8e\u540c\u6b65\u4e3b\u9632\u706b\u5899\u548c\u8f85\u52a9\u9632\u706b\u5899\u4e4b\u95f4\u7684\u914d\u7f6e\u548c\u9632\u706b\u5899\u72b6\u6001\u3002<\/p>\n<p class=\"first admonition-title\" style=\"text-align: justify;\">\u6ce8\u610f<\/p>\n<p class=\"last\" style=\"text-align: justify;\">\u672c\u793a\u4f8b\u4ec5\u6db5\u76d6IPv4\u914d\u7f6e\u3002 \u9ad8\u53ef\u7528\u6027\u4e0eIPv6\u517c\u5bb9\uff0c\u4f46\u5b83\u9700\u8981\u5728\u9632\u706b\u5899\u63a5\u53e3\u4e0a\u8fdb\u884c\u9759\u6001\u5bfb\u5740\u3002 \u51c6\u5907\u914d\u7f6eHA\u65f6\uff0c\u5982\u679c\u9759\u6001IPv6\u5206\u914d\u4e0d\u53ef\u7528\uff0c\u8bf7\u5728\u6240\u6709\u63a5\u53e3\u4e0a\u5c06IPv6\u8bbe\u7f6e\u4e3a\u65e0\u3002<\/p>\n<h2 style=\"text-align: justify;\">\u786e\u5b9aIP\u5730\u5740\u5206\u914d<\/h2>\n<p style=\"text-align: justify;\">\u7b2c\u4e00\u9879\u4efb\u52a1\u662f\u89c4\u5212IP\u5730\u5740\u5206\u914d\u3002 \u4e00\u4e2a\u597d\u7684\u7b56\u7565\u662f\u4f7f\u7528\u5b50\u7f51\u4e2d\u6700\u4f4e\u53ef\u7528\u7684IP\u5730\u5740\u4f5c\u4e3aCARP VIP\uff0c\u5c06\u4e0b\u4e00\u4e2a\u540e\u7eedIP\u5730\u5740\u7528\u4f5c\u4e3b\u9632\u706b\u5899\u63a5\u53e3IP\u5730\u5740\uff0c\u5e76\u5c06\u4e0b\u4e00\u4e2aIP\u5730\u5740\u7528\u4f5c\u8f85\u52a9\u9632\u706b\u5899\u63a5\u53e3IP\u5730\u5740\u3002 \u8fd9\u79cd\u7b56\u7565\u662f\u53ef\u9009\u7684\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528\u4efb\u4f55\u65b9\u6848\uff0c\u4f46\u6211\u4eec\u5f3a\u70c8\u5efa\u8bae\u4f7f\u7528\u4e00\u81f4\u4e14\u5408\u7406\u7684\u65b9\u6848\u6765\u7b80\u5316\u8bbe\u8ba1\u548c\u7ba1\u7406\u3002<\/p>\n<h3 style=\"text-align: justify;\">WAN\u00a0\u5730\u5740<\/h3>\n<p style=\"text-align: justify;\">WAN\u5730\u5740\u5c06\u4eceISP\u5206\u914d\u7684\u5730\u5740\u4e2d\u9009\u62e9\u3002\u00a0\u5982\u201cWAN IP\u5730\u5740\u5206\u914d\u8868\u201d\u6240\u793a\uff0cHA\u7684WAN\u5b50\u7f51\u4e3a198.51.100.0\/24\uff0c\u5730\u5740198.51.100.200\u81f3198.51.100.202\u5c06\u7528\u4f5cWAN IP\u5730\u5740\u3002<\/p>\n<table class=\"docutils\">\n<caption>WAN IP\u5730\u5740\u5206\u914d\u8868<\/caption>\n<colgroup>\n<col width=\"37%\" \/>\n<col width=\"63%\" \/><\/colgroup>\n<thead valign=\"bottom\">\n<tr class=\"row-odd firstRow\">\n<th class=\"head\">IP\u00a0\u5730\u5740<\/th>\n<th class=\"head\">\u00a0\u4f5c\u7528<\/th>\n<\/tr>\n<\/thead>\n<tbody valign=\"top\">\n<tr class=\"row-even\">\n<td>198.51.100.200\/24<\/td>\n<td>CARP\u5171\u4eabIP\u5730\u5740<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>198.51.100.201\/24<\/td>\n<td>\u00a0\u4e3b\u8282\u70b9 WAN IP\u00a0\u5730\u5740<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>198.51.100.202\/24<\/td>\n<td>\u00a0\u8f85\u52a9\u8282\u70b9 WAN IP\u00a0\u5730\u5740<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 style=\"text-align: justify;\"><\/h3>\n<h3 style=\"text-align: justify;\">LAN\u5730\u5740<\/h3>\n<p style=\"text-align: justify;\">LAN\u5b50\u7f51\u662f192.168.1.0\/24\u3002 \u5728\u672c\u4f8b\u4e2d\uff0cLAN IP\u5730\u5740\u5c06\u6309\u7167\u201cLAN IP\u5730\u5740\u5206\u914d\u8868\u201d\u4e2d\u6240\u793a\u8fdb\u884c\u5206\u914d\u3002<\/p>\n<table class=\"docutils\">\n<caption>LAN IP\u5730\u5740\u5206\u914d\u8868<\/caption>\n<colgroup>\n<col width=\"37%\" \/>\n<col width=\"63%\" \/><\/colgroup>\n<thead valign=\"bottom\">\n<tr class=\"row-odd firstRow\">\n<th class=\"head\">IP\u00a0\u5730\u5740<\/th>\n<th class=\"head\">\u00a0\u4f5c\u7528<\/th>\n<\/tr>\n<\/thead>\n<tbody valign=\"top\">\n<tr class=\"row-even\">\n<td>192.168.1.1\/24<\/td>\n<td>CARP\u5171\u4eabIP\u5730\u5740<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>192.168.1.2\/24<\/td>\n<td>\u00a0\u4e3b\u8282\u70b9 LAN IP\u00a0\u5730\u5740<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>192.168.1.3\/24<\/td>\n<td>\u00a0\u8f85\u52a9\u8282\u70b9 LAN IP\u00a0\u5730\u5740<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 style=\"text-align: justify;\">Sync\u63a5\u53e3\u5730\u5740<\/h3>\n<p style=\"text-align: justify;\">\u8fd9\u4e2a\u63a5\u53e3\u4e0a\u6ca1\u6709\u5171\u4eab\u7684CARP VIP\uff0c\u56e0\u4e3a\u4e0d\u9700\u8981\u3002 \u8fd9\u4e9bIP\u5730\u5740\u4ec5\u7528\u4e8e\u9632\u706b\u5899\u4e4b\u95f4\u7684\u901a\u4fe1\u3002 \u5728\u672c\u4f8b\u4e2d\uff0c172.16.1.0\/24\u7528\u4f5cSync\u5b50\u7f51\u3002 \u5c06\u53ea\u4f7f\u7528\u4e24\u4e2aIP\u5730\u5740\uff0c\u4f46\u63a9\u7801\uff08\/ 24\uff09\u4e0e\u5176\u4ed6\u5185\u90e8\u63a5\u53e3\uff08LAN\uff09\u4fdd\u6301\u4e00\u81f4\u3002 \u5bf9\u4e8eIP\u5730\u5740\u7684\u6700\u540e\u516b\u4f4d\u5b57\u8282\uff0c\u8bf7\u4f7f\u7528\u4e0e\u8be5\u9632\u706b\u5899\u7684LAN IP\u5730\u5740\u76f8\u540c\u7684\u6700\u540e\u516b\u4f4d\u5b57\u8282\u4ee5\u4fdd\u6301\u4e00\u81f4\u3002<\/p>\n<table class=\"docutils\">\n<caption>Sync IP\u5730\u5740\u5206\u914d\u8868<\/caption>\n<colgroup>\n<col width=\"36%\" \/>\n<col width=\"64%\" \/><\/colgroup>\n<thead valign=\"bottom\">\n<tr class=\"row-odd firstRow\">\n<th class=\"head\">IP\u00a0\u5730\u5740<\/th>\n<th class=\"head\">\u00a0\u4f5c\u7528<\/th>\n<\/tr>\n<\/thead>\n<tbody valign=\"top\">\n<tr class=\"row-even\">\n<td>172.16.1.2\/24<\/td>\n<td>\u00a0\u4e3b\u8282\u70b9 Sync IP\u00a0\u5730\u5740<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>172.16.1.3\/24<\/td>\n<td>\u00a0\u8f85\u52a9\u8282\u70b9 Sync IP \u5730\u5740<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"text-align: justify;\">\u4e0b\u56fe\u663e\u793a\u4e86\u6b64\u793a\u4f8bHA\u7684\u7ed3\u6784\u3002 \u4e3b\u8282\u70b9\u548c\u8f85\u52a9\u8282\u90fd\u6709\u4e0eWAN\u548cLAN\u76f8\u540c\u7684\u8fde\u63a5\uff0c\u5e76\u4e14\u5b83\u4eec\u4e4b\u95f4\u4f7f\u7528\u4ea4\u53c9\u7535\u7f06\u8fde\u63a5Sync\u63a5\u53e3\u3002 \u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u5e7f\u57df\u7f51\u4ea4\u6362\u673a\u548c\u5c40\u57df\u7f51\u4ea4\u6362\u673a\u4ecd\u7136\u5b58\u5728\u6f5c\u5728\u7684\u5355\u70b9\u6545\u969c\u3002 \u4ea4\u6362\u673a\u5197\u4f59\u5c06\u5728\u672c\u7ae0\u540e\u9762\u7684\u7b2c2\u5c42\u5197\u4f59\u4e2d\u4ecb\u7ecd\u3002<\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1912\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/diagrams-example-carp.png\" alt=\"\" width=\"525\" height=\"497\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/diagrams-example-carp.png 525w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/diagrams-example-carp-300x284.png 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/diagrams-example-carp-317x300.png 317w\" sizes=\"auto, (max-width: 525px) 100vw, 525px\" \/><\/p>\n<p class=\"caption\" style=\"text-align: justify;\"><em>HA\u7f51\u7edc\u793a\u4f8b\u56fe<\/em><\/p>\n<h2 style=\"text-align: justify;\">\u7fa4\u96c6\u914d\u7f6e\u57fa\u7840<\/h2>\n<p style=\"text-align: justify;\">\u6bcf\u4e2a\u8282\u70b9\u90fd\u9700\u8981\u5b9e\u9645HA\u8bbe\u7f6e\u4ee5\u5916\u7684\u4e00\u4e9b\u57fa\u672c\u914d\u7f6e\u3002 \u5728\u4e24\u4e2a\u8282\u70b9\u90fd\u6ca1\u6709\u51b2\u7a81\u7684LAN\u8bbe\u7f6e\u4e4b\u524d\uff0c\u8bf7\u52ff\u5c06\u4e24\u4e2a\u8282\u70b9\u90fd\u8fde\u63a5\u5230\u540c\u4e00\u4e2aLAN\u4e2d\u3002<\/p>\n<h3 style=\"text-align: justify;\">\u5b89\u88c5\u3001\u63a5\u53e3\u5206\u914d\u548c\u57fa\u672c\u914d\u7f6e<\/h3>\n<p style=\"text-align: justify;\">\u5728\u9632\u706b\u5899\u4e0a\u5b89\u88c5\u64cd\u4f5c\u7cfb\u7edf\uff0c\u5e76\u5728\u4e24\u4e2a\u8282\u70b9\u4e0a\u4ee5\u76f8\u540c\u65b9\u5f0f\u5206\u914d\u63a5\u53e3\u3002 \u63a5\u53e3\u5fc5\u987b\u5728\u6240\u6709\u8282\u70b9\u4e0a\u6309\u7167\u76f8\u540c\u7684\u987a\u5e8f\u8fdb\u884c\u5206\u914d\u3002 \u5982\u679c\u63a5\u53e3\u672a\u5bf9\u9f50\uff0c\u914d\u7f6e\u540c\u6b65\u548c\u5176\u4ed6\u4efb\u52a1\u5c06\u65e0\u6cd5\u6b63\u5e38\u5de5\u4f5c\u3002 \u5982\u679c\u5bf9\u63a5\u53e3\u5206\u914d\u8fdb\u884c\u4e86\u4efb\u4f55\u8c03\u6574\uff0c\u5219\u5fc5\u987b\u5728\u4e24\u4e2a\u8282\u70b9\u4e0a\u8fdb\u884c\u76f8\u540c\u7684\u590d\u5236\u3002<\/p>\n<p style=\"text-align: justify;\">\u7136\u540e\uff0c\u8fde\u63a5\u5230GUI\u5e76\u4f7f\u7528\u5b89\u88c5\u5411\u5bfc\u4e3a\u6bcf\u4e2a\u9632\u706b\u5899\u914d\u7f6e\u552f\u4e00\u7684\u4e3b\u673a\u540d\u548c\u975e\u51b2\u7a81\u7684\u9759\u6001IP\u5730\u5740\u3002<\/p>\n<p style=\"text-align: justify;\">\u4f8b\u5982\uff0c\u4e00\u4e2a\u8282\u70b9\u53ef\u4ee5\u662f\u201cfirewall-a.example.com\u201d\uff0c\u53e6\u4e00\u4e2a\u8282\u70b9\u53ef\u4ee5\u662f\u201cfirewall- b.example.com\u201d\uff0c\u4e5f\u53ef\u4ee5\u662f\u66f4\u52a0\u4e2a\u6027\u5316\u7684\u4e00\u5bf9\u540d\u79f0\u3002<\/p>\n<p class=\"first admonition-title\" style=\"text-align: justify;\">\u6ce8\u610f\uff1a\u907f\u514d\u5c06\u8282\u70b9\u547d\u540d\u4e3a\u201cmaster\u201d\u6216\u201cbackup\u201d\uff0c\u56e0\u4e3a\u8fd9\u4e9b\u662f\u9632\u706b\u5899\u9ed8\u8ba4\u4f7f\u7528\u7684\u72b6\u6001\uff0c\u53ef\u4ee5\u5c06\u4ed6\u4eec\u547d\u540d\u4e3a\u201cprimary\u201d\u548c\u201csecondary\u201d\u3002<\/p>\n<p style=\"text-align: justify;\">\u9ed8\u8ba4\u7684LAN IP\u5730\u5740\u662f192.168.1.1\u3002 \u6bcf\u4e2a\u8282\u70b9\u5fc5\u987b\u4f7f\u7528\u5b83\u81ea\u5df1\u7684\u5730\u5740\uff0c\u4f8b\u5982\u4e3b\u8282\u70b9\u4f7f\u7528192.168.1.2\uff0c\u8f85\u52a9\u8282\u70b9\u4f7f\u7528192.168.1.3\u3002 \u8be5\u5e03\u5c40\u663e\u793a\u5728LAN IP\u5730\u5740\u5206\u914d\u4e2d\u3002 \u4e00\u65e6\u6bcf\u4e2a\u8282\u70b9\u5177\u6709\u552f\u4e00\u7684LAN IP\u5730\u5740\uff0c\u5219\u4e24\u4e2a\u8282\u70b9\u90fd\u53ef\u4ee5\u63d2\u5165\u540c\u4e00\u4e2aLAN\u4ea4\u6362\u673a\u3002<\/p>\n<h2 style=\"text-align: justify;\">\u8bbe\u7f6eSync\u63a5\u53e3<\/h2>\n<p style=\"text-align: justify;\">\u5728\u7ee7\u7eed\u4e4b\u524d\uff0c\u5fc5\u987b\u914d\u7f6e\u7fa4\u96c6\u8282\u70b9\u4e0a\u7684Sync\u63a5\u53e3\u3002 \u540c\u6b65IP\u5730\u5740\u5206\u914d\u5217\u51fa\u4e86\u7528\u4e8e\u6bcf\u4e2a\u8282\u70b9\u4e0a\u7684\u540c\u6b65\u63a5\u53e3\u7684\u5730\u5740\u3002 \u5728\u4e3b\u8282\u70b9\u4e0a\u5b8c\u6210\u8bbe\u7f6e\u540e\uff0c\u518d\u5728\u8f85\u52a9\u8282\u70b9\u4e0a\u8fdb\u884c\u8bbe\u7f6e\u3002<\/p>\n<p style=\"text-align: justify;\">\u5b8c\u6210Sync\u63a5\u53e3\u914d\u7f6e\u540e\uff0c\u8fd8\u5fc5\u987b\u5728\u4e24\u4e2a\u8282\u70b9\u4e0a\u5c06\u6dfb\u52a0\u9632\u706b\u5899\u89c4\u5219\u4ee5\u5141\u8bb8\u4ed6\u4eec\u4e4b\u95f4\u8fdb\u884c\u540c\u6b65\u3002<\/p>\n<p style=\"text-align: justify;\">\u9632\u706b\u5899\u89c4\u5219\u5fc5\u987b\u5141\u8bb8\u901a\u8fc7\u914d\u7f6e\u540c\u6b65\uff08\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cHTTPS\u4f7f\u7528\u7684443\u7aef\u53e3\uff09\u548cpfsync\u5728\u4e24\u4e2a\u8282\u70b9\u4e4b\u95f4\u7684\u901a\u4fe1\u3002\u00a0\u53ef\u4ee5\u4f7f\u7528\u7b80\u5355\u7684\u201c\u5168\u90e8\u5141\u8bb8\u201d\u6837\u5f0f\u89c4\u5219\u3002<\/p>\n<p style=\"text-align: justify;\">\u4e0b\u56fe\u662f\u914d\u7f6e\u5b8c\u6210\u7684\u9632\u706b\u5899\u89c4\u5219\u5217\u8868\uff0c\u5176\u4e2d\u8fd8\u5305\u542b\u5141\u8bb8ICMP\uff08ping\uff09\u7528\u4e8e\u8bca\u65ad\u76ee\u7684\u7684\u89c4\u5219\u3002<\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1913\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/ha-sync-rules.png\" alt=\"\" width=\"1027\" height=\"145\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/ha-sync-rules.png 1027w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/ha-sync-rules-1024x145.png 1024w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/ha-sync-rules-300x42.png 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/ha-sync-rules-768x108.png 768w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/ha-sync-rules-500x71.png 500w\" sizes=\"auto, (max-width: 1027px) 100vw, 1027px\" \/><\/p>\n<p class=\"caption\" style=\"text-align: justify;\"><em>Sync\u00a0\u63a5\u53e3\u9632\u706b\u5899\u89c4\u5219\u793a\u4f8b<\/em><\/p>\n<p style=\"text-align: justify;\">\u8f85\u52a9\u8282\u70b9\u5e76\u4e0d\u9700\u8981\u8fd9\u4e9b\u89c4\u5219\uff0c\u53ea\u9700\u8981\u6709\u4e00\u6761\u89c4\u5219\u5141\u8bb8\u6d41\u91cf\u901a\u8fc7GUI\u6765\u4f7fXML-RPC\u8fd0\u884c\u3002 \u4e00\u65e6\u914d\u7f6e\u4e86XML-RPC\uff0c\u4e3b\u8282\u70b9\u7684\u5168\u90e8\u89c4\u5219\u5c31\u4f1a\u540c\u6b65\u5230\u8f85\u52a9\u8282\u70b9\u3002<\/p>\n<h2 style=\"text-align: justify;\">\u914d\u7f6epfsync<\/h2>\n<p style=\"text-align: justify;\">\u5fc5\u987b\u5728\u4e3b\u8282\u70b9\u548c\u8f85\u52a9\u8282\u70b9\u4e0a\u914d\u7f6e\u4f7f\u7528pfsync\u7684\u72b6\u6001\u540c\u6b65\u624d\u80fd\u6b63\u5e38\u5de5\u4f5c\u3002<\/p>\n<p style=\"text-align: justify;\">\u9996\u5148\u5728\u4e3b\u8282\u70b9\u4e0a\uff0c\u7136\u540e\u5728\u8f85\u52a9\u8282\u70b9\u4e0a\u6267\u884c\u4ee5\u4e0b\u64cd\u4f5c\uff1a<\/p>\n<ul class=\" list-paddingleft-2\" style=\"text-align: justify;\">\n<li>\u5bfc\u822a\u5230\u7cfb\u7edf&gt;\u9ad8\u53ef\u7528\u6027\u540c\u6b65\uff08\u53cc\u673a\u5907\u4efd\uff09<\/li>\n<li>\u8bbe\u7f6e\u540c\u6b65\u72b6\u6001<\/li>\n<li>\u5c06\u540c\u6b65\u63a5\u53e3\u8bbe\u7f6e\u4e3aSYNC<\/li>\n<li>\u5c06pfsync\u540c\u6b65\u5bf9\u7b49IP\u5230\u53e6\u4e00\u4e2a\u8282\u70b9\u3002 \u914d\u7f6e\u4e3b\u8282\u70b9\u65f6\u8bbe\u7f6e\u4e3a172.16.1.3\uff0c\u914d\u7f6e\u8f85\u52a9\u8282\u70b9\u65f6\u8bbe\u7f6e\u4e3a172.16.1.2<\/li>\n<li>\u70b9\u51fb\u4fdd\u5b58<\/li>\n<\/ul>\n<h2 style=\"text-align: justify;\">\u914d\u7f6e\u540c\u6b65 (XML-RPC)\u8bbe\u7f6e<\/h2>\n<p class=\"first admonition-title\" style=\"text-align: justify;\">\u8b66\u544a\uff1a\u914d\u7f6e\u540c\u6b65\u53ea\u80fd\u5728\u4e3b\u8282\u70b9\u4e0a\u914d\u7f6e\u3002 \u8f85\u52a9\u8282\u70b9\u4e0d\u80fd\u4e5f\u4e0d\u9700\u8981\u914d\u7f6e\u3002<\/p>\n<p style=\"text-align: justify;\">\u5728\u4e3b\u8282\u70b9\u4e0a\u6267\u884c\u4ee5\u4e0b\u64cd\u4f5c\uff1a<\/p>\n<ul>\n<li>\u5bfc\u822a\u5230\u7cfb\u7edf&gt;\u9ad8\u53ef\u7528\u6027\u540c\u6b65<\/li>\n<li>\u5c06\u201c\u540c\u6b65\u914d\u7f6e\u201d\u4e0b\u7684\u201c\u914d\u7f6e\u540c\u6b65\u76ee\u6807IP\u201d\u8bbe\u7f6e\u4e3a\u4e3a\u8f85\u52a9\u8282\u70b9\u540c\u6b65\u63a5\u53e3IP\u5730\u5740172.16.1.3<\/li>\n<li>\u5c06\u8fdc\u7a0b\u7cfb\u7edf\u7528\u6237\u540d\u8bbe\u7f6e\u4e3aadmin\u3002<\/li>\n<\/ul>\n<blockquote>\n<p class=\"first admonition-title\">\u6ce8\u610f<\/p>\n<p class=\"last\">\u7528\u6237\u540d\u5fc5\u987b\u662f\u201cadmin\u201d\uff0c\u5176\u4ed6\u7528\u6237\u540d\u4e0d\u4f1a\u6b63\u5e38\u5de5\u4f5c\uff01<\/p>\n<\/blockquote>\n<ul class=\" list-paddingleft-2\" style=\"text-align: justify;\">\n<li>\u5c06\u8fdc\u7a0b\u7cfb\u7edf\u5bc6\u7801\u8bbe\u7f6e\u4e3a\u7ba1\u7406\u5458\u7528\u6237\u5e10\u6237\u5bc6\u7801\uff0c\u5e76\u5728\u786e\u8ba4\u6846\u4e2d\u91cd\u590d\u8f93\u5165\u3002<\/li>\n<li>\u9009\u4e2d\u9700\u8981\u8fdb\u884c\u540c\u6b65\u533a\u57df\u7684\u590d\u9009\u6846\u4ee5\u540c\u6b65\u5230\u8f85\u52a9\u8282\u70b9\u3002 \u5168\u90e8\u5207\u6362\u6309\u94ae\u7528\u4e8e\u4e00\u6b21\u9009\u62e9\u6240\u6709\u9009\u9879\u3002<\/li>\n<li>\u70b9\u51fb\u4fdd\u5b58<\/li>\n<\/ul>\n<p style=\"text-align: justify;\">\u5feb\u901f\u786e\u8ba4\u540e\uff0c\u8fdb\u5165\u8f85\u52a9\u8282\u70b9\u7684\u9632\u706b\u5899&gt;\u89c4\u5219\u7b56\u7565\u5217\u8868\uff0c\u53ef\u4ee5\u770b\u5230\u4e3b\u8282\u70b9\u8f93\u5165\u7684\u89c4\u5219\u5df2\u7ecf\u88ab\u540c\u6b65\u8fc7\u6765\u4e86\u3002<\/p>\n<p style=\"text-align: justify;\">\u8fd9\u4e24\u4e2a\u8282\u70b9\u5df2\u8fde\u63a5\u5e76\u8fdb\u884c\u914d\u7f6e\u540c\u6b65\uff01 \u6bcf\u5f53\u5728\u4e3b\u8282\u70b9\u4e0a\u8fdb\u884c\u4fee\u6539\u540e\uff0c\u6240\u505a\u7684\u66f4\u6539\u5c06\u5f88\u5feb\u540c\u6b65\u5230\u8f85\u52a9\u8282\u70b9\u3002<\/p>\n<p class=\"first admonition-title\" style=\"text-align: justify;\">\u8b66\u544a\uff1a\u4e0d\u8981\u5728\u8f85\u52a9\u8282\u5bf9\u8bbe\u7f6e\u540c\u6b65\u7684\u533a\u57df\u8fdb\u884c\u4efb\u4f55\u66f4\u6539\uff01 \u4e0b\u6b21\u4e3b\u8282\u70b9\u6267\u884c\u540c\u6b65\u65f6\uff0c\u8fd9\u4e9b\u9009\u9879\u5c06\u88ab\u8986\u76d6\u3002<\/p>\n<h3 style=\"text-align: justify;\">\u914d\u7f6eCARP\u865a\u62dfIP<\/h3>\n<p style=\"text-align: justify;\">\u901a\u8fc7\u914d\u7f6e\u540c\u6b65\uff0cCARP\u865a\u62dfIP\u5730\u5740\u53ea\u9700\u6dfb\u52a0\u5230\u4e3b\u8282\u70b9\uff0c\u5e76\u4e14\u5b83\u4eec\u5c06\u81ea\u52a8\u540c\u6b65\u5230\u8f85\u52a9\u8282\u70b9\u3002<\/p>\n<ul>\n<li class=\"first\">\u5bfc\u822a\u5230\u4e3b\u8282\u70b9\u4e0a\u7684\u9632\u706b\u5899&gt;\u865a\u62dfIPs\uff0c\u8bbe\u7f6eCARP VIP<\/li>\n<li class=\"first\">\u5355\u51fb\u53f3\u4fa7\u7684 <img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1666\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/fa-plus.png\" alt=\"\" width=\"25\" height=\"25\" \/>\u00a0\u6309\u94ae\u5728\u5217\u8868\u9876\u90e8\u6dfb\u52a0\u65b0\u7684VIP\u3002<\/li>\n<\/ul>\n<p class=\"first admonition-title\">\u6ce8\u610f\uff1a\u5fc5\u987b\u4e3a\u5904\u7406\u7528\u6237\u6d41\u91cf\u7684\u6bcf\u4e2a\u63a5\u53e3\u6dfb\u52a0\u4e00\u4e2aVIP\uff0c\u5728\u672c\u793a\u4f8b\u4e2d\uff0c\u8981\u4e3aWAN\u548cLAN\u5404\u6dfb\u52a0\u4e00\u4e2a\u3002\u7c7b\u578b:\u5b9a\u4e49VIP\u7684\u7c7b\u578b\uff0c\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0bCARP\u3002<\/p>\n<p style=\"text-align: justify;\"><strong>\u63a5\u53e3:\u00a0<\/strong>\u5b9a\u4e49VIP\u5c06\u9a7b\u7559\u7684\u63a5\u53e3\uff0c\u4f8b\u5982WAN<\/p>\n<p style=\"text-align: justify;\"><strong>\u5730\u5740:\u00a0<\/strong>\u5730\u5740\u6846\u662f\u4e3aVIP\u8f93\u5165IP\u5730\u5740\u503c\u7684\u4f4d\u7f6e\u3002 \u8fd8\u5fc5\u987b\u9009\u62e9\u5b50\u7f51\u63a9\u7801\uff0c\u5e76\u4e14\u5b83\u5fc5\u987b\u4e0e\u63a5\u53e3IP\u5730\u5740\u4e0a\u7684\u5b50\u7f51\u63a9\u7801\u76f8\u5339\u914d\u3002 \u5728\u672c\u4f8b\u4e2d\uff0c\u8f93\u5165198.51.100.200\u548c24\uff08\u8bf7\u53c2\u9605WAN IP\u5730\u5740\u5206\u914d\uff09\u3002<\/p>\n<p style=\"text-align: justify;\"><strong>\u865a\u62df IP\u5bc6\u7801:\u00a0<\/strong>\u8bbe\u7f6eCARP VIP\u7684\u5bc6\u7801\u3002 \u8fd9\u53ea\u9700\u8981\u4e24\u4e2a\u8282\u70b9\u4e4b\u95f4\u7684\u5339\u914d\uff0c\u8fd9\u5c06\u901a\u8fc7\u540c\u6b65\u6765\u5904\u7406\u3002 \u5bc6\u7801\u548c\u786e\u8ba4\u5bc6\u7801\u6846\u5fc5\u987b\u586b\u5199\u5e76\u4e14\u5fc5\u987b\u5339\u914d\u3002<\/p>\n<p style=\"text-align: justify;\"><strong>VHID \u7ec4:<\/strong>\u00a0 \u5b9a\u4e49CARP VIP\u7684ID\u4e00\u4e2a\u5e38\u89c1\u7684\u7b56\u7565\u662f\u4f7fVHID\u5339\u914dIP\u5730\u5740\u7684\u6700\u540e\u4e00\u4e2a\u5b57\u8282\uff0c\u56e0\u6b64\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\u9009\u62e9200<\/p>\n<p style=\"text-align: justify;\"><strong>\u5e7f\u64ad\u9891\u7387:\u00a0\u00a0<\/strong>\u786e\u5b9aCARP\u5fc3\u8df3\u53d1\u9001\u7684\u9891\u7387\u3002<\/p>\n<p style=\"text-align: justify;\"><strong>Base<\/strong>\uff08\u57fa\u672c\u503c\uff09\uff1a\u63a7\u5236Heartbeats\u4e4b\u95f4\u7ecf\u8fc7\u7684\u6574\u79d2\u6570\uff0c\u901a\u5e38\u4e3a1.\u8fd9\u5e94\u8be5\u5728\u7fa4\u96c6\u8282\u70b9\u4e4b\u95f4\u5339\u914d\u3002Skew\uff08\u504f\u79bb\u503c\uff09\uff1a\u63a7\u5236\u79d2\u7684\u5206\u6570\uff081\/256\u589e\u91cf\uff09\u3002 \u4e3b\u8282\u70b9\u901a\u5e38\u8bbe\u7f6e\u4e3a0\u62161\uff0c\u6b21\u8282\u70b9\u5c06\u4e3a100\u6216\u66f4\u9ad8\u3002 \u8be5\u8c03\u6574\u7531XML-RPC\u540c\u6b65\u81ea\u52a8\u5904\u7406\u3002<\/p>\n<p style=\"text-align: justify;\">\u63cf\u8ff0:\u4e00\u4e9b\u6587\u672c\u53ef\u4ee5\u8bc6\u522bVIP\uff0c\u4f8b\u5982WAN CARP VIP\u3002<\/p>\n<p class=\"first admonition-title\" style=\"text-align: justify;\">\u6ce8\u610f\uff1a\u5982\u679cCARP\u5bf9\u7ed9\u5b9a\u7f51\u7edc\u7684\u5ef6\u8fdf\u8fc7\u4e8e\u654f\u611f\uff0c\u5efa\u8bae\u4e00\u6b21\u8c03\u6574\u57fa\u672c\u503c\u4e00\u79d2\u949f\uff0c\u76f4\u5230\u7a33\u5b9a\u4e3a\u6b62\u3002<\/p>\n<p style=\"text-align: justify;\">\u4ee5\u4e0a\u63cf\u8ff0\u4ee5WAN VIP\u4e3a\u4f8b\u3002 LAN VIP\u4e5f\u8fdb\u884c\u7c7b\u4f3c\u914d\u7f6e\uff0c\u4f46\u5b83\u5c06\u4f7f\u7528LAN\u63a5\u53e3\uff0c\u5730\u5740\u4e3a192.168.1.1\uff08\u8bf7\u53c2\u9605LAN IP\u5730\u5740\u5206\u914d\uff09\u3002<\/p>\n<p style=\"text-align: justify;\">\u5982\u679cWAN\u5b50\u7f51\u4e2d\u6709\u4efb\u4f55\u989d\u5916\u7684IP\u5730\u5740\u7528\u4e8e1\uff1a1 NAT\u3001\u7aef\u53e3\u8f6c\u53d1\u3001***\u7b49\uff0c\u4e5f\u53ef\u4ee5\u5728\u8fd9\u91cc\u8fdb\u884c\u6dfb\u52a0\u3002<\/p>\n<p style=\"text-align: justify;\">\u7f16\u8f91\u5b8c\u6210\u540e\uff0c\u70b9\u51fb\u5e94\u7528\u66f4\u6539\u3002<\/p>\n<p style=\"text-align: justify;\">\u6dfb\u52a0VIP\u540e\uff0c\u8bf7\u68c0\u67e5\u8f85\u52a9\u8282\u70b9\u4e0a\u7684<strong>\u9632\u706b\u5899&gt;\u865a\u62dfIPs<\/strong>\uff0c\u4ee5\u786e\u4fddVIP\u6309\u9884\u671f\u8fdb\u884c\u4e86\u540c\u6b65\u3002<\/p>\n<p style=\"text-align: justify;\">\u5982\u679c\u540c\u6b65\u6210\u529f\uff0c\u4e24\u4e2a\u8282\u70b9\u4e0a\u7684\u865a\u62dfIP\u5730\u5740\u5c06\u5982\u4e0b\u56fe\u6240\u793a\u3002<\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1914\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/ha-carp-vips.png\" alt=\"\" width=\"882\" height=\"128\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/ha-carp-vips.png 882w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/ha-carp-vips-300x44.png 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/ha-carp-vips-768x111.png 768w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/ha-carp-vips-500x73.png 500w\" sizes=\"auto, (max-width: 882px) 100vw, 882px\" \/><\/p>\n<p class=\"caption\" style=\"text-align: justify;\">CARP\u865a\u62dfIP\u5730\u5740\u5217\u8868<\/p>\n<h3 style=\"text-align: justify;\">\u4e3aCARP\u914d\u7f6e\u51fa\u7ad9NAT<\/h3>\n<p style=\"text-align: justify;\">\u4e0b\u9762\u5c06\u914d\u7f6eNAT\uff0c\u4ee5\u4fbfLAN\u4e0a\u7684\u5ba2\u6237\u7aef\u4f7f\u7528\u5171\u4eab\u7684WAN IP\u8bbf\u95ee\u5e7f\u57df\u7f51\u3002<\/p>\n<ul class=\" list-paddingleft-2\" style=\"text-align: justify;\">\n<li>\u5bfc\u822a\u5230\u9632\u706b\u5899&gt; NAT\uff08\u5730\u5740\u8f6c\u6362\uff09\uff0c\u51fa\u7ad9\u9009\u9879\u5361<\/li>\n<li>\u5355\u51fb\u9009\u4e2d\u624b\u52a8\u51fa\u7ad9NAT\u89c4\u5219\u751f\u6210<\/li>\n<li>\u70b9\u51fb\u4fdd\u5b58<\/li>\n<\/ul>\n<p style=\"text-align: justify;\">\u5c06\u51fa\u73b0\u4e00\u7ec4\u4e0e\u81ea\u52a8\u51fa\u7ad9NAT\u9002\u7528\u7684\u89c4\u5219\u3002 \u8c03\u6574\u5185\u90e8\u5b50\u7f51\u6e90\u7684\u89c4\u5219\uff0c\u4ee5\u6539\u4e3a\u4f7f\u7528CARP IP\u5730\u5740\u3002<\/p>\n<ul class=\" list-paddingleft-2\" style=\"text-align: justify;\">\n<li>\u5728\u89c4\u5219\u7684\u53f3\u4fa7\u5355\u51fb <img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1668\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/fa-pencil.png\" alt=\"\" width=\"25\" height=\"25\" \/>\u00a0\u8fdb\u884c\u7f16\u8f91<\/li>\n<li>\u627e\u5230\u9875\u9762\u7684\u8f6c\u6362\u90e8\u5206<\/li>\n<li>\u4ece\u5730\u5740\u4e0b\u62c9\u5217\u8868\u4e2d\u9009\u62e9WAN CARP VIP\u5730\u5740<\/li>\n<li>\u66f4\u6539\u63cf\u8ff0\u4ee5\u63d0\u53ca\u6b64\u89c4\u5219\u5c06NAT LAN\u8fde\u63a5\u5230WAN CARP VIP\u5730\u5740<\/li>\n<\/ul>\n<p class=\"first admonition-title\" style=\"text-align: justify;\">\u8b66\u544a\uff1a\u5982\u679c\u7a0d\u540e\u6dfb\u52a0\u5176\u4ed6\u672c\u5730\u63a5\u53e3\uff08\u5982\u7b2c\u4e8c\u4e2aLAN\uff0cDMZ\u7b49\uff09\uff0c\u5e76\u4e14\u8be5\u63a5\u53e3\u4f7f\u7528\u79c1\u6709IP\u5730\u5740\uff0c\u5219\u5fc5\u987b\u5728\u6b64\u65f6\u6dfb\u52a0\u5176\u4ed6\u624b\u52a8\u51fa\u7ad9NAT\u89c4\u5219\u3002<\/p>\n<p style=\"text-align: justify;\">\u5b8c\u6210\u540e\uff0c\u89c4\u5219\u66f4\u6539\u5c06\u4e0e\u4f7f\u7528CARP VIP\u7684LAN\u51fa\u7ad9NAT\u89c4\u5219\u4e2d\u7684\u89c4\u5219\u66f4\u6539\u7c7b\u4f3c\u3002<\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1915\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/ha-out-nat.png\" alt=\"\" width=\"1059\" height=\"192\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/ha-out-nat.png 1059w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/ha-out-nat-1024x186.png 1024w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/ha-out-nat-300x54.png 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/ha-out-nat-768x139.png 768w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/ha-out-nat-500x91.png 500w\" sizes=\"auto, (max-width: 1059px) 100vw, 1059px\" \/><\/p>\n<p class=\"caption\" style=\"text-align: justify;\">CARP VIP\u7684LAN\u51fa\u7ad9NAT\u89c4\u5219<\/p>\n<h3 style=\"text-align: justify;\">\u4fee\u6539DHCP\u670d\u52a1\u5668<\/h3>\n<p style=\"text-align: justify;\">\u7fa4\u96c6\u8282\u70b9\u4e0a\u7684DHCP\u670d\u52a1\u5668\u8bbe\u7f6e\u9700\u8981\u8c03\u6574\uff0c\u4ee5\u4fbf\u5b83\u4eec\u53ef\u4ee5\u4e00\u8d77\u5de5\u4f5c\u3002 \u8fd9\u4e9b\u4fee\u6539\u5c06\u4ece\u4e3b\u8282\u70b9\u540c\u6b65\u5230\u8f85\u52a9\u8282\u70b9\uff0c\u56e0\u6b64\u5bf9\u4e8eVIP\u548c\u51fa\u7ad9NAT\uff0c\u8fd9\u4e9b\u4fee\u6539\u53ea\u9700\u8981\u5728\u4e3b\u8282\u70b9\u4e0a\u8fdb\u884c\u3002<\/p>\n<ul class=\" list-paddingleft-2\" style=\"text-align: justify;\">\n<li>\u5bfc\u822a\u5230\u7cfb\u7edf\u670d\u52a1&gt; DHCP\u670d\u52a1\u5668\uff0cLAN \u9009\u9879\u5361\u3002<\/li>\n<li>\u5c06DNS\u670d\u52a1\u5668\u8bbe\u7f6e\u4e3aLAN CARP VIP\uff0c\u6b64\u5904\u4e3a192.168.1.1<\/li>\n<li>\u5c06\u7f51\u5173\u8bbe\u7f6e\u4e3aLAN CARP VIP\uff0c\u6b64\u5904\u4e3a192.168.1.1<\/li>\n<li>\u5c06\u6545\u969c\u8f6c\u79fb\u5bf9\u7b49IP\u8bbe\u7f6e\u4e3a\u8f85\u52a9\u8282\u70b9\u7684\u5b9e\u9645LAN IP\u5730\u5740\uff0c\u6b64\u5904\u4e3a192.168.1.3<\/li>\n<li>\u70b9\u51fb\u4fdd\u5b58<\/li>\n<\/ul>\n<p style=\"text-align: justify;\">\u5c06DNS\u670d\u52a1\u5668\u548c\u7f51\u5173\u8bbe\u7f6e\u4e3aCARP VIP\u53ef\u786e\u4fdd\u672c\u5730\u5ba2\u6237\u7aef\u4e0e\u6545\u969c\u8f6c\u79fb\u5730\u5740\u901a\u4fe1\uff0c\u800c\u4e0d\u662f\u76f4\u63a5\u901a\u5411\u4efb\u4e00\u8282\u70b9\u3002 \u5982\u679c\u4e3b\u8282\u70b9\u5931\u8d25\uff0c\u672c\u5730\u5ba2\u6237\u7aef\u5c06\u7ee7\u7eed\u4e0e\u8f85\u52a9\u8282\u70b9\u901a\u8bdd\u3002<\/p>\n<p style=\"text-align: justify;\">\u6545\u969c\u8f6c\u79fb\u5bf9\u7b49IP\u5141\u8bb8\u5b88\u62a4\u7a0b\u5e8f\u76f4\u63a5\u5728\u6b64\u5b50\u7f51\u4e2d\u4e0e\u5bf9\u7b49\u65b9\u8fdb\u884c\u901a\u4fe1\uff0c\u4ee5\u4ea4\u6362\u79df\u8d41\u4fe1\u606f\u7b49\u6570\u636e\u3002 \u5f53\u8bbe\u7f6e\u4e0e\u8f85\u52a9\u8bbe\u5907\u540c\u6b65\u65f6\uff0c\u4f1a\u81ea\u52a8\u8c03\u6574\u8be5\u503c\uff0c\u4ee5\u4fbf\u8f85\u52a9\u8bbe\u5907\u6307\u5411\u4e3b\u8bbe\u5907\u3002<\/p>\n<h1 style=\"text-align: justify;\">\u9ad8\u53ef\u7528\u4e0e\u591aWAN<\/h1>\n<p style=\"text-align: justify;\">HA\u8fd8\u53ef\u4ee5\u5728\u591aWAN\u914d\u7f6e\u4e2d\u7528\u4e8e\u9632\u706b\u5899\u5197\u4f59\u3002 \u672c\u8282\u8be6\u7ec6\u4ecb\u7ecd\u53ccWAN HA\u90e8\u7f72\u6240\u9700\u7684VIP\u548cNAT\u914d\u7f6e\u3002<\/p>\n<h2 style=\"text-align: justify;\">\u786e\u5b9aIP\u5730\u5740\u5206\u914d<\/h2>\n<p style=\"text-align: justify;\">\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u6bcf\u4e2aWAN\u4e0a\u5c06\u4f7f\u7528\u56db\u4e2aIP\u5730\u5740\u3002 \u6bcf\u4e2a\u9632\u706b\u5899\u9700\u8981\u4e00\u4e2aIP\u5730\u5740\uff0c\u53e6\u5916\u8fd8\u6709\u4e00\u4e2aCARP VIP\u7528\u4e8e\u51fa\u7ad9NAT\uff0c\u53e6\u5916\u8fd8\u6709\u4e00\u4e2aCARP VIP\u7528\u4e8e1\uff1a1 NAT\u6761\u76ee\uff0c\u8be5\u6761\u76ee\u5c06\u7528\u4e8eDMZ\u6bb5\u4e2d\u7684\u5185\u90e8\u90ae\u4ef6\u670d\u52a1\u5668\u3002<\/p>\n<h3 style=\"text-align: justify;\">WAN\u00a0\u548c\u00a0WAN2 IP\u00a0\u5730\u5740<\/h3>\n<p style=\"text-align: justify;\">\u4e0b\u8868\u663e\u793a\u4e86\u4e24\u4e2aWAN\u7684IP\u5730\u5740\u3002 \u5728\u5927\u591a\u6570\u73af\u5883\u4e2d\uff0c\u8fd9\u4e9b\u5c06\u662f\u516c\u5171IP\u5730\u5740\u3002<\/p>\n<table class=\"docutils\">\n<caption>WAN IP\u00a0\u5730\u5740<\/caption>\n<colgroup>\n<col width=\"30%\" \/>\n<col width=\"70%\" \/><\/colgroup>\n<thead valign=\"bottom\">\n<tr class=\"row-odd firstRow\">\n<th class=\"head\">IP\u00a0\u5730\u5740<\/th>\n<th class=\"head\">\u00a0\u4f5c\u7528<\/th>\n<\/tr>\n<\/thead>\n<tbody valign=\"top\">\n<tr class=\"row-even\">\n<td>198.51.100.200<\/td>\n<td>\u7528\u4e8e\u51fa\u7ad9NAT\u7684\u5171\u4eabCARP VIP<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>198.51.100.201<\/td>\n<td>\u00a0\u4e3b\u8282\u70b9\u9632\u706b\u5899 WAN<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>198.51.100.202<\/td>\n<td>\u00a0\u8f85\u52a9\u8282\u70b9\u9632\u706b\u5899 WAN<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>198.51.100.203<\/td>\n<td>\u7528\u4e8e1\uff1a1 NAT\u7684\u5171\u4eabCARP VIP<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table class=\"docutils\">\n<caption>WAN2 IP\u00a0\u5730\u5740<\/caption>\n<colgroup>\n<col width=\"27%\" \/>\n<col width=\"73%\" \/><\/colgroup>\n<thead valign=\"bottom\">\n<tr class=\"row-odd firstRow\">\n<th class=\"head\">IP\u00a0\u5730\u5740<\/th>\n<th class=\"head\">\u00a0\u4f5c\u7528<\/th>\n<\/tr>\n<\/thead>\n<tbody valign=\"top\">\n<tr class=\"row-even\">\n<td>203.0.113.10<\/td>\n<td>\u7528\u4e8e\u51fa\u7ad9NAT\u7684\u5171\u4eabCARP VIP<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>203.0.113.11<\/td>\n<td>\u00a0\u4e3b\u8282\u70b9\u9632\u706b\u5899\u00a0WAN2<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>203.0.113.12<\/td>\n<td>\u00a0\u8f85\u52a9\u8282\u70b9\u9632\u706b\u5899\u00a0WAN2<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>203.0.113.13<\/td>\n<td>\u7528\u4e8e1\uff1a1 NAT\u7684\u5171\u4eabCARP VIP<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 style=\"text-align: justify;\"><\/h3>\n<h3 style=\"text-align: justify;\">LAN\u00a0\u5730\u5740<\/h3>\n<p style=\"text-align: justify;\">LAN\u5b50\u7f51\u662f192.168.1.0\/24\u3002 \u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0cLAN IP\u5730\u5740\u5c06\u88ab\u5206\u914d\u5982\u4e0b\u3002<\/p>\n<table class=\"docutils\">\n<caption>LAN IP \u5730\u5740\u5206\u914d<\/caption>\n<colgroup>\n<col width=\"33%\" \/>\n<col width=\"67%\" \/><\/colgroup>\n<thead valign=\"bottom\">\n<tr class=\"row-odd firstRow\">\n<th class=\"head\">IP\u00a0\u5730\u5740<\/th>\n<th class=\"head\">\u00a0\u4f5c\u7528<\/th>\n<\/tr>\n<\/thead>\n<tbody valign=\"top\">\n<tr class=\"row-even\">\n<td>192.168.1.1<\/td>\n<td>CARP\u5171\u4eabLAN VIP<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>192.168.1.2<\/td>\n<td>\u00a0\u4e3b\u8282\u70b9\u9632\u706b\u5899LAN<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>192.168.1.3<\/td>\n<td>\u00a0\u8f85\u52a9\u8282\u70b9\u9632\u706b\u5899 LAN<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 style=\"text-align: justify;\">DMZ\u00a0\u5730\u5740<\/h3>\n<p style=\"text-align: justify;\">DMZ\u5b50\u7f51\u662f192.168.2.0\/24\u3002\u00a0\u5730\u5740\u5206\u914d\u89c1\u4e0b\u8868\u3002<\/p>\n<table class=\"docutils\">\n<caption>DMZ IP\u00a0\u5730\u5740\u5206\u914d\u8868<\/caption>\n<colgroup>\n<col width=\"33%\" \/>\n<col width=\"67%\" \/><\/colgroup>\n<thead valign=\"bottom\">\n<tr class=\"row-odd firstRow\">\n<th class=\"head\">IP\u00a0\u5730\u5740<\/th>\n<th class=\"head\">\u00a0\u4f5c\u7528<\/th>\n<\/tr>\n<\/thead>\n<tbody valign=\"top\">\n<tr class=\"row-even\">\n<td>192.168.2.1<\/td>\n<td>CARP\u5171\u4eabDMZ VIP<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>192.168.2.2<\/td>\n<td>\u00a0\u4e3b\u8282\u70b9\u9632\u706b\u5899 DMZ<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>192.168.2.3<\/td>\n<td>\u00a0\u8f85\u52a9\u8282\u70b9\u9632\u706b\u5899 DMZ<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 style=\"text-align: justify;\">pfsync\u00a0\u5730\u5740<\/h3>\n<p style=\"text-align: justify;\">\u8fd9\u4e2a\u63a5\u53e3\u4e0a\u4e0d\u4f1a\u6709\u5171\u4eab\u7684CARP VIP\uff0c\u56e0\u6b64\u4e0d\u9700\u8981\u8bbe\u7f6e\u3002 \u8fd9\u4e9bIP\u5730\u5740\u4ec5\u7528\u4e8e\u9632\u706b\u5899\u4e4b\u95f4\u7684\u901a\u4fe1\u3002 \u5728\u672c\u4f8b\u4e2d\uff0c172.16.1.0\/24\u5c06\u4f5c\u4e3aSync\u5b50\u7f51\u3002\u00a0\u4f7f\u7528\u4e24\u4e2aIP\u5730\u5740\uff0c\u5b50\u7f51\u63a9\u7801\u4e0e\u5176\u4ed6\u5185\u90e8\u63a5\u53e3\u4e00\u81f4\u3002<\/p>\n<table class=\"docutils\">\n<caption>Sync IP\u00a0\u5730\u5740\u5206\u914d<\/caption>\n<colgroup>\n<col width=\"30%\" \/>\n<col width=\"70%\" \/><\/colgroup>\n<thead valign=\"bottom\">\n<tr class=\"row-odd firstRow\">\n<th class=\"head\">IP\u00a0\u5730\u5740<\/th>\n<th class=\"head\">\u00a0\u4f5c\u7528<\/th>\n<\/tr>\n<\/thead>\n<tbody valign=\"top\">\n<tr class=\"row-even\">\n<td>172.16.1.2<\/td>\n<td>\u4e3b\u8282\u70b9\u9632\u706b\u5899 Sync<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>172.16.1.3<\/td>\n<td>\u00a0\u8f85\u52a9\u8282\u70b9\u9632\u706b\u5899 Sync<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 style=\"text-align: justify;\">NAT\u00a0\u914d\u7f6e<\/h2>\n<p style=\"text-align: justify;\">\u4f7f\u7528HA\u4e0e\u591aWAN\u65f6\u7684NAT\u914d\u7f6e\u4e0e\u4f7f\u7528\u5355\u4e2aWAN\u7684HA\u76f8\u540c\u3002 \u786e\u4fdd\u53ea\u6709CARP VIP\u7528\u4e8e\u5165\u7ad9\u6d41\u91cf\u6216\u8def\u7531\u3002 \u6709\u5173NAT\u914d\u7f6e\u7684\u66f4\u591a\u4fe1\u606f\uff0c\u8bf7\u53c2\u9605\u76f8\u5173\u6587\u6863\u3002<\/p>\n<h2 style=\"text-align: justify;\">\u9632\u706b\u5899\u914d\u7f6e<\/h2>\n<p style=\"text-align: justify;\">\u4f7f\u7528\u591aWAN\u65f6\uff0c\u5fc5\u987b\u8bbe\u7f6e\u9632\u706b\u5899\u89c4\u5219\uff0c\u4ee5\u4f7f\u7528\u9ed8\u8ba4\u7f51\u5173\u5c06\u6d41\u91cf\u4f20\u9012\u5230\u672c\u5730\u7f51\u7edc\u3002 \u5426\u5219\uff0c\u5f53\u6d41\u91cf\u5c1d\u8bd5\u5230\u8fbeCARP\u5730\u5740\u6216\u4eceLAN\u5230DMZ\u65f6\uff0c\u5b83\u5c06\u8f6c\u800c\u51fa\u53bb\u4e0eWAN\u8fde\u63a5\u3002<\/p>\n<p style=\"text-align: justify;\">\u5fc5\u987b\u5728\u6240\u6709\u5185\u90e8\u63a5\u53e3\u7684\u9632\u706b\u5899\u89c4\u5219\u9876\u90e8\u6dfb\u52a0\u4e00\u6761\u89c4\u5219\uff0c\u8be5\u89c4\u5219\u5c06\u6240\u6709\u672c\u5730\u7f51\u7edc\u7684\u6d41\u91cf\u5f15\u5bfc\u81f3\u9ed8\u8ba4\u7f51\u5173\u3002\u00a0\u5fc5\u987b\u6ce8\u610f\u4f7f\u7528\u9ed8\u8ba4\u7f51\u5173\uff0c\u800c\u4e0d\u662f\u6545\u969c\u8f6c\u79fb\u6216\u8d1f\u8f7d\u5e73\u8861\u7f51\u5173\u7ec4\u4e4b\u4e00\u3002 \u6b64\u89c4\u5219\u7684\u76ee\u7684\u5730\u662f\u672c\u5730LAN\u7f51\u7edc\uff0c\u6216\u5305\u542b\u4efb\u4f55\u672c\u5730\u53ef\u8fbe\u7f51\u7edc\u7684\u522b\u540d\u3002<\/p>\n<h2 style=\"text-align: justify;\">\u5177\u6709DMZ\u7684\u591aWAN HA\u00a0\u56fe<\/h2>\n<p style=\"text-align: justify;\">\u7531\u4e8e\u9644\u52a0\u7684\u5e7f\u57df\u7f51\u548cDMZ\u5143\u7d20\uff0c\u8fd9\u79cd\u5e03\u5c40\u7684\u56fe\u8868\u8981\u590d\u6742\u5f97\u591a\uff0c\u5982\u4e0b\u56fe\u6240\u793a\u3002<\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1916\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/diagrams-example-multi-wan-carp.png\" alt=\"\" width=\"571\" height=\"455\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/diagrams-example-multi-wan-carp.png 571w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/diagrams-example-multi-wan-carp-300x239.png 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/diagrams-example-multi-wan-carp-376x300.png 376w\" sizes=\"auto, (max-width: 571px) 100vw, 571px\" \/><\/p>\n<p class=\"caption\" style=\"text-align: justify;\"><em>\u5177\u6709DMZ\u7684\u591aWAN HA\u793a\u610f\u56fe<\/em><\/p>\n<h1 style=\"text-align: justify;\">\u9a8c\u8bc1\u6545\u969c\u8f6c\u79fb\u529f\u80fd<\/h1>\n<p style=\"text-align: justify;\">\u7531\u4e8e\u4f7f\u7528HA\u6d89\u53ca\u9ad8\u53ef\u7528\u6027\uff0c\u56e0\u6b64\u5728\u5c06\u7fa4\u96c6\u6295\u5165\u751f\u4ea7\u4e4b\u524d\u5e94\u8be5\u8fdb\u884c\u5f7b\u5e95\u7684\u6d4b\u8bd5\u3002 \u6d4b\u8bd5\u6700\u91cd\u8981\u7684\u90e8\u5206\u662f\u786e\u4fddHA\u7cfb\u7edf\u5728\u7cfb\u7edf\u4e2d\u65ad\u671f\u95f4\u80fd\u591f\u6b63\u5e38\u6545\u969c\u5207\u6362\u3002<\/p>\n<p style=\"text-align: justify;\">\u5982\u679c\u672c\u8282\u4e2d\u7684\u4efb\u4f55\u64cd\u4f5c\u4e0d\u80fd\u6309\u9884\u671f\u6b63\u5e38\u5de5\u4f5c\uff0c\u8bf7\u53c2\u9605\u9ad8\u53ef\u7528\u6027\u6545\u969c\u6392\u9664\u3002<\/p>\n<h2 style=\"text-align: justify;\">\u68c0\u67e5CARP\u00a0\u72b6\u6001<\/h2>\n<p style=\"text-align: justify;\">\u5728\u8fd9\u4e24\u4e2a\u7cfb\u7edf\u4e0a\uff0c\u5bfc\u822a\u5230\u7cfb\u7edf\u72b6\u6001&gt; CARP\uff08\u6545\u969c\u8f6c\u79fb\uff09\u3002 \u5982\u679c\u4e00\u5207\u5de5\u4f5c\u6b63\u5e38\uff0c\u4e3b\u8282\u70b9\u8bbe\u5907\u6240\u6709CARP VIP\u72b6\u6001\u5c06\u663e\u793a\u4e3a<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1919\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/fa-play-circle.png\" alt=\"\" width=\"25\" height=\"25\" \/>MASTER\uff0c\u8f85\u52a9\u8282\u70b9\u8bbe\u5907\u5c06\u663e\u793a\u4e3a<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1918\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/fa-pause-circle.png\" alt=\"\" width=\"25\" height=\"25\" \/>BACKUP\u3002<\/p>\n<p style=\"text-align: justify;\">\u5982\u679c\u5176\u4e2d\u4e00\u4e2a\u663e\u793aDISABLED\uff0c\u8bf7\u5355\u51fb\u542f\u7528CARP\u6309\u94ae\uff0c\u7136\u540e\u5237\u65b0\u9875\u9762\u3002<\/p>\n<p style=\"text-align: justify;\">\u5982\u679c\u4e00\u4e2a\u63a5\u53e3\u663e\u793a<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1920\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/fa-times-circle.png\" alt=\"\" width=\"25\" height=\"25\" \/><strong>\u00a0INIT<\/strong>\uff0c\u5219\u610f\u5473\u7740\u5305\u542bCARP VIP\u7684\u63a5\u53e3\u6ca1\u6709\u8fde\u63a5\u3002 \u5c06\u63a5\u53e3\u8fde\u63a5\u5230\u4ea4\u6362\u673a\uff0c\u6216\u8005\u81f3\u5c11\u8fde\u63a5\u5230\u5176\u4ed6\u8282\u70b9\u3002 \u5982\u679c\u8be5\u63a5\u53e3\u4e0d\u4f7f\u7528\uff0c\u8bf7\u4ece\u63a5\u53e3\u4e0a\u79fb\u9664CARP VIP\uff0c\u56e0\u4e3a\u8fd9\u4f1a\u5e72\u6270\u6b63\u5e38\u7684CARP\u64cd\u4f5c\u3002<\/p>\n<h2 style=\"text-align: justify;\">\u68c0\u67e5\u914d\u7f6e\u662f\u5426\u6b63\u786e\u540c\u6b65<\/h2>\n<p style=\"text-align: justify;\">\u5bfc\u822a\u5230\u8f85\u52a9\u8282\u70b9\u4e0a\u7684\u4e3b\u8981\u4f4d\u7f6e\uff0c\u4f8b\u5982\u9632\u706b\u5899&gt;\u89c4\u5219\u7b56\u7565\u548c\u9632\u706b\u5899&gt; NAT\uff08\u5730\u5740\u8f6c\u6362\uff09\uff0c\u786e\u4fdd\u5728\u4e3b\u8282\u70b9\u4e0a\u521b\u5efa\u7684\u89c4\u5219\u6b63\u5728\u540c\u6b65\u5230\u8f85\u52a9\u8282\u70b9\u3002<\/p>\n<h2 style=\"text-align: justify;\">\u68c0\u67e5DHCP\u6545\u969c\u8f6c\u79fb\u72b6\u6001<\/h2>\n<p style=\"text-align: justify;\">\u5982\u679c\u914d\u7f6e\u4e86DHCP\u6545\u969c\u5207\u6362\uff0c\u5219\u53ef\u4ee5\u5728\u7cfb\u7edf\u72b6\u6001&gt; DHCP\u79df\u7ea6\u4e2d\u68c0\u67e5\u5b83\u7684\u72b6\u6001\u3002 \u5305\u542bDHCP\u6545\u969c\u8f6c\u79fb\u6c60\u72b6\u6001\u7684\u9875\u9762\u9876\u90e8\u5c06\u51fa\u73b0\u4e00\u4e2a\u65b0\u7684\u90e8\u5206\uff0c\u5982\u4e0b\u56fe\u6240\u793a\u3002<\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1917\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/example-carp-dhcpfailover.png\" alt=\"\" width=\"1143\" height=\"98\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/example-carp-dhcpfailover.png 1143w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/example-carp-dhcpfailover-1024x88.png 1024w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/example-carp-dhcpfailover-300x26.png 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/example-carp-dhcpfailover-768x66.png 768w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/example-carp-dhcpfailover-500x43.png 500w\" sizes=\"auto, (max-width: 1143px) 100vw, 1143px\" \/><\/p>\n<p class=\"caption\" style=\"text-align: justify;\"><em>DHCP\u6545\u969c\u8f6c\u79fb\u6c60\u72b6\u6001<\/em><\/p>\n<h2 style=\"text-align: justify;\">\u6d4b\u8bd5CARP\u6545\u969c\u5207\u6362<\/h2>\n<p style=\"text-align: justify;\">\u73b0\u5728\u8fdb\u884c\u771f\u6b63\u7684\u6545\u969c\u8f6c\u79fb\u6d4b\u8bd5\u3002\u5728\u5f00\u59cb\u4e4b\u524d\uff0c\u8bf7\u786e\u4fddLAN\u4e0a\u7684CARP\u540e\u9762\u7684\u672c\u5730\u5ba2\u6237\u7aef\u53ef\u4ee5\u8fde\u63a5\u5230\u4e92\u8054\u7f51\uff0c\u540c\u65f6pfSense\u9632\u706b\u5899\u5728\u7ebf\u8fd0\u884c\u3002\u4e00\u65e6\u786e\u8ba4\u53ef\u4ee5\u6b63\u5e38\u5de5\u4f5c\uff0c\u90a3\u4e48\u73b0\u5728\u662f\u8fdb\u884c\u5907\u4efd\u7684\u597d\u65f6\u673a\u3002<\/p>\n<p style=\"text-align: justify;\">\u5b9e\u9645\u6d4b\u8bd5\u65f6\uff0c\u8bf7\u4ece\u7f51\u7edc\u4e0a\u62d4\u4e0b\u4e3b\u8282\u70b9\u6216\u6682\u65f6\u5173\u95ed\u4e3b\u8282\u70b9\u3002\u5ba2\u6237\u7aef\u5c06\u80fd\u591f\u901a\u8fc7\u8f85\u52a9\u8282\u70b9\u7ee7\u7eed\u4eceInternet\u52a0\u8f7d\u5185\u5bb9\u3002\u5728\u8f85\u52a9\u8282\u70b9\u4e0a\u518d\u6b21\u68c0\u67e5\u72b6\u6001&gt; CARP\uff08\u6545\u969c\u8f6c\u79fb\uff09\uff0c\u5b83\u73b0\u5728\u5c06\u62a5\u544a\u5b83\u662fLAN\u548cWAN CARP VIP\u7684MASTER\u3002<\/p>\n<p style=\"text-align: justify;\">\u73b0\u5728\u5c06\u4e3b\u8282\u70b9\u91cd\u65b0\u8054\u673a\uff0c\u5b83\u5c06\u6062\u590d\u4e3aMASTER\u7684\u89d2\u8272\uff0c\u5e76\u4e14\u8f85\u52a9\u8282\u70b9\u7cfb\u7edf\u5c06\u81ea\u5df1\u964d\u7ea7\u5230BACKUP\u3002\u5728\u8fd9\u4e2a\u8fc7\u7a0b\u4e2d\u7684\u4efb\u4f55\u65f6\u5019\uff0c\u4e92\u8054\u7f51\u8fde\u63a5\u4ecd\u7136\u662f\u53ef\u4ee5\u6b63\u5e38\u5de5\u4f5c\u7684\u3002<\/p>\n<p style=\"text-align: justify;\">\u5728\u5c3d\u53ef\u80fd\u591a\u7684\u6545\u969c\u60c5\u51b5\u4e0b\u6d4b\u8bd5HA\u3002\u5176\u4ed6\u6d4b\u8bd5\u5305\u62ec\uff1a<\/p>\n<ul class=\" list-paddingleft-2\" style=\"text-align: justify;\">\n<li>\u62d4\u4e0bWAN\u6216LAN\u4e0a\u7684\u7f51\u7ebf<\/li>\n<li>\u62d4\u4e0b\u4e3b\u7535\u6e90\u63d2\u5934<\/li>\n<li>\u4f7f\u7528\u4e34\u65f6\u7981\u7528\u529f\u80fd\u548c\u7ef4\u62a4\u6a21\u5f0f\u7981\u7528\u4e3b\u8282\u70b9\u4e0a\u7684CARP<\/li>\n<li>\u5355\u72ec\u6d4b\u8bd5\u6bcf\u4e2a\u7cfb\u7edf\uff08\u5173\u95ed\u8f85\u52a9\u8282\u70b9\u7535\u6e90\uff0c\u7136\u540e\u91cd\u65b0\u63a5\u901a\u7535\u6e90\u5e76\u5173\u95ed\u4e3b\u7535\u6e90\uff09<\/li>\n<li>\u5728\u6545\u969c\u8f6c\u79fb\u671f\u95f4\u4e0b\u8f7d\u6587\u4ef6\u6216\u5c1d\u8bd5\u4f20\u8f93\u97f3\u9891\/\u89c6\u9891\u6d41<\/li>\n<li>\u5728\u6545\u969c\u8f6c\u79fb\u671f\u95f4\uff0c\u5411Internet\u4e3b\u673a\u8fd0\u884c\u8fde\u7eed\u7684ICMP\u56de\u5e94\u8bf7\u6c42\uff08ping\uff09<\/li>\n<\/ul>\n<h1 style=\"text-align: justify;\">\u63d0\u4f9b\u65e0NAT\u7684\u5197\u4f59<\/h1>\n<p style=\"text-align: justify;\">\u5982\u524d\u6240\u8ff0\uff0c\u53ea\u6709CARP VIP\u4e3a\u9632\u706b\u5899\u76f4\u63a5\u5904\u7406\u7684\u5730\u5740\u63d0\u4f9b\u5197\u4f59\uff0c\u5e76\u4e14\u5b83\u4eec\u53ea\u80fd\u4e0eNAT\u6216\u9632\u706b\u5899\u672c\u8eab\u7684\u670d\u52a1\u4e00\u8d77\u4f7f\u7528\u3002 \u5197\u4f59\u8fd8\u53ef\u4ee5\u4e3a\u5177\u6709HA\u7684\u8def\u7531\u516c\u5171IP\u5b50\u7f51\u63d0\u4f9b\u5197\u4f59\u3002 \u672c\u8282\u4ecb\u7ecd\u8fd9\u79cd\u7c7b\u578b\u7684\u914d\u7f6e\uff0c\u8fd9\u5728\u5927\u578b\u7f51\u7edc\u3001ISP\u548c\u65e0\u7ebfISP\u7f51\u7edc\u4ee5\u53ca\u6570\u636e\u4e2d\u5fc3\u73af\u5883\u4e2d\u5f88\u5e38\u89c1\u3002<\/p>\n<h2 style=\"text-align: justify;\">\u516c\u5171IP\u5206\u914d<\/h2>\n<p style=\"text-align: justify;\">pfSense\u7684WAN\u7aef\u81f3\u5c11\u9700\u8981\u4e00\u4e2a\/ 29\u7684\u516c\u5171IP\u8303\u56f4\uff0c\u5b83\u63d0\u4f9b\u4e86\u516d\u4e2a\u53ef\u7528\u7684IP\u5730\u5740\u3002 \u4e24\u4e2a\u9632\u706b\u5899\u90e8\u7f72\u53ea\u9700\u8981\u4e09\u4e2a\uff0c\u4f46\u8fd9\u662f\u5bb9\u7eb3\u4e09\u4e2aIP\u5730\u5740\u7684\u6700\u5c0fIP\u5b50\u7f51\u3002 \u6bcf\u4e2a\u9632\u706b\u5899\u90fd\u9700\u8981\u4e00\u4e2aIP\uff0c\u5e76\u4e14WAN\u7aef\u81f3\u5c11\u9700\u8981\u4e00\u4e2aCARP VIP\u3002<\/p>\n<p style=\"text-align: justify;\">\u7b2c\u4e8c\u4e2a\u516c\u5171IP\u5b50\u7f51\u5c06\u901a\u8fc7ISP\u3001\u6570\u636e\u4e2d\u5fc3\u6216\u4e0a\u6e38\u8def\u7531\u5668\u8def\u7531\u5230CARP VIP\u3002 \u7531\u4e8e\u6b64\u5b50\u7f51\u8def\u7531\u5230CARP VIP\uff0c\u56e0\u6b64\u8def\u7531\u4e0d\u4f1a\u4f9d\u8d56\u4e8e\u5355\u4e2a\u9632\u706b\u5899\u3002 \u5bf9\u4e8e\u672c\u7ae0\u4e2d\u6240\u63cf\u8ff0\u7684\u793a\u4f8b\u914d\u7f6e\uff0c\u5c06\u4f7f\u7528\/ 24\u516c\u5171IP\u5b50\u7f51\uff0c\u5e76\u5c06\u5176\u5206\u6210\u4e24\u4e2a\/ 25\u4e2a\u5b50\u7f51\u3002<\/p>\n<h2 style=\"text-align: justify;\">\u7f51\u7edc\u6982\u8ff0<\/h2>\n<p style=\"text-align: justify;\">\u8fd9\u91cc\u63cf\u8ff0\u7684\u793a\u4f8b\u7f51\u7edc\u662f\u4e00\u4e2a\u6570\u636e\u4e2d\u5fc3\u73af\u5883\uff0c\u7531\u4e24\u4e2apfSense\u9632\u706b\u5899\u7ec4\u6210\uff0c\u6bcf\u4e2a\u9632\u706b\u5899\u6709\u56db\u4e2a\u63a5\u53e3\uff1aWAN\u3001LAN\u3001DBDMZ\u548cpfsync\u3002 \u8be5\u7f51\u7edc\u5305\u542b\u8bb8\u591a\u7f51\u7edc\u548c\u6570\u636e\u5e93\u670d\u52a1\u5668\u3002 \u5b83\u4e0d\u662f\u57fa\u4e8e\u4efb\u4f55\u771f\u5b9e\u7684\u7f51\u7edc\uff0c\u4f46\u4f1a\u6709\u7c7b\u4f3c\u8fd9\u6837\u7684\u5b9e\u4f8b\u90e8\u7f72\u3002<\/p>\n<h3 style=\"text-align: justify;\">WAN\u7f51\u7edc<\/h3>\n<p style=\"text-align: justify;\">WAN\u4fa7\u8fde\u63a5\u5230\u4e0a\u6e38\u7f51\u7edc\uff0c\u5373ISP\u3001\u6570\u636e\u4e2d\u5fc3\u6216\u4e0a\u6e38\u8def\u7531\u5668\u3002<\/p>\n<h3 style=\"text-align: justify;\">WEB \u7f51\u7edc<\/h3>\n<p style=\"text-align: justify;\">\u8be5\u7f51\u7edc\u4e2d\u7684\u7f51\u6bb5\u4f7f\u7528\u201cLAN\u201d\u63a5\u53e3\uff0c\u4f46\u5df2\u91cd\u547d\u540d\u3002 \u5b83\u5305\u542bWeb\u670d\u52a1\u5668\uff0c\u6240\u4ee5\u5b83\u88ab\u547d\u540d\u4e3aWEB\uff0c\u4f46\u53ef\u4ee5\u79f0\u4e3aDMZ\uff0cSERVERS\u6216\u4efb\u4f55\u6240\u9700\u7684\u4e1c\u897f\u3002<\/p>\n<h3 style=\"text-align: justify;\">DBDMZ\u7f51\u7edc<\/h3>\n<p style=\"text-align: justify;\">\u8be5\u6bb5\u662f\u4e00\u4e2aOPT\u63a5\u53e3\u5e76\u5305\u542b\u6570\u636e\u5e93\u670d\u52a1\u5668\u3002 \u5728\u6258\u7ba1\u73af\u5883\u4e2d\uff0c\u5c06\u7f51\u7edc\u548c\u6570\u636e\u5e93\u670d\u52a1\u5668\u5206\u9694\u6210\u4e24\u4e2a\u7f51\u7edc\u662f\u5f88\u5e38\u89c1\u7684\u3002 \u6570\u636e\u5e93\u670d\u52a1\u5668\u901a\u5e38\u4e0d\u9700\u8981\u4ece\u4e92\u8054\u7f51\u76f4\u63a5\u8bbf\u95ee\uff0c\u56e0\u6b64\u4e0d\u53d7Web\u670d\u52a1\u5668\u7684\u5371\u5bb3\u5f71\u54cd\u3002<\/p>\n<h3 style=\"text-align: justify;\">Sync\u7f51\u7edc<\/h3>\n<p style=\"text-align: justify;\">\u6b64\u56fe\u4e2d\u7684\u540c\u6b65\u7f51\u7edc\u7528\u4e8e\u901a\u8fc7XML-RPC\u540c\u6b65pfSense\u914d\u7f6e\u7684\u4fee\u6539\uff0c\u4ee5\u53capfsync\u540c\u6b65\u4e24\u4e2a\u9632\u706b\u5899\u4e4b\u95f4\u7684\u72b6\u6001\u8868\u4fee\u6539\u3002 \u5efa\u8bae\u4f7f\u7528\u4e13\u7528\u63a5\u53e3\u3002<\/p>\n<h3 style=\"text-align: justify;\">\u7f51\u7edc\u62d3\u6251<\/h3>\n<p style=\"text-align: justify;\">\u7f51\u7edc\u62d3\u6251\u5982\u4e0b\u56fe\u6240\u793a\uff0c\u5305\u62ec\u6240\u6709\u53ef\u8def\u7531\u7684IP\u5730\u5740\u3001WEB\u7f51\u7edc\u548c\u6570\u636e\u5e93DMZ\u3002<\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1921\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/diagrams-example-carp-nonat.png\" alt=\"\" width=\"571\" height=\"459\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/diagrams-example-carp-nonat.png 571w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/diagrams-example-carp-nonat-300x241.png 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/diagrams-example-carp-nonat-373x300.png 373w\" sizes=\"auto, (max-width: 571px) 100vw, 571px\" \/><\/p>\n<p class=\"caption\" style=\"text-align: justify;\"><em>HA\u4e0e\u8def\u7531IPs\u7684\u5173\u7cfb\u56fe<\/em><\/p>\n<p class=\"first admonition-title\" style=\"text-align: justify;\">\u6ce8\u610f\uff1a\u5305\u542b\u6570\u636e\u5e93\u670d\u52a1\u5668\u7684\u7f51\u6bb5\u901a\u5e38\u4e0d\u9700\u8981\u516c\u5f00\u8bbf\u95ee\uff0c\u56e0\u6b64\u66f4\u5e38\u7528\u7684\u662f\u4f7f\u7528\u79c1\u6709IP\u5b50\u7f51\uff0c\u4f46\u53ef\u4ee5\u4f7f\u7528\u6b64\u5904\u8bf4\u660e\u7684\u793a\u4f8b\uff0c\u800c\u4e0d\u8003\u8651\u4e24\u4e2a\u5185\u90e8\u5b50\u7f51\u7684\u529f\u80fd\u3002<\/p>\n<h1 style=\"text-align: justify;\">\u7b2c2\u5c42\u5197\u4f59<\/h1>\n<p style=\"text-align: justify;\">\u672c\u8282\u4ecb\u7ecd\u89c4\u5212\u5197\u4f59\u7f51\u7edc\u65f6\u8981\u8003\u8651\u7684\u7b2c2\u5c42\u8bbe\u8ba1\u5143\u7d20\u3002 \u672c\u7ae0\u5047\u5b9a\u53ea\u90e8\u7f72\u4e24\u4e2a\u7cfb\u7edf\uff0c\u5f53\u7136\u4e5f\u53ef\u4ee5\u6839\u636e\u9700\u8981\u6269\u5c55\u5230\u66f4\u591a\u7684\u90e8\u7f72\u3002<\/p>\n<p style=\"text-align: justify;\">\u5982\u679c\u4e24\u4e2a\u5197\u4f59pfSense\u9632\u706b\u5899\u90fd\u63a5\u5165\u5230\u540c\u4e00\u53f0\u4ea4\u6362\u673a\u4efb\u4f55\u63a5\u53e3\u4e0a\uff0c\u5219\u8be5\u4ea4\u6362\u673a\u5c06\u6210\u4e3a\u5355\u70b9\u6545\u969c\u3002 \u4e3a\u4e86\u907f\u514d\u8fd9\u79cd\u5355\u70b9\u6545\u969c\uff0c\u6700\u597d\u7684\u9009\u62e9\u4e3a\u6bcf\u4e2a\u63a5\u53e3\u90e8\u7f72\u4e24\u4e2a\u4ea4\u6362\u673a\uff08\u9664\u4e86\u4e13\u7528\u7684pfsync\u63a5\u53e3\uff09\u3002<\/p>\n<p style=\"text-align: justify;\">\u4e0b\u56fe\u4ee5\u7f51\u7edc\u4e3a\u4e2d\u5fc3\uff0c\u672a\u663e\u793a\u4ea4\u6362\u673a\u57fa\u7840\u7ed3\u6784\u3002 \u5177\u6709\u5197\u4f59\u4ea4\u6362\u673a\u7684HA\u56fe\u56fe\u89e3\u91ca\u4e86\u8be5\u73af\u5883\u5982\u4f55\u4e0e\u5197\u4f59\u4ea4\u6362\u673a\u57fa\u7840\u67b6\u6784\u914d\u5408\u4f7f\u7528\u3002<\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1922\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/diagrams-example-carp-redundantswitches.png\" alt=\"\" width=\"571\" height=\"481\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/diagrams-example-carp-redundantswitches.png 571w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/diagrams-example-carp-redundantswitches-300x253.png 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/diagrams-example-carp-redundantswitches-356x300.png 356w\" sizes=\"auto, (max-width: 571px) 100vw, 571px\" \/><\/p>\n<p class=\"caption\" style=\"text-align: justify;\">\u5177\u6709\u5197\u4f59\u4ea4\u6362\u673a\u7684HA\u793a\u610f\u56fe<\/p>\n<h2 style=\"text-align: justify;\">\u4ea4\u6362\u673a\u914d\u7f6e<\/h2>\n<p style=\"text-align: justify;\">\u4f7f\u7528\u591a\u4e2a\u4ea4\u6362\u673a\u65f6\uff0c\u4ea4\u6362\u673a\u5e94\u4e92\u8fde\u3002 \u53ea\u8981\u4e24\u53f0\u4ea4\u6362\u673a\u4e4b\u95f4\u6709\u5355\u4e00\u8fde\u63a5\uff0c\u5e76\u4e14\u4efb\u4f55\u4e00\u53f0\u9632\u706b\u5899\u4e0a\u90fd\u6ca1\u6709\u7f51\u6865\uff0c\u5bf9\u4efb\u4f55\u7c7b\u578b\u7684\u4ea4\u6362\u673a\u6765\u8bf4\u90fd\u662f\u5b89\u5168\u7684\u3002 \u5728\u4f7f\u7528\u6865\u63a5\u7684\u60c5\u51b5\u4e0b\uff0c\u6216\u8005\u5728\u4ea4\u6362\u673a\u4e4b\u95f4\u5b58\u5728\u591a\u4e2a\u4e92\u8fde\u7684\u60c5\u51b5\u4e0b\uff0c\u5fc5\u987b\u5c0f\u5fc3\u907f\u514d\u7b2c2\u5c42\u73af\u8def\u3002\u00a0\u5982\u679c\u662f\u8fd9\u79cd\u60c5\u51b5\uff0c\u5c31\u9700\u8981\u4e00\u4e2a\u7ba1\u7406\u578b\u4ea4\u6362\u673a\uff0c\u5b83\u80fd\u591f\u4f7f\u7528\u751f\u6210\u6811\u534f\u8bae\uff08STP\uff09\u6765\u68c0\u6d4b\u548c\u963b\u585e\u4f1a\u4ea7\u751f\u4ea4\u6362\u673a\u73af\u8def\u7684\u7aef\u53e3\u3002 \u5f53\u4f7f\u7528STP\u65f6\uff0c\u5982\u679c\u6d3b\u52a8\u94fe\u8def\u65ad\u8def\uff0c\u4f8b\u5982\u4ea4\u6362\u673a\u6545\u969c\uff0c\u90a3\u4e48\u5907\u4efd\u94fe\u8def\u53ef\u4ee5\u81ea\u52a8\u63d0\u4ea4\u5230\u5b83\u7684\u4f4d\u7f6e\u3002<\/p>\n<p style=\"text-align: justify;\">pfSense\u8fd8\u652f\u6301lagg\uff084\uff09\u94fe\u8def\u805a\u5408\u548c\u94fe\u8def\u6545\u969c\u5207\u6362\u63a5\u53e3\uff0c\u5141\u8bb8\u5c06\u591a\u4e2a\u7f51\u7edc\u63a5\u53e3\u63d2\u5165\u4e00\u4e2a\u6216\u591a\u4e2a\u4ea4\u6362\u673a\u4ee5\u63d0\u9ad8\u5bb9\u9519\u80fd\u529b\u3002 \u6709\u5173\u914d\u7f6e\u94fe\u8def\u805a\u5408\u7684\u66f4\u591a\u4fe1\u606f\uff0c\u8bf7\u53c2\u9605LAGG\uff08\u94fe\u8def\u805a\u5408\uff09\u3002<\/p>\n<h2 style=\"text-align: justify;\">\u4e3b\u673a\u5197\u4f59<\/h2>\n<p style=\"text-align: justify;\">\u83b7\u5f97\u9632\u706b\u5899\u5185\u5173\u952e\u7cfb\u7edf\u7684\u4e3b\u673a\u5197\u4f59\u6bd4\u8f83\u56f0\u96be\u3002 \u6bcf\u4e2a\u7cfb\u7edf\u90fd\u53ef\u4ee5\u4f7f\u7528\u4e24\u4e2a\u7f51\u5361\uff0c\u4f7f\u7528\u94fe\u8def\u805a\u5408\u63a7\u5236\u534f\u8bae\uff08LACP\uff09\u6216\u7c7b\u4f3c\u7684\u4f9b\u5e94\u5546\u7279\u5b9a\u529f\u80fd\u8fde\u63a5\u5230\u6bcf\u7ec4\u4ea4\u6362\u673a\u3002 \u670d\u52a1\u5668\u4e5f\u53ef\u4ee5\u6709\u591a\u4e2a\u7f51\u7edc\u8fde\u63a5\uff0c\u5e76\u4e14\u6839\u636e\u64cd\u4f5c\u7cfb\u7edf\uff0c\u53ef\u4ee5\u5728\u4e00\u7ec4\u670d\u52a1\u5668\u4e0a\u8fd0\u884cCARP\u6216\u7c7b\u4f3c\u7684\u534f\u8bae\uff0c\u4ee5\u4fbf\u5b83\u4eec\u5f62\u6210\u76f8\u4e92\u5197\u4f59\u3002<\/p>\n<h2 style=\"text-align: justify;\">\u5176\u4ed6\u5355\u70b9\u6545\u969c<\/h2>\n<p style=\"text-align: justify;\">\u5f53\u8bd5\u56fe\u8bbe\u8ba1\u4e00\u4e2a\u5b8c\u5168\u5197\u4f59\u7684\u7f51\u7edc\u65f6\uff0c\u4f1a\u8bb8\u591a\u5355\u70b9\u6545\u969c\u4f1a\u88ab\u5ffd\u7565\u3002\u9700\u8981\u8003\u8651\u7684\u4e8b\u60c5\u6bd4\u7b80\u5355\u7684\u4ea4\u6362\u673a\u6545\u969c\u8981\u591a\u5f97\u591a\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u89c1\u7684\u5197\u4f59\u793a\u4f8b\uff1a<\/p>\n<ul>\n<li>\u4e3a\u6bcf\u4e2a\u5197\u4f59\u6bb5\u63d0\u4f9b\u9694\u79bb\u7535\u6e90\u3002<\/li>\n<li>\u4e3a\u5197\u4f59\u7cfb\u7edf\u4f7f\u7528\u5355\u72ec\u7684\u65ad\u8def\u5668\u3002<\/li>\n<li>\u4f7f\u7528\u591a\u4e2aUPS\/\u53d1\u7535\u673a\u3002<\/li>\n<li>\u4f7f\u7528\u591a\u4e2a\u7535\u529b\u4f9b\u5e94\u5546\uff0c\u5c3d\u53ef\u80fd\u8fdb\u5165\u5efa\u7b51\u7269\u7684\u4e24\u4fa7\u3002<\/li>\n<li>\u5373\u4f7f\u662f\u591aWAN\u914d\u7f6e\u4e5f\u4e0d\u80fd\u4fdd\u8bc1Internet\u6b63\u5e38\u8fd0\u884c\u3002<\/li>\n<li>\u4f7f\u7528\u591a\u79cd\u4e92\u8054\u7f51\u8fde\u63a5\u6280\u672f\uff08DSL\uff0cCable\uff0cFiber\uff0cWireless\uff09\u3002<\/li>\n<li>\u5982\u679c\u4efb\u4f55\u4e24\u4e2a\u8fd0\u8425\u5546\u4f7f\u7528\u76f8\u540c\u7684\u5149\u7ea4\/\u96a7\u9053\/\u8def\u5f84\uff0c\u4ed6\u4eec\u90fd\u53ef\u80fd\u540c\u65f6\u88ab\u6dd8\u6c70\u3002<\/li>\n<li>\u5907\u4efd\u51b7\u5374\uff0c\u5197\u4f59\u51b7\u6c34\u673a\u7ec4\u6216\u4fbf\u643a\u5f0f\/\u5e94\u6025\u7a7a\u8c03\u3002<\/li>\n<li>\u8003\u8651\u5c06\u7b2c\u4e8c\u5957\u5197\u4f59\u8bbe\u5907\u653e\u7f6e\u5728\u53e6\u4e00\u4e2a\u623f\u95f4\uff0c\u53e6\u4e00\u4e2a\u697c\u5c42\u6216\u53e6\u4e00\u4e2a\u5efa\u7b51\u7269\u4e2d\u3002<\/li>\n<li>\u5728\u57ce\u9547\u6216\u5176\u4ed6\u57ce\u5e02\u7684\u53e6\u4e00\u90e8\u5206\u6709\u91cd\u590d\u7684\u8bbe\u7f6e\u3002<\/li>\n<li>\u6211\u542c\u8bf4\u706b\u661f\u4e0a\u7684\u4e3b\u673a\u4ef7\u683c\u4fbf\u5b9c\uff0c\u4f46\u5ef6\u8fdf\u662f\u6740\u624b\u7ea7\u7684\u3002<\/li>\n<\/ul>\n<h1 style=\"text-align: justify;\">\u9ad8\u53ef\u7528\u6027\u4e0e\u6865\u63a5<\/h1>\n<p style=\"text-align: justify;\">\u9ad8\u53ef\u7528\u6027\u76ee\u524d\u4e0d\u517c\u5bb9\u672c\u5730\u6865\u63a5\u3002<\/p>\n<h1 style=\"text-align: justify;\">\u4f7f\u7528IP\u522b\u540d\u51cf\u5c11\u5fc3\u8df3\u6d41\u91cf<\/h1>\n<p style=\"text-align: justify;\">\u5982\u679c\u67d0\u4e2a\u7f51\u6bb5\u4e0a\u6709\u5927\u91cf\u7684CARP VIP\uff0c\u5219\u4f1a\u5bfc\u81f4\u5f88\u591a\u7ec4\u64ad\u6d41\u91cf\u3002 \u6bcf\u4e2aCARP VIP\u6bcf\u79d2\u53d1\u9001\u4e00\u6b21\u5fc3\u8df3\u3002 \u4e3a\u4e86\u51cf\u5c11\u8fd9\u79cd\u6d41\u91cf\uff0c\u989d\u5916\u7684VIP\u53ef\u4ee5\u5728\u63a5\u53e3\u4e0a\u7684\u4e00\u4e2aCARP VIP\u4e0a\u201c\u5806\u53e0\u201d\u3002 \u9996\u5148\uff0c\u9009\u62e9\u4e00\u4e2aCARP VIP\u4f5c\u4e3a\u63a5\u53e3\u7684\u201c\u4e3b\u8981\u201dVIP\u3002 \u7136\u540e\uff0c\u5c06\u540c\u4e00\u5b50\u7f51\u4e2d\u7684\u5176\u4ed6CARP VIP\u66f4\u6539\u4e3aIP\u522b\u540d\u7c7b\u578bVIP\uff0c\u9009\u62e9\u201c\u4e3b\u201dCARP VIP\u63a5\u53e3\u4f5c\u4e3a\u5b83\u4eec\u5728VIP\u914d\u7f6e\u4e0a\u7684\u63a5\u53e3\u3002<\/p>\n<p style=\"text-align: justify;\">\u8fd9\u4e0d\u4ec5\u51cf\u5c11\u4e86\u5728\u7ed9\u5b9a\u7ec6\u5206\u53d7\u4f17\u4e2d\u770b\u5230\u7684\u5fc3\u8df3\uff0c\u800c\u4e14\u8fd8\u4f1a\u5bfc\u81f4\u6240\u6709IP\u522b\u540dVIP\u4e0e\u201c\u4e3b\u201dCARP VIP\u4e00\u8d77\u66f4\u6539\u72b6\u6001\uff0c\u4ece\u800c\u964d\u4f4e\u7b2c2\u5c42\u95ee\u9898\uff0c\u51cf\u5c11\u6545\u969c\u8f6c\u79fb\u51fa\u73b0\u95ee\u9898\u7684\u6982\u7387\u3002<\/p>\n<p style=\"text-align: justify;\">IP\u522b\u540dVIP\u901a\u5e38\u4e0d\u4f1a\u901a\u8fc7XML-RPC\u914d\u7f6e\u540c\u6b65\u8fdb\u884c\u540c\u6b65\uff0c\u4f46\u662f\uff0c\u4ee5\u8fd9\u79cd\u65b9\u5f0f\u8bbe\u7f6e\u4e3a\u4f7f\u7528CARP\u63a5\u53e3\u7684IP\u522b\u540dVIP\u5c06\u4f1a\u8fdb\u884c\u540c\u6b65\u3002<\/p>\n<h1 style=\"text-align: justify;\">\u63a5\u53e3<\/h1>\n<p style=\"text-align: justify;\">\u5982\u679c\u5728\u4e0eHA\u7684\u5355\u4e2a\u63a5\u53e3\u4e0a\u9700\u8981\u591a\u4e2a\u5b50\u7f51\uff0c\u5219\u53ef\u4ee5\u4f7f\u7528IP\u522b\u540d\u6765\u5b8c\u6210\u3002 \u4e0e\u4e3b\u63a5\u53e3IP\u5730\u5740\u4e00\u6837\uff0c\u6211\u4eec\u5efa\u8bae\u6bcf\u4e2a\u9632\u706b\u5899\u5728\u9644\u52a0\u5b50\u7f51\u5185\u90fd\u6709\u4e00\u4e2aIP\u5730\u5740\uff0c\u6bcf\u4e2a\u5b50\u7f51\u603b\u5171\u81f3\u5c11\u6709\u4e09\u4e2aIP\u3002 \u5fc5\u987b\u5c06\u5355\u72ec\u7684IP\u522b\u540d\u6761\u76ee\u6dfb\u52a0\u5230\u65b0\u5b50\u7f51\u5185\u7684\u6bcf\u4e2a\u8282\u70b9\uff0c\u4ee5\u786e\u4fdd\u5176\u5b50\u7f51\u63a9\u7801\u4e0e\u65b0\u5b50\u7f51\u7684\u5b9e\u9645\u5b50\u7f51\u63a9\u7801\u76f8\u5339\u914d\u3002 \u76f4\u63a5\u5728\u63a5\u53e3\u4e0a\u7684IP\u522b\u540dVIP\u4e0d\u540c\u6b65\uff0c\u5b89\u5168\u53ef\u4ee5\u5f97\u5230\u4fdd\u8bc1\u3002<\/p>\n<p style=\"text-align: justify;\">\u4e00\u65e6\u5c06IP\u522b\u540dVIP\u6dfb\u52a0\u5230\u4e24\u4e2a\u8282\u70b9\u4ee5\u5728\u65b0\u5b50\u7f51\u4e2d\u83b7\u5f97\u7acb\u8db3\u70b9\uff0c\u5219\u53ef\u4ee5\u4f7f\u7528\u6765\u81ea\u65b0\u5b50\u7f51\u7684IP\u5730\u5740\u6dfb\u52a0CARP VIP\u3002<\/p>\n<p style=\"text-align: justify;\">\u53ea\u8981\u4e0d\u9700\u8981\u9644\u52a0\u5b50\u7f51\u548c\u4e24\u4e2a\u72ec\u7acbHA\u8282\u70b9\u4e4b\u95f4\u7684\u901a\u4fe1\uff0c\u5c31\u53ef\u4ee5\u7701\u7565IP\u522b\u540d\uff0c\u5e76\u76f4\u63a5\u5728\u53e6\u4e00\u4e2a\u5b50\u7f51\u4e2d\u4f7f\u7528CARP VIP\u3002<\/p>\n<h1 style=\"text-align: justify;\">\u6545\u969c\u6392\u9664<\/h1>\n<p style=\"text-align: justify;\">\u9ad8\u53ef\u7528\u6027\u914d\u7f6e\u76f8\u5bf9\u590d\u6742\uff0c\u4e14\u6709\u8bb8\u591a\u4e0d\u540c\u7684\u65b9\u5f0f\u6765\u914d\u7f6e\u6545\u969c\u8f6c\u79fb\u7fa4\u96c6\u3002\u5728\u672c\u8282\u4e2d\uff0c\u4e00\u4e9b\u5e38\u89c1\uff08\u4e0d\u5e38\u89c1\uff09\u7684\u95ee\u9898\u5728\u5927\u591a\u6570\u60c5\u51b5\u4e0b\u8ba8\u8bba\u5e76\u6709\u671b\u89e3\u51b3\u3002\u5982\u679c\u5728\u54a8\u8be2\u672c\u8282\u540e\u95ee\u9898\u4ecd\u7136\u5b58\u5728\uff0c\u90a3\u4e48\u5728pfSense\u8bba\u575b\u4e0a\u6709\u4e13\u95e8\u7684CARP \/ VIPs\u8ba8\u8bba\u533a\u3002<\/p>\n<p style=\"text-align: justify;\">\u5728\u7ee7\u7eed\u4e4b\u524d\uff0c\u8bf7\u82b1\u65f6\u95f4\u68c0\u67e5HA\u7fa4\u96c6\u7684\u6240\u6709\u6210\u5458\u4ee5\u786e\u4fdd\u5b83\u4eec\u5177\u6709\u4e00\u81f4\u7684\u914d\u7f6e\u3002\u901a\u5e38\uff0c\u8fd9\u6709\u52a9\u4e8e\u901a\u8fc7\u793a\u4f8b\u8bbe\u7f6e\uff0c\u4ed4\u7ec6\u68c0\u67e5\u6240\u6709\u6b63\u786e\u7684\u8bbe\u7f6e\u3002\u5728\u8f85\u52a9\u8282\u70b9\u4e0a\u91cd\u590d\u8be5\u8fc7\u7a0b\uff0c\u5e76\u6ce8\u610f\u8f85\u52a9\u8282\u70b9\u4e0a\u914d\u7f6e\u4e0d\u540c\u7684\u5730\u65b9\u3002\u8bf7\u52a1\u5fc5\u68c0\u67e5CARP\u72b6\u6001\uff08\u68c0\u67e5CARP\u72b6\u6001\uff09\uff0c\u5e76\u786e\u4fdd\u6240\u6709\u96c6\u7fa4\u6210\u5458\u90fd\u542f\u7528CARP\u3002<\/p>\n<p style=\"text-align: justify;\"><strong>\u7cfb\u7edf\u72b6\u6001&gt;\u7cfb\u7edf\u65e5\u5fd7<\/strong>\uff0c\u7cfb\u7edf\u9009\u9879\u5361\u4f1a\u8bb0\u5f55\u4e0eHA\u6709\u5173\u7684\u9519\u8bef\u3002\u68c0\u67e5\u6d89\u53ca\u7684\u6bcf\u4e2a\u7cfb\u7edf\u4e0a\u7684\u65e5\u5fd7\uff0c\u770b\u770b\u662f\u5426\u6709\u4efb\u4f55\u4e0eXMLRPC\u540c\u6b65\u3001CARP\u72b6\u6001\u8f6c\u6362\u6216\u5176\u4ed6\u76f8\u5173\u9519\u8bef\u7684\u4fe1\u606f\u3002<\/p>\n<h2 style=\"text-align: justify;\">\u5e38\u89c1\u9519\u8bef\u914d\u7f6e<\/h2>\n<p style=\"text-align: justify;\">\u6709\u4e09\u79cd\u5e38\u89c1\u7684\u9519\u8bef\u914d\u7f6e\u4f1a\u963b\u6b62HA\u6b63\u5e38\u5de5\u4f5c\u3002<\/p>\n<h3 style=\"text-align: justify;\">\u6bcf\u4e2aCARP VIP\u4f7f\u7528\u4e0d\u540c\u7684VHID<\/h3>\n<p style=\"text-align: justify;\">\u5728\u7ed9\u5b9a\u63a5\u53e3\u6216\u5e7f\u64ad\u57df\u4e0a\u521b\u5efa\u7684\u6bcf\u4e2aCARP VIP\u4e0a\u5fc5\u987b\u4f7f\u7528\u4e0d\u540c\u7684VHID\u3002 \u4f7f\u7528\u5355\u4e2aHA\u65f6\uff0c\u8f93\u5165\u9a8c\u8bc1\u5c06\u9632\u6b62\u91cd\u590d\u7684VHID\u3002\u00a0\u4e0d\u8fc7\uff0c\u4e5f\u4e0d\u603b\u662f\u90a3\u4e48\u7b80\u5355\u3002 CARP\u662f\u4e00\u79cd\u7ec4\u64ad\u6280\u672f\uff0c\u56e0\u6b64\u5728\u540c\u4e00\u7f51\u6bb5\u4e0a\u4f7f\u7528CARP\u7684\u4efb\u4f55\u5185\u5bb9\u90fd\u5fc5\u987b\u4f7f\u7528\u552f\u4e00\u7684VHID\u3002 VRRP\u4e5f\u4f7f\u7528\u4e0eCARP\u7c7b\u4f3c\u7684\u534f\u8bae\uff0c\u56e0\u6b64\u786e\u4fdd\u4e0eVRRP VHID\u6ca1\u6709\u51b2\u7a81\uff0c\u4f8b\u5982ISP\u6216\u672c\u5730\u7f51\u7edc\u4e2d\u7684\u5176\u4ed6\u8def\u7531\u5668\u6b63\u5728\u4f7f\u7528VRRP\u3002<\/p>\n<p style=\"text-align: justify;\">\u6700\u597d\u7684\u89e3\u51b3\u65b9\u6cd5\u662f\u4f7f\u7528\u4e00\u7ec4\u72ec\u7279\u7684VHID\u3002 \u5982\u679c\u6b63\u5728\u4f7f\u7528\u5df2\u77e5\u5b89\u5168\u7684\u4e13\u7528\u7f51\u7edc\uff0c\u8bf7\u4ece1\u5f00\u59cb\u7f16\u53f7\u3002\u5728VRRP\u6216CARP\u53d1\u751f\u51b2\u7a81\u7684\u7f51\u7edc\u4e0a\uff0c\u54a8\u8be2\u8be5\u7f51\u7edc\u7684\u7ba1\u7406\u5458\u4ee5\u67e5\u627e\u7a7a\u95f2\u533a\u57df\u7684VHID\u3002<\/p>\n<h3 style=\"text-align: justify;\">\u4e0d\u6b63\u786e\u7684\u65f6\u95f4<\/h3>\n<p style=\"text-align: justify;\">\u68c0\u67e5\u6240\u6d89\u53ca\u7684\u7cfb\u7edf\u662f\u5426\u6b63\u786e\u540c\u6b65\u65f6\u95f4\u5e76\u5177\u6709\u6709\u6548\u65f6\u533a\uff0c\u5c24\u5176\u662f\u5728\u865a\u62df\u673a\u4e2d\u8fd0\u884c\u65f6\u3002 \u5982\u679c\u65f6\u95f4\u76f8\u5dee\u592a\u5927\uff0c\u67d0\u4e9b\u540c\u6b65\u4efb\u52a1\uff08\u5982DHCP\u6545\u969c\u5207\u6362\uff09\u5c06\u65e0\u6cd5\u6b63\u5e38\u5de5\u4f5c\u3002<\/p>\n<h3 style=\"text-align: justify;\">\u4e0d\u6b63\u786e\u7684\u5b50\u7f51\u63a9\u7801<\/h3>\n<p style=\"text-align: justify;\">\u771f\u6b63\u7684\u5b50\u7f51\u63a9\u7801\u5fc5\u987b\u7528\u4e8eCARP VIP\uff0c\u800c\u4e0d\u662f\/ 32\u3002 \u8fd9\u5fc5\u987b\u4e0e\u5206\u914dCARP IP\u7684\u63a5\u53e3\u4e0a\u7684IP\u5730\u5740\u7684\u5b50\u7f51\u63a9\u7801\u76f8\u5339\u914d\u3002<\/p>\n<h3 style=\"text-align: justify;\">CARP\u63a5\u53e3\u7684IP\u5730\u5740<\/h3>\n<p style=\"text-align: justify;\">CARP VIP\u6240\u5728\u7684\u63a5\u53e3\u5728\u4f7f\u7528\u524d\u5fc5\u987b\u5df2\u7ecf\u5728\u63a5\u53e3\uff08VLAN\uff0cLAN\uff0cWAN\uff0cOPT\uff09\u4e0a\u76f4\u63a5\u5b9a\u4e49\u4e86\u53e6\u4e00\u4e2aIP\u3002<\/p>\n<h2 style=\"text-align: justify;\">\u4e0d\u6b63\u786e\u7684\u54c8\u5e0c\u9519\u8bef<\/h2>\n<p style=\"text-align: justify;\">\u5982\u679cCARP\u5728\u51fa\u73b0\u6b64\u9519\u8bef\u65f6\u65e0\u6cd5\u6b63\u5e38\u5de5\u4f5c\uff0c\u5219\u53ef\u80fd\u662f\u914d\u7f6e\u4e0d\u5339\u914d\u3002 \u786e\u4fdd\u5bf9\u4e8e\u7ed9\u5b9a\u7684VIP\u3001VHID\u3001\u5bc6\u7801\u548cIP\u5730\u5740\/\u5b50\u7f51\u63a9\u7801\u90fd\u5339\u914d\u3002<\/p>\n<p style=\"text-align: justify;\">\u5982\u679c\u8bbe\u7f6e\u6b63\u786e\uff0c\u5e76\u4e14\u5728\u751f\u6210\u6b64\u9519\u8bef\u6d88\u606f\u65f6CARP\u4ecd\u4e0d\u8d77\u4f5c\u7528\uff0c\u90a3\u4e48\u5728\u540c\u4e00\u5e7f\u64ad\u57df\u4e2d\u53ef\u80fd\u4f1a\u6709\u591a\u4e2aCARP\u5b9e\u4f8b\u3002 \u4f7f\u7528tcpdump\uff08\u6570\u636e\u5305\u6355\u83b7\uff09\u7981\u7528CARP\u5e76\u76d1\u63a7\u7f51\u7edc\uff0c\u4ee5\u68c0\u67e5\u5176\u4ed6CARP\u6216\u7c7b\u4f3cCARP\u7684\u6d41\u91cf\uff0c\u5e76\u9002\u5f53\u8c03\u6574VHID\u3002<\/p>\n<p style=\"text-align: justify;\">\u5982\u679cCARP\u5de5\u4f5c\u6b63\u5e38\uff0c\u5e76\u4e14\u7cfb\u7edf\u542f\u52a8\u65f6\u6b64\u6d88\u606f\u5728\u65e5\u5fd7\u4e2d\uff0c\u5219\u53ef\u4ee5\u5ffd\u7565\u5b83\u3002 \u53ea\u8981CARP\u7ee7\u7eed\u6b63\u5e38\u5de5\u4f5c\uff08\u4e3b\u8282\u70b9\u663e\u793aMASTER\uff0c\u8f85\u52a9\u8282\u70b9\u663e\u793aBACKUP\u72b6\u6001\uff09\uff0c\u542f\u52a8\u65f6\u5c31\u4f1a\u770b\u5230\u6b64\u6d88\u606f\u662f\u6b63\u5e38\u7684\u3002<\/p>\n<h2 style=\"text-align: justify;\">\u4e24\u4e2a\u7cfb\u7edf\u90fd\u663e\u793a\u4e3aMASTER<\/h2>\n<p style=\"text-align: justify;\">\u5982\u679c\u8f85\u52a9\u8282\u70b9\u65e0\u6cd5\u4ece\u4e3b\u8282\u70b9\u6536\u5230CARP\u5e7f\u64ad\uff0c\u5219\u4f1a\u53d1\u751f\u8fd9\u79cd\u60c5\u51b5\u3002 \u68c0\u67e5\u9632\u706b\u5899\u89c4\u5219\u3001\u8fde\u63a5\u3001\u4ea4\u6362\u673a\u914d\u7f6e\u3002 \u540c\u65f6\u68c0\u67e5\u7cfb\u7edf\u65e5\u5fd7\u662f\u5426\u6709\u53ef\u80fd\u5bfc\u81f4\u89e3\u51b3\u65b9\u6848\u7684\u76f8\u5173\u9519\u8bef\u4fe1\u606f\u3002 \u5982\u679c\u5728\u865a\u62df\u673a\uff08VM\uff09\u4ea7\u54c1\uff08\u5982ESX\uff09\u4e2d\u9047\u5230\u6b64\u95ee\u9898\uff0c\u8bf7\u53c2\u9605\u865a\u62df\u673a\uff08ESX\uff09\u4e2d\u7684\u95ee\u9898\u3002<\/p>\n<h2 style=\"text-align: justify;\">\u4e3b\u8282\u70b9\u964d\u7ea7\u4e3aBACKUP<\/h2>\n<p style=\"text-align: justify;\">\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u5728\u7cfb\u7edf\u6062\u590d\u8054\u673a\u540e\uff0c\u53ef\u80fd\u4f1a\u5728\u77ed\u65f6\u95f4\u5185\u6b63\u5e38\u53d1\u751f\u8fd9\u79cd\u60c5\u51b5\u3002 \u4f46\u662f\uff0c\u67d0\u4e9b\u786c\u4ef6\u6545\u969c\u6216\u5176\u4ed6\u9519\u8bef\u60c5\u51b5\u53ef\u80fd\u4f1a\u5bfc\u81f4\u670d\u52a1\u5668\u9ed8\u9ed8\u627f\u62c5240\u7684\u8f83\u9ad8\u4f18\u5148\u7ea7\uff0c\u4ee5\u8868\u793a\u5b83\u4ecd\u7136\u5b58\u5728\u95ee\u9898\uff0c\u5e76\u4e14\u4e0d\u5e94\u6210\u4e3a\u4e3b\u8bbe\u5907\u3002 \u8fd9\u53ef\u4ee5\u901a\u8fc7GUI\u6216\u901a\u8fc7shell\u6216\u7cfb\u7edf\u8bca\u65ad&gt;\u547d\u4ee4\u6765\u8fdb\u884c\u68c0\u67e5\u3002<\/p>\n<p style=\"text-align: justify;\">\u5728GUI\u4e2d\uff0c\u6b64\u72b6\u6001\u663e\u793a\u5728\u7cfb\u7edf\u72b6\u6001&gt; CARP\u7684\u9519\u8bef\u6d88\u606f\u4e2d\u3002<\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1923\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/ha-carp-demoted.png\" alt=\"\" width=\"1148\" height=\"356\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/ha-carp-demoted.png 1148w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/ha-carp-demoted-1024x318.png 1024w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/ha-carp-demoted-300x93.png 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/ha-carp-demoted-768x238.png 768w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/ha-carp-demoted-500x155.png 500w\" sizes=\"auto, (max-width: 1148px) 100vw, 1148px\" \/><\/p>\n<p class=\"caption\" style=\"text-align: justify;\">\u5f53\u4e3b\u8282\u70b9\u88ab\u964d\u7ea7\u65f6CARP\u72b6\u6001<\/p>\n<p style=\"text-align: justify;\">\u5728shell\u6216\u7cfb\u7edf\u8bca\u65ad&gt;\u547d\u4ee4\u4e2d\uff0c\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u68c0\u67e5\u964d\u7ea7\uff1a<\/p>\n<pre><span class=\"c1\">#  sysctl net.inet.carp.demotion<\/span>\r\n<span class=\"n\">net<\/span><span class=\"o\">.<\/span><span class=\"n\">inet<\/span><span class=\"o\">.<\/span><span class=\"n\">carp<\/span><span class=\"o\">.<\/span><span class=\"n\">demotion<\/span><span class=\"p\">:<\/span> <span class=\"mi\">240<\/span><\/pre>\n<p style=\"text-align: justify;\">\u5982\u679c\u8be5\u503c\u5927\u4e8e0\uff0c\u5219\u8be5\u8282\u70b9\u5df2\u964d\u7ea7\u3002<\/p>\n<p style=\"text-align: justify;\">\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u9694\u79bb\u9632\u706b\u5899\uff0c\u68c0\u67e5\u7f51\u7edc\u8fde\u63a5\uff0c\u5e76\u6267\u884c\u8fdb\u4e00\u6b65\u7684\u786c\u4ef6\u6d4b\u8bd5\u3002<\/p>\n<p style=\"text-align: justify;\">\u5982\u679c\u964d\u7ea7\u503c\u4e3a0\uff0c\u5e76\u4e14\u4e3b\u8282\u70b9\u4ecd\u7136\u5c06\u81ea\u5df1\u964d\u7ea7\u4e3aBACKUP\u6216\u4e0d\u65ad\u53d8\u5316\uff0c\u8bf7\u68c0\u67e5\u7f51\u7edc\u4ee5\u786e\u4fdd\u6ca1\u6709\u7b2c2\u5c42\u73af\u8def\u3002 \u5982\u679c\u9632\u706b\u5899\u4ece\u4ea4\u6362\u673a\u63a5\u6536\u5230\u81ea\u5df1\u7684\u5fc3\u8df3\uff0c\u5b83\u4e5f\u53ef\u4ee5\u89e6\u53d1\u5bf9BACKUP\u72b6\u6001\u7684\u66f4\u6539\u3002<\/p>\n<h2 style=\"text-align: justify;\">\u865a\u62df\u673a\u5185\u90e8\u95ee\u9898\uff08ESX\uff09<\/h2>\n<p style=\"text-align: justify;\">\u5728\u865a\u62df\u673a\u5185\u90e8\u4f7f\u7528HA\u65f6\uff0c\u5c24\u5176\u662fVMware ESX\uff0c\u9700\u8981\u4e00\u4e9b\u7279\u6b8a\u7684\u914d\u7f6e\uff1a<\/p>\n<ul class=\" list-paddingleft-2\" style=\"text-align: justify;\">\n<li>\u5728vSwitch\u4e0a\u542f\u7528\u6df7\u6742\u6a21\u5f0f\u3002<\/li>\n<li>\u542f\u7528\u201cMAC\u5730\u5740\u66f4\u6539\u201d\u3002<\/li>\n<li>\u542f\u7528\u201c\u4f2a\u4f20\u8f93\u201d\u3002<\/li>\n<\/ul>\n<h3 style=\"text-align: justify;\">ESX VDS\u6df7\u6742\u6a21\u5f0f\u89e3\u51b3\u65b9\u6cd5<\/h3>\n<p style=\"text-align: justify;\">\u5982\u679c\u6b63\u5728\u4f7f\u7528\u865a\u62df\u5206\u5e03\u5f0f\u4ea4\u6362\u673a\uff0c\u5219\u53ef\u4ee5\u4e3a\u542f\u7528\u6df7\u6742\u6a21\u5f0f\u7684\u9632\u706b\u5899\u63a5\u53e3\u521b\u5efa\u7aef\u53e3\u7ec4\uff0c\u5e76\u4e3a\u5176\u4ed6\u4e3b\u673a\u8bbe\u7f6e\u5355\u72ec\u7684\u975e\u6df7\u6742\u7aef\u53e3\u7ec4\u3002\u8bba\u575b\u4e0a\u6709\u7528\u6237\u4f7f\u7528\u8fd9\u79cd\u65b9\u5f0f\u6765\u5e73\u8861\u8ba9CARP\u529f\u80fd\u548c\u4fdd\u62a4\u5ba2\u6237\u7aef\u7aef\u53e3\u7684\u8981\u6c42\u3002<\/p>\n<h3 style=\"text-align: justify;\">ESX VDS\u00a0\u5347\u7ea7\u95ee\u9898<\/h3>\n<p style=\"text-align: justify;\">\u5982\u679c\u57284.0\u62164.1\u4e2d\u4f7f\u7528VDS\uff08\u865a\u62df\u5206\u5e03\u5f0f\u4ea4\u6362\u673a\uff09\u5e76\u5c06\u5176\u4ece4.0\u5347\u7ea7\u52304.1\u62165.0\uff0c\u5219VDS\u5c06\u65e0\u6cd5\u6b63\u786e\u4f20\u9012CARP\u6d41\u91cf\u3002 \u5982\u679c\u57284.1\u62165.0\u4e0a\u521b\u5efa\u4e86\u65b0\u7684VDS\uff0c\u5b83\u53ef\u4ee5\u6b63\u5e38\u5de5\u4f5c\uff0c\u4f46\u5347\u7ea7\u540e\u7684VDS\u5219\u4e0d\u4f1a\u3002<\/p>\n<p style=\"text-align: justify;\">\u53ef\u4ee5\u5728VDS\u4e0a\u7981\u7528\u6df7\u6742\u6a21\u5f0f\uff0c\u7136\u540e\u91cd\u65b0\u542f\u7528\u5b83\u53ef\u4ee5\u89e3\u51b3\u8be5\u95ee\u9898\u3002<\/p>\n<h3 style=\"text-align: justify;\">ESX VDS\u7aef\u53e3\u955c\u50cf\u95ee\u9898<\/h3>\n<p style=\"text-align: justify;\">\u5982\u679c\u5728VDS\u4e0a\u542f\u7528\u7aef\u53e3\u955c\u50cf\uff0c\u5219\u4f1a\u6253\u7834\u6df7\u6742\u6a21\u5f0f\u3002 \u8981\u4fee\u590d\u5b83\uff0c\u8bf7\u7981\u7528\u7136\u540e\u91cd\u65b0\u542f\u7528\u6df7\u6742\u6a21\u5f0f\u3002<\/p>\n<h3 style=\"text-align: justify;\">ESX\u5ba2\u6237\u7aef\u7aef\u53e3\u95ee\u9898<\/h3>\n<p style=\"text-align: justify;\">\u5982\u679c\u7269\u7406HA\u96c6\u7fa4\u4f7f\u7528ESX\u4e3b\u673a\uff08lagg\u7ec4\u6216\u7c7b\u4f3c\u8bbe\u5907\uff09\u4e0a\u7684\u591a\u4e2a\u7aef\u53e3\u8fde\u63a5\u5230\u4ea4\u6362\u673a\uff0c\u5e76\u4e14\u76ee\u6807VM\u53ea\u80fd\u8bbf\u95ee\u67d0\u4e9b\u8bbe\u5907\/ IP\uff0c\u5219\u7aef\u53e3\u7ec4\u8bbe\u7f6e\u53ef\u80fd\u9700\u8981\u8c03\u6574 ESX\u5c06\u57fa\u4e8eIP\u8bbe\u7f6e\u7ec4\u7684\u8d1f\u8f7d\u5e73\u8861\u8bbe\u7f6e\u4e3a\u57fa\u4e8e\u6563\u5217\uff0c\u800c\u4e0d\u662f\u59cb\u53d1\u63a5\u53e3\u3002<\/p>\n<p style=\"text-align: justify;\">\u8bbe\u7f6e\u4e0d\u6b63\u786e\u7684\u526f\u4f5c\u7528\u5305\u62ec\uff1a<\/p>\n<ul class=\" list-paddingleft-2\" style=\"text-align: justify;\">\n<li>\u6d41\u91cf\u4ec5\u5728\u5176NIC\u4e0a\u4ee5\u6df7\u6742\u6a21\u5f0f\u5230\u8fbe\u76ee\u6807VM\u3002<\/li>\n<li>\u5f53\u4e3b\u9632\u706b\u5899\u7684\u201c\u771f\u5b9e\u201dIP\u5730\u5740\u53ef\u4ee5\u5230\u8fbe\u65f6\uff0c\u65e0\u6cd5\u4ece\u76ee\u6807VM\u5230\u8fbeCARP VIP\u3002<\/li>\n<li>\u5230\u76ee\u6807VM\u7684\u7aef\u53e3\u8f6c\u53d1\u6216\u5176\u4ed6\u5165\u7ad9\u8fde\u63a5\u4ece\u4e00\u4e9bIP\u5730\u5740\u5de5\u4f5c\uff0c\u800c\u4e0d\u662f\u5176\u4ed6IP\u5730\u5740\u3002<\/li>\n<\/ul>\n<h3 style=\"text-align: justify;\">ESX\u7269\u7406\u7f51\u5361\u6545\u969c\u65e0\u6cd5\u89e6\u53d1\u6545\u969c\u5207\u6362<\/h3>\n<p style=\"text-align: justify;\">CARP\u4e2d\u7684\u81ea\u6211\u964d\u7ea7\u4f9d\u8d56\u4e8e\u4ea4\u6362\u673a\u7aef\u53e3\u94fe\u8def\u7684\u4e22\u5931\u3002 \u56e0\u6b64\uff0c\u5982\u679c\u4e3b\u9632\u706b\u5899\u5b9e\u4f8b\u548c\u8f85\u52a9\u9632\u706b\u5899\u5b9e\u4f8b\u4f4d\u4e8e\u4e0d\u540c\u7684ESX\u5355\u5143\u4e0a\uff0c\u5e76\u4e14\u4e3b\u8bbe\u5907\u4e22\u5931\u4e86\u4ea4\u6362\u673a\u7aef\u53e3\u94fe\u63a5\u5e76\u4e14\u4e0d\u4f1a\u5c06\u5176\u516c\u5f00\u7ed9\u865a\u62df\u673a\uff0cCARP\u5c06\u5728\u5176\u6240\u6709VIP\u4e0a\u4fdd\u7559MASTER\uff0c\u5e76\u4e14\u6b21\u8981\u8bbe\u5907\u4e5f\u4f1a\u76f8\u4fe1\u5b83\u5e94\u8be5\u662fMASTER\u3002 \u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\u7684\u65b9\u6cd5\u4e4b\u4e00\u662f\u5728ESX\u4e2d\u7f16\u5199\u4e00\u4e2a\u4e8b\u4ef6\uff0c\u5982\u679c\u7269\u7406\u7aef\u53e3\u4e22\u5931\u94fe\u63a5\uff0c\u8be5\u4e8b\u4ef6\u5c06\u53d6\u6d88VM\u4e0a\u7684\u4ea4\u6362\u673a\u7aef\u53e3\u3002 \u5728ESX\u4e2d\u4e5f\u53ef\u80fd\u6709\u5176\u4ed6\u65b9\u6cd5\u3002<\/p>\n<h3 style=\"text-align: justify;\">KVM + Qemu\u95ee\u9898<\/h3>\n<ul>\n<li>\u4f7f\u7528e1000\u7f51\u5361\uff08em\uff084\uff09\uff09\uff0ced\uff084\uff09\u7f51\u5361\u6216CARP VIP\u4e0d\u4f1a\u79bb\u5f00init\u72b6\u6001\u3002<\/li>\n<li>VirtualBox\u00a0\u95ee\u9898<\/li>\n<li>\u5728VM\u7684\u76f8\u5173\u63a5\u53e3\u4e0a\u8bbe\u7f6e\u201c\u6df7\u6742\u6a21\u5f0f\uff1a\u5141\u8bb8CARP\u5728\u4efb\u4f55\u63a5\u53e3\u7c7b\u578b\uff08\u6865\u63a5\uff0c\u4e3b\u673a\uff0c\u5185\u90e8\uff09\u4e0a\u8fd0\u884c\uff0c<\/li>\n<\/ul>\n<h2 style=\"text-align: justify;\">\u5176\u4ed6\u4ea4\u6362\u673a\u548c\u7b2c2\u5c42\u95ee\u9898<\/h2>\n<ul class=\" list-paddingleft-2\" style=\"text-align: justify;\">\n<li>\u5982\u679c\u8282\u70b9\u5355\u5143\u63d2\u5165\u5355\u72ec\u7684\u4ea4\u6362\u673a\uff0c\u8bf7\u786e\u4fdd\u4ea4\u6362\u673a\u6b63\u786e\u4e2d\u7ee7\u5e76\u4f20\u9012\u5e7f\u64ad\/\u591a\u64ad\u901a\u4fe1\u3002<\/li>\n<li>\u4e00\u4e9b\u4ea4\u6362\u673a\u5177\u6709\u5e7f\u64ad\/\u591a\u64ad\u8fc7\u6ee4\uff0c\u9650\u5236\u6216\u201c\u98ce\u66b4\u63a7\u5236\u201d\u529f\u80fd\uff0c\u53ef\u4ee5\u6253\u7834CARP\u3002<\/li>\n<li>\u67d0\u4e9b\u4ea4\u6362\u673a\u5df2\u635f\u574f\u56fa\u4ef6\uff0c\u5bfc\u81f4IGMP Snooping\u7b49\u529f\u80fd\u5e72\u6270CARP\u3002<\/li>\n<li>\u5982\u679c\u4f7f\u7528\u8c03\u5236\u89e3\u8c03\u5668\/ CPE\u80cc\u9762\u7684\u5f00\u5173\uff0c\u8bf7\u5c1d\u8bd5\u4f7f\u7528\u771f\u6b63\u7684\u5f00\u5173\u3002 \u8fd9\u4e9b\u5185\u7f6e\u4ea4\u6362\u673a\u901a\u5e38\u65e0\u6cd5\u6b63\u786e\u5904\u7406CARP\u6d41\u91cf\u3002 \u901a\u5e38\u5c06\u9632\u706b\u5899\u63d2\u5165\u5408\u9002\u7684\u4ea4\u6362\u673a\uff0c\u7136\u540e\u4e0a\u884c\u5230CPE\u5c06\u6d88\u9664\u95ee\u9898\u3002<\/li>\n<\/ul>\n<h2 style=\"text-align: justify;\">\u914d\u7f6e\u540c\u6b65\u95ee\u9898<\/h2>\n<ul class=\" list-paddingleft-2\" style=\"text-align: justify;\">\n<li>\u5728\u9047\u5230\u914d\u7f6e\u540c\u6b65\u95ee\u9898\u65f6\uff0c\u8bf7\u4ed4\u7ec6\u68c0\u67e5\u4ee5\u4e0b\u9879\u76ee\uff1a<\/li>\n<li>\u6240\u6709\u8282\u70b9\u4e0a\u7684\u7528\u6237\u540d\u5fc5\u987b\u4e3aadmin\u3002<\/li>\n<li>\u4e3b\u670d\u52a1\u5668\u4e0a\u7684\u914d\u7f6e\u540c\u6b65\u8bbe\u7f6e\u4e2d\u7684\u5bc6\u7801\u5fc5\u987b\u4e0e\u5907\u4efd\u4e2d\u7684\u5bc6\u7801\u76f8\u5339\u914d\u3002<\/li>\n<li>WebGUI\u5fc5\u987b\u4f4d\u4e8e\u6240\u6709\u8282\u70b9\u4e0a\u7684\u76f8\u540c\u7aef\u53e3\u4e0a\u3002<\/li>\n<li>WebGUI\u5fc5\u987b\u5728\u6240\u6709\u8282\u70b9\u4e0a\u4f7f\u7528\u76f8\u540c\u7684\u534f\u8bae\uff08HTTP\u6216HTTPS\uff09\u3002<\/li>\n<li>\u5fc5\u987b\u5141\u8bb8\u6d41\u91cf\u901a\u8fc7\u540c\u6b65\u6d41\u91cf\u63a5\u53e3\u4e0a\u7684WebGUI\u7aef\u53e3\u3002<\/li>\n<li>\u5fc5\u987b\u5728\u6240\u6709\u8282\u70b9\u4e0a\u542f\u7528\u548c\u914d\u7f6epfsync\u63a5\u53e3\u3002<\/li>\n<li>\u786e\u8ba4\u53ea\u6709\u4e3b\u540c\u6b65\u8282\u70b9\u542f\u7528\u4e86\u914d\u7f6e\u540c\u6b65\u9009\u9879\u3002<\/li>\n<li>\u786e\u4fdd\u5728\u8f85\u52a9\u8282\u70b9\u4e0a\u7684\u540c\u6b65\u914d\u7f6e\u5230IP\u4e2d\u6ca1\u6709\u6307\u5b9aIP\u5730\u5740\u3002<\/li>\n<li>\u786e\u4fdd\u4e24\u4e2a\u8282\u70b9\u4e0a\u7684\u65f6\u95f4\u90fd\u662f\u6700\u65b0\u7684\uff0c\u5e76\u4e14\u76f8\u5f53\u51c6\u786e\u3002<\/li>\n<\/ul>\n<h2 style=\"text-align: justify;\">HA\u548c\u591aWAN\u6545\u969c\u6392\u9664<\/h2>\n<p style=\"text-align: justify;\">\u5982\u679c\u4ece\u5904\u7406\u591aWAN\u65f6\u5230\u8fbeCARP VIP\u65f6\u9047\u5230\u95ee\u9898\uff0c\u8bf7\u4ed4\u7ec6\u68c0\u67e5\u662f\u5426\u5b58\u5728\u9632\u706b\u5899\u89c4\u5219\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9ad8\u53ef\u7528\u96c6\u7fa4 pfsync\u6982\u8ff0 pfSense XML-RPC\u914d\u7f6e\u540c\u6b65\u6982\u8ff0 \u5197\u4f59\u914d &hellip; <a href=\"https:\/\/blog.pfchina.org\/?p=209\">\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":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[28],"tags":[192],"class_list":["post-209","post","type-post","status-publish","format-standard","hentry","category-pfsense","tag-high-availability"],"_links":{"self":[{"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=\/wp\/v2\/posts\/209","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=209"}],"version-history":[{"count":0,"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=\/wp\/v2\/posts\/209\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=209"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=209"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=209"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}