{"id":12038,"date":"2024-09-02T08:25:41","date_gmt":"2024-09-02T00:25:41","guid":{"rendered":"https:\/\/blog.pfchina.org\/?p=12038"},"modified":"2024-09-16T09:13:24","modified_gmt":"2024-09-16T01:13:24","slug":"opnsense%e9%85%8d%e7%bd%ae%e9%ab%98%e5%8f%af%e7%94%a8%e6%80%a7","status":"publish","type":"post","link":"https:\/\/blog.pfchina.org\/?p=12038","title":{"rendered":"OPNsense \u914d\u7f6e HA\uff08\u9ad8\u53ef\u7528\u6027\uff09"},"content":{"rendered":"<p style=\"text-align: justify;\">\u9ad8\u53ef\u7528\u6027 (HA) \u662f\u6307IT\u7cfb\u7edf\u3001\u7ec4\u4ef6\u6216\u5e94\u7528\u7a0b\u5e8f\u5728\u4e00\u5b9a\u65f6\u95f4\u5185\u4ee5\u8f83\u9ad8\u7ea7\u522b\u4e00\u81f4\u4e14\u4e0d\u4e2d\u65ad\u5730\u8fd0\u884c\u7684\u80fd\u529b\u3002\u9ad8\u53ef\u7528\u6027 (HA) \u65e8\u5728\u4fdd\u8bc1\u7cfb\u7edf\u6ee1\u8db3\u9884\u5148\u8bbe\u5b9a\u7684\u8fd0\u884c\u6027\u80fd\u6c34\u5e73\uff0c\u63d0\u4f9b\u6700\u4f73\u6027\u80fd\u5e76\u6709\u6548\u7ba1\u7406\u5404\u79cd\u5de5\u4f5c\u8d1f\u8f7d\u548c\u6545\u969c\uff0c\u540c\u65f6\u6700\u5927\u9650\u5ea6\u5730\u51cf\u5c11\u6216\u6d88\u9664\u4efb\u4f55\u670d\u52a1\u4e2d\u65ad\u3002<\/p>\n<p style=\"text-align: justify;\">OPNsense\u91c7\u7528\u901a\u7528\u5730\u5740\u5197\u4f59\u534f\u8bae (CARP) \u6765\u5b9e\u73b0\u786c\u4ef6\u6545\u969c\u8f6c\u79fb\uff0c\u901a\u8fc7\u914d\u7f6e\u4e24\u4e2a\u6216\u591a\u4e2a\u9632\u706b\u5899\u6765\u521b\u5efa\uff0c\u5982\u679c\u4e3b\u9632\u706b\u5899\u4e0a\u7684\u4e00\u4e2a\u63a5\u53e3\u51fa\u73b0\u6545\u969c\u6216\u4e3b\u9632\u706b\u5899\u5b8c\u5168\u5173\u95ed\uff0c\u5219\u8f85\u52a9\u9632\u706b\u5899\u5c06\u53d8\u4e3a\u6d3b\u52a8\u72b6\u6001\u3002<\/p>\n<p style=\"text-align: justify;\">\u5229\u7528\u8fd9\u4e00\u5f3a\u5927\u7684\u529f\u80fd\uff0c\u53ef\u4ee5\u5efa\u7acb\u4e00\u4e2a\u5b8c\u5168\u5197\u4f59\u7684\u9632\u706b\u5899\u7cfb\u7edf\uff0c\u5e76\u5177\u6709\u81ea\u52a8\u4e14\u5b8c\u7f8e\u7684\u6545\u969c\u8f6c\u79fb\u529f\u80fd\u3002\u5728\u8fc7\u6e21\u5230\u5907\u4efd\u7f51\u7edc\u671f\u95f4\uff0c\u7f51\u7edc\u5c06\u4fdd\u6301\u6b63\u5e38\u8fde\u63a5\uff0c\u5bf9\u7528\u6237\u9020\u6210\u7684\u5e72\u6270\u57fa\u672c\u53ef\u4ee5\u5ffd\u7565\u3002<\/p>\n<p style=\"text-align: justify;\">\u5728\u6df1\u5165\u7814\u7a76OPNsense\u4e0a\u7684HA\u8bbe\u7f6e\u4e4b\u524d\uff0c\u6211\u4eec\u5148\u4e86\u89e3\u4e0e\u5efa\u7acb\u96c6\u7fa4\u7cfb\u7edf\u76f8\u5173\u7684\u672f\u8bed\u3002<\/p>\n<h1 id=\"what-is-carp\" class=\"anchor anchorWithStickyNavbar_LWe7\" style=\"text-align: justify;\">CARP<\/h1>\n<p style=\"text-align: justify;\">CARP(\u901a\u7528\u5730\u5740\u5197\u4f59\u534f\u8bae ) \u652f\u6301\u5728\u591a\u4e2a\u4e3b\u673a\u4e4b\u95f4\u5171\u4eab\u5355\u4e2aIP\u5730\u5740\u548c\u865a\u62df\u4e3b\u673a ID (VHID)\uff0c\u4ece\u800c\u786e\u4fdd\u4e00\u9879\u6216\u591a\u9879\u670d\u52a1\u7684\u9ad8\u53ef\u7528\u6027\u3002\u5982\u679c\u4e00\u53f0\u6216\u591a\u53f0\u4e3b\u673a\u53d1\u751f\u6545\u969c\uff0c\u5176\u4f59\u4e3b\u673a\u5c06\u65e0\u7f1d\u63a5\u7ba1\u63a7\u5236\u6743\uff0c\u786e\u4fdd\u7528\u6237\u4e0d\u4f1a\u9047\u5230\u4efb\u4f55\u670d\u52a1\u4e2d\u65ad\u3002<\/p>\n<p style=\"text-align: justify;\">\u9664\u4e86\u5171\u4eabIP\u5730\u5740\u4e4b\u5916\uff0c\u6bcf\u4e2a\u4e3b\u673a\u8fd8\u5206\u914d\u6709\u4e00\u4e2a\u552f\u4e00\u7684IP\u5730\u5740\u7528\u4e8e\u7ba1\u7406\u548c\u914d\u7f6e\u3002\u5171\u4eabIP\u5730\u5740\u7684\u6240\u6709\u8ba1\u7b97\u673a\u90fd\u62e5\u6709\u76f8\u540c\u7684VHID\u3002\u7f51\u7edc\u63a5\u53e3\u5e7f\u64ad\u57df\u4e2d\u7684\u6bcf\u4e2a\u865a\u62dfIP\u5730\u5740\u90fd\u5fc5\u987b\u5177\u6709\u552f\u4e00\u7684\u865a\u62df\u4e3b\u673a\u6807\u8bc6\u7b26 (VHID)\u3002<\/p>\n<p style=\"text-align: justify;\">\u901a\u7528\u5730\u5740\u5197\u4f59\u534f\u8bae (CARP) \u4f7f\u7528IP\u534f\u8bae112\uff0c\u57fa\u4e8eOpenBSD\uff0c\u5e76\u4f7f\u7528\u591a\u64ad\u6570\u636e\u5305\u5c06\u5176\u72b6\u6001\u4f20\u8fbe\u7ed9\u76f8\u90bb\u8bbe\u5907\u3002\u786e\u4fdd\u6bcf\u4e2a\u63a5\u53e3\u90fd\u80fd\u63a5\u6536CARP\u62a5\u6587\u3002\u6bcf\u4e2a\u865a\u62df\u63a5\u53e3\u90fd\u9700\u8981\u62e5\u6709\u4e00\u4e2a\u4e0d\u540c\u7684\u865a\u62df\u4e3b\u673aID (vhid)\uff0c\u8be5ID\u5728\u7269\u7406\u8ba1\u7b97\u673a\u4e4b\u95f4\u5171\u4eab\u3002\u89c4\u5b9a\u7684\u504f\u5dee\u7528\u4e8e\u786e\u5b9a\u5177\u6709\u8f83\u9ad8\u4f18\u5148\u7ea7\u7684\u7269\u7406\u673a\u3002\u504f\u5ea6\u7684\u964d\u4f4e\u5bf9\u5e94\u4e8e\u5206\u6570\u7684\u589e\u52a0\u3002CARP\u91c7\u7528IP\u534f\u8bae112\uff080x70\uff09\u6765\u786e\u5b9a\u4f20\u8f93\u901a\u544a\u65f6\u7684\u4f18\u5148\u7ea7\uff0c\u5b83\u901a\u8fc7224.0.0.18\u6216 \u6765\u5b9e\u73b0FF02::12\u3002<\/p>\n<h1 id=\"what-is-pfsync\" class=\"anchor anchorWithStickyNavbar_LWe7\" style=\"text-align: justify;\">pfSync<\/h1>\n<p style=\"text-align: justify;\">pfsync\u662f\u4e00\u79cd\u901a\u8baf\u534f\u8bae\uff0c\u7528\u4e8e\u5728\u8fd0\u884c\u6570\u636e\u5305\u8fc7\u6ee4\u5668 (PF) \u7684\u8ba1\u7b97\u673a\u4e4b\u95f4\u540c\u6b65\u9632\u706b\u5899\u72b6\u6001\uff0c\u4ee5\u5b9e\u73b0\u9ad8\u53ef\u7528\u6027\u3002\u5b83\u4e0eCARP\u7ed3\u5408\u4f7f\u7528\uff0c\u4ee5\u786e\u4fdd\u5907\u4efd\u9632\u706b\u5899\u7ef4\u62a4\u4e0e\u4e3b\u9632\u706b\u5899\u76f8\u540c\u7684\u4fe1\u606f\u3002\u5982\u679c\u9632\u706b\u5899\u96c6\u7fa4\u4e2d\u7684\u4e3b\u7cfb\u7edf\u53d1\u751f\u6545\u969c\uff0c\u8f85\u52a9\u8ba1\u7b97\u673a\u80fd\u591f\u65e0\u7f1d\u5904\u7406\u6b63\u5728\u8fdb\u884c\u7684\u8fde\u63a5\uff0c\u800c\u4e0d\u4f1a\u9020\u6210\u4efb\u4f55\u635f\u5931\u3002\u5efa\u8bae\u4f7f\u7528\u4e13\u7528\u63a5\u53e3\u5728\u4e3b\u673a\u4e4b\u95f4\u4f20\u8f93pfSync\u6570\u636e\u5305\uff0c\u4ee5\u589e\u5f3a\u5b89\u5168\u6027\uff08\u9632\u6b62\u72b6\u6001\u6ce8\u5165\uff09\u5e76\u63d0\u9ad8\u901f\u5ea6\u3002\u4e3a\u4e86\u4f7f\u72b6\u6001\u4fe1\u606f\u51c6\u786e\u5730\u8de8\u4e24\u4e2a\u9632\u706b\u5899\u5e94\u7528\uff0c\u5b83\u4eec\u5fc5\u987b\u4f7f\u7528\u76f8\u540c\u7684\u63a5\u53e3\u540d\u79f0\u6765\u8bbf\u95ee\u76f8\u540c\u7684\u7f51\u7edc\u3002\u4e3e\u4f8b\u6765\u8bf4\uff0c\u5982\u679c\u9632\u706b\u5899A \u7684\u5185\u90e8\u7f51\u7edc (LAN) \u901a\u8fc7igb0\u63a5\u53e3\u94fe\u63a5\uff0c\u5219\u9632\u706b\u5899B\u4e5f\u5fc5\u987b\u5c06igb0\u5206\u914d\u7ed9\u8be5LAN\u3002<\/p>\n<h1 id=\"what-is-xmlrpc-sync\" class=\"anchor anchorWithStickyNavbar_LWe7\" style=\"text-align: justify;\">XMLRPC<\/h1>\n<p style=\"text-align: justify;\">OPNsense\u7684\u4e00\u9879\u529f\u80fdXMLRPC\u540c\u6b65\u53ef\u4ee5\u786e\u4fdd\u5907\u4efd\u670d\u52a1\u5668\u7684\u914d\u7f6e\u4e0e\u4e3b\u670d\u52a1\u5668\u7684\u914d\u7f6e\u4fdd\u6301\u4e00\u81f4\u3002\u6bcf\u6b21\u914d\u7f6e\u53d1\u751f\u53d8\u5316\u540e\uff0c\u9009\u4e2d\u540c\u6b65\u533a\u57df\u7684\u914d\u7f6e\u90fd\u4f1a\u4ece\u4e3b\u8282\u70b9\u590d\u5236\u5230\u8f85\u52a9\u8282\u70b9\uff0c\u5e76\u5728\u542f\u7528XMLRPC\u540c\u6b65\u65f6\u6fc0\u6d3b\u3002XMLRPC\u540c\u6b65\u4e0d\u662f\u5fc5\u9700\u7684\uff0c\u4f46\u5b83\u53ef\u4ee5\u5927\u5927\u51cf\u5c11\u96c6\u7fa4\u7ef4\u62a4\u6240\u9700\u7684\u5de5\u4f5c\u91cf\u3002<\/p>\n<p style=\"text-align: justify;\">\u5728\u672c\u6559\u7a0b\u4e2d\uff0c\u5c06\u4ecb\u7ecd\u5982\u4f55\u5728OPNsense \u9632\u706b\u5899\u7cfb\u7edf\u4e0a\u914d\u7f6e\u9ad8\u53ef\u7528\u6027\uff0c\u4f7f\u7528\u7684\u9632\u706b\u5899\u7248\u672c\u4e3aOPNsense 24.7.3\uff0c\u7f51\u7edc\u62d3\u6251\u5982\u4e0b\u00a0\u56fe\u6240\u793a\uff1a<\/p>\n<div class=\"ideal-image\" style=\"text-align: justify;\"><a href=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2024\/02\/opnsense-ha-configuration-topology.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-12059\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2024\/02\/opnsense-ha-configuration-topology.jpg\" alt=\"OPNsense High Availability Topology\" width=\"1157\" height=\"1155\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2024\/02\/opnsense-ha-configuration-topology.jpg 958w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2024\/02\/opnsense-ha-configuration-topology-300x300.jpg 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2024\/02\/opnsense-ha-configuration-topology-768x766.jpg 768w\" sizes=\"auto, (max-width: 1157px) 100vw, 1157px\" \/><\/a><\/div>\n<h1 id=\"what-are-the-requirements-for-opnsense-ha-cluster\" class=\"anchor anchorWithStickyNavbar_LWe7\" style=\"text-align: justify;\"><strong>HA\u914d\u7f6e<\/strong><\/h1>\n<h2 style=\"text-align: justify;\">\u5fc5\u5907\u6761\u4ef6<\/h2>\n<ul style=\"text-align: justify;\">\n<li>\u4e24\u4e2aOPNsense \u9632\u706b\u5899\u8bbe\u5907\uff0c\u6bcf\u4e2a\u9632\u706b\u5899\u6709\u4e09\u4e2a\u7f51\u7edc\u63a5\u53e3\u3002<\/li>\n<li>WAN\u00a0 IP \u5730\u57403\u4e2a\uff0c\u4e3b\u3001\u5907\u5404\u4e00\u4e2a\u56fa\u5b9a IP \u5730\u5740\uff0c\u8fd8\u6709\u4e00\u4e2a\u4e3a\u4e3b\u9632\u706b\u5899\u6307\u5b9a\u7684\u865a\u62df IP \u5730\u5740\u3002<\/li>\n<li>LAN IP \u5730\u57403 \u4e2a\uff0c\u4e3b\u3001\u5907\u5404\u4e00\u4e2a\u56fa\u5b9a IP \u5730\u5740\uff0c\u8fd8\u6709\u4e00\u4e2a\u4e3a\u4e3b\u9632\u706b\u5899\u6307\u5b9a\u7684\u865a\u62df IP \u5730\u5740\u3002<\/li>\n<\/ul>\n<div style=\"text-align: justify;\">\n<div>\u6ce8\u610f\uff1aESXI\u73af\u5883\u4e0b\u90e8\u7f72\u9700\u8981\u8c03\u6574\u5bbf\u4e3b\u673a\u7ba1\u7406&gt;\u7cfb\u7edf&gt;\u9ad8\u7ea7\u8bbe\u7f6e\u5904\u7684<span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"https:\/\/docs.netgate.com\/pfsense\/en\/latest\/troubleshooting\/high-availability-virtual.html\">\u7cfb\u7edf\u53c2\u6570<\/a><\/span>\uff0c\u5c06Net.ReversePathFwdCheckPromisc\u503c\u7531\u9ed8\u8ba40\u66f4\u6539\u4e3a1\uff0c\u5982\u4e0b\u56fe\u6240\u793a\uff1a<\/div>\n<div><a href=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2024\/09\/Snipaste_2024-09-13_17-20-42.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-13657\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2024\/09\/Snipaste_2024-09-13_17-20-42.png\" alt=\"\" width=\"524\" height=\"174\" \/><\/a><\/div>\n<div><\/div>\n<div>\u540c\u65f6\u5728LAN\u548cWAN\u6240\u4f7f\u7528\u7684\u7aef\u53e3\u4e0a\u542f\u7528\u5141\u8bb8\u6df7\u6742\u6a21\u5f0f\u3001\u5141\u8bb8\u4f2a\u4f20\u8f93\u548c\u5141\u8bb8MAC \u5730\u5740\u66f4\u6539\u4e09\u4e2a\u9009\u9879\u3002\uff08\u5426\u5219\u4f1a\u51fa\u73b0\u4e3b\u5907\u4e0d\u80fd\u5207\u6362\u6216\u90fd\u4e3a\u4e3b\u9632\u706b\u5899\u7684\u73b0\u8c61\uff09\u3002\u865a\u62df\u673a\u4e0a\u90e8\u7f72\u6709\u8f83\u591a\u7684\u4e0d\u786e\u5b9a\u56e0\u7d20\uff0c\u751f\u4ea7\u73af\u5883\u5efa\u8bae\u5728\u7269\u7406\u673a\u4e0a\u4f7f\u7528HA\u3002<\/div>\n<div><a href=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2024\/09\/Snipaste_2024-09-13_16-00-04.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-13652\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2024\/09\/Snipaste_2024-09-13_16-00-04.png\" alt=\"\" width=\"522\" height=\"125\" \/><\/a><\/div>\n<\/div>\n<p><em>ESXI\u5b89\u5168\u7b56\u7565\u8bbe\u7f6e<\/em><\/p>\n<h2 id=\"1-configure-interfaces\" class=\"anchor anchorWithStickyNavbar_LWe7\" style=\"text-align: justify;\">\u914d\u7f6e\u63a5\u53e3<\/h2>\n<p style=\"text-align: justify;\">\u672c\u6559\u7a0b\u9632\u706b\u5899IP\u5730\u5740\u5206\u914d\u5982\u4e0b\u8868\u6240\u793a\uff1a<\/p>\n<table style=\"height: 90px;\" width=\"383\">\n<thead>\n<tr>\n<th>\u63a5\u53e3<\/th>\n<th>IP\u5730\u5740<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>lan<\/td>\n<td>10.10.10.201\/24<\/td>\n<\/tr>\n<tr>\n<td>wan<\/td>\n<td>192.168.0.201\/24<\/td>\n<\/tr>\n<tr>\n<td>pfSync<\/td>\n<td>11.11.0.1<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"text-align: justify;\"><strong>\u8868 1.<\/strong>\u00a0<em>\u4e3b\u9632\u706b\u5899\u63a5\u53e3 IP \u5730\u5740<\/em><\/p>\n<table style=\"height: 129px;\" width=\"378\">\n<thead>\n<tr>\n<th>\u63a5\u53e3<\/th>\n<th>IP\u5730\u5740<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>lan<\/td>\n<td>10.10.10.202\/24<\/td>\n<\/tr>\n<tr>\n<td>wan<\/td>\n<td>192.168.0.202\/24<\/td>\n<\/tr>\n<tr>\n<td>pfSync<\/td>\n<td>11.11.0.2<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"text-align: justify;\"><strong>\u8868 2.<\/strong>\u00a0<em>\u5907\u4efd\u9632\u706b\u5899\u63a5\u53e3 IP \u5730\u5740<\/em><\/p>\n<p style=\"text-align: justify;\">\u6309\u7167\u4e0a\u8ff0\u8868\u683c\u7684\u6570\u636e\uff0c\u914d\u7f6e\u597d\u4e3b\u5907\u9632\u706b\u5899\u7684\u5bf9\u5e94\u63a5\u53e3\uff0c\u786e\u4fdd\u4e3b\u5907\u5206\u522b\u4f7f\u7528\u90fd\u80fd\u6b63\u5e38\u8054\u7f51\u3002<\/p>\n<h2 id=\"2-configure-firewall-rules\" class=\"anchor anchorWithStickyNavbar_LWe7\" style=\"text-align: justify;\">\u9632\u706b\u5899\u89c4\u5219<\/h2>\n<p id=\"22-add-firewall-rule-on-backup-node\" class=\"anchor anchorWithStickyNavbar_LWe7\" style=\"text-align: justify;\">\u5728\u5148\u524d\u7684\u7248\u672c\u4e2d\uff0c\u9700\u8981\u5728LAN\u548cWAN\u63a5\u53e3\u624b\u52a8\u6dfb\u52a0CARP\u534f\u8bae\u653e\u884c\u89c4\u5219\uff0c24.7.3\u7248\u672c\u5df2\u7ecf\u5305\u542b\u5728\u9ed8\u8ba4\u81ea\u52a8\u751f\u6210\u7684\u89c4\u5219\u5185\uff0c\u65e0\u9700\u518d\u6dfb\u52a0\u3002\u5982\u4e0b\u56fe\u6240\u793a\uff1a<\/p>\n<p><a href=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2024\/09\/Snipaste_2024-09-13_11-28-31.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-13654\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2024\/09\/Snipaste_2024-09-13_11-28-31.png\" alt=\"\" width=\"1716\" height=\"172\" \/><\/a><\/p>\n<p class=\"anchor anchorWithStickyNavbar_LWe7\" style=\"text-align: justify;\">\u5728pfSync\u63a5\u53e3\uff0c\u6dfb\u52a0\u4e00\u6761\u653e\u884cPFSYNC\u534f\u8bae\u7684\u89c4\u5219\uff0c\u8ba9HA\u53ef\u4ee5\u540c\u6b65\u6570\u636e\uff1a<\/p>\n<p><a href=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2024\/09\/Snipaste_2024-09-14_21-40-23.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-13687 size-full\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2024\/09\/Snipaste_2024-09-14_21-40-23.png\" alt=\"\" width=\"1374\" height=\"30\" \/><\/a><\/p>\n<h2 id=\"3-configure-virtual-ip-address\" class=\"anchor anchorWithStickyNavbar_LWe7\" style=\"text-align: justify;\">\u865a\u62dfIP\u5730\u5740<\/h2>\n<p style=\"text-align: justify;\">\u5728\u4e3b\u8282\u70b9\u4e0a\u914d\u7f6e\u865a\u62dfIP\u5730\u5740\uff0c\u7136\u540e\u4f7f\u7528XMLRPC\u540c\u6b65\uff0c\u5c06\u8fd9\u4e9b\u8bbe\u7f6e\u540c\u6b65\u5230\u5907\u4efd\u9632\u706b\u5899\u3002<\/p>\n<p style=\"text-align: justify;\">VIP\u63a5\u53e3\u7684\u503c\u5982\u4e0b\u8868\u6240\u793a\uff1a<\/p>\n<table style=\"height: 191px;\" width=\"675\">\n<thead>\n<tr>\n<th>\u9009\u9879<\/th>\n<th>\u503c<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><em>\u7c7b\u578b<\/em><\/td>\n<td>Carp<\/td>\n<\/tr>\n<tr>\n<td><em>\u63a5\u53e3<\/em><\/td>\n<td>LAN<\/td>\n<\/tr>\n<tr>\n<td><em>IP\u5730\u5740<\/em><\/td>\n<td>10.10.10.200 \/ 24<\/td>\n<\/tr>\n<tr>\n<td><em>\u5bc6\u7801<\/em><\/td>\n<td>opnsense<\/td>\n<\/tr>\n<tr>\n<td><em>VHID\u7ec4<\/em><\/td>\n<td>3<\/td>\n<\/tr>\n<tr>\n<td><em>\u901a\u544a\u9891\u7387<\/em><\/td>\n<td>\u57fa\u672c 1 \/ \u504f\u79bb 0<\/td>\n<\/tr>\n<tr>\n<td><em>\u63cf\u8ff0<\/em><\/td>\n<td>VIP LAN<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>\u88683. <\/strong><em>LAN \u63a5\u53e3\u865a\u62dfIP\u8bbe\u7f6e<\/em><\/p>\n<table style=\"height: 206px;\" width=\"673\">\n<thead>\n<tr>\n<th>\u9009\u9879<\/th>\n<th>\u503c<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><em>\u7c7b\u578b<\/em><\/td>\n<td>Carp<\/td>\n<\/tr>\n<tr>\n<td><em>\u63a5\u53e3<\/em><\/td>\n<td>WAN<\/td>\n<\/tr>\n<tr>\n<td><em>IP\u5730\u5740<\/em><\/td>\n<td>192.168.0.200 \/ 24<\/td>\n<\/tr>\n<tr>\n<td><em>\u5bc6\u7801<\/em><\/td>\n<td>opnsense<\/td>\n<\/tr>\n<tr>\n<td><em>VHID\u7ec4<\/em><\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td><em>\u901a\u544a\u9891\u7387<\/em><\/td>\n<td>\u00a0\u57fa\u672c 1 \/ \u504f\u79bb 0<\/td>\n<\/tr>\n<tr>\n<td><em>\u63cf\u8ff0<\/em><\/td>\n<td>VIP WAN<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"text-align: justify;\"><strong>\u8868 4. <\/strong><em>WAN \u63a5\u53e3\u865a\u62dfIP\u8bbe\u7f6e<\/em><\/p>\n<p style=\"text-align: justify;\">\u5728\u4e3b\u9632\u706b\u5899\u4e0a\uff0c\u5bfc\u822a\u81f3\u63a5\u53e3\u2192\u865a\u62dfIP \u2192\u8bbe\u7f6e\uff0c\u70b9\u51fb\u53f3\u4e0b\u89d2\u6dfb\u52a0\u6309\u94ae\uff0c\u4e3aLAN\u63a5\u53e3\u521b\u5efa\u65b0\u7684\u865a\u62dfIP \u5730\u5740\uff0c\u5982\u4e0b\u56fe\u6240\u793a\uff1a<\/p>\n<p><a href=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2024\/09\/Snipaste_2024-09-12_15-31-56.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-13627\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2024\/09\/Snipaste_2024-09-12_15-31-56.png\" alt=\"\" width=\"1335\" height=\"895\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">\u8f93\u5165\u5b8c\u6210\u4ee5\u540e\uff0c\u5355\u51fb\u201c\u4fdd\u5b58\u201d\u3002\u5e76\u70b9\u51fb\u201c\u5e94\u7528\u201d\u6fc0\u6d3b\u8bbe\u7f6e\u3002<\/p>\n<p style=\"text-align: justify;\">\u4e3aWAN \u63a5\u53e3\u521b\u5efa\u65b0\u7684\u865a\u62df IP \u5730\u5740\uff0c\u5982\u4e0b\u56fe\u6240\u793a\uff1a<\/p>\n<p><a href=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2024\/09\/Snipaste_2024-09-12_15-31-09-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-13626\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2024\/09\/Snipaste_2024-09-12_15-31-09-1.png\" alt=\"\" width=\"1335\" height=\"912\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">\u8f93\u5165\u5b8c\u6210\u4ee5\u540e\uff0c\u5355\u51fb\u201c\u4fdd\u5b58\u201d\u3002\u5e76\u70b9\u51fb\u201c\u5e94\u7528\u201d\u6fc0\u6d3b\u8bbe\u7f6e\u3002<\/p>\n<p style=\"text-align: justify;\">\u6ce8\u610f\uff1a\u8981\u786e\u4fddCarp VIP\u7684\u5b50\u7f51\u63a9\u7801\u4e0e\u4e3b\u63a5\u53e3\u76f8\u540c\u3002<\/p>\n<h2 id=\"4-configure-outbound-nat\" class=\"anchor anchorWithStickyNavbar_LWe7\" style=\"text-align: justify;\">\u51fa\u7ad9NAT<\/h2>\n<p style=\"text-align: justify;\">\u4e3a\u4e86\u4fdd\u6301\u5e73\u7a33\u8fc7\u6e21\uff0c\u79bb\u5f00\u9632\u706b\u5899\u7684\u6d41\u91cf\u5fc5\u987b\u4f7f\u7528\u4e0e\u5e7f\u57df\u7f51 (WAN) \u63a5\u53e3\u5173\u8054\u7684\u865a\u62dfIP\u5730\u5740\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cOPNsense\u7684NAT\u51fa\u7ad9\u4e3a\u201c<em>\u81ea\u52a8\u51fa\u7ad9 NAT\u89c4\u5219\u751f\u6210\u201d\uff0c<\/em>\u4f1a\u5f71\u54cd\u6570\u636e\u6d41\u91cf\u7684\u5e73\u6ed1\u8fc7\u6e21\uff0c\u9700\u8981\u4fee\u6539\u4e3a\u865a\u62df\u7684VIP WAN\u63a5\u53e3\uff0c\u4ee5\u4fbf\u6765\u8ba9\u6765\u81ea10.10.10.0\/24 \u7f51\u7edc\u7684\u6570\u636e\u5305\u4f7f\u7528CARP\u865a\u62df\u63a5\u53e3 (192.168.0.200)\u51fa\u7ad9\u3002<\/p>\n<p style=\"text-align: justify;\">\u5728\u4e3b\u9632\u706b\u5899\u4e0a\u914d\u7f6e\u51fa\u7ad9 NAT \u89c4\u5219\uff0c\u5bfc\u822a\u5230\u9632\u706b\u5899\u2192 NAT \u2192\u51fa\u7ad9\uff0c\u9009\u62e9\u6df7\u5408\u6216\u624b\u52a8\u51fa\u7ad9NAT\u89c4\u5219\uff0c\u70b9\u51fb\u4fdd\u5b58\uff0c\u7136\u540e\u5355\u51fb\u6dfb\u52a0\u6309\u94ae\u521b\u5efa\u65b0\u51fa\u7ad9\u89c4\u5219\uff0c\u63a5\u53e3\u9009\u62e9WAN\uff0c\u6e90\u5730\u5740\u8bbe\u7f6e\u4e3aLAN\u00a0 net\uff0c\u8f6c\u6362\/\u76ee\u6807\u8bbe\u7f6e\u9009\u62e9\u865a\u62df\u7684VIP WAN\uff0c\u5355\u51fb\u201c\u4fdd\u5b58\u201d\uff0c\u5355\u51fb\u201c\u5e94\u7528\u66f4\u6539\u201d\u6fc0\u6d3b\u8bbe\u7f6e\u3002<\/p>\n<p><a href=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2024\/09\/Snipaste_2024-09-12_15-45-49.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-13628\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2024\/09\/Snipaste_2024-09-12_15-45-49.png\" alt=\"\" width=\"2100\" height=\"671\" \/><\/a><\/p>\n<h2 id=\"5-configure-dhcp-server-optional\" class=\"anchor anchorWithStickyNavbar_LWe7\" style=\"text-align: justify;\">\u914d\u7f6eDHCP<\/h2>\n<p style=\"text-align: justify;\">\u5728\u5c40\u57df\u7f51\u90e8\u7f72DHCP\uff0c\u6240\u6709\u5ba2\u6237\u7aef\u90fd\u5e94\u8be5\u4f7f\u7528\u865a\u62df\u5730\u5740\u6765\u4ee3\u66ff\u901a\u5e38\u4f20\u8f93\u7684\u7269\u7406\u5730\u5740\u3002\u4e24\u53f0\u9632\u706b\u5899\u5728\u540c\u65f6\u8fd0\u884c\u65f6\uff0c\u5b83\u4eec\u5e94\u8be5\u4e86\u89e3\u5f7c\u6b64\u7684DHCP\u6c60\uff0c\u5f53 OPNsense\u8f6c\u53d1DNS\u8bf7\u6c42\u65f6\uff0c\u9a8c\u8bc1DHCP\u670d\u52a1\u5668\u662f\u5426\u63d0\u4f9b\u6b63\u786e\u7684IP\u5730\u5740\u3002DHCP\u83b7\u53d6\u7684DNS\u548c\u7f51\u5173\u5e94\u8be5\u662f\u865a\u62dfVIP LAN\u5730\u5740\u3002<\/p>\n<p style=\"text-align: justify;\">\u5728\u4e3b\u3001\u5907\u9632\u706b\u5899\u4e0a\uff0c\u5206\u522b\u8f6c\u5230\u670d\u52a1&gt;ISC DHCPv4\uff0cLAN\u9009\u9879\u5361\uff0c\u9009\u62e9\u4ee5\u4e0b\u53c2\u6570\u8fdb\u884c\u914d\u7f6e\u3002<\/p>\n<table style=\"height: 122px;\" width=\"576\">\n<thead>\n<tr>\n<th>\u9009\u9879<\/th>\n<th>\u503c<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>DNS\u670d\u52a1\u5668<\/td>\n<td>10.10.10.200<\/td>\n<\/tr>\n<tr>\n<td>\u7f51\u5173<\/td>\n<td>10.10.10.200<\/td>\n<\/tr>\n<tr>\n<td>\u6545\u969c\u8f6c\u79fb\u5bf9\u7aefIP<\/td>\n<td>10.10.10.202<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"text-align: justify;\"><strong>\u8868 5.<\/strong>\u00a0<em>\u4e3b\u8282\u70b9\u4e0a\u7684 DHCP \u670d\u52a1\u5668\u9009\u9879<\/em><\/p>\n<p style=\"text-align: justify;\">\u5907\u4efd\u8282\u70b9\u4e0a\u914d\u7f6e\u5982\u4e0b\uff1a<\/p>\n<table style=\"height: 86px;\" width=\"575\">\n<thead>\n<tr>\n<th>\u9009\u9879<\/th>\n<th>\u503c<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>DNS\u670d\u52a1\u5668<\/td>\n<td>10.10.10.200<\/td>\n<\/tr>\n<tr>\n<td>\u7f51\u5173<\/td>\n<td>10.10.10.200<\/td>\n<\/tr>\n<tr>\n<td>\u6545\u969c\u8f6c\u79fb\u5bf9\u7aefIP<\/td>\n<td>10.10.10.201<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"text-align: justify;\"><strong>\u8868 6.<\/strong>\u00a0<em>\u5907\u4efd\u8282\u70b9\u4e0a\u7684 DHCP \u670d\u52a1\u5668\u9009\u9879<\/em><\/p>\n<h2 class=\"anchor anchorWithStickyNavbar_LWe7\" style=\"text-align: justify;\">pfSync<\/h2>\n<p style=\"text-align: justify;\">\u4e3a\u4e86\u542f\u52a8\u540c\u6b65\u8fc7\u7a0b\uff0c\u5fc5\u987b\u5728\u4e3b\u9632\u706b\u5899\u4e0a\u5206\u522b\u914d\u7f6epfSync\u548cHA\u540c\u6b65 (xmlrpc)\u3002\u5728\u4e3b\u8282\u70b9\u4e0a\u542f\u7528pfSync\uff0c\u53ef\u4ee5\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u64cd\u4f5c\uff1a<\/p>\n<p style=\"text-align: justify;\">\u5bfc\u822a\u5230\u7cfb\u7edf\u2192\u9ad8\u53ef\u7528\u6027\u2192\u8bbe\u7f6e\uff0c\u9009\u4e2d\u540c\u6b65\u72b6\u6001\u9009\u9879\uff0c\u9009\u62e9PFSYNC\u4f5c\u4e3a\u540c\u6b65\u63a5\u53e3\uff08\u4e5f\u53ef\u4ee5\u9009\u62e9LAN\u63a5\u53e3\u4f5c\u4e3a\u540c\u6b65\u63a5\u53e3\uff0c\u56e0\u4e3a\u540c\u6b65\u7684\u6570\u636e\u91cf\u548c\u6b21\u6570\u975e\u5e38\u5c11\uff0c\u8fd9\u6837\u53ef\u4ee5\u5c11\u5360\u7528\u4e00\u4e2a\u4e13\u7528\u7f51\u7edc\u63a5\u53e3\u3002\uff09\uff0c\u5c06\u540c\u6b65\u5bf9\u7aef IP\u8bbe\u7f6e\u4e3a 11.11.0.2\u3002\uff08\u8fd9\u91cc\u4f7f\u7528\u5907\u4efd\u9632\u706b\u5899\u7684PFSYNC\u63a5\u53e3\u7684IP\u5730\u5740\uff09\u3002\u5c06\u540c\u6b65\u914d\u7f6e\u5230IP\u8bbe\u7f6e\u4e3a 11.11.0.2\u3002\u8f93\u5165\u8fdc\u7a0b\u7cfb\u7edf\u7528\u6237\u540d\uff0c\u4f8b\u5982root\uff0c\u8f93\u5165\u8fdc\u7a0b\u7cfb\u7edf\u5bc6\u7801\uff0c\u5982opnsense\u3002\u5728\u670d\u52a1\u9009\u9879\uff0c\u9009\u62e9\u8981\u540c\u6b65\u5230\u5907\u4efd\u9632\u706b\u5899\u7684\u8bbe\u7f6e\uff0c\u5efa\u8bae\u9009\u4e2dWeb Gui\u3001Unbound DNS\u3001Virtual IPs\u3001NAT\u3001Network Time\u3001Cron\u3001DHCPD\u3001Firewall Rules\u7b49\u51e0\u4e2a\u9009\u9879\u3002<\/p>\n<p><a href=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2024\/09\/Snipaste_2024-09-12_15-57-08.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-13629\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2024\/09\/Snipaste_2024-09-12_15-57-08.png\" alt=\"\" width=\"1371\" height=\"982\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">\u5907\u4efd\u9632\u706b\u5899\u4e0apfSync\u7684\u914d\u7f6e\uff0c\u5982\u4e0b\u56fe\u6240\u793a\uff1a<\/p>\n<p><a href=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2024\/09\/Snipaste_2024-09-12_16-02-54.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-13630\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2024\/09\/Snipaste_2024-09-12_16-02-54.png\" alt=\"\" width=\"1365\" height=\"884\" \/><\/a><\/p>\n<h2 class=\"anchor anchorWithStickyNavbar_LWe7\" style=\"text-align: justify;\">HA\u540c\u6b65<\/h2>\n<p>\u8f6c\u5230\u7cfb\u7edf\u2192\u9ad8\u53ef\u7528\u6027\u2192\u72b6\u6001\uff0c\u5982\u679c\u80fd\u6253\u5f00\u8be5\u9875\u9762\uff0c\u8bf4\u660e\u4e3b\u3001\u5907\u9632\u706b\u5899\u5df2\u6210\u529f\u5efa\u7acb\u8fde\u63a5\u3002\u70b9\u51fb\u72b6\u6001\u4e0b\u9762\u7684\u540c\u6b65\u6309\u94ae\uff0c\u5c06\u914d\u7f6e\u540c\u6b65\u5230\u5907\u4efd\u9632\u706b\u5899\uff0c\u7136\u540e\u70b9\u51fb\u4e0b\u9762\u7684\u91cd\u542f\u6240\u6709\u670d\u52a1\u6309\u94ae\uff0c\u91cd\u542f\u9632\u706b\u5899\u7684\u5404\u79cd\u670d\u52a1\u3002<\/p>\n<p><a href=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2024\/09\/Snipaste_2024-09-12_16-06-05.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-13631\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2024\/09\/Snipaste_2024-09-12_16-06-05.png\" alt=\"\" width=\"1867\" height=\"1420\" \/><\/a><\/p>\n<h2 id=\"8-test\" class=\"anchor anchorWithStickyNavbar_LWe7\" style=\"text-align: justify;\">\u6d4b\u8bd5<\/h2>\n<p>\u5728\u6d4b\u8bd5\u4e4b\u524d\uff0c\u5efa\u8bae\u91cd\u542f\u4e3b\u3001\u5907\u9632\u706b\u5899\u3002<\/p>\n<p style=\"text-align: justify;\">\u4ece\u4f4d\u4e8e\u4e24\u4e2a\u9632\u706b\u5899\u540e\u9762\u7684\u5ba2\u6237\u7aef\u8fdb\u884c\u8054\u7f51\u6d4b\u8bd5\uff08\u5ba2\u6237\u7aef\u7684\u7f51\u5173\u548cDNS\u5e94\u8bbe\u7f6e\u4e3a\u865a\u62dfVIP LAN\u5730\u5740\uff09\uff0c\u4ece\u4e3b\u9632\u706b\u5899\u4e0a\u65ad\u5f00WAN\u63a5\u53e3\uff0c\u5e94\u8be5\u80fd\u5c06\u8fde\u63a5\u8f6c\u79fb\u5230\u5907\u4efd\u9632\u706b\u5899\uff0c\u800c\u4e0d\u4f1a\u5bfc\u81f4\u7f51\u7edc\u4e2d\u65ad\u3002<\/p>\n<h2 id=\"updating-ha-cluster-firewall-system\" class=\"anchor anchorWithStickyNavbar_LWe7\" style=\"text-align: justify;\">\u66f4\u65b0<\/h2>\n<p style=\"text-align: justify;\">\u4e3a\u4e86\u6700\u5927\u9650\u5ea6\u5730\u51cf\u5c11\u66f4\u65b0\u6267\u884c\u671f\u95f4\u7684\u4e2d\u65ad\uff0c\u9700\u8981\u9075\u5faa\u4ee5\u4e0b\u6b65\u9aa4\u8fdb\u884c\u64cd\u4f5c\uff1a<\/p>\n<p style=\"text-align: justify;\">1\u3001\u5728\u5907\u7528\u9632\u706b\u5899\u4e0a\u5e94\u7528\u66f4\u65b0\uff0c\u7136\u540e\u91cd\u542f\u5907\u7528\u9632\u706b\u5899\u3002<\/p>\n<p style=\"text-align: justify;\">2\u3001\u5728\u4e3b\u9632\u706b\u5899\u4e0a\uff0c\u8f6c\u5230\u63a5\u53e3\u2192\u865a\u62df IP \u2192\u72b6\u6001\uff0c\u7136\u540e\u9009\u62e9\u8fdb\u5165\u6301\u4e45 CARP \u7ef4\u62a4\u6a21\u5f0f\u3002\u73b0\u5728\u5907\u7528\u9632\u706b\u5899\u5df2\u6210\u4e3aMASTER\uff0c\u9a8c\u8bc1\u6240\u6709\u670d\u52a1\uff08\u5305\u62ec DHCP\u3001VPN \u548c NAT\uff09\u662f\u5426\u6b63\u5e38\uff0c\u786e\u4fdd\u5907\u7528\u9632\u706b\u5899\u63a5\u7ba1\u6b63\u5e38\u3002<\/p>\n<p style=\"text-align: justify;\">3\u3001\u66f4\u65b0\u4e3b\u9632\u706b\u5899\uff0c\u91cd\u65b0\u542f\u52a8\u540e\uff0c\u5728\u4e3b\u9632\u706b\u5899\u4e0a\u9000\u51fa\u6301\u4e45 CARP \u7ef4\u62a4\u6a21\u5f0f\u3002<\/p>\n<h2 id=\"how-do-i-automate-the-replication-of-ha-opnsense-nodes\" class=\"anchor anchorWithStickyNavbar_LWe7\" style=\"text-align: justify;\">\u81ea\u52a8\u64cd\u4f5c<\/h2>\n<p style=\"text-align: justify;\">\u5efa\u8bae\u5728\u6267\u884c\u7ef4\u62a4\u65f6\u4fdd\u6301\u5907\u4efd\u9632\u706b\u5899\u7684\u5b8c\u6574\u6027\uff0c\u4e5f\u53ef\u4ee5\u8bbe\u7f6e\u5b9a\u671f\u540c\u6b65\u5907\u4efd\u3002\u4e3b\u9632\u706b\u5899\u8282\u70b9\u4e0a\u6709\u4e00\u4e2a\u5185\u7f6ecron\u64cd\u4f5c\uff0c\u53ef\u4ee5\u5b9a\u671f\u540c\u6b65\u914d\u7f6e\u3002\u5bfc\u822a\u5230\u7cfb\u7edf \u2192 \u8bbe\u7f6e \u2192 Cron\uff0c\u6dfb\u52a0\u4e00\u4e2a\u4efb\u52a1\u5373\u53ef\u3002<\/p>\n<p><a href=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2024\/09\/Snipaste_2024-09-12_17-06-12.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-13632\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2024\/09\/Snipaste_2024-09-12_17-06-12.png\" alt=\"\" width=\"1347\" height=\"707\" \/><\/a><\/p>\n<div style=\"text-align: justify;\">\n<div>\u6ce8\u610f\uff1a\u4e3a\u4e86\u9650\u5236\u975e\u8fd0\u884c\u4e3b\u673a\u5bf9\u6d3b\u52a8\u4e3b\u673a\u7684\u66f4\u65b0\uff0c\u53ea\u6709\u5f53\u6240\u6709carp\u63a5\u53e3\u8bbe\u7f6e\u4e3aMASTER \u6a21\u5f0f\u65f6\u624d\u4f1a\u6267\u884cHA \u66f4\u65b0\u548c\u91cd\u65b0\u914d\u7f6e\u5907\u4efd\u3002<\/div>\n<\/div>\n<h2 id=\"how-to-view-the-status-of-a-ha-node\" class=\"anchor anchorWithStickyNavbar_LWe7\" style=\"text-align: justify;\">\u8282\u70b9\u72b6\u6001<\/h2>\n<p style=\"text-align: justify;\">\u5bfc\u822a\u81f3\u7cfb\u7edf\u2192\u9ad8\u53ef\u7528\u6027\u2192\u72b6\u6001\uff0c\u67e5\u770b\u5148\u524d\u914d\u7f6e\u7684\u5907\u4efd\u9632\u706b\u5899\u7684\u72b6\u6001\u3002\u72b6\u6001\u9875\u9762\u663e\u793a\u5907\u4efd\u9632\u706b\u5899\u4e0a\u8fd0\u884c\u7684\u6240\u6709\u670d\u52a1\u3002\u5982\u6709\u5fc5\u8981\uff0c\u53ef\u4ee5\u4ece\u6b64\u9875\u9762\u66f4\u65b0\u5907\u4efd\u8ba1\u7b97\u673a\u5e76\u6062\u590d\u670d\u52a1\u3002<\/p>\n<p style=\"text-align: justify;\">\u53ef\u4ee5\u5bfc\u822a\u5230\u63a5\u53e3 \u2192 \u865a\u62dfIPs \u2192 \u72b6\u6001\u67e5\u770b HA \u96c6\u7fa4\u7684\u72b6\u6001\u3002<\/p>\n<p style=\"text-align: justify;\">\u72b6\u6001\u9875\u9762\u5217\u51fa\u4e86\u6bcf\u4e2a\u914d\u7f6e\u7684carp VHID \u7ec4\u7684\u6d3b\u52a8\u72b6\u6001\u3002\u6b64\u5916\uff0c\u72b6\u6001\u9875\u9762\u8fd8\u5305\u62ec\u7528\u4e8e\u5f3a\u5236\u8282\u70b9\u8fdb\u5165\u7ef4\u62a4\u6a21\u5f0f\u548c\u7981\u7528carp\u7684\u9009\u9879\u3002\u6bcf\u4e2aVIP \u72b6\u6001\u7684\u8be6\u7ec6\u63cf\u8ff0\u5982\u4e0b\u3002<\/p>\n<ul>\n<li>INIT\uff1a\u8fd9\u901a\u5e38\u8868\u793a\u63a5\u53e3\u6709\u95ee\u9898\uff1b\u901a\u5e38\uff0c\u8fd9\u662f\u7531\u4e8e\u63a5\u53e3\u672a\u65ad\u5f00\u6216\u5176\u4ed6\u6280\u672f\u95ee\u9898\u9020\u6210\u7684\u3002<\/li>\n<li>BACKUP\uff1a\u5f53\u5904\u4e8e\u5907\u4efd\u72b6\u6001\u65f6\uff0c\u6b64\u63a5\u53e3\u4f5c\u4e3a\u96c6\u7fa4\u7684\u4e00\u90e8\u5206\u76d1\u89c6\u901a\u544a\u3002\u5982\u679c\u6682\u65f6\u6ca1\u6709\u901a\u544a\uff0c\u5b83\u5c06\u8fc7\u6e21\u5230\u4e3b\u6a21\u5f0f\u3002<\/li>\n<li>MASTER\uff1a\u5728\u76d1\u89c6\u7f51\u7edc\u901a\u544a\u65f6\u8bc6\u522b\u6d3b\u52a8\u8282\u70b9\u3002\u5982\u679c\u68c0\u6d4b\u5230\u5177\u6709\u9ad8\u7ea7\u901a\u544a\u7684\u8282\u70b9\uff0c\u5b83\u53ef\u80fd\u4f1a\u8f6c\u6362\u4e3a\u5907\u4efd\u72b6\u6001\uff08\u53d7\u62a2\u5360\u8bbe\u7f6e\u9650\u5236\uff0c\u53ef\u901a\u8fc7\u7cfb\u7edf\u2192\u9ad8\u53ef\u7528\u6027\u2192\u8bbe\u7f6e\u9875\u9762\u8bbf\u95ee\uff09\u3002<\/li>\n<li>\u7981\u7528\uff1a\u9009\u62e9\u6b64\u9875\u9762\u4e0a\u7684\u201c\u6682\u65f6\u7981\u7528 CARP\u201d\u9009\u9879\u65f6\u7981\u7528\u3002<\/li>\n<\/ul>\n<p><a href=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2024\/09\/OPNsense\u9ad8\u53ef\u7528\u6d4b\u8bd5_by\u8001\u718a.pdf\">OPNsense\u9ad8\u53ef\u7528\u6d4b\u8bd5_by\u8001\u718a<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9ad8\u53ef\u7528\u6027 (HA) \u662f\u6307IT\u7cfb\u7edf\u3001\u7ec4\u4ef6\u6216\u5e94\u7528\u7a0b\u5e8f\u5728\u4e00\u5b9a\u65f6\u95f4\u5185\u4ee5\u8f83\u9ad8\u7ea7\u522b\u4e00\u81f4\u4e14\u4e0d\u4e2d &hellip; <a href=\"https:\/\/blog.pfchina.org\/?p=12038\">\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":[4],"tags":[215,190,453,454,287],"class_list":["post-12038","post","type-post","status-publish","format-standard","hentry","category-opnsense","tag-carp","tag-ha","tag-pfsync","tag-xmlprc","tag-287"],"_links":{"self":[{"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=\/wp\/v2\/posts\/12038","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=12038"}],"version-history":[{"count":41,"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=\/wp\/v2\/posts\/12038\/revisions"}],"predecessor-version":[{"id":13703,"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=\/wp\/v2\/posts\/12038\/revisions\/13703"}],"wp:attachment":[{"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=12038"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=12038"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=12038"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}