{"id":25467,"date":"2021-11-28T16:36:11","date_gmt":"2021-11-28T08:36:11","guid":{"rendered":"https:\/\/aqzt.com\/25467.html"},"modified":"2021-11-28T16:36:11","modified_gmt":"2021-11-28T08:36:11","slug":"lvs%e8%b4%9f%e8%bd%bd%e5%9d%87%e8%a1%a1","status":"publish","type":"post","link":"https:\/\/aqzt.com\/25467.html","title":{"rendered":"LVS\u8d1f\u8f7d\u5747\u8861"},"content":{"rendered":"<h3>LVS\u8d1f\u8f7d\u5747\u8861<\/h3>\n<ul>\n<li>\n<p>Linux cluster<\/p>\n<\/p>\n<ul>\n<li>LVS<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>LVS\u4f53\u7cfb\u7ed3\u6784<\/p>\n<\/li>\n<li>\n<p>LVS\u96c6\u7fa4\u7c7b\u578b\u4ee5\u53ca\u8c03\u5ea6\u7b97\u6cd5<br \/>\n* LVS-NAT<br \/>\n* LVS-DR<br \/>\n* LVS-tun<br \/>\n* LVS-fullnat<br \/>\n* LVS\u8c03\u5ea6\u7b97\u6cd5<\/p>\n<pre>\n\n<div class=\"codecolorer-container text solarized-dark language-bash\" style=\"overflow:auto;white-space:nowrap;width:800px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/><\/div><\/td><td><div class=\"text codecolorer\">1 &nbsp;* ipvsadm<br \/>\n2<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n\n<\/pre>\n<\/li>\n<li>\n<p>lvs-nat<\/p>\n<\/li>\n<li>\n<p>\u5b9e\u73b0NAT\u7c7b\u578b\u7684https\u8bbf\u95ee<\/p>\n<pre>\n\n<div class=\"codecolorer-container text solarized-dark language-bash\" style=\"overflow:auto;white-space:nowrap;width:800px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/><\/div><\/td><td><div class=\"text codecolorer\">1 &nbsp; &nbsp; &nbsp;* LVS-DR<br \/>\n2<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n\n<\/pre>\n<\/li>\n<li>\n<p>VIP\u548cDIP\u5904\u5728\u540c\u4e00\u7f51\u6bb5\u5b9e\u73b0<br \/>\n* VIP\u548cDIP\u4e0d\u5904\u5728\u540c\u4e00\u7f51\u6bb5\u5b9e\u73b0<\/p>\n<\/li>\n<\/ul>\n<h2>Linux cluster<\/h2>\n<p>Linux\u96c6\u7fa4\u7b80\u5355\u6765\u8bf4\u5c31\u662f\u90e8\u7f72\u8bb8\u591a\u8ba1\u7b97\u673a(\u670d\u52a1\u5668)\u6765\u5171\u540c\u534f\u4f5c\u5b8c\u6210\u4e00\u4e2a\u4efb\u52a1\u3002\u4e00\u4e2a\u8ba1\u7b97\u673a\u79f0\u4f5c\u96c6\u7fa4\u7684\u4e00\u4e2a\u8282\u70b9\u3002<br \/>\n<strong>\u96c6\u7fa4\u7684\u4f18\u52bf\uff1a<\/strong><\/p>\n<ul>\n<li>\u6613\u4e8e\u6269\u5c55\uff0c\u7ba1\u7406\u53ef\u4ee5\u65b9\u4fbf\u7684\u5bf9\u670d\u52a1\u5668\u8fdb\u884c\u589e\u3001\u5220<\/li>\n<li>\u9ad8\u53ef\u7528\u6027\uff0c\u5f53\u96c6\u7fa4\u4e2d\u7684\u67d0\u4e00\u4e2a\u8282\u70b9\u5931\u6548\uff0c\u4f1a\u6709\u5176\u5b83\u8282\u70b9\u7684\u673a\u5668\u81ea\u52a8\u9876\u4e0a\u53bb\u3002\u4e0d\u4f1a\u5f71\u54cd\u4e1a\u52a1\u7684\u8fdb\u884c<\/li>\n<li>\u9ad8\u6027\u80fd\uff0c\u8d1f\u8f7d\u5747\u8861\u7684\u673a\u5668\u53ef\u4ee5\u5c06\u8bf7\u6c42\u5747\u8861\u7684\u5206\u53d1\u81f3\u5404\u4e2a\u670d\u52a1\u5668\uff0c\u5927\u5927\u51cf\u8f7b\u670d\u52a1\u5668\u627f\u8f7d\u7684\u538b\u529b<\/li>\n<\/ul>\n<p><strong>\u5e38\u89c1\u7684\u96c6\u7fa4\u65b9\u5f0f\uff1a<\/strong><\/p>\n<ul>\n<li>LB\u96c6\u7fa4\uff08Load Balancing\uff09\uff1a\u8d1f\u8f7d\u5747\u8861\u96c6\u7fa4\uff0c\u5c31\u662f\u5c06\u7528\u6237\u7684\u8bf7\u6c42\u5408\u7406\u7684\u5206\u53d1\u81f3\u5404\u4e2a\u670d\u52a1\u5668\u4e0a<\/li>\n<li>HA\u96c6\u7fa4\uff08High Availiablity\uff09\uff1a\u9ad8\u53ef\u7528\u96c6\u7fa4\uff0c\u5f53\u67d0\u53f0\u670d\u52a1\u5668\u51fa\u73b0\u5355\u70b9\u6545\u969c\u65f6\uff0c\u670d\u52a1\u4e0d\u4f1a\u4e2d\u65ad\uff0c\u800c\u662f\u4ea4\u7531\u5176\u5b83\u8fd0\u884c\u6b63\u5e38\u7684\u670d\u52a1\u5668\u63a5\u7ba1\u3002<\/li>\n<li>HP\u96c6\u7fa4\uff08High Performance\uff09\uff1a\u9ad8\u6027\u80fd\u7684\u96c6\u7fa4\u662f\u5f53\u67d0\u4e00\u9879\u4efb\u52a1\u8ba1\u7b97\u91cf\u975e\u5e38\u5927\u7684\u65f6\u5019\uff0c\u7531\u4e00\u4e2a\u8ba1\u7b97\u673a\u96c6\u7fa4\u5171\u540c\u6765\u5b8c\u6210\u8fd9\u9879\u4efb\u52a1\uff0c\u8fd9\u79cd \u5904\u7406\u65b9\u5f0f\u6211\u4eec\u79f0\u4e3a\u5e76\u884c\u5904\u7406\u673a\u5236\u3002\u4e00\u822c\u9ad8\u6027\u80fd\u96c6\u7fa4\u7528\u4e8e\u79d1\u7814\u5de5\u4f5c\u65b9\u9762<\/li>\n<\/ul>\n<h2>LVS<\/h2>\n<p>LVS\u662fLinux Virtual Server\u7684\u7b80\u5199\uff0c\u610f\u5373Linux\u865a\u62df\u670d\u52a1\u5668\uff0c\u662f\u4e00\u4e2a\u865a\u62df\u7684\u670d\u52a1\u5668\u96c6\u7fa4\u7cfb\u7edf\u3002\u672c\u9879\u76ee\u57281998\u5e745\u6708\u7531\u7ae0\u6587\u5d69\u535a\u58eb\u6210\u7acb\uff0c\u662f\u4e2d\u56fd\u56fd\u5185\u6700\u65e9\u51fa\u73b0\u7684\u81ea\u7531\u8f6f\u4ef6\u9879\u76ee\u4e4b\u4e00\u3002\u4ecelinux\u5185\u6838\u76842.4\u7248\u672c\u4e4b\u540e\u5185\u7f6e\u4e86LVS\u7684\u5404\u4e2a\u6a21\u5757\u3002\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528\u3002<br \/>\n<!-- -->LVS\u5de5\u4f5c\u5728\u7f51\u7edc\u6a21\u578b\u7684\u7b2c\u56db\u5c42\uff0c\u76f4\u63a5\u5728\u5185\u6838\u4e2d\u5b9e\u73b0\u5404\u79cd\u529f\u80fd\uff0c\u4e5f\u5c31\u65e0\u9700\u76d1\u542c\u5957\u63a5\u5b57\uff0c\u6240\u4ee5\u6446\u8131\u4e86\u5957\u63a5\u5b57\u6570\u91cf\u7684\u9650\u5236\u3002<br \/>\n<strong>lvs\u7684\u4f18\u7f3a\u70b9\uff08\u8f6c\u8f7d\uff09\uff1a<\/strong><br \/>\n<!-- -->1\u3001\u6297\u8d1f\u8f7d\u80fd\u529b\u5f3a\u3001\u662f\u5de5\u4f5c\u5728\u7f51\u7edc4\u5c42\u4e4b\u4e0a\u4ec5\u4f5c\u5206\u53d1\u4e4b\u7528\uff0c\u6ca1\u6709\u6d41\u91cf\u7684\u4ea7\u751f\uff0c\u4fdd\u8bc1\u4e86\u5747\u8861\u5668IO\u7684\u6027\u80fd\u4e0d\u4f1a\u53d7\u5230\u5927\u6d41\u91cf\u7684\u5f71\u54cd\uff1b<\/p>\n<p>2\u3001\u914d\u7f6e\u6027\u6bd4\u8f83\u4f4e\uff0c\u8fd9\u662f\u4e00\u4e2a\u7f3a\u70b9\u4e5f\u662f\u4e00\u4e2a\u4f18\u70b9\uff0c\u56e0\u4e3a\u6ca1\u6709\u53ef\u592a\u591a\u914d\u7f6e\u7684\u4e1c\u897f\uff0c\u6240\u4ee5\u5e76\u4e0d\u9700\u8981\u592a\u591a\u63a5\u89e6\uff0c\u5927\u5927\u51cf\u5c11\u4e86\u4eba\u4e3a\u51fa\u9519\u7684\u51e0\u7387\uff1b<\/p>\n<p>3\u3001\u5de5\u4f5c\u7a33\u5b9a\uff0c\u81ea\u8eab\u6709\u5b8c\u6574\u7684\u53cc\u673a\u70ed\u5907\u65b9\u6848\uff0c\u5982LVS+Keepalived\u548cLVS+Heartbeat\uff0c\u4e0d\u8fc7\u6211\u4eec\u5728\u9879\u76ee\u5b9e\u65bd\u4e2d\u7528\u5f97\u6700\u591a\u7684\u8fd8\u662fLVS\/DR+Keepalived\uff1b<\/p>\n<p>4\u3001\u5e94\u7528\u8303\u56f4\u6bd4\u8f83\u5e7f\uff0c\u53ef\u4ee5\u5bf9\u6240\u6709\u5e94\u7528\u505a\u8d1f\u8f7d\u5747\u8861\uff0c\u4e0d\u7ba1\u662fhttp\u8fd8\u662fssh\u534f\u8bae\u90fd\u53ef\u4ee5\u4f7f\u7528lvs\uff1b<\/p>\n<p>5\u3001\u8f6f\u4ef6\u672c\u8eab\u4e0d\u652f\u6301\u6b63\u5219\u5904\u7406\uff0c\u4e0d\u80fd\u505a\u52a8\u9759\u5206\u79bb\uff0c\u8fd9\u4e2a\u5c31\u6bd4\u8f83\u9057\u61be\u4e86\uff1b\u5176\u5b9e\u73b0\u5728\u8bb8\u591a\u7f51\u7ad9\u5728\u8fd9\u65b9\u9762\u90fd\u6709\u8f83\u5f3a\u7684\u9700\u6c42\uff0c\u8fd9\u4e2a\u662fNginx\/HAProxy+Keepalived\u7684\u4f18\u52bf\u6240\u5728\u3002<\/p>\n<p>6\u3001\u5982\u679c\u662f\u7f51\u7ad9\u5e94\u7528\u6bd4\u8f83\u5e9e\u5927\u7684\u8bdd\uff0c\u5b9e\u65bdLVS\/DR+Keepalived\u8d77\u6765\u5c31\u6bd4\u8f83\u590d\u6742\u4e86\uff0c\u7279\u522b\u540e\u9762\u6709Windows Server\u5e94\u7528\u7684\u673a\u5668\u7684\u8bdd\uff0c\u5982\u679c\u5b9e\u65bd\u53ca\u914d\u7f6e\u8fd8\u6709\u7ef4\u62a4\u8fc7\u7a0b\u5c31\u6bd4\u8f83\u590d\u6742\u4e86\uff0c\u76f8\u5bf9\u800c\u8a00\uff0cNginx\/HAProxy+Keepalived\u5c31\u7b80\u5355\u591a\u4e86\u3002<\/p>\n<p>7\u3001\u6027\u80fd\u975e\u5e38\u5353\u8d8a\uff0c\u5df2\u7ecf\u5728\u591a\u4e2a\u516c\u53f8\u4f7f\u7528\u53ef\u9760\u6027\u4e5f\u975e\u5e38\u4e0d\u9519\uff0c\u5e76\u4e14\u662f\u5f00\u6e90\u9879\u76ee\uff0c\u53ef\u4ee5\u4fee\u6539\u6e90\u4ee3\u7801\u5b9a\u5236\u81ea\u5df1\u7684\u9700\u6c42<\/p>\n<h3>LVS\u4f53\u7cfb\u7ed3\u6784<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/aqzt.com\/wp-content\/uploads\/20220222103006-96.jpg\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><br \/>\n<!-- -->\u7ed3\u5408\u4e0a\u56fe\u6765\u89e3\u91caLVS\u7684\u6784\u5efa\u7ed3\u6784<\/p>\n<ul>\n<li>Director Server\uff1a\u6700\u524d\u7aef\u7684\u670d\u52a1\u5668\uff0c\u7528\u6765\u63a5\u6536\u7528\u6237\u7684\u8bf7\u6c42\u62a5\u6587\uff0c\u7136\u540e\u6839\u636e\u8c03\u5ea6\u7b97\u6cd5\u5c06\u7528\u6237\u7684\u8bf7\u6c42\u5206\u53d1\u81f3\u540e\u9762\u7684Real Server\u4e0a\u3002\u6b64\u5904\u975e\u5e38\u91cd\u8981\uff0c\u56e0\u4e3a\u5b83\u7684\u5065\u5eb7\u4e0e\u5426\u76f4\u63a5\u5f71\u54cd\u4e86\u7528\u6237\u7684\u8bbf\u95ee\u7ed3\u679c\uff0c\u6240\u4ee5\u5b83\u4e00\u822c\u90fd\u4e3a\u4e24\u53f0\uff0c\u4e00\u53f0\u7528\u6765\u4e3a\u7528\u6237\u63d0\u4f9b\u670d\u52a1\uff0c\u4e00\u53f0\u7528\u6765\u76d1\u542c\u670d\u52a1\u7684\u90a3\u53f0\u673a\u5668\u3002\u4e00\u65e6\u670d\u52a1\u7684\u90a3\u53f0\u673a\u5668\u6302\u6389\uff0c\u5c31\u9700\u8981\u53e6\u4e00\u53f0\u7acb\u9a6c\u9876\u4e0a\uff0c\u5e76\u62e5\u6709\u5b83\u6240\u6709\u7684\u8d44\u6e90\u3002<\/li>\n<li>Real Server\uff1a\u63d0\u4f9b\u670d\u52a1\u7684\u771f\u6b63\u4e3b\u673a\u3002\u5b83\u53ef\u4ee5\u662fweb\u670d\u52a1\uff0cftp\u670d\u52a1\u7b49\u3002\u5982\u4f55\u6765\u76d1\u63a7\u5b83\u4eec\u7684\u5065\u5eb7\u72b6\u6001\u3002\u53ef\u4ee5\u5728Director Server\u4e0a\u5b89\u88c5Ldirectord\u6765\u76d1\u542cReal Server\u7684\u5065\u5eb7\u72b6\u51b5\u3002<\/li>\n<li>\u6570\u636e\uff1a\u5171\u4eab\u5b58\u50a8\uff0c\u5047\u5982\u7528\u6237\u5728Real Server1\u4e0a\u8bbf\u95ee\u65f6\uff0c\u5f80\u8d2d\u7269\u8f66\u91cc\u52a0\u7269\u54c1\u3002\u7b2c\u4e8c\u6b21\u518d\u8bbf\u95ee\u65f6\u5374\u5206\u53d1\u5230\u4e86Real Server2\u4e0a\u3002\u5982\u679c\u6ca1\u6709\u5171\u4eab\u5b58\u50a8\uff0c\u7528\u6237\u4f1a\u53d1\u73b0\u8d2d\u7269\u8f66\u91cc\u4e4b\u524d\u6dfb\u52a0\u7684\u4e1c\u897f\u90fd\u6ca1\u6709\u4e86\u3002\u6240\u4ee5\u5171\u4eab\u5b58\u50a8\u4e3b\u8981\u662f\u4e3a\u4e86\u5404\u4e2a\u670d\u52a1\u5668\u4e4b\u95f4\u7684\u8d44\u6e90\u7edf\u4e00\u6027\u3002<\/li>\n<\/ul>\n<p>Director Server\u5fc5\u987b\u662flinux\u6216\u8005freeBSD\u3002\u800cReal Server\u53ef\u4ee5\u662f\u5927\u90e8\u5206\u64cd\u4f5c\u7cfb\u7edf\u3002<\/p>\n<h3>LVS\u96c6\u7fa4\u7c7b\u578b\u4ee5\u53ca\u8c03\u5ea6\u7b97\u6cd5<\/h3>\n<p>\u7531\u4e8eLVS\u662f\u76f4\u63a5\u5de5\u4f5c\u5728\u5185\u6838\u4e2d\uff0c\u8ddfiptables\u7c7b\u4f3c\uff0c\u9700\u8981\u7528\u4e00\u4e2a\u5e94\u7528\u7a0b\u5e8f\u4e13\u95e8\u5411\u5185\u6838\u4e2d\u4f20\u9012\u53c2\u6570\u4ee5\u8fbe\u5230\u6dfb\u52a0\u89c4\u5219\u7684\u65b9\u6cd5\u3002lvs\u5728\u5185\u6838\u4e2d\u662f\u7531ipvs\u6a21\u5757\u6765\u5b9e\u73b0\u7684\u3002\u5229\u7528ipvsadm\u7a0b\u5e8f\u6765\u5411ipvs\u6a21\u5757\u4e2d\u5b9a\u4e49\u89c4\u5219\u3002\u4e3a\u4e86\u540e\u9762\u4fbf\u4e8e\u4e66\u5199\uff0c\u5c06\u5982\u4e0b\u540d\u79f0\u7b80\u5316\uff1a<\/p>\n<p>VS<br \/>\nVirtual Server \u8c03\u5ea6\u5668\uff0c\u4e5f\u53ebDirector<br \/>\nRS<br \/>\nReal Server<br \/>\nCIP<br \/>\n\u5ba2\u6237\u7aefIP<br \/>\nVIP<br \/>\nVirtual IP , \u865a\u62dfIP<br \/>\nRIP<br \/>\n\u540e\u7aef\u4e3b\u673aIP<br \/>\nDIP<br \/>\nDirector IP\uff0c\u4e0eRS\u901a\u4fe1\u7684IP<\/p>\n<p>\u5f53\u7528\u6237\u8bf7\u6c42\u8d44\u6e90\u65f6\uff0c\u8c03\u5ea6\u5668\uff08VS\uff09\u662f\u600e\u4e48\u5c06\u8d44\u6e90\u53d1\u9001\u7ed9\u540e\u65b9\u7684RS\u8282\u70b9\u7684\u4ee5\u53caRS\u5728\u54cd\u5e94\u65f6\u600e\u4e48\u54cd\u5e94?LVS\u96c6\u7fa4\u7c7b\u578b\u4e3b\u8981\u4ee5\u4e0b\u51e0\u79cd\u7c7b\u578b\uff1a<\/p>\n<h3>LVS-NAT<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/aqzt.com\/wp-content\/uploads\/20220222103007-75.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<ul>\n<li>\u5ba2\u6237\u7aefCIP\u901a\u8fc7\u7f51\u7edc\u4e2d\u7684\u8def\u7531\u5230\u8fbe\u5904\u5728\u516c\u7f51\u7684VIP<\/li>\n<li>VIP\u63a5\u6536\u5230\u7528\u6237\u8bf7\u6c42\uff0c\u8fdb\u5165\u81ea\u5df1\u7684\u9632\u706b\u5899\u89c4\u5219\uff0c\u53d1\u73b0\u8bbf\u95ee\u7684\u662f\u672c\u673a\u8fdb\u7a0b\u3002\u76f4\u63a5\u5728INPUT\u94fe\u4e0a\u8fdb\u884clvs\u7b56\u7565\u8f6c\u6362<\/li>\n<li>lvs\u5c06\u5ba2\u6237\u7aefCIP\u8bbf\u95ee\u7684\u76ee\u6807\u5730\u5740VIP\uff0c\u8f6c\u53d8\u4e3a\u540e\u7aef\u771f\u6b63\u5b9e\u73b0\u670d\u52a1\u7684RIP\u5730\u5740\u4e0a\u3002\u6240\u4ee5\u53d8\u6210\u4e86src\uff1aCIP,dest\uff1aRIP\u3002\u7ecf\u8fc7POSTROUTING\u5230\u8fbe\u540e\u7aef\u7684real server<\/li>\n<li>real server\u54cd\u5e94\u7684\u65f6\u5019\uff0c\u4ecd\u7136\u539f\u8def\u8fd4\u56de\uff0c\u6b64\u65f6\u7684src\uff1aRIP\uff0cdest\uff1aCIP\u3002\u7b49\u5230\u4eceVIP\u7f51\u5361\u51fa\u53bb\u7684\u65f6\u5019\uff0c\u4f1a\u5c06RIP\u8be5\u4e3aVIP\u8fdb\u884c\u54cd\u5e94\u3002\u8fd9\u662f\u56e0\u4e3a\u5ba2\u6237\u7aef\u5c31\u8bbf\u95ee\u7684VIP\uff0c\u6211\u4eec\u4ecd\u7136\u7528VIP\u6765\u54cd\u5e94\u3002RIP\u867d\u7136\u4e5f\u53ef\u4ee5\u8fdb\u884c\u54cd\u5e94\uff0c\u4f46\u662f\u5ba2\u6237\u7aef\u53ea\u662f\u60f3\u8bbf\u95eeVIP\uff0c\u6211\u4eec\u5982\u679c\u7528RIP\u7684\u8bdd\uff0c\u5ba2\u6237\u7aef\u4e0d\u4f1a\u63a5\u53d7\u54cd\u5e94\u3002<\/li>\n<\/ul>\n<p>\u6839\u636e\u4e0a\u8ff0\u6709\u4ee5\u4e0b\u51e0\u70b9\uff1a<\/p>\n<ul>\n<li>VIP\u5fc5\u987b\u662f\u516c\u7f51\uff0c\u53ef\u4ee5\u63a5\u53d7\u7528\u6237\u7684\u8bbf\u95ee<\/li>\n<li>RIP\u548cDIP\u5fc5\u987b\u5728\u4e00\u4e2a\u672c\u5730\u7f51\u7edc\uff0c\u4e14\u5e94\u8be5\u4f7f\u7528\u79c1\u7f51\u5730\u5740\uff0cRS\u7684\u7f51\u5173\u9700\u8981\u6307\u5411DIP\uff0c\u5982\u679c\u90fd\u6307\u5411\u4e86\u516c\u7f51\uff0c\u5c31\u6ca1\u6709\u610f\u4e49\u4e86\uff0c\u7528\u6237\u53ef\u4ee5\u76f4\u63a5\u8bbf\u95ee\u5230RS\u3002 \u8fd9\u662f\u4e0d\u88ab\u5141\u8bb8\u7684\u3002<\/li>\n<\/ul>\n<p>\u8fd9\u5c31\u6709\u4e00\u4e2a\u95ee\u9898\uff0c\u4e0d\u7ba1\u54cd\u5e94\u8fd8\u662f\u8bf7\u6c42\uff0c\u90fd\u8981\u7ecf\u8fc7\u8c03\u5ea6\u5668\uff0c\u8fd9\u6837\u8c03\u5ea6\u627f\u8f7d\u7684\u538b\u529b\u5c31\u5927\u5927\u589e\u52a0\u3002\u538b\u529b\u8d8a\u5927\uff0c\u8d8a\u5bb9\u6613\u5d29\u6e83\u3002<\/p>\n<h3>LVS-DR<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/aqzt.com\/wp-content\/uploads\/20220222103009-52.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><br \/>\n<!-- -->\u7528\u6237\u5411VIP\u53d1\u8d77\u8bf7\u6c42\uff0c\u8c03\u5ea6\u5668\u5728\u6e90\u76ee\u6807CIP\u548c\u76ee\u6807VIP\u4e4b\u5916\u5728\u5c01\u88c5\u4e00\u4e2a\u6e90DIPMAC\u5730\u5740\u548c\u76ee\u6807RIPMAC\u5730\u5740\uff08\u4e3a\u6311\u9009\u51fa\u6765\u7684RSMAC\u5730\u5740\uff09\u3002\u7136\u540e\u5728\u5c06\u8fd9\u56db\u4e2a\u5730\u5740\u4e00\u8d77\u53d1\u9001\u7ed9\u6311\u9009\u51fa\u6765\u7684RS\u3002\u54cd\u5e94\u65f6\uff0cRS\u5148\u62c6\u9664\u4e24\u4e2aMAC\u5730\u5740\uff0c\u53d1\u73b0\u8bf7\u6c42\u7684\u76ee\u6807VIP\u662f\u672c\u673a\u5730\u5740\uff0c\u7136\u540e\u76f4\u63a5\u5c06\u7ed3\u679c\u8fd4\u56de\u7ed9CIP\u3002\u800c\u4e0d\u518d\u7ecf\u8fc7\u8c03\u5ea6\u5668\u3002<br \/>\n<!-- -->dr\u7c7b\u578b\u6709\u4ee5\u4e0b\u51e0\u4e2a\u8981\u70b9\uff1a<\/p>\n<ul>\n<li>vs\u548c\u5404RS\u4e0a\u90fd\u8981\u6709VIP<\/li>\n<li>\u786e\u4fdd\u7528\u6237\u7684\u8bf7\u6c42\u76ee\u6807\u4e3aVIP\u7684\u62a5\u6587\u53d1\u9001\u7ed9\u8c03\u5ea6\u5668\uff0c\u56e0\u4e3aRS\u4e0a\u4e5f\u6709VIP\uff0c\u6240\u4ee5\u8981\u5bf9RS\u4e0aVIP\u8fdb\u884c\u9650\u5236\uff0c\u4ee5\u9632\u7528\u6237\u53d1\u9001\u7684\u8bf7\u6c42\u76f4\u63a5\u53d1\u5230\u4e86RS\u4e0a\u3002\u540e\u9762\u793a\u4f8b\u4f1a\u5199\u5230\u3002\u76f4\u63a5\u8c03\u6574\u5185\u6838\u53c2\u6570\u5373\u53ef\u3002<\/li>\n<li>RS\u7684RIP\u53ef\u4ee5\u662f\u79c1\u7f51\u5730\u5740\uff0c\u4e5f\u53ef\u4ee5\u662f\u516c\u7f51\u5730\u5740\uff0c\u4f46\u662fRIP\u548cVIP\u8981\u5728\u540c\u4e00\u4e2a\u7269\u7406\u7f51\u6bb5\u4e0a\uff0cRIP\u7684\u7f51\u5173\u4e0d\u80fd\u6307\u5411DIP,\u4ee5\u786e\u4fddRS\u53ef\u4ee5\u76f4\u63a5\u54cd\u5e94\u7528\u6237\uff0c\u800c\u4e0d\u662f\u7531Director\u54cd\u5e94\u3002<\/li>\n<li>RS\u4e0a\u7684VIP\u8981\u8bbe\u7f6e\u56de\u73af\u63a5\u53e3lo\u4e0a\uff0c\u4f7f\u7528ARP\u9650\u5236VIP\u3002\u7a0d\u540e\u914d\u7f6e\u4f1a\u8bf4\u5230\u3002<\/li>\n<\/ul>\n<h3>LVS-tun<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/aqzt.com\/wp-content\/uploads\/20220222103011-49.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><br \/>\n<!-- -->tun\u6a21\u578b\u4e5f\u79f0\u4e3a\u96a7\u9053\u6a21\u578b\uff0c\u7531\u8c03\u5ea6\u5668\u628a\u8bf7\u6c42\u62a5\u6587\u53d1\u9001\u81f3\u67d0\u4e00\u4e2aReal Server\u4e0a\u3002\u7136\u540e\u7531Real Server\u76f4\u63a5\u54cd\u5e94\u7ed9\u5ba2\u6237\u3002\u6709\u4ee5\u4e0b\u51e0\u4e2a\u8981\u70b9\uff1a<\/p>\n<ul>\n<li>DIP\u5728\u5411RS\u53d1\u9001\u8bf7\u6c42\u62a5\u6587\u65f6\uff0c\u5bf9\u6700\u539f\u59cb\u7684\u6e90CIP\/\u76ee\u6807VIP\u4e0d\u8fdb\u884c\u4fee\u6539\uff0c\u800c\u662f\u5728\u5916\u9762\u5728\u6dfb\u52a0\u4e00\u5c42IP\uff0c\u5373\u6e90DIP\u548c\u76ee\u6807RIP\u3002<\/li>\n<li>DIP,RIP,VIP\u5e94\u8be5\u90fd\u662f\u516c\u7f51\u5730\u5740\uff0c\u5e76\u4e14RS\u53ef\u4ee5\u5904\u5728\u4e0d\u540c\u7684\u5730\u65b9\u3002<\/li>\n<li>RS\u7684\u7f51\u5173\u4e0d\u4f1a\u6307\u5411DIP<\/li>\n<li>\u8bf7\u6c42\u53ef\u4ee5\u7ecf\u8fc7VS\uff0c\u4f46\u662f\u54cd\u5e94\u4e0d\u80fd\u7ecf\u7531VS\u3002<\/li>\n<\/ul>\n<h3>LVS-fullnat<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/aqzt.com\/wp-content\/uploads\/20220222103012-93.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><br \/>\n<!-- -->\u7b80\u5355\u6765\u8bf4\u5c31\u662f\u5c06\u8bf7\u6c42\u62a5\u6587\u548c\u54cd\u5e94\u62a5\u6587\u5168\u90e8\u8fdb\u884c\u4fee\u6539\u3002\u6839\u636e\u4e0a\u56fe\u8fdb\u884c\u89e3\u91ca\uff1a<\/p>\n<ul>\n<li>\u7528\u6237\u53d1\u8d77\u8bf7\u6c42\uff0c\u6e90\u76ee\u6807CIP\/\u76ee\u6807VIP<\/li>\n<li>\u8c03\u5ea6\u53d1\u73b0\u7528\u6237\u8bf7\u6c42\u9700\u8981\u53d1\u9001\u7ed9RS\uff0c\u7136\u540e\u4fee\u6539\u6e90CIP\/\u76ee\u6807VIP\u6210\u6e90DIP\/\u76ee\u6807RIP(RS1)<\/li>\n<li>RS1\u6536\u5230\u8bf7\u6c42\u540e\uff0c\u5c06\u54cd\u5e94\u62a5\u6587\u539f\u8def\u8fd4\u56de\uff0c\u8fd9\u65f6\u6e90RIP\/\u76ee\u6807DIP<\/li>\n<li>\u8c03\u5ea6\u5668\u5c06\u54cd\u5e94\u62a5\u6587\u518d\u6b21\u4fee\u6539\uff0c\u6700\u540e\u53d8\u6210\u6e90VIP\/\u76ee\u6807CIP\u54cd\u5e94\u7ed9\u5ba2\u6237<\/li>\n<\/ul>\n<p><strong>fullnat\u7531\u51e0\u4e2a\u8981\u70b9\uff1a<\/strong><\/p>\n<ul>\n<li>VIP\u662f\u516c\u7f51\u5730\u5740\uff0cDIP\u548cRIP\u90fd\u662f\u79c1\u7f51\u5730\u5740\uff0c\u4e14\u4e0d\u518d\u540c\u4e00\u6bb5\u7f51\u7edc\uff0cRIP\u7684\u7f51\u5173\u4e0d\u8981\u6307\u5411DIP<\/li>\n<li>RS\u6536\u5230\u7684\u6e90\u5730\u5740IP\u662fDIP\uff0c\u54cd\u5e94\u4e5f\u4e00\u5b9a\u8981\u7ed9DIP\uff0c\u6700\u540e\u7531DIP\u8f6c\u53d1\u7ed9VIP\u54cd\u5e94\u7ed9\u5ba2\u6237\u3002<\/li>\n<li>\u8bf7\u6c42\u548c\u54cd\u5e94\u62a5\u6587\u90fd\u8981\u6d41\u7ecfVS<\/li>\n<\/ul>\n<h3>LVS\u8c03\u5ea6\u7b97\u6cd5<\/h3>\n<p>\u6839\u636e\u5176\u8c03\u5ea6\u65f6\u662f\u5426\u8003\u8651\u5404RS\u5f53\u524d\u7684\u8d1f\u8f7d\u72b6\u6001\uff0c\u5206\u4e3a\u9759\u6001\u65b9\u6cd5\u548c\u52a8\u6001\u65b9\u6cd5\uff1a<br \/>\n<strong>\u9759\u6001\u65b9\u6cd5\uff1a\u6839\u636e\u7b97\u6cd5\u672c\u8eab\u8fdb\u884c\u8c03\u5ea6<\/strong><\/p>\n<ul>\n<li>RR\uff1a\u8f6e\u8be2\uff08roundrobin\uff09\uff0c\u53731\uff1a1\u8fdb\u884c\u5206\u914d\uff0c\u4e0d\u8003\u8651\u8d1f\u8f7d\u5747\u8861\u3002\u6bd4\u5982\u4e09\u53f0\u670d\u52a1\u5668\uff0c\u6bcf\u4e00\u53f0\u90fd\u670910\u4e2a\u8bf7\u6c42\uff0c\u5373\u4f7f\u540e\u4e24\u53f0\u90fd\u5df2\u7ecf\u5904\u7406\u5b8c\uff0c\u7b2c\u4e00\u53f0\u4ecd\u5728\u5904\u7406\u8bf7\u6c42\u3002\u8fdb\u6765\u6700\u65b0\u7684\u8bf7\u6c42\u4e5f\u4f1a\u53d1\u9001\u7ed9\u7b2c\u4e00\u53f0<\/li>\n<li>WRR\uff1a\u52a0\u6743\u8f6e\u8be2\uff08weight RR\uff09\u3002\u6bd4\u5982\u4e24\u53f0\u670d\u52a1\u5668\uff0c\u4e24\u53f0\u7684\u6743\u91cd\u6bd42\uff1a1\uff0c\u90a3\u4e48\u53d1\u9001\u7684\u8bf7\u6c42\u5c31\u662f212\u3002<\/li>\n<li>SH\uff1a\u6e90\u5730\u5740\u54c8\u5e0c(Source Hashing) \u3002\u5c06\u6765\u81ea\u4e8e\u540c\u4e00\u4e2aIP\u7684\u8bf7\u6c42\u59cb\u7ec8\u53d1\u5f80\u7b2c\u4e00\u6b21\u6311\u4e2d\u7684RS\uff0c\u5b9e\u73b0\u4f1a\u8bdd\u7ed1\u5b9a\u3002<\/li>\n<li>DH\uff1a\u76ee\u6807\u5730\u5740\u54c8\u5e0c(Destination Hashing)\u3002\u5c06\u53d1\u5f80\u540c\u4e00\u4e2a\u76ee\u6807\u5730\u5740\u7684\u8bf7\u6c42\u59cb\u7ec8\u8f6c\u53d1\u81f3\u7b2c\u4e00\u6b21\u6311\u4e2d\u7684RS\u3002<\/li>\n<\/ul>\n<p><strong>\u52a8\u6001\u65b9\u6cd5\uff1a\u6839\u636e\u6bcfRS\u5f53\u524d\u7684\u8d1f\u8f7d\u72b6\u6001\u4ee5\u53ca\u8c03\u5ea6\u7b97\u6cd5\u8fdb\u884c\u8c03\u5ea6<\/strong><\/p>\n<ul>\n<li>LC\uff1a\u6700\u5c11\u8fde\u63a5\u6570\uff08least connections \uff09\uff0c\u7b80\u5355\u6765\u8bf4\u5c31\u662f\u5c06\u65b0\u7684\u8bf7\u6c42\u53d1\u9001\u7ed9\u76ee\u524d\u8fde\u63a5\u7ec4\u5c11\u7684\u670d\u52a1\u5668<\/li>\n<li>WLC\uff1a\u52a0\u6743\u6700\u5c11\u8fde\u63a5\u6570\uff08Weighted LC\uff09\uff0c\u662fLC\u7684\u5347\u7ea7\u7248\uff0c\u5c06\u65b0\u8bf7\u6c42\u5e73\u5747\u5206\u914d\u5230\u670d\u52a1\u5668\u4e0a\uff0c\u4ee5\u7b26\u5408\u670d\u52a1\u5668\u4e4b\u95f4\u7684\u6743\u91cd\u6bd4\u3002<\/li>\n<li>SED\uff1a\u6700\u77ed\u671f\u671b\u5ef6\u65f6\uff08Shortest Expection Delay\uff09\uff0c\u57fa\u4e8eWLC\u7b97\u6cd5<\/li>\n<li>NQ\uff1a\u4ece\u4e0d\u6392\u961f\uff08Never Queue\uff09\uff0c\u76f4\u63a5\u5c06\u65b0\u8bf7\u6c42\u53d1\u9001\u7ed9\u7a7a\u95f2\u7684RS<\/li>\n<li>LBLC\uff1a\u57fa\u4e8e\u5c40\u90e8\u6027\u7684\u6700\u5c11\u8fde\u63a5\u6570(Locality-Based LC)\uff0c\u76f8\u5f53\u4e8eDH\u548cLC\u7b97\u6cd5\u7684\u96c6\u5408\uff0c\u7528\u6765\u5c06\u76ee\u6807\u5730\u5740IP\u8c03\u5ea6\u5230\u540c\u4e00\u4e2a\u670d\u52a1\u7aef\uff0c\u5982\u679c\u8be5\u670d\u52a1\u7aef\u8d1f\u8f7d\u6b63\u5e38\uff0c\u5219\u7ee7\u7eed\u53d1\u5f80\u8be5\u670d\u52a1\u5668\u7aef\u3002\u5982\u679c\u8be5\u670d\u52a1\u7aef\u8d1f\u8f7d\u5df2\u7ecf\u8d85\u8fc7\u4e00\u534a\u4ee5\u4e0a\uff0c\u5c31\u6309\u7167LC\u89c4\u5219\u53d1\u9001\u5230\u6700\u5c11\u8fde\u63a5\u6570\u4e0a\u7684\u4e00\u4e2a\u670d\u52a1\u5668\u4e0a\u3002<\/li>\n<li>LBLCR\uff1a\u5e26\u590d\u5236\u529f\u80fd\u7684LBLC(LBLC with Replication)<\/li>\n<\/ul>\n<h3>ipvsadm<\/h3>\n<p>\u7528\u6765\u5411\u96c6\u7fa4\u670d\u52a1\u5b9a\u4e49\u89c4\u5219\u3002\u5e38\u7528\u9009\u9879\u5982\u4e0b\uff1a<\/p>\n<p>-A<br \/>\n\u6dfb\u52a0\u4e00\u6761\u65b0\u7684\u865a\u62df\u670d\u52a1<br \/>\n-E<br \/>\n\u7f16\u8f91\u865a\u62df\u670d\u52a1<br \/>\n-D<br \/>\n\u5220\u9664\u865a\u62df\u670d\u52a1<br \/>\n-C<br \/>\n\u6e05\u695a\u865a\u62df\u670d\u52a1\u7684\u89c4\u5219<br \/>\n-R<br \/>\n\u6062\u590d\u865a\u62df\u670d\u52a1\u7684\u89c4\u5219<br \/>\n-a<br \/>\n\u5728\u4e00\u4e2a\u65b0\u7684\u865a\u62df\u670d\u52a1\u4e0a\u9762\u6dfb\u52a0\u4e00\u6761\u65b0\u7684\u670d\u52a1\u5668<br \/>\n-e<br \/>\n\u7f16\u8f91\u67d0\u4e2a\u771f\u5b9e\u7684\u670d\u52a1\u5668<br \/>\n-d<br \/>\n\u5220\u9664\u67d0\u4e2a\u771f\u5b9e\u7684\u670d\u52a1\u5668<br \/>\n-L|l<br \/>\n\u663e\u793a\u5185\u6838\u4e2d\u7684\u865a\u62df\u670d\u52a1\u5668\u7684\u89c4\u5219<br \/>\n-n<br \/>\n\u4ee5\u6570\u5b57\u5f62\u5f0f\u663e\u793aip\u7aef\u53e3<br \/>\n-c<br \/>\n\u663e\u793aipvs\u76ee\u524d\u4ee5\u5b58\u5728\u7684\u8fde\u63a5<br \/>\n-Z<br \/>\n\u5c06\u8f6c\u53d1\u7684\u6d88\u606f\u8ba1\u6570\u6e05\u96f6<br \/>\n-p<br \/>\n\u914d\u7f6e\u6301\u4e45\u5316\u65f6\u95f4<br \/>\n-A<br \/>\n\u6dfb\u52a0\u4e00\u6761\u65b0\u7684\u865a\u62df\u670d\u52a1<br \/>\n-t|-u<br \/>\ntcp\u6216udp\u7684\u865a\u62df\u670d\u52a1\u534f\u8bae<br \/>\n-g|-m|-i<br \/>\nlvs\u6a21\u578b\uff1aDR,NAT,TUN<br \/>\n-w<br \/>\n\u914d\u7f6e\u771f\u5b9e\u670d\u52a1\u5668\u7684\u6743\u91cd<br \/>\n-s<br \/>\n\u914d\u5408\u5747\u8861\u8d1f\u8f7d\u7b97\u6cd5<\/p>\n<ul>\n<li>-timeout<\/li>\n<\/ul>\n<p>\u663e\u793a\u914d\u7f6e\u7684tcp\/udp\u8d85\u65f6\u65f6\u95f4<\/p>\n<ul>\n<li>-stats<\/li>\n<\/ul>\n<p>\u663e\u793a\u5386\u53f2\u6d88\u606f\u8f6c\u53d1\u7edf\u8ba1<\/p>\n<ul>\n<li>-rate<\/li>\n<\/ul>\n<p>\u663e\u793a\u8f6c\u53d1\u901f\u7387\u4fe1\u606f<\/p>\n<p>\u7ba1\u7406\u96c6\u7fa4\u670d\u52a1\uff1a\u589e\u3001\u5220\u3001\u6539<\/p>\n<ul>\n<li>\u589e\/\u6539\uff1aipvsadm -A|E -t|u|f service-address [-s scheduler] [-p [timeout]]<\/li>\n<li>\u5220\uff1aipvsadm -D -t|u|f service-address<\/li>\n<\/ul>\n<p>\u793a\u4f8b\uff1a<\/p>\n<pre>\n\n<div class=\"codecolorer-container text solarized-dark language-bash\" style=\"overflow:auto;white-space:nowrap;width:800px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/>8<br \/>9<br \/>10<br \/>11<br \/>12<br \/>13<br \/>14<br \/>15<br \/>16<br \/>17<br \/><\/div><\/td><td><div class=\"text codecolorer\">1<br \/>\n2[root@directory ~]# ipvsadm -A -t 192.168.199.146:80 -s rr<br \/>\n3[root@directory ~]# ipvsadm -ln<br \/>\n4IP Virtual Server version 1.2.1 (size=4096)<br \/>\n5Prot LocalAddress:Port Scheduler Flags<br \/>\n6 &nbsp;-&amp;gt; RemoteAddress:Port &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Forward Weight ActiveConn InActConn<br \/>\n7TCP &nbsp;192.168.199.146:80 rr<br \/>\n8\u6dfb\u52a0\u4e00\u6761\u65b0\u7684\u865a\u62df\u670d\u52a1\uff0c\u7b97\u6cd5\u662f\u8f6e\u8be2<br \/>\n9<br \/>\n10[root@directory ~]# ipvsadm -D -t 192.168.199.146:80<br \/>\n11[root@directory ~]# ipvsadm<br \/>\n12IP Virtual Server version 1.2.1 (size=4096)<br \/>\n13Prot LocalAddress:Port Scheduler Flags<br \/>\n14 &nbsp;-&amp;gt; RemoteAddress:Port &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Forward Weight ActiveConn InActConn<br \/>\n15\u5220\u9664\u865a\u62df\u670d\u52a1<br \/>\n16<br \/>\n17<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n\n<\/pre>\n<p>\u7ba1\u7406\u96c6\u7fa4\u4e0a\u7684RS\u670d\u52a1\uff1a\u589e\uff0c\u6539\uff0c\u5220<\/p>\n<ul>\n<li>\u589e\uff0c\u6539\uff1aipvsadm -a|e -t|u|f service-address -r server-address [-g|i|m] [-w weight]<\/li>\n<li>\u5220\uff1a ipvsadm -d -t|u|f service-address -r server-address<\/li>\n<\/ul>\n<p>\u793a\u4f8b\uff1a<\/p>\n<pre>\n\n<div class=\"codecolorer-container text solarized-dark language-bash\" style=\"overflow:auto;white-space:nowrap;width:800px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/>8<br \/>9<br \/>10<br \/>11<br \/>12<br \/>13<br \/><\/div><\/td><td><div class=\"text codecolorer\">1[root@directory ~]# ipvsadm -a -t 192.168.199.146:80 -r 192.168.199.230:80 -g<br \/>\n2[root@directory ~]# ipvsadm -ln<br \/>\n3IP Virtual Server version 1.2.1 (size=4096)<br \/>\n4Prot LocalAddress:Port Scheduler Flags<br \/>\n5 &nbsp;-&amp;gt; RemoteAddress:Port &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Forward Weight ActiveConn InActConn<br \/>\n6TCP &nbsp;192.168.199.146:80 rr<br \/>\n7 &nbsp;-&amp;gt; 192.168.199.230:80 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Route &nbsp; 1 &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; &nbsp; <br \/>\n8\u6dfb\u52a0\u96c6\u7fa4\u4e0a\u7684\u4e00\u6761RS\u670d\u52a1<br \/>\n9<br \/>\n10[root@directory ~]# ipvsadm -d -t 192.168.199.146:80 -r 192.168.199.230:80<br \/>\n11\u5220\u9664\u96c6\u7fa4\u4e0a\u7684\u67d0\u6761RS\u670d\u52a1<br \/>\n12<br \/>\n13<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n\n<\/pre>\n<h3>lvs-nat<\/h3>\n<p>\u4f7f\u7528ipvsadm\u5b9e\u73b0lvs-nat<br \/>\n<img decoding=\"async\" src=\"https:\/\/aqzt.com\/wp-content\/uploads\/20220222103015-54.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><br \/>\n<!-- -->\u5b9e\u73b0NAT\u6a21\u578b\u6709\u4ee5\u4e0b\u51e0\u70b9\uff1a<\/p>\n<ul>\n<li>VS\u673a\u5668\u4e0a\u6709\u4e24\u5f20\u7f51\u5361\uff0cVIP\u63a5\u6536\u7528\u6237\u8bf7\u6c42\uff0cDIP\u5411RS\u53d1\u9001\u8bf7\u6c42<\/li>\n<li>RIP\u548cDIP\u5e94\u8be5\u90fd\u5728\u79c1\u7f51\u4e0a\uff0c\u5e76\u4e14RIP\u7f51\u5173\u6307\u5411DIP<\/li>\n<\/ul>\n<p>VIP<br \/>\n192.168.199.157<br \/>\nDIP<br \/>\n192.168.192.129<br \/>\nRIP1<br \/>\n192.168.192.130<br \/>\nRIP2<br \/>\n192.168.192.128<\/p>\n<pre>\n\n<div class=\"codecolorer-container text solarized-dark language-bash\" style=\"overflow:auto;white-space:nowrap;width:800px;height:300px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/>8<br \/>9<br \/>10<br \/>11<br \/>12<br \/>13<br \/>14<br \/>15<br \/>16<br \/>17<br \/>18<br \/>19<br \/>20<br \/>21<br \/>22<br \/>23<br \/>24<br \/>25<br \/>26<br \/>27<br \/>28<br \/>29<br \/>30<br \/>31<br \/>32<br \/>33<br \/>34<br \/>35<br \/>36<br \/>37<br \/>38<br \/>39<br \/>40<br \/>41<br \/>42<br \/>43<br \/>44<br \/><\/div><\/td><td><div class=\"text codecolorer\">1#\u51c6\u5907\u597d\u540e\u7aefhttpd\u4e3b\u673a\u51c6\u5907\u597d\u7f51\u9875\uff0c\u4ee5\u53ca\u4e3b\u673a\u7684\u7f51\u5173\u6307\u5411<br \/>\n2[root@http1 ~]# route -n<br \/>\n3Kernel IP routing table<br \/>\n4Destination &nbsp; &nbsp; Gateway &nbsp; &nbsp; &nbsp; &nbsp; Genmask &nbsp; &nbsp; &nbsp; &nbsp; Flags Metric Ref &nbsp; &nbsp;Use Iface<br \/>\n50.0.0.0 &nbsp; &nbsp; &nbsp; &nbsp; 192.168.192.129 0.0.0.0 &nbsp; &nbsp; &nbsp; &nbsp; UG &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; &nbsp;0 ens33<br \/>\n6<br \/>\n7[root@httpd2 ~]# route -n<br \/>\n8Kernel IP routing table<br \/>\n9Destination &nbsp; &nbsp; Gateway &nbsp; &nbsp; &nbsp; &nbsp; Genmask &nbsp; &nbsp; &nbsp; &nbsp; Flags Metric Ref &nbsp; &nbsp;Use Iface<br \/>\n100.0.0.0 &nbsp; &nbsp; &nbsp; &nbsp; 192.168.192.129 0.0.0.0 &nbsp; &nbsp; &nbsp; &nbsp; UG &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; &nbsp;0 ens33<br \/>\n11<br \/>\n12[root@http1 ~]# curl http:\/\/192.168.192.130<br \/>\n13httpd1<br \/>\n14<br \/>\n15[root@httpd2 ~]# curl http:\/\/192.168.192.128<br \/>\n16httpd2<br \/>\n17<br \/>\n18<br \/>\n19#\u6dfb\u52a0lvs\u4e3b\u673a\u7b56\u7565\u3002<br \/>\n20[root@lvs ~]# ipvsadm -A -t 192.168.199.157:80 -s rr &nbsp; &nbsp; &nbsp;\u6dfb\u52a0\u4ee5\u8f6e\u8be2\u65b9\u5f0f\u8bbf\u95ee<br \/>\n21#\u6dfb\u52a0\u540e\u7aef\u771f\u6b63\u670d\u52a1\u5668<br \/>\n22[root@lvs ~]# ipvsadm -a -t 192.168.199.157:80 -r 192.168.192.130 -m <br \/>\n23[root@lvs ~]# ipvsadm -a -t 192.168.199.157:80 -r 192.168.192.128 -m <br \/>\n24<br \/>\n25[root@lvs ~]# ipvsadm -Ln<br \/>\n26IP Virtual Server version 1.2.1 (size=4096)<br \/>\n27Prot LocalAddress:Port Scheduler Flags<br \/>\n28 &nbsp;-&amp;gt; RemoteAddress:Port &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Forward Weight ActiveConn InActConn<br \/>\n29TCP &nbsp;192.168.199.157:80 rr<br \/>\n30 &nbsp;-&amp;gt; 192.168.192.128:80 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Masq &nbsp; &nbsp;1 &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; &nbsp; <br \/>\n31 &nbsp;-&amp;gt; 192.168.192.130:80 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Masq &nbsp; &nbsp;1 &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp;<br \/>\n32<br \/>\n33#\u6d4b\u8bd5\u8bbf\u95ee<br \/>\n34[root@client ~]# curl http:\/\/192.168.199.157<br \/>\n35httpd2<br \/>\n36[root@client ~]# curl http:\/\/192.168.199.157<br \/>\n37httpd1<br \/>\n38[root@client ~]# curl http:\/\/192.168.199.157<br \/>\n39httpd2<br \/>\n40[root@client ~]# curl http:\/\/192.168.199.157<br \/>\n41httpd1<br \/>\n42<br \/>\n43<br \/>\n44<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n\n<\/pre>\n<p><strong>NAT\u7c7b\u578b\u7684\u7aef\u53e3\u6620\u5c04<\/strong><\/p>\n<pre>\n\n<div class=\"codecolorer-container text solarized-dark language-bash\" style=\"overflow:auto;white-space:nowrap;width:800px;height:300px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/>8<br \/>9<br \/>10<br \/>11<br \/>12<br \/>13<br \/>14<br \/>15<br \/>16<br \/>17<br \/>18<br \/>19<br \/>20<br \/>21<br \/>22<br \/>23<br \/>24<br \/>25<br \/>26<br \/>27<br \/>28<br \/><\/div><\/td><td><div class=\"text codecolorer\">1#\u9996\u5148\u5c06128\u4e3b\u673a\u4e0a\u7684web\u7aef\u53e3\u6539\u4e3a8080<br \/>\n2[root@httpd2 ~]# cat \/etc\/httpd\/conf\/httpd.conf | grep Listen<br \/>\n3Listen 8080<br \/>\n4<br \/>\n5[root@httpd2 ~]# ss -ntl | grep 8080<br \/>\n6LISTEN &nbsp; &nbsp; 0 &nbsp; &nbsp; &nbsp;128 &nbsp; &nbsp; &nbsp; &nbsp; :::8080 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:::* &nbsp;<br \/>\n7<br \/>\n8#\u5c06\u7b56\u7565\u4fee\u6539\u6210\u4ee5\u4e0b<br \/>\n9[root@lvs ~]# ipvsadm -Ln<br \/>\n10IP Virtual Server version 1.2.1 (size=4096)<br \/>\n11Prot LocalAddress:Port Scheduler Flags<br \/>\n12 &nbsp;-&amp;gt; RemoteAddress:Port &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Forward Weight ActiveConn InActConn<br \/>\n13TCP &nbsp;192.168.199.157:80 rr<br \/>\n14 &nbsp;-&amp;gt; 192.168.192.128:8080 &nbsp; &nbsp; &nbsp; &nbsp; Masq &nbsp; &nbsp;1 &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; &nbsp; <br \/>\n15 &nbsp;-&amp;gt; 192.168.192.130:80 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Masq &nbsp; &nbsp;1 &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0<br \/>\n16<br \/>\n17# \u6d4b\u8bd5\u8bbf\u95ee<br \/>\n18[root@client ~]# curl http:\/\/192.168.199.157<br \/>\n19httpd2<br \/>\n20[root@client ~]# curl http:\/\/192.168.199.157<br \/>\n21httpd1<br \/>\n22[root@client ~]# curl http:\/\/192.168.199.157<br \/>\n23httpd2<br \/>\n24[root@client ~]# curl http:\/\/192.168.199.157<br \/>\n25httpd1<br \/>\n26<br \/>\n27<br \/>\n28<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n\n<\/pre>\n<h3>\u5b9e\u73b0NAT\u7c7b\u578b\u7684https\u8bbf\u95ee<\/h3>\n<p>\u8fd9\u91cc\u4e0d\u6784\u5efa\u79c1\u6709CA\uff0c\u76f4\u63a5\u521b\u5efa\u81ea\u7b7e\u8bc1\u4e66\uff0c\u7531\u4e8e\u66f4\u6362\u4e86IP\uff0c\u91cd\u65b0\u5199\u4e00\u4e0bIP\u5730\u5740<\/p>\n<p>client<br \/>\n175<br \/>\nlvs<br \/>\n157(VIP)\u548c 192.168.192.129\uff08DIP\uff09<br \/>\nhttpd1<br \/>\n192.168.192.131<br \/>\nhttpd2<br \/>\n192.168.192.128<\/p>\n<p>1\uff09\u5728httpd\u4e3b\u673a\u4e0a\u521b\u5efa\u5b58\u653e\u81ea\u7b7e\u8bc1\u4e66\u7684\u76ee\u5f55\/etc\/httpd\/tls<\/p>\n<pre>\n\n<div class=\"codecolorer-container text solarized-dark language-bash\" style=\"overflow:auto;white-space:nowrap;width:800px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/><\/div><\/td><td><div class=\"text codecolorer\">1[root@httpd2 httpd]# mkdir tls<br \/>\n2<br \/>\n3<br \/>\n4<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n\n<\/pre>\n<p>2)\u5728\/etc\/pki\/tls\/certs\u76f4\u63a5make\u751f\u6210\u81ea\u7b7e\u8bc1\u4e66\u3002<\/p>\n<pre>\n\n<div class=\"codecolorer-container text solarized-dark language-bash\" style=\"overflow:auto;white-space:nowrap;width:800px;height:300px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/>8<br \/>9<br \/>10<br \/>11<br \/>12<br \/>13<br \/>14<br \/>15<br \/>16<br \/>17<br \/>18<br \/>19<br \/>20<br \/>21<br \/>22<br \/>23<br \/>24<br \/>25<br \/>26<br \/>27<br \/>28<br \/>29<br \/>30<br \/>31<br \/><\/div><\/td><td><div class=\"text codecolorer\">1[root@httpd2 certs]# make ydong.com.crt<br \/>\n2umask 77 ; \\<br \/>\n3\/usr\/bin\/openssl req -utf8 -new -key ydong.com.key -x509 -days 365 -out ydong.com.crt <br \/>\n4Enter pass phrase for ydong.com.key:<br \/>\n5You are about to be asked to enter information that will be incorporated<br \/>\n6into your certificate request.<br \/>\n7What you are about to enter is what is called a Distinguished Name or a DN.<br \/>\n8There are quite a few fields but you can leave some blank<br \/>\n9For some fields there will be a default value,<br \/>\n10If you enter &amp;#x27;.&amp;#x27;, the field will be left blank.<br \/>\n11-----<br \/>\n12Country Name (2 letter code) [XX]:CN<br \/>\n13State or Province Name (full name) []:beijing<br \/>\n14Locality Name (eg, city) [Default City]:beijing<br \/>\n15Organization Name (eg, company) [Default Company Ltd]:ydong.com &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br \/>\n16Organizational Unit Name (eg, section) []:opt<br \/>\n17Common Name (eg, your name or your server&amp;#x27;s hostname) []:www.ydong.com<br \/>\n18Email Address []:<br \/>\n19[root@httpd2 certs]# ll<br \/>\n20total 20<br \/>\n21lrwxrwxrwx. 1 root root &nbsp; 49 Jan 13 23:35 ca-bundle.crt -&amp;gt; \/etc\/pki\/ca-trust\/extracted\/pem\/tls-ca-bundle.pem<br \/>\n22lrwxrwxrwx. 1 root root &nbsp; 55 Jan 13 23:35 ca-bundle.trust.crt -&amp;gt; \/etc\/pki\/ca-trust\/extracted\/openssl\/ca-bundle.trust.crt<br \/>\n23-rwxr-xr-x. 1 root root &nbsp;610 Oct 30 &nbsp;2018 make-dummy-cert<br \/>\n24-rw-r--r--. 1 root root 2516 Oct 30 &nbsp;2018 Makefile<br \/>\n25-rwxr-xr-x. 1 root root &nbsp;829 Oct 30 &nbsp;2018 renew-dummy-cert<br \/>\n26-rw------- &nbsp;1 root root 1330 Apr &nbsp;5 05:04 ydong.com.crt<br \/>\n27-rw------- &nbsp;1 root root 1766 Apr &nbsp;5 05:03 ydong.com.key<br \/>\n28<br \/>\n29<br \/>\n30<br \/>\n31<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n\n<\/pre>\n<p>3\uff09\u5b89\u88c5ssl\u6a21\u5757<\/p>\n<pre>\n\n<div class=\"codecolorer-container text solarized-dark language-bash\" style=\"overflow:auto;white-space:nowrap;width:800px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/><\/div><\/td><td><div class=\"text codecolorer\">1[root@httpd2 certs]# yum install -y mod_ssl<br \/>\n2<br \/>\n3<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n\n<\/pre>\n<p>4\uff09\u5c06crt\u6587\u4ef6\u79fb\u52a8\u5230\/etc\/httpd\/tls\u76ee\u5f55\u4e0b\u3002<\/p>\n<pre>\n\n<div class=\"codecolorer-container text solarized-dark language-bash\" style=\"overflow:auto;white-space:nowrap;width:800px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/><\/div><\/td><td><div class=\"text codecolorer\">1[root@httpd2 certs]# mv ydong.com.* \/etc\/httpd\/tls\/<br \/>\n2<br \/>\n3<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n\n<\/pre>\n<p>5\uff09\u914d\u7f6essl.conf\u6587\u4ef6\uff0c\u4fee\u6539\u4ee5\u4e0b\u4e24\u9879<\/p>\n<pre>\n\n<div class=\"codecolorer-container text solarized-dark language-bash\" style=\"overflow:auto;white-space:nowrap;width:800px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/><\/div><\/td><td><div class=\"text codecolorer\">1SSLCertificateFile \/etc\/httpd\/tls\/ydong.com.crt<br \/>\n2SSLCertificateKeyFile \/etc\/httpd\/tls\/ydong.com.key<br \/>\n3<br \/>\n4<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n\n<\/pre>\n<p>6\uff09\u91cd\u542f\u670d\u52a1<\/p>\n<pre>\n\n<div class=\"codecolorer-container text solarized-dark language-bash\" style=\"overflow:auto;white-space:nowrap;width:800px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/><\/div><\/td><td><div class=\"text codecolorer\">1[root@httpd2 conf.d]# ss -tnl | grep 443<br \/>\n2LISTEN &nbsp; &nbsp; 0 &nbsp; &nbsp; &nbsp;128 &nbsp; &nbsp; &nbsp; &nbsp; :::443 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :::* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br \/>\n3<br \/>\n4<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n\n<\/pre>\n<p>7\uff09\u5728lvs\u7aef\u6dfb\u52a0\u7b56\u7565<\/p>\n<pre>\n\n<div class=\"codecolorer-container text solarized-dark language-bash\" style=\"overflow:auto;white-space:nowrap;width:800px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/>8<br \/>9<br \/>10<br \/>11<br \/>12<br \/>13<br \/><\/div><\/td><td><div class=\"text codecolorer\">1[root@lvs ~]# ipvsadm -A -t 192.168.199.157:443 -s rr<br \/>\n2[root@lvs ~]# ipvsadm -a -t 192.168.199.157:443 -r 192.168.192.131 -m <br \/>\n3[root@lvs ~]# ipvsadm -a -t 192.168.199.157:443 -r 192.168.192.128 -m <br \/>\n4[root@lvs ~]# ipvsadm -Ln<br \/>\n5IP Virtual Server version 1.2.1 (size=4096)<br \/>\n6Prot LocalAddress:Port Scheduler Flags<br \/>\n7 &nbsp;-&amp;gt; RemoteAddress:Port &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Forward Weight ActiveConn InActConn<br \/>\n8TCP &nbsp;192.168.199.157:443 rr<br \/>\n9 &nbsp;-&amp;gt; 192.168.192.128:443 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Masq &nbsp; &nbsp;1 &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; &nbsp; <br \/>\n10 &nbsp;-&amp;gt; 192.168.192.131:443 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Masq &nbsp; &nbsp;1 &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; &nbsp; <br \/>\n11<br \/>\n12<br \/>\n13<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n\n<\/pre>\n<p>8\uff09\u5ba2\u6237\u7aef\u6d4b\u8bd5<\/p>\n<pre>\n\n<div class=\"codecolorer-container text solarized-dark language-bash\" style=\"overflow:auto;white-space:nowrap;width:800px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/><\/div><\/td><td><div class=\"text codecolorer\">1[root@client ~]# curl -k https:\/\/192.168.199.157<br \/>\n2httpd2<br \/>\n3[root@client ~]# curl -k https:\/\/192.168.199.157<br \/>\n4httpd1<br \/>\n5<br \/>\n6<br \/>\n7<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n\n<\/pre>\n<h3>LVS-DR<\/h3>\n<h3>VIP\u548cDIP\u5904\u5728\u540c\u4e00\u7f51\u6bb5\u5b9e\u73b0<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/aqzt.com\/wp-content\/uploads\/20220222103017-62.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><br \/>\n<!-- -->DR\u6a21\u578b\u6709\u4ee5\u4e0b\u51e0\u4e2a\u8981\u70b9\uff1a<\/p>\n<ul>\n<li>VIP\u4ecd\u662f\u516c\u7f51\uff0c\u63a5\u6536\u7528\u6237\u8bf7\u6c42\uff0cRIP\u53ef\u4ee5\u662f\u79c1\u7f51\uff0c\u4e5f\u53ef\u4ee5\u662f\u516c\u7f51\uff0c\u4f46\u662f\u8981\u8ddfDIP\u5728\u540c\u4e00\u6bb5\u7269\u7406\u7f51\u7edc<\/li>\n<li>RS\u4e0a\u914d\u7f6eVIP\uff0c\u5e76\u4e14\u5bf9VIP\u8fdb\u884c\u6291\u5236\u914d\u7f6e\u3002<\/li>\n<li>RIP\u7f51\u5173\u4e0d\u80fd\u6307\u5411DIP<\/li>\n<\/ul>\n<p>\u5173\u4e8e\u6291\u5236vip\u901a\u544a\u548c\u54cd\u5e94\u9700\u8981\u8bbe\u7f6earp_ignore(\u54cd\u5e94)\u548carp_announce(\u901a\u544a)<br \/>\n<img decoding=\"async\" src=\"https:\/\/aqzt.com\/wp-content\/uploads\/20220222103019-13.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><br \/>\n<!-- -->\u9650\u5236\u54cd\u5e94\u7ea7\u522barp_ignore\uff1a<\/p>\n<ul>\n<li>0\uff1a\u9ed8\u8ba4\u503c\uff0c\u8868\u793a\u53ef\u4f7f\u7528\u672c\u5730\u4e0a\u4efb\u610f\u63a5\u53e3\u4e0a\u914d\u7f6e\u7684\u4efb\u610f\u5730\u5740\u8fdb\u884c\u54cd\u5e94\u3002\u610f\u601d\u662f\u4e3b\u673a\u57281.1\u63a5\u53e3\u4e0a\u8bf7\u6c422.1\u7684\u63a5\u53e3\u65f6\uff0c\u4e5f\u4f1a\u7ed9\u4e88\u54cd\u5e94\u3002<\/li>\n<li>1\uff1a\u4ec5\u5728\u8bf7\u6c42\u7684\u76ee\u6807IP\u914d\u7f6e\u5728\u672c\u5730\u4e3b\u673a\u7684\u63a5\u6536\u5230\u8bf7\u6c42\u62a5\u6587\u63a5\u53e3\u4e0a\u65f6\uff0c\u624d\u7ed9\u4e88\u54cd\u5e94\u3002\u610f\u601d\u662f\u4e3b\u673a\u57281.1\u63a5\u53e3\u4e0a\u8bf7\u6c422.1\u7684\u63a5\u53e3\u65f6\uff0c\u4e0d\u7ed9\u4e88\u54cd\u5e94\u3002\u53ea\u6709\u4e3b\u673a\u4eb2\u81ea\u53bb2.2\u63a5\u53e3\u4e0a\u8bf7\u6c42\u624d\u7ed9\u4e88\u54cd\u5e94<\/li>\n<\/ul>\n<p>\u9650\u5236\u901a\u544a\u7ea7\u522barp_announce\uff1a<\/p>\n<ul>\n<li>0\uff1a\u9ed8\u8ba4\u503c\uff0c\u628a\u672c\u673a\u4e0a\u6240\u6709\u63a5\u53e3\u7684\u6240\u6709\u4fe1\u606f\u5411\u6bcf\u4e2a\u63a5\u53e3\u4e0a\u7684\u7f51\u7edc\u8fdb\u884c\u901a\u4fe1\uff0c\u901a\u544a\u6240\u6709\u4e3b\u673a\u4e0a\u672c\u673a\u7684\u7f51\u7edcmac\u3002\u610f\u601d\u662f\u4e3b\u673a\u5373\u4f7f\u53ea\u57281.1\u63a5\u53e3\u4e0a\uff0c\u4f46\u662f\u5b83\u53ef\u4ee5\u83b7\u5f97\u672c\u673a\u6240\u6709\u7684\u7f51\u7edcmac\u5730\u5740\uff0c1.1\u7684mac\uff0c2.1\u7684mac\uff0c3.1\u7684mac\u3002\u5b83\u90fd\u4f1a\u6536\u5230<\/li>\n<li>1\uff1a\u5c3d\u91cf\u907f\u514d\u5411\u975e\u76f4\u63a5\u8fde\u63a5\u7f51\u7edc\u8fdb\u884c\u901a\u544a\uff1b<\/li>\n<li>2\uff1a\u5fc5\u987b\u907f\u514d\u5411\u975e\u672c\u7f51\u7edc\u901a\u544a\uff1b\u610f\u601d\u5c31\u662f1.1\u53ea\u901a\u544a\u7ed9\u8fde\u63a5\u5728\u81ea\u5df1\u63a5\u53e3\u4e0a\u7684\u4e3b\u673a\uff0c\u5176\u5b83\u7684\u4e00\u5f8b\u4e0d\u901a\u544a\u3002<\/li>\n<\/ul>\n<p>\u5728RS\u4e0a\u914d\u7f6eVIP\u65f6\uff0c\u9700\u8981\u5c06\u5b83\u7684\u54cd\u5e94\u8bbe\u7f6e\u4e3a1\uff0c\u901a\u544a\u7ea7\u522b\u8bbe\u7f6e\u62102\u3002<\/p>\n<p>1\uff09\u9996\u5148\u914d\u7f6e\u8def\u7531\u5177\u6709\u8f6c\u53d1\u529f\u80fd<\/p>\n<pre>\n\n<div class=\"codecolorer-container text solarized-dark language-bash\" style=\"overflow:auto;white-space:nowrap;width:800px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/><\/div><\/td><td><div class=\"text codecolorer\">1[root@route ~]# vim \/etc\/sysctl.conf <br \/>\n2<br \/>\n3[root@route ~]# sysctl -p<br \/>\n4net.ipv4.ip_forward = 1<br \/>\n5<br \/>\n6<br \/>\n7<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n\n<\/pre>\n<p>2\uff09\u6d4b\u8bd5\u5ba2\u6237\u7aef\u662f\u5426ping\u901a\u8def\u7531\u7684192\u7f51\u6bb5<\/p>\n<pre>\n\n<div class=\"codecolorer-container text solarized-dark language-bash\" style=\"overflow:auto;white-space:nowrap;width:800px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/>8<br \/>9<br \/>10<br \/>11<br \/>12<br \/><\/div><\/td><td><div class=\"text codecolorer\">1[root@localhost ~]# ping 192.168.192.100<br \/>\n2PING 192.168.192.100 (192.168.192.100) 56(84) bytes of data.<br \/>\n364 bytes from 192.168.192.100: icmp_seq=1 ttl=64 time=0.274 ms<br \/>\n4<br \/>\n5<br \/>\n6\u8de8\u8def\u7531\u8bbf\u95eelvs<br \/>\n7[root@localhost ~]# ping 192.168.192.132<br \/>\n8PING 192.168.192.132 (192.168.192.132) 56(84) bytes of data.<br \/>\n964 bytes from 192.168.192.132: icmp_seq=1 ttl=63 time=0.423 ms &nbsp;#\u53ef\u4ee5\u770b\u5230ttl\u662f63\uff0c\u8bc1\u660e\u8de8\u4e86\u4e00\u4e2a\u8def\u7531\u3002<br \/>\n10<br \/>\n11<br \/>\n12<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n\n<\/pre>\n<p>3\uff09\u5728httpd\u4e3b\u673a\u4e0a\u8bbe\u7f6eVIP\uff0c\u5230\u65f6vip\u4f1a\u7ed1\u5728lo\u56de\u73af\u7f51\u5361\u4e0a<\/p>\n<pre>\n\n<div class=\"codecolorer-container text solarized-dark language-bash\" style=\"overflow:auto;white-space:nowrap;width:800px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/><\/div><\/td><td><div class=\"text codecolorer\">1[root@httpd1 ~]# echo &amp;quot;2&amp;quot; &nbsp;&amp;gt; \/proc\/sys\/net\/ipv4\/conf\/all\/arp_announce<br \/>\n2[root@httpd1 ~]# echo &amp;quot;2&amp;quot; &nbsp;&amp;gt; \/proc\/sys\/net\/ipv4\/conf\/lo\/arp_announce<br \/>\n3[root@httpd1 ~]# echo &amp;quot;1&amp;quot; &amp;gt; \/proc\/sys\/net\/ipv4\/conf\/all\/arp_ignore<br \/>\n4[root@httpd1 ~]# echo &amp;quot;1&amp;quot; &amp;gt; \/proc\/sys\/net\/ipv4\/conf\/lo\/arp_ignore<br \/>\n5<br \/>\n6<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n\n<\/pre>\n<p>4\uff09\u5c06VIP\u5730\u5740\u7ed1\u5b9a\u5728lo\u4e0a<\/p>\n<pre>\n\n<div class=\"codecolorer-container text solarized-dark language-bash\" style=\"overflow:auto;white-space:nowrap;width:800px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/>8<br \/>9<br \/>10<br \/>11<br \/>12<br \/>13<br \/>14<br \/><\/div><\/td><td><div class=\"text codecolorer\">1<br \/>\n2[root@httpd1 ~]# ip address &nbsp;add 192.168.192.132 dev lo<br \/>\n3<br \/>\n4[root@httpd1 ~]# ip a<br \/>\n51: lo: &amp;lt;LOOPBACK,UP,LOWER_UP&amp;gt; mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000<br \/>\n6 &nbsp; &nbsp;link\/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00<br \/>\n7 &nbsp; &nbsp;inet 127.0.0.1\/8 scope host lo<br \/>\n8 &nbsp; &nbsp; &nbsp; valid_lft forever preferred_lft forever<br \/>\n9 &nbsp; &nbsp;inet 192.168.192.132\/32 scope global lo<br \/>\n10 &nbsp; &nbsp; &nbsp; valid_lft forever preferred_lft forever<br \/>\n11 &nbsp; &nbsp;inet6 ::1\/128 scope host <br \/>\n12 &nbsp; &nbsp; &nbsp; valid_lft forever preferred_lft forever<br \/>\n13<br \/>\n14<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n\n<\/pre>\n<p>5\uff09\u5b9a\u5236lvs\u7b56\u7565<\/p>\n<pre>\n\n<div class=\"codecolorer-container text solarized-dark language-bash\" style=\"overflow:auto;white-space:nowrap;width:800px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/>8<br \/>9<br \/>10<br \/><\/div><\/td><td><div class=\"text codecolorer\">1[root@lvs ~]# ipvsadm -Ln<br \/>\n2IP Virtual Server version 1.2.1 (size=4096)<br \/>\n3Prot LocalAddress:Port Scheduler Flags<br \/>\n4 &nbsp;-&amp;gt; RemoteAddress:Port &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Forward Weight ActiveConn InActConn<br \/>\n5TCP &nbsp;192.168.192.134:80 rr<br \/>\n6 &nbsp;-&amp;gt; 192.168.192.131:80 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Route &nbsp; 1 &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;13 &nbsp; &nbsp; &nbsp; &nbsp;<br \/>\n7 &nbsp;-&amp;gt; 192.168.192.133:80 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Route &nbsp; 1 &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;4 &nbsp; &nbsp; &nbsp; <br \/>\n8<br \/>\n9<br \/>\n10<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n\n<\/pre>\n<p>6\uff09client\u6d4b\u8bd5<\/p>\n<pre>\n\n<div class=\"codecolorer-container text solarized-dark language-bash\" style=\"overflow:auto;white-space:nowrap;width:800px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/>8<br \/>9<br \/>10<br \/>11<br \/><\/div><\/td><td><div class=\"text codecolorer\">1[root@client ~]# curl http:\/\/192.168.192.134<br \/>\n2httpd1<br \/>\n3[root@client ~]# curl http:\/\/192.168.192.134<br \/>\n4httpd2<br \/>\n5[root@client ~]# curl http:\/\/192.168.192.134<br \/>\n6httpd1<br \/>\n7[root@client ~]# curl http:\/\/192.168.192.134<br \/>\n8httpd2<br \/>\n9<br \/>\n10<br \/>\n11<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n\n<\/pre>\n<p>PS\uff1a<br \/>\n<!-- -->\u540c\u4e00\u7f51\u6bb5\u7684\u4e3b\u673a\u5176\u5b9e\u6ca1\u592a\u5927\u4f5c\u7528\uff0c\u56e0\u4e3a\u4f60\u53ef\u4ee5\u76f4\u63a5\u8bbf\u95ee\u540e\u7aef\u771f\u6b63\u7684\u670d\u52a1\u5668\uff0c\u6ca1\u5fc5\u8981\u5728\u901a\u8fc7lvs\u591a\u6b21\u4e00\u4e3e\u3002\u4e0a\u8fb9\u6f14\u793a\u6709\u51e0\u4e2a\u5c0f\u95ee\u9898\u3002<\/p>\n<ul>\n<li>LVS\u4e0a\u7684VIP\u4e0d\u662f\u7269\u7406\u7f51\u5361\u4e0a\u7684ip\u5730\u5740\uff0c\u800c\u662f\u5728\u4e00\u5f20\u7269\u7406\u7f51\u5361\u4e0a\u65b0\u6dfb\u52a0\u7684\u5730\u5740\uff0c\u4e24\u5f20\u7269\u7406\u7f51\u5361\u7684\u8bdd\uff0c\u5728real server\u4e0a\u6dfb\u52a0VIP\u65f6\uff0c\u53ef\u80fd\u4f1a\u5bfc\u81f4lvs\u4e0a\u4f1a\u51fa\u73b0\u6ca1\u6709\u5230\u4e3b\u673a\u8def\u7531\u7684\u60c5\u51b5\u3002\u4ece\u800c\u5bfc\u81f4\u8bbf\u95ee\u5931\u8d25\u3002<\/li>\n<li>Real Server\u7684\u7f51\u7ba1\u5e94\u8be5\u6307\u5411route\uff0c\u800clvs\u7684\u7f51\u5173\u53ef\u4ee5\u968f\u610f\u6307\u5411\u3002\u4ec5\u9650\u540c\u4e00\u7f51\u6bb5\u3002\u56e0\u4e3a\u8fd4\u56de\u7684\u62a5\u6587\u662f\u4e0d\u7ecf\u8fc7lvs\u7684\u3002<\/li>\n<\/ul>\n<h3>VIP\u548cDIP\u4e0d\u5904\u5728\u540c\u4e00\u7f51\u6bb5\u5b9e\u73b0<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/aqzt.com\/wp-content\/uploads\/20220222103021-66.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><br \/>\n<!-- -->1\uff09\u914d\u7f6e\u5404\u4e3b\u673a\u7684ip\u5730\u5740\u4ee5\u53ca\u7f51\u5173\u6307\u5411\uff0c\u6d4b\u8bd5client\u7aef\u662f\u5426\u80fdping\u901alvs\u7684VIP\u3002<\/p>\n<pre>\n\n<div class=\"codecolorer-container text solarized-dark language-bash\" style=\"overflow:auto;white-space:nowrap;width:800px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/><\/div><\/td><td><div class=\"text codecolorer\">1[root@client ~]# ping 192.168.192.132<br \/>\n2PING 192.168.192.132 (192.168.192.132) 56(84) bytes of data.<br \/>\n364 bytes from 192.168.192.132: icmp_seq=1 ttl=63 time=0.328 ms<br \/>\n4#ttl=63\uff0c\u8bc1\u660e\u662f\u8de8\u8def\u7531\u4e86<br \/>\n5<br \/>\n6<br \/>\n7<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n\n<\/pre>\n<p>2\uff09\u5bf9\u540e\u7aefreal server\u8fdb\u884c\u6291\u5236arp\u5e7f\u64ad<\/p>\n<pre>\n\n<div class=\"codecolorer-container text solarized-dark language-bash\" style=\"overflow:auto;white-space:nowrap;width:800px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/><\/div><\/td><td><div class=\"text codecolorer\">1[root@httpd1 ~]# echo &amp;quot;1&amp;quot; &amp;gt; \/proc\/sys\/net\/ipv4\/conf\/lo\/arp_ignore<br \/>\n2[root@httpd1 ~]# echo &amp;quot;1&amp;quot; &amp;gt; \/proc\/sys\/net\/ipv4\/conf\/all\/arp_ignore<br \/>\n3[root@httpd1 ~]# echo &amp;quot;2&amp;quot; &amp;gt; \/proc\/sys\/net\/ipv4\/conf\/lo\/arp_announce <br \/>\n4[root@httpd1 ~]# echo &amp;quot;2&amp;quot; &amp;gt; \/proc\/sys\/net\/ipv4\/conf\/all\/arp_announce <br \/>\n5<br \/>\n6<br \/>\n7<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n\n<\/pre>\n<p>3\uff09\u5728real server\u4e0a\u6dfb\u52a0vip\u5730\u5740<\/p>\n<pre>\n\n<div class=\"codecolorer-container text solarized-dark language-bash\" style=\"overflow:auto;white-space:nowrap;width:800px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/><\/div><\/td><td><div class=\"text codecolorer\">1[root@httpd1 ~]# ip a a 192.168.192.132\/32 dev lo<br \/>\n2<br \/>\n3<br \/>\n4<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n\n<\/pre>\n<p>4\uff09\u914d\u7f6elvs\u670d\u52a1\u5668<\/p>\n<pre>\n\n<div class=\"codecolorer-container text solarized-dark language-bash\" style=\"overflow:auto;white-space:nowrap;width:800px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/>8<br \/>9<br \/>10<br \/><\/div><\/td><td><div class=\"text codecolorer\">1[root@lvs ~]# ipvsadm -Ln<br \/>\n2IP Virtual Server version 1.2.1 (size=4096)<br \/>\n3Prot LocalAddress:Port Scheduler Flags<br \/>\n4 &nbsp;-&amp;gt; RemoteAddress:Port &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Forward Weight ActiveConn InActConn<br \/>\n5TCP &nbsp;192.168.192.132:80 wrr<br \/>\n6 &nbsp;-&amp;gt; 172.16.0.101:80 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Route &nbsp; 2 &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; &nbsp; <br \/>\n7 &nbsp;-&amp;gt; 172.16.0.102:80 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Route &nbsp; 1 &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br \/>\n8<br \/>\n9<br \/>\n10<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n\n<\/pre>\n<p>5\uff09\u6d4b\u8bd5<\/p>\n<pre>\n\n<div class=\"codecolorer-container text solarized-dark language-bash\" style=\"overflow:auto;white-space:nowrap;width:800px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/>8<br \/>9<br \/>10<br \/>11<br \/>12<br \/>13<br \/>14<br \/>15<br \/>16<br \/>17<br \/><\/div><\/td><td><div class=\"text codecolorer\">1[root@client ~]# curl http:\/\/192.168.192.132<br \/>\n2httpd2<br \/>\n3[root@client ~]# curl http:\/\/192.168.192.132<br \/>\n4httpd1<br \/>\n5[root@client ~]# curl http:\/\/192.168.192.132<br \/>\n6httpd1<br \/>\n7[root@client ~]# curl http:\/\/192.168.192.132<br \/>\n8httpd2<br \/>\n9[root@client ~]# curl http:\/\/192.168.192.132<br \/>\n10httpd1<br \/>\n11[root@client ~]# curl http:\/\/192.168.192.132<br \/>\n12httpd1<br \/>\n13[root@client ~]# curl http:\/\/192.168.192.132<br \/>\n14httpd2<br \/>\n15<br \/>\n16<br \/>\n17<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n\n<\/pre>\n<p>PS<\/p>\n<ul>\n<li>RIP\u7684\u7f51\u5173\u5e94\u8be5\u6307\u5411route\u7684172\u5730\u5740\u6bb5\u3002<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>LVS\u8d1f\u8f7d\u5747\u8861 Linux cluster LVS LVS\u4f53\u7cfb\u7ed3\u6784 LVS\u96c6\u7fa4\u7c7b\u578b\u4ee5\u53ca\u8c03\u5ea6\u7b97\u6cd5 * LVS-NAT * LVS-DR * LVS-tun * LVS-fullnat * LVS\u8c03\u5ea6\u7b97\u6cd5 121 &nbsp;* ipvsadm 2 lvs-nat \u5b9e\u73b0NAT\u7c7b\u578b\u7684https\u8bbf\u95ee 121 &nbsp; &nbsp; &nbsp;* LVS-DR 2 VIP\u548cDIP\u5904\u5728\u540c\u4e00\u7f51\u6bb5\u5b9e\u73b0 * VIP\u548cDIP\u4e0d\u5904\u5728\u540c\u4e00\u7f51\u6bb5\u5b9e\u73b0 Linux cluster Linux\u96c6\u7fa4\u7b80\u5355\u6765\u8bf4\u5c31\u662f\u90e8\u7f72\u8bb8\u591a\u8ba1\u7b97\u673a(\u670d\u52a1\u5668)\u6765\u5171\u540c\u534f<\/p>\n","protected":false},"author":1,"featured_media":25435,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"categories":[2],"tags":[292,17,390,26,200,498,534,21,10,15,22,500,190,16],"collection":[],"_links":{"self":[{"href":"https:\/\/aqzt.com\/wp-json\/wp\/v2\/posts\/25467"}],"collection":[{"href":"https:\/\/aqzt.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aqzt.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aqzt.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/aqzt.com\/wp-json\/wp\/v2\/comments?post=25467"}],"version-history":[{"count":0,"href":"https:\/\/aqzt.com\/wp-json\/wp\/v2\/posts\/25467\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/aqzt.com\/wp-json\/wp\/v2\/media\/25435"}],"wp:attachment":[{"href":"https:\/\/aqzt.com\/wp-json\/wp\/v2\/media?parent=25467"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aqzt.com\/wp-json\/wp\/v2\/categories?post=25467"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aqzt.com\/wp-json\/wp\/v2\/tags?post=25467"},{"taxonomy":"collection","embeddable":true,"href":"https:\/\/aqzt.com\/wp-json\/wp\/v2\/collection?post=25467"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}