{"id":209735,"date":"2020-11-29T06:02:47","date_gmt":"2020-11-28T22:02:47","guid":{"rendered":"http:\/\/4563.org\/?p=209735"},"modified":"2020-11-29T06:02:47","modified_gmt":"2020-11-28T22:02:47","slug":"%e8%af%b7%e9%97%ae-kvm-%e8%99%9a%e6%8b%9f%e6%9c%ba%e9%80%9a%e8%bf%87%e6%a1%a5%e6%8e%a5%e6%96%b9%e5%bc%8f%e5%85%b1%e4%ba%ab%e4%bd%bf%e7%94%a8%e7%bd%91%e5%8d%a1%e7%89%a9%e7%90%86%e6%98%af%e5%9c%a8","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=209735","title":{"rendered":"\u8bf7\u95ee KVM \u865a\u62df\u673a\u901a\u8fc7\u6865\u63a5\u65b9\u5f0f\u5171\u4eab\u4f7f\u7528\u7f51\u5361\u7269\u7406\u662f\u5728\u4e00\u4e2a\u51b2\u7a81\u57df\u5417?"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u8bf7\u95ee KVM \u865a\u62df\u673a\u901a\u8fc7\u6865\u63a5\u65b9\u5f0f\u5171\u4eab\u4f7f\u7528\u7f51\u5361\u7269\u7406\u662f\u5728\u4e00\u4e2a\u51b2\u7a81\u57df\u5417?               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : cxh116 <\/span>  <span><i><\/i> 0<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u591a\u53f0\u865a\u62df\u673a\u4f7f\u7528\u4e00\u5f20\u7269\u7406\u7f51\u5361\u65f6,\u4e00\u53f0\u865a\u62df\u673a\u5728\u53d1\u5305\u65f6,\u53e6\u5916\u4e00\u53f0\u4f1a\u6682\u505c\u53d1\u5305\u5417? \u8fd8\u6709\u4ec0\u4e48\u673a\u5236\u4f1a\u5904\u7406\u8fd9\u79cd\u51b2\u7a81?<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>10<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"4358331\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : XiaoxiaoPu <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e0d\u80fd\u591a\u4e2a\u865a\u62df\u673a\u4f7f\u7528\u4e00\u4e2a\u7f51\u5361\u5427\uff1f\u6211\u731c\u4f60\u7684\u610f\u601d\u662f\u6bcf\u4e2a\u865a\u62df\u673a\u90fd\u8ddf\u7269\u7406\u7f51\u5361\u6865\u63a5\uff1f\u5982\u679c\u662f\u8fd9\u4e2a\u610f\u601d\uff0c\u90a3\u4e48\u76f8\u5f53\u4e8e\u6bcf\u4e2a\u865a\u62df\u673a\u7684\u7f51\u5361\u90fd\u901a\u8fc7\u865a\u62df\u4ea4\u6362\u673a\u4e0e\u7269\u7406\u7f51\u5361\u901a\u4fe1\uff0c\u56e0\u4e3a\u6709\u4ea4\u6362\u673a\uff0c\u6240\u4ee5\u4e0d\u5728\u4e00\u4e2a\u51b2\u7a81\u57df\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4358332\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : cxh116 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @XiaoxiaoPu \u662f\u7684.\u662f\u6bcf\u4e2a\u865a\u62df\u673a\u90fd\u8ddf\u7269\u7406\u7f51\u5361\u6865\u63a5\u8fd9\u79cd\u60c5\u51b5.<\/p>\n<p>\u4f46\u8fd9\u51e0\u5f20\u865a\u62df\u7f51\u5361\u90fd\u662f\u8ddf\u4e00\u4e2a\u4ea4\u6362\u673a\u7684\u7269\u7406\u7aef\u53e3\u901a\u4fe1,\u8fd9\u6837\u770b\u8d77\u6765\u50cf\u662f\u4e00\u4e2a\u51b2\u7a81\u57df?<br \/>\u8fd8\u662f\u8bf4\u5728\u6865\u63a5\u8f6f\u4ef6\u90e8\u5206,\u6709\u505a\u51b2\u7a81\u9694\u79bb?                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4358333\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : zhangsanfeng2012 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             linux bridge \u662f\u7c7b\u4f3c\u4ea4\u6362\u673a\u7684\u529f\u80fd\uff0c\u4e0d\u662f hub                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4358334\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : jim9606 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u865a\u62df\u673a\u7528\u7684\u865a\u62df\u7f51\u5361\u9ed8\u8ba4\u662f macvtap+bridge\uff0cHost \u5185\u6838\u7528 CPU \u5904\u7406\u5305\u4ea4\u6362\u7684\u4e8b\u52a1\uff0c\u7269\u7406\u7f51\u5361\u5de5\u4f5c\u5728\u6df7\u6742\u6a21\u5f0f\u3002<br \/>\u5982\u679c\u662f\u7528 NAT \u8f6c\u53d1\uff0cHost \u5185\u6838\u540c\u6837\u8981\u4f7f\u7528 CPU \u4ecb\u5165 NAT \u4e8b\u52a1\uff0c\u4e0d\u8fc7\u7269\u7406\u7f51\u5361\u5c31\u4e0d\u9700\u8981\u6df7\u6742\u6a21\u5f0f\u4e86\u3002<br \/>\u5982\u679c\u60f3\u63d0\u9ad8\u6027\u80fd\uff0c\u53ef\u4ee5\u7528\u7f51\u5361\u7684 SR-IOV\uff0c\u9700\u8981 Guest \u5b89\u88c5\u4e13\u7528 VF \u9a71\u52a8\uff0c\u7f51\u5361\u81ea\u884c\u5904\u7406\u4ea4\u6362\u4e8b\u52a1\uff0cCPU \u57fa\u672c\u4e0d\u4ecb\u5165\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4358335\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : cxh116 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @jim9606 \u7528 ip a \u547d\u4ee4,\u770b\u4e86\u7269\u7406\u7f51\u5361\u548c\u6865\u63a5\u521b\u5efa\u7684\u5bbf\u4e3b\u673a\u7684\u865a\u62df\u7f51\u5361\u597d\u50cf\u90fd\u6ca1\u6709\u5728\u6df7\u6742\u6a21\u5f0f\u4e0b.<\/p>\n<p>&lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt;<\/p>\n<p>\u6ca1\u6709\u770b\u5230 PROMISC                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4358336\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : billlee <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u73b0\u5728\u7684\u6709\u7ebf\u4ee5\u592a\u7f51\u90fd\u662f\u4f7f\u7528\u53cc\u7ede\u7ebf \/\u5149\u7ea4 + \u4ea4\u6362\u673a\u4e86\uff0cCSMA\/CD \u5df2\u7ecf\u6ca1\u7528\u4e86\uff0c\u4e0d\u5b58\u5728\u51b2\u7a81\u57df\u7684\u6982\u5ff5\u3002<\/p>\n<p>\u6709\u7ebf\u4ee5\u592a\u7f51\u9700\u8981 CSMA\/CD \u90a3\u662f\u4ee5\u524d\u4f7f\u7528\u540c\u8f74\u7535\u7f06\u7684\u65f6\u4ee3\u7684\u4e8b\u60c5\u4e86\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4358337\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : moln <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e0d\u5728\uff0c\u865a\u62df\u4ea4\u6362\u673a                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4358338\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : jim9606 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @cxh116 <br \/>\u786e\u5b9e\u6211\u641e\u9519\u4e86\uff0c\u6ca1\u6709\u7528 PROMISC \u3002<br \/>\u51b2\u7a81\u7684\u5b9a\u4e49\u6211\u67e5\u4e86\u4e0b\u662f\u91c7\u7528\u5171\u4eab\u4ecb\u8d28\u901a\u4fe1\u65f6\u901a\u8fc7 CSMA\/CD \u907f\u514d\u540c\u4e00\u4ecb\u8d28\u4e0b\u7684\u4e24\u4e2a NIC \u540c\u65f6\u4f7f\u7528\u4ecb\u8d28\u53d1\u9001\u6570\u636e\u3002<br \/>\u8fd9\u73a9\u610f\u53ea\u6709\u7269\u7406\u4ecb\u8d28\uff08\u53cc\u7ede\u7ebf\u3001\u540c\u8f74\u7535\u7f06\uff09\u65f6\u9700\u8981\u5427\uff0c\u865a\u62df\u7f51\u5361\u548c\u7f51\u6865\u53ea\u662f\u5185\u6838\u4e2d\u7684\u6570\u636e\u7ed3\u6784\uff0c\u4e0d\u9700\u8981\u5904\u7406\u8fd9\u4e9b PHY \u5c42\u624d\u5b58\u5728\u7684\u95ee\u9898\u5427\u3002<br \/>\u4f8b\u5982\u4e24\u4e2a VM \u901a\u8fc7\u865a\u62df\u7f51\u6865\u4f7f\u7528\u540c\u4e00\u4e2a\u7269\u7406\u7f51\u5361\u53d1\u5305\uff0cHost \u5185\u6838\u7f51\u7edc\u6808\u5904\u7406\u5b8c\u8fd9\u4e24\u4e2a\u5e27\u4e4b\u540e\u518d\u63d2\u5165\u7269\u7406\u7f51\u5361\u7684 TX Queue \u4e2d\uff0c\u7269\u7406\u7f51\u5361\u7684\u5904\u7406\u5668\u5e76\u4e0d\u77e5\u9053\u8fd9\u4e9b\u5e27\u662f\u4ece\u54ea\u6765\u7684\uff0c\u53ea\u662f\u6309\u7167 Queue \u7684\u987a\u5e8f\u53d1\u9001\u51fa\u53bb\u7f62\u4e86\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4358339\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : jim9606 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u81f3\u4e8e\u6865\u63a5\u81f3\u540c\u4e00\u4e2a\u7269\u7406\u7f51\u5361(lower device)\u7684\u591a\u4e2a\u865a\u62df\u7f51\u5361\uff08 upper device \uff09\u80fd\u4e0d\u80fd\u4e92\u901a\u7684\u95ee\u9898\uff0c\u53d6\u51b3\u4e8e\u5de5\u4f5c\u6a21\u5f0f\u3002<\/p>\n<p>\u53c2\u8003\u81ea\u8fd9\u7bc7\u535a\u6587\uff08 https:\/\/suhu0426.github.io\/Web\/Presentation\/20150120\/index.html \uff09<\/p>\n<p>VEPA \u6a21\u5f0f\u4e0b upper device \u7684\u5e27\u4f1a\u901a\u8fc7 lower device \u53d1\u9001\u51fa\u53bb\uff0c\u5982\u679c\u8981\u6298\u8fd4\uff08\u4e5f\u5c31\u662f VM \u95f4\u901a\u4fe1\uff09\uff0c\u9700\u8981\u5916\u90e8 switch \u6216\u8005 router \u8f6c\u53d1\uff0c\u9664\u975e lower device \u652f\u6301 hairpin mode \u3002<\/p>\n<p>\u5982\u679c\u662f bridge \u6a21\u5f0f\uff0cHost \u7684\u7f51\u7edc\u6808\u4f1a\u8f6c\u53d1 upper device \u95f4\u901a\u4fe1\u7684\u5e27\u800c\u4e0d\u4f1a\u5230\u8fbe lower device\uff0c\u901a\u5e38\u90fd\u662f\u7528\u8fd9\u4e2a\u6a21\u5f0f\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4358340\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : julyclyde <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u51b2\u7a81\u57df\u9700\u8981\u4e00\u4e2a\u201c\u516c\u7528\u4ecb\u8d28\u201d<br \/>\u73b0\u4ee3\u793e\u4f1a\u5f88\u5357\u6784\u9020\u51fa\u51b2\u7a81\u57df\u4e86\u3002\u5982\u679c\u4f60\u660e\u786e\u77e5\u9053\uff0c\u90a3\u5c31\u662f\uff1b\u5982\u679c\u4f60\u95ee\uff0c\u57fa\u672c\u4e0a\u90fd\u4e0d\u662f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u8bf7\u95ee KVM \u865a\u62df\u673a\u901a\u8fc7\u6865\u63a5\u65b9\u5f0f\u5171&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/209735"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=209735"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/209735\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=209735"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=209735"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=209735"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}