{"id":182,"date":"2016-06-03T13:51:16","date_gmt":"2016-06-03T13:51:16","guid":{"rendered":""},"modified":"2016-06-03T13:51:16","modified_gmt":"2016-06-03T13:51:16","slug":"","status":"publish","type":"post","link":"http:\/\/weizn.net\/?p=182","title":{"rendered":"[\u8f6c]Linux\u4e0a\u7684\u57fa\u7840\u7f51\u7edc\u8bbe\u5907\u8be6\u89e3"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_17 counter-hierarchy\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\">\u76ee\u5f55<\/p>\n<span class=\"ez-toc-title-toggle\"><a class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" style=\"display: none;\"><i class=\"ez-toc-glyphicon ez-toc-icon-toggle\"><\/i><\/a><\/span><\/div>\n<nav><ul class=\"ez-toc-list ez-toc-list-level-1\"><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-1\" href=\"http:\/\/weizn.net\/?p=182\/#%E7%9B%B8%E5%85%B3%E7%BD%91%E7%BB%9C%E8%AE%BE%E5%A4%87%E5%B7%A5%E4%BD%9C%E5%8E%9F%E7%90%86\" title=\"\n\t\u76f8\u5173\u7f51\u7edc\u8bbe\u5907\u5de5\u4f5c\u539f\u7406 \n\">\n\t\u76f8\u5173\u7f51\u7edc\u8bbe\u5907\u5de5\u4f5c\u539f\u7406 \n<\/a><ul class=\"ez-toc-list-level-3\"><li class=\"ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-2\" href=\"http:\/\/weizn.net\/?p=182\/#Bridge\" title=\"\n\tBridge \n\">\n\tBridge \n<\/a><ul class=\"ez-toc-list-level-5\"><li class=\"ez-toc-heading-level-5\"><ul class=\"ez-toc-list-level-5\"><li class=\"ez-toc-heading-level-5\"><a class=\"ez-toc-link ez-toc-heading-3\" href=\"http:\/\/weizn.net\/?p=182\/#%E5%9B%BE_1Bridge_%E8%AE%BE%E5%A4%87%E5%B7%A5%E4%BD%9C%E8%BF%87%E7%A8%8B\" title=\"\n\t\u56fe 1.Bridge \u8bbe\u5907\u5de5\u4f5c\u8fc7\u7a0b \n\">\n\t\u56fe 1.Bridge \u8bbe\u5907\u5de5\u4f5c\u8fc7\u7a0b \n<\/a><\/li><\/ul><\/li><\/ul><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-4\" href=\"http:\/\/weizn.net\/?p=182\/#VLAN_device_for_8021q\" title=\"\n\tVLAN device for 802.1.q \n\">\n\tVLAN device for 802.1.q \n<\/a><ul class=\"ez-toc-list-level-5\"><li class=\"ez-toc-heading-level-5\"><ul class=\"ez-toc-list-level-5\"><li class=\"ez-toc-heading-level-5\"><a class=\"ez-toc-link ez-toc-heading-5\" href=\"http:\/\/weizn.net\/?p=182\/#%E5%9B%BE_2_VLAN_%E8%AE%BE%E5%A4%87%E5%B7%A5%E4%BD%9C%E8%BF%87%E7%A8%8B\" title=\"\n\t\u56fe 2 .VLAN \u8bbe\u5907\u5de5\u4f5c\u8fc7\u7a0b \n\">\n\t\u56fe 2 .VLAN \u8bbe\u5907\u5de5\u4f5c\u8fc7\u7a0b \n<\/a><\/li><\/ul><\/li><\/ul><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-6\" href=\"http:\/\/weizn.net\/?p=182\/#TAP_%E8%AE%BE%E5%A4%87%E4%B8%8E_VETH_%E8%AE%BE%E5%A4%87\" title=\"\n\tTAP \u8bbe\u5907\u4e0e VETH \u8bbe\u5907 \n\">\n\tTAP \u8bbe\u5907\u4e0e VETH \u8bbe\u5907 \n<\/a><ul class=\"ez-toc-list-level-5\"><li class=\"ez-toc-heading-level-5\"><ul class=\"ez-toc-list-level-5\"><li class=\"ez-toc-heading-level-5\"><a class=\"ez-toc-link ez-toc-heading-7\" href=\"http:\/\/weizn.net\/?p=182\/#%E5%9B%BE_3_TAP_%E8%AE%BE%E5%A4%87%E5%92%8C_VETH_%E8%AE%BE%E5%A4%87%E5%B7%A5%E4%BD%9C%E8%BF%87%E7%A8%8B\" title=\"\n\t\u56fe 3 .TAP \u8bbe\u5907\u548c VETH \u8bbe\u5907\u5de5\u4f5c\u8fc7\u7a0b \n\">\n\t\u56fe 3 .TAP \u8bbe\u5907\u548c VETH \u8bbe\u5907\u5de5\u4f5c\u8fc7\u7a0b \n<\/a><\/li><\/ul><\/li><\/ul><\/li><\/ul><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-8\" href=\"http:\/\/weizn.net\/?p=182\/#%E7%BD%91%E7%BB%9C%E8%AE%BE%E7%BD%AE%E4%B8%BE%E4%BE%8B%E8%AF%B4%E6%98%8E\" title=\"\n\t\u7f51\u7edc\u8bbe\u7f6e\u4e3e\u4f8b\u8bf4\u660e \n\">\n\t\u7f51\u7edc\u8bbe\u7f6e\u4e3e\u4f8b\u8bf4\u660e \n<\/a><ul class=\"ez-toc-list-level-3\"><li class=\"ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-9\" href=\"http:\/\/weizn.net\/?p=182\/#%E4%BB%8E_vlan100_%E5%AD%90%E8%AE%BE%E5%A4%87%E5%8F%91%E9%80%81_ARP_%E6%8A%A5%E6%96%87\" title=\"\n\t\u4ece vlan100 \u5b50\u8bbe\u5907\u53d1\u9001 ARP \u62a5\u6587 \n\">\n\t\u4ece vlan100 \u5b50\u8bbe\u5907\u53d1\u9001 ARP \u62a5\u6587 \n<\/a><ul class=\"ez-toc-list-level-5\"><li class=\"ez-toc-heading-level-5\"><ul class=\"ez-toc-list-level-5\"><li class=\"ez-toc-heading-level-5\"><a class=\"ez-toc-link ez-toc-heading-10\" href=\"http:\/\/weizn.net\/?p=182\/#%E5%9B%BE_4_ARP_from_vlan100_child_device\" title=\"\n\t\u56fe 4 .ARP from vlan100 child device \n\">\n\t\u56fe 4 .ARP from vlan100 child device \n<\/a><\/li><\/ul><\/li><\/ul><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-11\" href=\"http:\/\/weizn.net\/?p=182\/#%E4%BB%8E_vlan200_%E5%AD%90%E8%AE%BE%E5%A4%87%E5%8F%91%E9%80%81_ARP_%E6%8A%A5%E6%96%87\" title=\"\n\t\u4ece vlan200 \u5b50\u8bbe\u5907\u53d1\u9001 ARP \u62a5\u6587 \n\">\n\t\u4ece vlan200 \u5b50\u8bbe\u5907\u53d1\u9001 ARP \u62a5\u6587 \n<\/a><ul class=\"ez-toc-list-level-5\"><li class=\"ez-toc-heading-level-5\"><ul class=\"ez-toc-list-level-5\"><li class=\"ez-toc-heading-level-5\"><a class=\"ez-toc-link ez-toc-heading-12\" href=\"http:\/\/weizn.net\/?p=182\/#%E5%9B%BE_5_ARP_from_vlan200_child_device\" title=\"\n\t\u56fe 5 .ARP from vlan200 child device \n\">\n\t\u56fe 5 .ARP from vlan200 child device \n<\/a><\/li><\/ul><\/li><\/ul><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-13\" href=\"http:\/\/weizn.net\/?p=182\/#%E4%BB%8E%E4%B8%AD%E5%BF%83_bridge_%E5%8F%91%E9%80%81_ARP_%E6%8A%A5%E6%96%87\" title=\"\n\t\u4ece\u4e2d\u5fc3 bridge \u53d1\u9001 ARP \u62a5\u6587 \n\">\n\t\u4ece\u4e2d\u5fc3 bridge \u53d1\u9001 ARP \u62a5\u6587 \n<\/a><ul class=\"ez-toc-list-level-5\"><li class=\"ez-toc-heading-level-5\"><ul class=\"ez-toc-list-level-5\"><li class=\"ez-toc-heading-level-5\"><a class=\"ez-toc-link ez-toc-heading-14\" href=\"http:\/\/weizn.net\/?p=182\/#%E5%9B%BE_5_ARP_from_central_bridge\" title=\"\n\t\u56fe 5 .ARP from central bridge \n\">\n\t\u56fe 5 .ARP from central bridge \n<\/a><\/li><\/ul><\/li><\/ul><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-15\" href=\"http:\/\/weizn.net\/?p=182\/#%E4%BB%8E%E5%A4%96%E9%83%A8%E7%BD%91%E7%BB%9C%E5%90%91%E7%89%A9%E7%90%86%E7%BD%91%E5%8D%A1%E5%8F%91%E9%80%81_ARPvlan200_%E6%8A%A5%E6%96%87\" title=\"\n\t\u4ece\u5916\u90e8\u7f51\u7edc\u5411\u7269\u7406\u7f51\u5361\u53d1\u9001 ARP@vlan200 \u62a5\u6587 \n\">\n\t\u4ece\u5916\u90e8\u7f51\u7edc\u5411\u7269\u7406\u7f51\u5361\u53d1\u9001 ARP@vlan200 \u62a5\u6587 \n<\/a><ul class=\"ez-toc-list-level-5\"><li class=\"ez-toc-heading-level-5\"><ul class=\"ez-toc-list-level-5\"><li class=\"ez-toc-heading-level-5\"><a class=\"ez-toc-link ez-toc-heading-16\" href=\"http:\/\/weizn.net\/?p=182\/#%E5%9B%BE_6_ARP_from_external_network\" title=\"\n\t\u56fe 6 .ARP from external network \n\">\n\t\u56fe 6 .ARP from external network \n<\/a><\/li><\/ul><\/li><\/ul><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-17\" href=\"http:\/\/weizn.net\/?p=182\/#%E4%BB%8E_TAP_%E8%AE%BE%E5%A4%87%E4%BB%A5_ping_%E6%96%B9%E5%BC%8F%E5%8F%91%E9%80%81_ARP\" title=\"\n\t\u4ece TAP \u8bbe\u5907\u4ee5 ping \u65b9\u5f0f\u53d1\u9001 ARP \n\">\n\t\u4ece TAP \u8bbe\u5907\u4ee5 ping \u65b9\u5f0f\u53d1\u9001 ARP \n<\/a><ul class=\"ez-toc-list-level-5\"><li class=\"ez-toc-heading-level-5\"><ul class=\"ez-toc-list-level-5\"><li class=\"ez-toc-heading-level-5\"><a class=\"ez-toc-link ez-toc-heading-18\" href=\"http:\/\/weizn.net\/?p=182\/#%E5%9B%BE_7_ping_from_TAP_device\" title=\"\n\t\u56fe 7 .ping from TAP device \n\">\n\t\u56fe 7 .ping from TAP device \n<\/a><\/li><\/ul><\/li><\/ul><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-19\" href=\"http:\/\/weizn.net\/?p=182\/#%E4%BB%A5%E6%96%87%E4%BB%B6%E6%93%8D%E4%BD%9C%E6%96%B9%E5%BC%8F%E4%BB%8E_TAP_%E8%AE%BE%E5%A4%87%E5%8F%91%E9%80%81%E6%8A%A5%E6%96%87\" title=\"\n\t\u4ee5\u6587\u4ef6\u64cd\u4f5c\u65b9\u5f0f\u4ece TAP \u8bbe\u5907\u53d1\u9001\u62a5\u6587 \n\">\n\t\u4ee5\u6587\u4ef6\u64cd\u4f5c\u65b9\u5f0f\u4ece TAP \u8bbe\u5907\u53d1\u9001\u62a5\u6587 \n<\/a><ul class=\"ez-toc-list-level-5\"><li class=\"ez-toc-heading-level-5\"><ul class=\"ez-toc-list-level-5\"><li class=\"ez-toc-heading-level-5\"><a class=\"ez-toc-link ez-toc-heading-20\" href=\"http:\/\/weizn.net\/?p=182\/#%E5%9B%BE_8_file_operation_on_TAP_device\" title=\"\n\t\u56fe 8 .file operation on TAP device \n\">\n\t\u56fe 8 .file operation on TAP device \n<\/a><\/li><\/ul><\/li><\/ul><\/li><\/ul><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-21\" href=\"http:\/\/weizn.net\/?p=182\/#Linux_%E4%B8%8A%E9%85%8D%E7%BD%AE%E7%BD%91%E7%BB%9C%E8%AE%BE%E5%A4%87%E5%91%BD%E4%BB%A4%E4%B8%BE%E4%BE%8B\" title=\"\n\tLinux \u4e0a\u914d\u7f6e\u7f51\u7edc\u8bbe\u5907\u547d\u4ee4\u4e3e\u4f8b \n\">\n\tLinux \u4e0a\u914d\u7f6e\u7f51\u7edc\u8bbe\u5907\u547d\u4ee4\u4e3e\u4f8b \n<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-22\" href=\"http:\/\/weizn.net\/?p=182\/#%E5%B0%8F%E7%BB%93\" title=\"\n\t\u5c0f\u7ed3 \n\">\n\t\u5c0f\u7ed3 \n<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-23\" href=\"http:\/\/weizn.net\/?p=182\/#%E5%8F%82%E8%80%83%E8%B5%84%E6%96%99\" title=\"\n\t\u53c2\u8003\u8d44\u6599 \n\">\n\t\u53c2\u8003\u8d44\u6599 \n<\/a><ul class=\"ez-toc-list-level-3\"><li class=\"ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-24\" href=\"http:\/\/weizn.net\/?p=182\/#%E5%AD%A6%E4%B9%A0\" title=\"\n\t\u5b66\u4e60 \n\">\n\t\u5b66\u4e60 \n<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<p style=\"text-indent:2em;\">\n\t<span style=\"font-size:16px;line-height:19.2px;text-indent:2em;\">\u62bd\u8c61\u7f51\u7edc\u8bbe\u5907\u7684\u539f\u7406\u53ca\u4f7f\u7528<\/span>\n<\/p>\n<p style=\"text-indent:2em;\">\n\t\n<\/p>\n<p style=\"margin-top:0px;margin-bottom:0px;padding:0px 0px 10px;border:0px;outline:0px;vertical-align:baseline;width:620px;line-height:1.3em;text-indent:2em;\">\n\t<span style=\"font-size:16px;\">\u7f51\u7edc\u865a\u62df\u5316\u662f Cloud \u4e2d\u7684\u4e00\u4e2a\u91cd\u8981\u90e8\u5206\u3002\u4f5c\u4e3a\u57fa\u7840\u77e5\u8bc6\uff0c\u672c\u6587\u8be6\u7ec6\u8bb2\u8ff0 Linux \u62bd\u8c61\u51fa\u6765\u7684\u5404\u79cd\u7f51\u7edc\u8bbe\u5907\u7684\u539f\u7406\u3001\u7528\u6cd5\u3001\u6570\u636e\u6d41\u5411\u3002\u60a8\u901a\u8fc7\u6b64\u6587\uff0c\u80fd\u591f\u77e5\u9053\u5982\u4f55\u4f7f\u7528 Linux \u7684\u57fa\u7840\u7f51\u7edc\u8bbe\u5907\u8fdb\u884c\u914d\u7f6e\u4ee5\u8fbe\u5230\u7279\u5b9a\u7684\u76ee\u7684\uff0c\u5206\u6790\u51fa Linux \u53ef\u80fd\u7684\u7f51\u7edc\u6545\u969c\u539f\u56e0\u3002<\/span>\n<\/p>\n<p style=\"margin-top:0px;margin-bottom:0px;padding:0px 0px 10px;border:0px;outline:0px;vertical-align:baseline;width:620px;line-height:1.3em;text-indent:2em;\">\n\t<span style=\"font-size:16px;line-height:1.5;\">Linux \u62bd\u8c61\u7f51\u7edc\u8bbe\u5907\u7b80\u4ecb<\/span>\n<\/p>\n<p style=\"margin-top:0px;margin-bottom:0px;padding:0px 0px 10px;border:0px;outline:0px;vertical-align:baseline;width:620px;line-height:1.3em;text-indent:2em;\">\n\t<span style=\"line-height:1.5em;font-size:16px;\">\u548c\u78c1\u76d8\u8bbe\u5907\u7c7b\u4f3c\uff0cLinux \u7528\u6237\u60f3\u8981\u4f7f\u7528\u7f51\u7edc\u529f\u80fd\uff0c\u4e0d\u80fd\u901a\u8fc7\u76f4\u63a5\u64cd\u4f5c\u786c\u4ef6\u5b8c\u6210\uff0c\u800c\u9700\u8981\u76f4\u63a5\u6216\u95f4\u63a5\u7684\u64cd\u4f5c\u4e00\u4e2a Linux \u4e3a\u6211\u4eec\u62bd\u8c61\u51fa\u6765\u7684\u8bbe\u5907\uff0c\u65e2\u901a\u7528\u7684 Linux \u7f51\u7edc\u8bbe\u5907\u6765\u5b8c\u6210\u3002\u4e00\u4e2a\u5e38\u89c1\u7684\u60c5\u51b5\u662f\uff0c\u7cfb\u7edf\u91cc\u88c5\u6709\u4e00\u4e2a\u786c\u4ef6\u7f51\u5361\uff0cLinux \u4f1a\u5728\u7cfb\u7edf\u91cc\u4e3a\u5176\u751f\u6210\u4e00\u4e2a\u7f51\u7edc\u8bbe\u5907\u5b9e\u4f8b\uff0c\u5982 eth0\uff0c\u7528\u6237\u9700\u8981\u5bf9 eth0 \u53d1\u51fa\u547d\u4ee4\u4ee5\u914d\u7f6e\u6216\u4f7f\u7528\u5b83\u4e86\u3002\u66f4\u591a\u7684\u786c\u4ef6\u4f1a\u5e26\u6765\u66f4\u591a\u7684\u8bbe\u5907\u5b9e\u4f8b\uff0c\u865a\u62df\u7684\u786c\u4ef6\u4e5f\u4f1a\u5e26\u6765\u66f4\u591a\u7684\u8bbe\u5907\u5b9e\u4f8b\u3002\u968f\u7740\u7f51\u7edc\u6280\u672f\uff0c\u865a\u62df\u5316\u6280\u672f\u7684\u53d1\u5c55\uff0c\u66f4\u591a\u7684\u9ad8\u7ea7\u7f51\u7edc\u8bbe\u5907\u88ab\u52a0\u5165\u4e86\u5230\u4e86 Linux \u4e2d\uff0c\u4f7f\u5f97\u60c5\u51b5\u53d8\u5f97\u66f4\u52a0\u590d\u6742\u3002\u5728\u4ee5\u4e0b\u7ae0\u8282\u4e2d\uff0c\u5c06\u4e00\u4e00\u5206\u6790\u5728\u865a\u62df\u5316\u6280\u672f\u4e2d\u7ecf\u5e38\u4f7f\u7528\u7684\u51e0\u79cd Linux \u7f51\u7edc\u8bbe\u5907\u62bd\u8c61\u7c7b\u578b\uff1aBridge\u3001802.1.q VLAN device\u3001VETH\u3001TAP\uff0c\u8be6\u7ec6\u89e3\u91ca\u5982\u4f55\u7528\u5b83\u4eec\u914d\u5408 Linux \u4e2d\u7684 Route table\u3001IP table \u7b80\u5355\u7684\u521b\u5efa\u51fa\u672c\u5730\u865a\u62df\u7f51\u7edc\u3002<\/span>\n<\/p>\n<h2 id=\"2.\u76f8\u5173\u7f51\u7edc\u8bbe\u5907\u5de5\u4f5c\u539f\u7406 |outline\" style=\"margin:5px 0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;white-space:normal;text-indent:2em;\"><span class=\"ez-toc-section\" id=\"%E7%9B%B8%E5%85%B3%E7%BD%91%E7%BB%9C%E8%AE%BE%E5%A4%87%E5%B7%A5%E4%BD%9C%E5%8E%9F%E7%90%86\"><\/span>\n\t<span style=\"font-size:16px;\">\u76f8\u5173\u7f51\u7edc\u8bbe\u5907\u5de5\u4f5c\u539f\u7406<\/span><br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3 id=\"N1003F\" style=\"margin:5px 0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;white-space:normal;text-indent:2em;\"><span class=\"ez-toc-section\" id=\"Bridge\"><\/span>\n\t<span style=\"font-size:16px;\">Bridge<\/span><br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"margin-bottom:0px;padding:6px 0px;border:0px;outline:0px;vertical-align:baseline;line-height:1.5em;white-space:normal;margin-top:-2px !important;text-indent:2em;\">\n\t<span style=\"font-size:16px;\">Bridge\uff08\u6865\uff09\u662f Linux \u4e0a\u7528\u6765\u505a TCP\/IP \u4e8c\u5c42\u534f\u8bae\u4ea4\u6362\u7684\u8bbe\u5907\uff0c\u4e0e\u73b0\u5b9e\u4e16\u754c\u4e2d\u7684\u4ea4\u6362\u673a\u529f\u80fd\u76f8\u4f3c\u3002Bridge \u8bbe\u5907\u5b9e\u4f8b\u53ef\u4ee5\u548c Linux \u4e0a\u5176\u4ed6\u7f51\u7edc\u8bbe\u5907\u5b9e\u4f8b\u8fde\u63a5\uff0c\u65e2 attach \u4e00\u4e2a\u4ece\u8bbe\u5907\uff0c\u7c7b\u4f3c\u4e8e\u5728\u73b0\u5b9e\u4e16\u754c\u4e2d\u7684\u4ea4\u6362\u673a\u548c\u4e00\u4e2a\u7528\u6237\u7ec8\u7aef\u4e4b\u95f4\u8fde\u63a5\u4e00\u6839\u7f51\u7ebf\u3002\u5f53\u6709\u6570\u636e\u5230\u8fbe\u65f6\uff0cBridge \u4f1a\u6839\u636e\u62a5\u6587\u4e2d\u7684 MAC \u4fe1\u606f\u8fdb\u884c\u5e7f\u64ad\u3001\u8f6c\u53d1\u3001\u4e22\u5f03\u5904\u7406\u3002<\/span>\n<\/p>\n<h5 id=\"N10047\" style=\"margin:5px 0px 0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;white-space:normal;text-indent:2em;\"><span class=\"ez-toc-section\" id=\"%E5%9B%BE_1Bridge_%E8%AE%BE%E5%A4%87%E5%B7%A5%E4%BD%9C%E8%BF%87%E7%A8%8B\"><\/span>\n\t<span style=\"font-size:16px;\">\u56fe 1.Bridge \u8bbe\u5907\u5de5\u4f5c\u8fc7\u7a0b<\/span><br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p style=\"text-indent:2em;\">\n\t<img decoding=\"async\" alt=\"Bridge \u8bbe\u5907\u5de5\u4f5c\u8fc7\u7a0b\" src=\"http:\/\/www.weizn.net\/content\/uploadfile\/201606\/b54fc2824c2f66202b62c5469aed7c9a20160603125553.jpg\" width=\"373\" style=\"margin:0px;padding:0px;outline:0px;vertical-align:baseline;line-height:15.36px;white-space:normal;\" \/>\n<\/p>\n<p style=\"margin-top:0px;margin-bottom:0px;padding:6px 0px;border:0px;outline:0px;vertical-align:baseline;line-height:1.5em;white-space:normal;text-indent:2em;\">\n\t<span style=\"font-size:16px;\">\u5982\u56fe\u6240\u793a\uff0cBridge \u7684\u529f\u80fd\u4e3b\u8981\u5728\u5185\u6838\u91cc\u5b9e\u73b0\u3002\u5f53\u4e00\u4e2a\u4ece\u8bbe\u5907\u88ab attach \u5230 Bridge \u4e0a\u65f6\uff0c\u76f8\u5f53\u4e8e\u73b0\u5b9e\u4e16\u754c\u91cc\u4ea4\u6362\u673a\u7684\u7aef\u53e3\u88ab\u63d2\u5165\u4e86\u4e00\u6839\u8fde\u6709\u7ec8\u7aef\u7684\u7f51\u7ebf\u3002\u8fd9\u65f6\u5728\u5185\u6838\u7a0b\u5e8f\u91cc\uff0cnetdev_rx_handler_register()\u88ab\u8c03\u7528\uff0c\u4e00\u4e2a\u7528\u4e8e\u63a5\u53d7\u6570\u636e\u7684\u56de\u8c03\u51fd\u6570\u88ab\u6ce8\u518c\u3002\u4ee5\u540e\u6bcf\u5f53\u8fd9\u4e2a\u4ece\u8bbe\u5907\u6536\u5230\u6570\u636e\u65f6\u90fd\u4f1a\u8c03\u7528\u8fd9\u4e2a\u51fd\u6570\u53ef\u4ee5\u628a\u6570\u636e\u8f6c\u53d1\u5230 Bridge \u4e0a\u3002\u5f53 Bridge \u63a5\u6536\u5230\u6b64\u6570\u636e\u65f6\uff0cbr_handle_frame()\u88ab\u8c03\u7528\uff0c\u8fdb\u884c\u4e00\u4e2a\u548c\u73b0\u5b9e\u4e16\u754c\u4e2d\u7684\u4ea4\u6362\u673a\u7c7b\u4f3c\u7684\u5904\u7406\u8fc7\u7a0b\uff1a\u5224\u65ad\u5305\u7684\u7c7b\u522b\uff08\u5e7f\u64ad\/\u5355\u70b9\uff09\uff0c\u67e5\u627e\u5185\u90e8 MAC \u7aef\u53e3\u6620\u5c04\u8868\uff0c\u5b9a\u4f4d\u76ee\u6807\u7aef\u53e3\u53f7\uff0c\u5c06\u6570\u636e\u8f6c\u53d1\u5230\u76ee\u6807\u7aef\u53e3\u6216\u4e22\u5f03\uff0c\u81ea\u52a8\u66f4\u65b0\u5185\u90e8 MAC \u7aef\u53e3\u6620\u5c04\u8868\u4ee5\u81ea\u6211\u5b66\u4e60\u3002<\/span>\n<\/p>\n<p style=\"margin-top:0px;margin-bottom:0px;padding:6px 0px;border:0px;outline:0px;vertical-align:baseline;line-height:1.5em;white-space:normal;text-indent:2em;\">\n\t<span style=\"font-size:16px;\">Bridge \u548c\u73b0\u5b9e\u4e16\u754c\u4e2d\u7684\u4e8c\u5c42\u4ea4\u6362\u673a\u6709\u4e00\u4e2a\u533a\u522b\uff0c\u56fe\u4e2d\u5de6\u4fa7\u753b\u51fa\u4e86\u8fd9\u79cd\u60c5\u51b5\uff1a\u6570\u636e\u88ab\u76f4\u63a5\u53d1\u5230 Bridge \u4e0a\uff0c\u800c\u4e0d\u662f\u4ece\u4e00\u4e2a\u7aef\u53e3\u63a5\u53d7\u3002\u8fd9\u79cd\u60c5\u51b5\u53ef\u4ee5\u770b\u505a Bridge \u81ea\u5df1\u6709\u4e00\u4e2a MAC \u53ef\u4ee5\u4e3b\u52a8\u53d1\u9001\u62a5\u6587\uff0c\u6216\u8005\u8bf4 Bridge \u81ea\u5e26\u4e86\u4e00\u4e2a\u9690\u85cf\u7aef\u53e3\u548c\u5bc4\u4e3b Linux \u7cfb\u7edf\u81ea\u52a8\u8fde\u63a5\uff0cLinux \u4e0a\u7684\u7a0b\u5e8f\u53ef\u4ee5\u76f4\u63a5\u4ece\u8fd9\u4e2a\u7aef\u53e3\u5411 Bridge \u4e0a\u7684\u5176\u4ed6\u7aef\u53e3\u53d1\u6570\u636e\u3002\u6240\u4ee5\u5f53\u4e00\u4e2a Bridge \u62e5\u6709\u4e00\u4e2a\u7f51\u7edc\u8bbe\u5907\u65f6\uff0c\u5982 bridge0 \u52a0\u5165\u4e86 eth0 \u65f6\uff0c\u5b9e\u9645\u4e0a bridge0 \u62e5\u6709\u4e24\u4e2a\u6709\u6548 MAC \u5730\u5740\uff0c\u4e00\u4e2a\u662f bridge0 \u7684\uff0c\u4e00\u4e2a\u662f eth0 \u7684\uff0c\u4ed6\u4eec\u4e4b\u95f4\u53ef\u4ee5\u901a\u8baf\u3002\u7531\u6b64\u5e26\u6765\u4e00\u4e2a\u6709\u610f\u601d\u7684\u4e8b\u60c5\u662f\uff0cBridge \u53ef\u4ee5\u8bbe\u7f6e IP \u5730\u5740\u3002\u901a\u5e38\u6765\u8bf4 IP \u5730\u5740\u662f\u4e09\u5c42\u534f\u8bae\u7684\u5185\u5bb9\uff0c\u4e0d\u5e94\u8be5\u51fa\u73b0\u5728\u4e8c\u5c42\u8bbe\u5907 Bridge \u4e0a\u3002\u4f46\u662f Linux \u91cc Bridge \u662f\u901a\u7528\u7f51\u7edc\u8bbe\u5907\u62bd\u8c61\u7684\u4e00\u79cd\uff0c\u53ea\u8981\u662f\u7f51\u7edc\u8bbe\u5907\u5c31\u80fd\u591f\u8bbe\u5b9a IP \u5730\u5740\u3002\u5f53\u4e00\u4e2a bridge0 \u62e5\u6709 IP \u540e\uff0cLinux \u4fbf\u53ef\u4ee5\u901a\u8fc7\u8def\u7531\u8868\u6216\u8005 IP \u8868\u89c4\u5219\u5728\u4e09\u5c42\u5b9a\u4f4d bridge0\uff0c\u6b64\u65f6\u76f8\u5f53\u4e8e Linux \u62e5\u6709\u4e86\u53e6\u5916\u4e00\u4e2a\u9690\u85cf\u7684\u865a\u62df\u7f51\u5361\u548c Bridge \u7684\u9690\u85cf\u7aef\u53e3\u76f8\u8fde\uff0c\u8fd9\u4e2a\u7f51\u5361\u5c31\u662f\u540d\u4e3a bridge0 \u7684\u901a\u7528\u7f51\u7edc\u8bbe\u5907\uff0cIP \u53ef\u4ee5\u770b\u6210\u662f\u8fd9\u4e2a\u7f51\u5361\u7684\u3002\u5f53\u6709\u7b26\u5408\u6b64 IP \u7684\u6570\u636e\u5230\u8fbe bridge0 \u65f6\uff0c\u5185\u6838\u534f\u8bae\u6808\u8ba4\u4e3a\u6536\u5230\u4e86\u4e00\u5305\u76ee\u6807\u4e3a\u672c\u673a\u7684\u6570\u636e\uff0c\u6b64\u65f6\u5e94\u7528\u7a0b\u5e8f\u53ef\u4ee5\u901a\u8fc7 Socket \u63a5\u6536\u5230\u5b83\u3002\u4e00\u4e2a\u66f4\u597d\u7684\u5bf9\u6bd4\u4f8b\u5b50\u662f\u73b0\u5b9e\u4e16\u754c\u4e2d\u7684\u5e26\u8def\u7531\u7684\u4ea4\u6362\u673a\u8bbe\u5907\uff0c\u5b83\u4e5f\u62e5\u6709\u4e00\u4e2a\u9690\u85cf\u7684 MAC \u5730\u5740\uff0c\u4f9b\u8bbe\u5907\u4e2d\u7684\u4e09\u5c42\u534f\u8bae\u5904\u7406\u7a0b\u5e8f\u548c\u7ba1\u7406\u7a0b\u5e8f\u4f7f\u7528\u3002\u8bbe\u5907\u91cc\u7684\u4e09\u5c42\u534f\u8bae\u5904\u7406\u7a0b\u5e8f\uff0c\u5bf9\u5e94\u540d\u4e3a bridge0 \u7684\u901a\u7528\u7f51\u7edc\u8bbe\u5907\u7684\u4e09\u5c42\u534f\u8bae\u5904\u7406\u7a0b\u5e8f\uff0c\u5373\u5bc4\u4e3b Linux \u7cfb\u7edf\u5185\u6838\u534f\u8bae\u6808\u7a0b\u5e8f\u3002\u8bbe\u5907\u91cc\u7684\u7ba1\u7406\u7a0b\u5e8f\uff0c\u5bf9\u5e94 bridge0 \u5bc4\u4e3b Linux \u7cfb\u7edf\u91cc\u7684\u5e94\u7528\u7a0b\u5e8f\u3002<\/span>\n<\/p>\n<p style=\"margin-top:0px;margin-bottom:0px;padding:6px 0px;border:0px;outline:0px;vertical-align:baseline;line-height:1.5em;white-space:normal;text-indent:2em;\">\n\t<span style=\"font-size:16px;\">Bridge \u7684\u5b9e\u73b0\u5f53\u524d\u6709\u4e00\u4e2a\u9650\u5236\uff1a\u5f53\u4e00\u4e2a\u8bbe\u5907\u88ab attach \u5230 Bridge \u4e0a\u65f6\uff0c\u90a3\u4e2a\u8bbe\u5907\u7684 IP \u4f1a\u53d8\u7684\u65e0\u6548\uff0cLinux \u4e0d\u518d\u4f7f\u7528\u90a3\u4e2a IP \u5728\u4e09\u5c42\u63a5\u53d7\u6570\u636e\u3002\u4e3e\u4f8b\u5982\u4e0b\uff1a\u5982\u679c eth0 \u672c\u6765\u7684 IP \u662f 192.168.1.2\uff0c\u6b64\u65f6\u5982\u679c\u6536\u5230\u4e00\u4e2a\u76ee\u6807\u5730\u5740\u662f 192.168.1.2 \u7684\u6570\u636e\uff0cLinux \u7684\u5e94\u7528\u7a0b\u5e8f\u80fd\u901a\u8fc7 Socket \u64cd\u4f5c\u63a5\u53d7\u5230\u5b83\u3002\u800c\u5f53 eth0 \u88ab attach \u5230\u4e00\u4e2a bridge0 \u65f6\uff0c\u5c3d\u7ba1 eth0 \u7684 IP \u8fd8\u5728\uff0c\u4f46\u5e94\u7528\u7a0b\u5e8f\u662f\u65e0\u6cd5\u63a5\u53d7\u5230\u4e0a\u8ff0\u6570\u636e\u7684\u3002\u6b64\u65f6\u5e94\u8be5\u628a IP 192.168.1.2 \u8d4b\u4e88 bridge0\u3002<\/span>\n<\/p>\n<p style=\"margin-top:0px;margin-bottom:0px;padding:6px 0px;border:0px;outline:0px;vertical-align:baseline;line-height:1.5em;white-space:normal;text-indent:2em;\">\n\t<span style=\"font-size:16px;\">\u53e6\u5916\u9700\u8981\u6ce8\u610f\u7684\u662f\u6570\u636e\u6d41\u7684\u65b9\u5411\u3002\u5bf9\u4e8e\u4e00\u4e2a\u88ab attach \u5230 Bridge \u4e0a\u7684\u8bbe\u5907\u6765\u8bf4\uff0c\u53ea\u6709\u5b83\u6536\u5230\u6570\u636e\u65f6\uff0c\u6b64\u5305\u6570\u636e\u624d\u4f1a\u88ab\u8f6c\u53d1\u5230 Bridge \u4e0a\uff0c\u8fdb\u800c\u5b8c\u6210\u67e5\u8868\u5e7f\u64ad\u7b49\u540e\u7eed\u64cd\u4f5c\u3002\u5f53\u8bf7\u6c42\u662f\u53d1\u9001\u7c7b\u578b\u65f6\uff0c\u6570\u636e\u662f\u4e0d\u4f1a\u88ab\u8f6c\u53d1\u5230 Bridge \u4e0a\u7684\uff0c\u5b83\u4f1a\u5bfb\u627e\u4e0b\u4e00\u4e2a\u53d1\u9001\u51fa\u53e3\u3002\u7528\u6237\u5728\u914d\u7f6e\u7f51\u7edc\u65f6\u7ecf\u5e38\u5ffd\u7565\u8fd9\u4e00\u70b9\u4ece\u800c\u9020\u6210\u7f51\u7edc\u6545\u969c\u3002<\/span>\n<\/p>\n<h3 id=\"N10059\" style=\"margin:5px 0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;white-space:normal;text-indent:2em;\"><span class=\"ez-toc-section\" id=\"VLAN_device_for_8021q\"><\/span>\n\t<span style=\"font-size:16px;\">VLAN device for 802.1.q<\/span><br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"margin-bottom:0px;padding:6px 0px;border:0px;outline:0px;vertical-align:baseline;line-height:1.5em;white-space:normal;margin-top:-2px !important;text-indent:2em;\">\n\t<span style=\"font-size:16px;\">VLAN \u53c8\u79f0\u865a\u62df\u7f51\u7edc\uff0c\u662f\u4e00\u4e2a\u88ab\u5e7f\u6cdb\u4f7f\u7528\u7684\u6982\u5ff5\uff0c\u6709\u4e9b\u5e94\u7528\u7a0b\u5e8f\u628a\u81ea\u5df1\u7684\u5185\u90e8\u7f51\u7edc\u4e5f\u79f0\u4e3a VLAN\u3002\u6b64\u5904\u4e3b\u8981\u8bf4\u7684\u662f\u5728\u7269\u7406\u4e16\u754c\u4e2d\u5b58\u5728\u7684\uff0c\u9700\u8981\u534f\u8bae\u652f\u6301\u7684 VLAN\u3002\u5b83\u7684\u79cd\u7c7b\u5f88\u591a\uff0c\u6309\u7167\u534f\u8bae\u539f\u7406\u4e00\u822c\u5206\u4e3a\uff1aMACVLAN\u3001802.1.q VLAN\u3001802.1.qbg VLAN\u3001802.1.qbh VLAN\u3002\u5176\u4e2d\u51fa\u73b0\u8f83\u65e9\uff0c\u5e94\u7528\u5e7f\u6cdb\u5e76\u4e14\u6bd4\u8f83\u6210\u719f\u7684\u662f 802.1.q VLAN\uff0c\u5176\u57fa\u672c\u539f\u7406\u662f\u5728\u4e8c\u5c42\u534f\u8bae\u91cc\u63d2\u5165\u989d\u5916\u7684 VLAN \u534f\u8bae\u6570\u636e\uff08\u79f0\u4e3a 802.1.q VLAN Tag)\uff0c\u540c\u65f6\u4fdd\u6301\u548c\u4f20\u7edf\u4e8c\u5c42\u8bbe\u5907\u7684\u517c\u5bb9\u6027\u3002Linux \u91cc\u7684 VLAN \u8bbe\u5907\u662f\u5bf9 802.1.q \u534f\u8bae\u7684\u4e00\u79cd\u5185\u90e8\u8f6f\u4ef6\u5b9e\u73b0\uff0c\u6a21\u62df\u73b0\u5b9e\u4e16\u754c\u4e2d\u7684 802.1.q \u4ea4\u6362\u673a\u3002<\/span>\n<\/p>\n<h5 id=\"N10061\" style=\"margin:5px 0px 0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;white-space:normal;text-indent:2em;\"><span class=\"ez-toc-section\" id=\"%E5%9B%BE_2_VLAN_%E8%AE%BE%E5%A4%87%E5%B7%A5%E4%BD%9C%E8%BF%87%E7%A8%8B\"><\/span>\n\t<span style=\"font-size:16px;\">\u56fe 2 .VLAN \u8bbe\u5907\u5de5\u4f5c\u8fc7\u7a0b<\/span><br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p style=\"text-indent:2em;\">\n\t<img decoding=\"async\" alt=\"\u56fe 2 .VLAN \u8bbe\u5907\u5de5\u4f5c\u8fc7\u7a0b\" src=\"http:\/\/www.weizn.net\/content\/uploadfile\/201606\/6573bd6041b8fff4550e47ac358e619320160603125554.jpg\" width=\"374\" style=\"margin:0px;padding:0px;outline:0px;vertical-align:baseline;line-height:15.36px;white-space:normal;\" \/>\n<\/p>\n<p style=\"margin-top:0px;margin-bottom:0px;padding:6px 0px;border:0px;outline:0px;vertical-align:baseline;line-height:1.5em;white-space:normal;text-indent:2em;\">\n\t<span style=\"font-size:16px;\">\u5982\u56fe\u6240\u793a\uff0cLinux \u91cc 802.1.q VLAN \u8bbe\u5907\u662f\u4ee5\u6bcd\u5b50\u5173\u7cfb\u6210\u5bf9\u51fa\u73b0\u7684\uff0c\u6bcd\u8bbe\u5907\u76f8\u5f53\u4e8e\u73b0\u5b9e\u4e16\u754c\u4e2d\u7684\u4ea4\u6362\u673a TRUNK \u53e3\uff0c\u7528\u4e8e\u8fde\u63a5\u4e0a\u7ea7\u7f51\u7edc\uff0c\u5b50\u8bbe\u5907\u76f8\u5f53\u4e8e\u666e\u901a\u63a5\u53e3\u7528\u4e8e\u8fde\u63a5\u4e0b\u7ea7\u7f51\u7edc\u3002\u5f53\u6570\u636e\u5728\u6bcd\u5b50\u8bbe\u5907\u95f4\u4f20\u9012\u65f6\uff0c\u5185\u6838\u5c06\u4f1a\u6839\u636e 802.1.q VLAN Tag \u8fdb\u884c\u5bf9\u5e94\u64cd\u4f5c\u3002\u6bcd\u5b50\u8bbe\u5907\u4e4b\u95f4\u662f\u4e00\u5bf9\u591a\u7684\u5173\u7cfb\uff0c\u4e00\u4e2a\u6bcd\u8bbe\u5907\u53ef\u4ee5\u6709\u591a\u4e2a\u5b50\u8bbe\u5907\uff0c\u4e00\u4e2a\u5b50\u8bbe\u5907\u53ea\u6709\u4e00\u4e2a\u6bcd\u8bbe\u5907\u3002\u5f53\u4e00\u4e2a\u5b50\u8bbe\u5907\u6709\u4e00\u5305\u6570\u636e\u9700\u8981\u53d1\u9001\u65f6\uff0c\u6570\u636e\u5c06\u88ab\u52a0\u5165 VLAN Tag \u7136\u540e\u4ece\u6bcd\u8bbe\u5907\u53d1\u9001\u51fa\u53bb\u3002\u5f53\u6bcd\u8bbe\u5907\u6536\u5230\u4e00\u5305\u6570\u636e\u65f6\uff0c\u5b83\u5c06\u4f1a\u5206\u6790\u5176\u4e2d\u7684 VLAN Tag\uff0c\u5982\u679c\u6709\u5bf9\u5e94\u7684\u5b50\u8bbe\u5907\u5b58\u5728\uff0c\u5219\u628a\u6570\u636e\u8f6c\u53d1\u5230\u90a3\u4e2a\u5b50\u8bbe\u5907\u4e0a\u5e76\u6839\u636e\u8bbe\u7f6e\u79fb\u9664 VLAN Tag\uff0c\u5426\u5219\u4e22\u5f03\u8be5\u6570\u636e\u3002\u5728\u67d0\u4e9b\u8bbe\u7f6e\u4e0b\uff0cVLAN Tag \u53ef\u4ee5\u4e0d\u88ab\u79fb\u9664\u4ee5\u6ee1\u8db3\u67d0\u4e9b\u76d1\u542c\u7a0b\u5e8f\u7684\u9700\u8981\uff0c\u5982 DHCP \u670d\u52a1\u7a0b\u5e8f\u3002\u4e3e\u4f8b\u8bf4\u660e\u5982\u4e0b\uff1aeth0 \u4f5c\u4e3a\u6bcd\u8bbe\u5907\u521b\u5efa\u4e00\u4e2a ID \u4e3a 100 \u7684\u5b50\u8bbe\u5907 eth0.100\u3002\u6b64\u65f6\u5982\u679c\u6709\u7a0b\u5e8f\u8981\u6c42\u4ece eth0.100 \u53d1\u9001\u4e00\u5305\u6570\u636e\uff0c\u6570\u636e\u5c06\u88ab\u6253\u4e0a VLAN 100 \u7684 Tag \u4ece eth0 \u53d1\u9001\u51fa\u53bb\u3002\u5982\u679c eth0 \u6536\u5230\u4e00\u5305\u6570\u636e\uff0cVLAN Tag \u662f 100\uff0c\u6570\u636e\u5c06\u88ab\u8f6c\u53d1\u5230 eth0.100 \u4e0a\uff0c\u5e76\u6839\u636e\u8bbe\u7f6e\u51b3\u5b9a\u662f\u5426\u79fb\u9664 VLAN Tag\u3002\u5982\u679c eth0 \u6536\u5230\u4e00\u5305\u5305\u542b VLAN Tag 101 \u7684\u6570\u636e\uff0c\u5176\u5c06\u88ab\u4e22\u5f03\u3002\u4e0a\u8ff0\u8fc7\u7a0b\u9690\u542b\u4ee5\u4e0b\u4e8b\u5b9e\uff1a\u5bf9\u4e8e\u5bc4\u4e3b Linux \u7cfb\u7edf\u6765\u8bf4\uff0c\u6bcd\u8bbe\u5907\u53ea\u80fd\u7528\u6765\u6536\u6570\u636e\uff0c\u5b50\u8bbe\u5907\u53ea\u80fd\u7528\u6765\u53d1\u9001\u6570\u636e\u3002\u548c Bridge \u4e00\u6837\uff0c\u6bcd\u5b50\u8bbe\u5907\u7684\u6570\u636e\u4e5f\u662f\u6709\u65b9\u5411\u7684\uff0c\u5b50\u8bbe\u5907\u6536\u5230\u7684\u6570\u636e\u4e0d\u4f1a\u8fdb\u5165\u6bcd\u8bbe\u5907\uff0c\u540c\u6837\u6bcd\u8bbe\u5907\u4e0a\u8bf7\u6c42\u53d1\u9001\u7684\u6570\u636e\u4e0d\u4f1a\u88ab\u8f6c\u5230\u5b50\u8bbe\u5907\u4e0a\u3002\u53ef\u4ee5\u628a VLAN \u6bcd\u5b50\u8bbe\u5907\u4f5c\u4e3a\u4e00\u4e2a\u6574\u4f53\u60f3\u8c61\u4e3a\u73b0\u5b9e\u4e16\u754c\u4e2d\u7684 802.1.q \u4ea4\u6362\u673a\uff0c\u4e0b\u7ea7\u63a5\u53e3\u901a\u8fc7\u5b50\u8bbe\u5907\u8fde\u63a5\u5230\u5bc4\u4e3b Linux \u7cfb\u7edf\u7f51\u7edc\u91cc\uff0c\u4e0a\u7ea7\u63a5\u53e3\u540c\u8fc7\u4e3b\u8bbe\u5907\u8fde\u63a5\u5230\u4e0a\u7ea7\u7f51\u7edc\uff0c\u5f53\u6bcd\u8bbe\u5907\u662f\u7269\u7406\u7f51\u5361\u65f6\u4e0a\u7ea7\u7f51\u7edc\u662f\u5916\u754c\u771f\u5b9e\u7f51\u7edc\uff0c\u5f53\u6bcd\u8bbe\u5907\u662f\u53e6\u5916\u4e00\u4e2a Linux \u865a\u62df\u7f51\u7edc\u8bbe\u5907\u65f6\u4e0a\u7ea7\u7f51\u7edc\u4ecd\u7136\u662f\u5bc4\u4e3b Linux \u7cfb\u7edf\u7f51\u7edc\u3002<\/span>\n<\/p>\n<p style=\"margin-top:0px;margin-bottom:0px;padding:6px 0px;border:0px;outline:0px;vertical-align:baseline;line-height:1.5em;white-space:normal;text-indent:2em;\">\n\t<span style=\"font-size:16px;\">\u9700\u8981\u6ce8\u610f\u7684\u662f\u6bcd\u5b50 VLAN \u8bbe\u5907\u62e5\u6709\u76f8\u540c\u7684 MAC \u5730\u5740\uff0c\u53ef\u4ee5\u628a\u5b83\u5f53\u6210\u73b0\u5b9e\u4e16\u754c\u4e2d 802.1.q \u4ea4\u6362\u673a\u7684 MAC\uff0c\u56e0\u6b64\u591a\u4e2a VLAN \u8bbe\u5907\u4f1a\u5171\u4eab\u4e00\u4e2a MAC\u3002\u5f53\u4e00\u4e2a\u6bcd\u8bbe\u5907\u62e5\u6709\u591a\u4e2a VLAN \u5b50\u8bbe\u5907\u65f6\uff0c\u5b50\u8bbe\u5907\u4e4b\u95f4\u662f\u9694\u79bb\u7684\uff0c\u4e0d\u5b58\u5728 Bridge \u90a3\u6837\u7684\u4ea4\u6362\u8f6c\u53d1\u5173\u7cfb\uff0c\u539f\u56e0\u5982\u4e0b\uff1a802.1.q VLAN \u534f\u8bae\u7684\u4e3b\u8981\u76ee\u7684\u662f\u4ece\u903b\u8f91\u4e0a\u9694\u79bb\u5b50\u7f51\u3002\u73b0\u5b9e\u4e16\u754c\u4e2d\u7684 802.1.q \u4ea4\u6362\u673a\u5b58\u5728\u591a\u4e2a VLAN\uff0c\u6bcf\u4e2a VLAN \u62e5\u6709\u591a\u4e2a\u7aef\u53e3\uff0c\u540c\u4e00 VLAN \u7aef\u53e3\u4e4b\u95f4\u53ef\u4ee5\u4ea4\u6362\u8f6c\u53d1\uff0c\u4e0d\u540c VLAN \u7aef\u53e3\u4e4b\u95f4\u9694\u79bb\uff0c\u6240\u4ee5\u5176\u5305\u542b\u4e24\u5c42\u529f\u80fd\uff1a\u4ea4\u6362\u4e0e\u9694\u79bb\u3002Linux VLAN device \u5b9e\u73b0\u7684\u662f\u9694\u79bb\u529f\u80fd\uff0c\u6ca1\u6709\u4ea4\u6362\u529f\u80fd\u3002\u4e00\u4e2a VLAN \u6bcd\u8bbe\u5907\u4e0d\u53ef\u80fd\u62e5\u6709\u4e24\u4e2a\u76f8\u540c ID \u7684 VLAN \u5b50\u8bbe\u5907\uff0c\u56e0\u6b64\u4e5f\u5c31\u4e0d\u53ef\u80fd\u51fa\u73b0\u6570\u636e\u4ea4\u6362\u60c5\u51b5\u3002\u5982\u679c\u60f3\u8ba9\u4e00\u4e2a VLAN \u91cc\u63a5\u591a\u4e2a\u8bbe\u5907\uff0c\u5c31\u9700\u8981\u4ea4\u6362\u529f\u80fd\u3002\u5728 Linux \u91cc Bridge \u4e13\u95e8\u5b9e\u73b0\u4ea4\u6362\u529f\u80fd\uff0c\u56e0\u6b64\u5c06 VLAN \u5b50\u8bbe\u5907 attach \u5230\u4e00\u4e2a Bridge \u4e0a\u5c31\u80fd\u5b8c\u6210\u540e\u7eed\u7684\u4ea4\u6362\u529f\u80fd\u3002\u603b\u7ed3\u8d77\u6765\uff0cBridge \u52a0 VLAN device \u80fd\u5728\u529f\u80fd\u5c42\u9762\u5b8c\u6574\u6a21\u62df\u73b0\u5b9e\u4e16\u754c\u91cc\u7684 802.1.q \u4ea4\u6362\u673a\u3002<\/span>\n<\/p>\n<p style=\"margin-top:0px;margin-bottom:0px;padding:6px 0px;border:0px;outline:0px;vertical-align:baseline;line-height:1.5em;white-space:normal;text-indent:2em;\">\n\t<span style=\"font-size:16px;\">Linux \u652f\u6301 VLAN \u786c\u4ef6\u52a0\u901f\uff0c\u5728\u5b89\u88c5\u6709\u7279\u5b9a\u786c\u4ef6\u60c5\u51b5\u4e0b\uff0c\u56fe\u4e2d\u6240\u8ff0\u5185\u6838\u5904\u7406\u8fc7\u7a0b\u53ef\u4ee5\u88ab\u653e\u5230\u7269\u7406\u8bbe\u5907\u4e0a\u5b8c\u6210\u3002<\/span>\n<\/p>\n<h3 id=\"N10071\" style=\"margin:5px 0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;white-space:normal;text-indent:2em;\"><span class=\"ez-toc-section\" id=\"TAP_%E8%AE%BE%E5%A4%87%E4%B8%8E_VETH_%E8%AE%BE%E5%A4%87\"><\/span>\n\t<span style=\"font-size:16px;\">TAP \u8bbe\u5907\u4e0e VETH \u8bbe\u5907<\/span><br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"margin-bottom:0px;padding:6px 0px;border:0px;outline:0px;vertical-align:baseline;line-height:1.5em;white-space:normal;margin-top:-2px !important;text-indent:2em;\">\n\t<span style=\"font-size:16px;\">TUN\/TAP \u8bbe\u5907\u662f\u4e00\u79cd\u8ba9\u7528\u6237\u6001\u7a0b\u5e8f\u5411\u5185\u6838\u534f\u8bae\u6808\u6ce8\u5165\u6570\u636e\u7684\u8bbe\u5907\uff0c\u4e00\u4e2a\u5de5\u4f5c\u5728\u4e09\u5c42\uff0c\u4e00\u4e2a\u5de5\u4f5c\u5728\u4e8c\u5c42\uff0c\u4f7f\u7528\u8f83\u591a\u7684\u662f TAP \u8bbe\u5907\u3002VETH \u8bbe\u5907\u51fa\u73b0\u8f83\u65e9\uff0c\u5b83\u7684\u4f5c\u7528\u662f\u53cd\u8f6c\u901a\u8baf\u6570\u636e\u7684\u65b9\u5411\uff0c\u9700\u8981\u53d1\u9001\u7684\u6570\u636e\u4f1a\u88ab\u8f6c\u6362\u6210\u9700\u8981\u6536\u5230\u7684\u6570\u636e\u91cd\u65b0\u9001\u5165\u5185\u6838\u7f51\u7edc\u5c42\u8fdb\u884c\u5904\u7406\uff0c\u4ece\u800c\u95f4\u63a5\u7684\u5b8c\u6210\u6570\u636e\u7684\u6ce8\u5165\u3002<\/span>\n<\/p>\n<h5 id=\"N10079\" style=\"margin:5px 0px 0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;white-space:normal;text-indent:2em;\"><span class=\"ez-toc-section\" id=\"%E5%9B%BE_3_TAP_%E8%AE%BE%E5%A4%87%E5%92%8C_VETH_%E8%AE%BE%E5%A4%87%E5%B7%A5%E4%BD%9C%E8%BF%87%E7%A8%8B\"><\/span>\n\t<span style=\"font-size:16px;\">\u56fe 3 .TAP \u8bbe\u5907\u548c VETH \u8bbe\u5907\u5de5\u4f5c\u8fc7\u7a0b<\/span><br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p style=\"text-indent:2em;\">\n\t<img decoding=\"async\" alt=\"\u56fe 3 .TAP \u8bbe\u5907\u548c VETH \u8bbe\u5907\u5de5\u4f5c\u8fc7\u7a0b\" src=\"http:\/\/www.weizn.net\/content\/uploadfile\/201606\/6ca2eacfcc9637904a338c4a6eb680d820160603125555.jpg\" width=\"453\" style=\"margin:0px;padding:0px;outline:0px;vertical-align:baseline;line-height:15.36px;white-space:normal;\" \/>\n<\/p>\n<p style=\"margin-top:0px;margin-bottom:0px;padding:6px 0px;border:0px;outline:0px;vertical-align:baseline;line-height:1.5em;white-space:normal;text-indent:2em;\">\n\t<span style=\"font-size:16px;\">\u5982\u56fe\u6240\u793a\uff0c\u5f53\u4e00\u4e2a TAP \u8bbe\u5907\u88ab\u521b\u5efa\u65f6\uff0c\u5728 Linux \u8bbe\u5907\u6587\u4ef6\u76ee\u5f55\u4e0b\u5c06\u4f1a\u751f\u6210\u4e00\u4e2a\u5bf9\u5e94 char \u8bbe\u5907\uff0c\u7528\u6237\u7a0b\u5e8f\u53ef\u4ee5\u50cf\u6253\u5f00\u666e\u901a\u6587\u4ef6\u4e00\u6837\u6253\u5f00\u8fd9\u4e2a\u6587\u4ef6\u8fdb\u884c\u8bfb\u5199\u3002\u5f53\u6267\u884c write()\u64cd\u4f5c\u65f6\uff0c\u6570\u636e\u8fdb\u5165 TAP \u8bbe\u5907\uff0c\u6b64\u65f6\u5bf9\u4e8e Linux \u7f51\u7edc\u5c42\u6765\u8bf4\uff0c\u76f8\u5f53\u4e8e TAP \u8bbe\u5907\u6536\u5230\u4e86\u4e00\u5305\u6570\u636e\uff0c\u8bf7\u6c42\u5185\u6838\u63a5\u53d7\u5b83\uff0c\u5982\u540c\u666e\u901a\u7684\u7269\u7406\u7f51\u5361\u4ece\u5916\u754c\u6536\u5230\u4e00\u5305\u6570\u636e\u4e00\u6837\uff0c\u4e0d\u540c\u7684\u662f\u5176\u5b9e\u6570\u636e\u6765\u81ea Linux \u4e0a\u7684\u4e00\u4e2a\u7528\u6237\u7a0b\u5e8f\u3002Linux \u6536\u5230\u6b64\u6570\u636e\u540e\u5c06\u6839\u636e\u7f51\u7edc\u914d\u7f6e\u8fdb\u884c\u540e\u7eed\u5904\u7406\uff0c\u4ece\u800c\u5b8c\u6210\u4e86\u7528\u6237\u7a0b\u5e8f\u5411 Linux \u5185\u6838\u7f51\u7edc\u5c42\u6ce8\u5165\u6570\u636e\u7684\u529f\u80fd\u3002\u5f53\u7528\u6237\u7a0b\u5e8f\u6267\u884c read()\u8bf7\u6c42\u65f6\uff0c\u76f8\u5f53\u4e8e\u5411\u5185\u6838\u67e5\u8be2 TAP \u8bbe\u5907\u4e0a\u662f\u5426\u6709\u9700\u8981\u88ab\u53d1\u9001\u51fa\u53bb\u7684\u6570\u636e\uff0c\u6709\u7684\u8bdd\u53d6\u51fa\u5230\u7528\u6237\u7a0b\u5e8f\u91cc\uff0c\u5b8c\u6210 TAP \u8bbe\u5907\u7684\u53d1\u9001\u6570\u636e\u529f\u80fd\u3002\u9488\u5bf9 TAP \u8bbe\u5907\u7684\u4e00\u4e2a\u5f62\u8c61\u7684\u6bd4\u55bb\u662f\uff1a\u4f7f\u7528 TAP \u8bbe\u5907\u7684\u5e94\u7528\u7a0b\u5e8f\u76f8\u5f53\u4e8e\u53e6\u5916\u4e00\u53f0\u8ba1\u7b97\u673a\uff0cTAP \u8bbe\u5907\u662f\u672c\u673a\u7684\u4e00\u4e2a\u7f51\u5361\uff0c\u4ed6\u4eec\u4e4b\u95f4\u76f8\u4e92\u8fde\u63a5\u3002\u5e94\u7528\u7a0b\u5e8f\u901a\u8fc7 read()\/write()\u64cd\u4f5c\uff0c\u548c\u672c\u673a\u7f51\u7edc\u6838\u5fc3\u8fdb\u884c\u901a\u8baf\u3002<\/span>\n<\/p>\n<p style=\"margin-top:0px;margin-bottom:0px;padding:6px 0px;border:0px;outline:0px;vertical-align:baseline;line-height:1.5em;white-space:normal;text-indent:2em;\">\n\t<span style=\"font-size:16px;\">VETH \u8bbe\u5907\u603b\u662f\u6210\u5bf9\u51fa\u73b0\uff0c\u9001\u5230\u4e00\u7aef\u8bf7\u6c42\u53d1\u9001\u7684\u6570\u636e\u603b\u662f\u4ece\u53e6\u4e00\u7aef\u4ee5\u8bf7\u6c42\u63a5\u53d7\u7684\u5f62\u5f0f\u51fa\u73b0\u3002\u8be5\u8bbe\u5907\u4e0d\u80fd\u88ab\u7528\u6237\u7a0b\u5e8f\u76f4\u63a5\u64cd\u4f5c\uff0c\u4f46\u4f7f\u7528\u8d77\u6765\u6bd4\u8f83\u7b80\u5355\u3002\u521b\u5efa\u5e76\u914d\u7f6e\u6b63\u786e\u540e\uff0c\u5411\u5176\u4e00\u7aef\u8f93\u5165\u6570\u636e\uff0cVETH \u4f1a\u6539\u53d8\u6570\u636e\u7684\u65b9\u5411\u5e76\u5c06\u5176\u9001\u5165\u5185\u6838\u7f51\u7edc\u6838\u5fc3\uff0c\u5b8c\u6210\u6570\u636e\u7684\u6ce8\u5165\u3002\u5728\u53e6\u4e00\u7aef\u80fd\u8bfb\u5230\u6b64\u6570\u636e\u3002<\/span>\n<\/p>\n<h2 id=\"3.\u7f51\u7edc\u8bbe\u7f6e\u4e3e\u4f8b\u8bf4\u660e |outline\" style=\"margin:5px 0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;white-space:normal;text-indent:2em;\"><span class=\"ez-toc-section\" id=\"%E7%BD%91%E7%BB%9C%E8%AE%BE%E7%BD%AE%E4%B8%BE%E4%BE%8B%E8%AF%B4%E6%98%8E\"><\/span>\n\t<span style=\"font-size:16px;\">\u7f51\u7edc\u8bbe\u7f6e\u4e3e\u4f8b\u8bf4\u660e<\/span><br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"margin-bottom:0px;padding:6px 0px;border:0px;outline:0px;vertical-align:baseline;line-height:1.5em;white-space:normal;text-indent:2em;\">\n\t<span style=\"font-size:16px;\">\u4e3a\u4e86\u66f4\u597d\u7684\u8bf4\u660e Linux \u7f51\u7edc\u8bbe\u5907\u7684\u7528\u6cd5\uff0c\u4e0b\u9762\u5c06\u7528\u4e00\u7cfb\u5217\u7684\u4f8b\u5b50\uff0c\u8bf4\u660e\u5728\u4e00\u4e2a\u590d\u6742\u7684 Linux \u7f51\u7edc\u5143\u7d20\u7ec4\u5408\u51fa\u7684\u865a\u62df\u7f51\u7edc\u91cc\uff0c\u6570\u636e\u7684\u6d41\u5411\u3002\u7f51\u7edc\u8bbe\u7f6e\u7b80\u4ecb\u5982\u4e0b\uff1a\u4e00\u4e2a\u4e2d\u5fc3 Bridge\uff1abridge0 \u4e0b attach \u4e86 4 \u4e2a\u7f51\u7edc\u8bbe\u5907\uff0c\u5305\u62ec 2 \u4e2a VETH \u8bbe\u5907\uff0c1 \u4e2a TAP \u8bbe\u5907 tap0\uff0c1 \u4e2a\u7269\u7406\u7f51\u5361 eth0\u3002\u5728 VETH \u7684\u53e6\u5916\u4e00\u7aef\u53c8\u521b\u5efa\u4e86 VLAN \u5b50\u8bbe\u5907\u3002Linux \u4e0a\u5171\u5b58\u5728 2 \u4e2a VLAN \u7f51\u7edc\uff0c\u65e2 vlan100 \u4e0e vlan200\u3002\u7269\u7406\u7f51\u5361\u548c\u5916\u90e8\u7f51\u7edc\u76f8\u8fde\uff0c\u5e76\u4e14\u5728\u5b83\u4e4b\u4e0b\u521b\u5efa\u4e86\u4e00\u4e2a VLAN ID \u4e3a 200 \u7684 VLAN \u5b50\u8bbe\u5907\u3002<\/span>\n<\/p>\n<h3 id=\"N1008E\" style=\"margin:5px 0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;white-space:normal;text-indent:2em;\"><span class=\"ez-toc-section\" id=\"%E4%BB%8E_vlan100_%E5%AD%90%E8%AE%BE%E5%A4%87%E5%8F%91%E9%80%81_ARP_%E6%8A%A5%E6%96%87\"><\/span>\n\t<span style=\"font-size:16px;\">\u4ece vlan100 \u5b50\u8bbe\u5907\u53d1\u9001 ARP \u62a5\u6587<\/span><br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h5 id=\"N10094\" style=\"margin:5px 0px 0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;white-space:normal;text-indent:2em;\"><span class=\"ez-toc-section\" id=\"%E5%9B%BE_4_ARP_from_vlan100_child_device\"><\/span>\n\t<span style=\"font-size:16px;\">\u56fe 4 .ARP from vlan100 child device<\/span><br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p style=\"text-indent:2em;\">\n\t<img decoding=\"async\" alt=\"\u56fe 4 .ARP from vlan100 child device\" src=\"http:\/\/www.weizn.net\/content\/uploadfile\/201606\/ed37207a1fee8ef6fb919ae6d339074020160603125555.jpg\" width=\"582\" style=\"margin:0px;padding:0px;outline:0px;vertical-align:baseline;line-height:15.36px;white-space:normal;\" \/>\n<\/p>\n<p style=\"margin-top:0px;margin-bottom:0px;padding:6px 0px;border:0px;outline:0px;vertical-align:baseline;line-height:1.5em;white-space:normal;text-indent:2em;\">\n\t<span style=\"font-size:16px;\">\u5982\u56fe\u6240\u793a\uff0c\u5f53\u7528\u6237\u5c1d\u8bd5 ping 192.168.100.3 \u65f6\uff0cLinux \u5c06\u4f1a\u6839\u636e\u8def\u7531\u8868\uff0c\u4ece vlan100 \u5b50\u8bbe\u5907\u53d1\u51fa ARP \u62a5\u6587\uff0c\u5177\u4f53\u8fc7\u7a0b\u5982\u4e0b\uff1a<\/span>\n<\/p>\n<p style=\"margin-top:0px;margin-bottom:0px;padding:6px 0px;border:0px;outline:0px;vertical-align:baseline;line-height:1.5em;white-space:normal;text-indent:2em;\">\n\t<span style=\"font-size:16px;\">1) \u7528\u6237 ping 192.168.100.3<\/span>\n<\/p>\n<p style=\"margin-top:0px;margin-bottom:0px;padding:6px 0px;border:0px;outline:0px;vertical-align:baseline;line-height:1.5em;white-space:normal;text-indent:2em;\">\n\t<span style=\"font-size:16px;\">2) Linux \u5411 vlan100 \u5b50\u8bbe\u5907\u53d1\u9001 ARP \u4fe1\u606f\u3002<\/span>\n<\/p>\n<p style=\"margin-top:0px;margin-bottom:0px;padding:6px 0px;border:0px;outline:0px;vertical-align:baseline;line-height:1.5em;white-space:normal;text-indent:2em;\">\n\t<span style=\"font-size:16px;\">3) ARP \u62a5\u6587\u88ab\u6253\u4e0a VLAN ID 100 \u7684 Tag \u6210\u4e3a ARP@vlan100\uff0c\u8f6c\u53d1\u5230\u6bcd\u8bbe\u5907\u4e0a\u3002<\/span>\n<\/p>\n<p style=\"margin-top:0px;margin-bottom:0px;padding:6px 0px;border:0px;outline:0px;vertical-align:baseline;line-height:1.5em;white-space:normal;text-indent:2em;\">\n\t<span style=\"font-size:16px;\">4) VETH \u8bbe\u5907\u5c06\u8fd9\u4e00\u53d1\u9001\u8bf7\u6c42\u8f6c\u53d8\u65b9\u5411\uff0c\u6210\u4e3a\u4e00\u4e2a\u9700\u8981\u63a5\u53d7\u5904\u7406\u7684\u62a5\u6587\u9001\u5165\u5185\u6838\u7f51\u7edc\u6a21\u5757\u3002<\/span>\n<\/p>\n<p style=\"margin-top:0px;margin-bottom:0px;padding:6px 0px;border:0px;outline:0px;vertical-align:baseline;line-height:1.5em;white-space:normal;text-indent:2em;\">\n\t<span style=\"font-size:16px;\">5) \u7531\u4e8e\u5bf9\u7aef\u7684 VETH \u8bbe\u5907\u88ab\u52a0\u5165\u5230\u4e86 bridge0 \u4e0a\uff0c\u5e76\u4e14\u5185\u6838\u53d1\u73b0\u5b83\u6536\u5230\u4e00\u4e2a\u62a5\u6587\uff0c\u4e8e\u662f\u62a5\u6587\u88ab\u8f6c\u53d1\u5230 bridge0 \u4e0a\u3002<\/span>\n<\/p>\n<p style=\"margin-top:0px;margin-bottom:0px;padding:6px 0px;border:0px;outline:0px;vertical-align:baseline;line-height:1.5em;white-space:normal;text-indent:2em;\">\n\t<span style=\"font-size:16px;\">6) bridge0 \u5904\u7406\u6b64 ARP@vlan100 \u4fe1\u606f\uff0c\u6839\u636e TCP\/IP \u4e8c\u5c42\u534f\u8bae\u53d1\u73b0\u662f\u4e00\u4e2a\u5e7f\u64ad\u8bf7\u6c42\uff0c\u4e8e\u662f\u5411\u5b83\u6240\u77e5\u9053\u7684\u6240\u6709\u7aef\u53e3\u5e7f\u64ad\u6b64\u62a5\u6587\uff0c\u5176\u4e2d\u4e00\u8def\u8fdb\u5165\u53e6\u4e00\u5bf9 VETH \u8bbe\u5907\u7684\u4e00\u7aef\uff0c\u4e00\u8def\u8fdb\u5165 TAP \u8bbe\u5907 tap0\uff0c\u4e00\u8def\u8fdb\u5165\u7269\u7406\u7f51\u5361\u8bbe\u5907 eth0\u3002\u6b64\u65f6\u5728 tap0 \u4e0a\uff0c\u7528\u6237\u7a0b\u5e8f\u53ef\u4ee5\u901a\u8fc7 read()\u64cd\u4f5c\u8bfb\u5230 ARP@vlan100\uff0ceth0 \u5c06\u4f1a\u5411\u5916\u754c\u53d1\u9001 ARP@vlan100\uff0c\u4f46 eth0 \u7684 VLAN \u5b50\u8bbe\u5907\u4e0d\u4f1a\u6536\u5230\u5b83\uff0c\u56e0\u4e3a\u6b64\u6570\u636e\u65b9\u5411\u4e3a\u8bf7\u6c42\u53d1\u9001\u800c\u4e0d\u662f\u8bf7\u6c42\u63a5\u6536\u3002<\/span>\n<\/p>\n<p style=\"margin-top:0px;margin-bottom:0px;padding:6px 0px;border:0px;outline:0px;vertical-align:baseline;line-height:1.5em;white-space:normal;text-indent:2em;\">\n\t<span style=\"font-size:16px;\">7) VETH \u5c06\u8bf7\u6c42\u65b9\u5411\u8f6c\u6362\uff0c\u6b64\u65f6\u5728\u53e6\u4e00\u7aef\u5f97\u5230\u8bf7\u6c42\u63a5\u53d7\u7684 ARP@vlan100 \u62a5\u6587\u3002<\/span>\n<\/p>\n<p style=\"margin-top:0px;margin-bottom:0px;padding:6px 0px;border:0px;outline:0px;vertical-align:baseline;line-height:1.5em;white-space:normal;text-indent:2em;\">\n\t<span style=\"font-size:16px;\">8) \u5bf9\u7aef VETH \u8bbe\u5907\u53d1\u73b0\u6709\u6570\u636e\u9700\u8981\u63a5\u53d7\uff0c\u5e76\u4e14\u81ea\u5df1\u6709\u4e24\u4e2a VLAN \u5b50\u8bbe\u5907\uff0c\u4e8e\u662f\u6267\u884c VLAN \u5904\u7406\u903b\u8f91\u3002\u5176\u4e2d\u4e00\u4e2a\u5b50\u8bbe\u5907\u662f vlan100\uff0c\u4e0e ARP@vlan100 \u543b\u5408\uff0c\u4e8e\u662f\u53bb\u9664 VLAN ID 100 \u7684 Tag \u8f6c\u53d1\u5230\u8fd9\u4e2a\u5b50\u8bbe\u5907\u4e0a\uff0c\u91cd\u65b0\u6210\u4e3a\u6807\u51c6\u7684\u4ee5\u592a\u7f51 ARP \u62a5\u6587\u3002\u53e6\u4e00\u4e2a\u5b50\u8bbe\u5907\u7531\u4e8e ID \u4e0d\u543b\u5408\uff0c\u4e0d\u4f1a\u5f97\u5230\u6b64\u62a5\u6587\u3002<\/span>\n<\/p>\n<p style=\"margin-top:0px;margin-bottom:0px;padding:6px 0px;border:0px;outline:0px;vertical-align:baseline;line-height:1.5em;white-space:normal;text-indent:2em;\">\n\t<span style=\"font-size:16px;\">9) \u6b64 VLAN \u5b50\u8bbe\u5907\u53c8\u88ab attach \u5230\u53e6\u4e00\u4e2a\u6865 bridge1 \u4e0a\uff0c\u4e8e\u662f\u8f6c\u53d1\u81ea\u5df1\u6536\u5230\u7684 ARP \u62a5\u6587\u3002<\/span>\n<\/p>\n<p style=\"margin-top:0px;margin-bottom:0px;padding:6px 0px;border:0px;outline:0px;vertical-align:baseline;line-height:1.5em;white-space:normal;text-indent:2em;\">\n\t<span style=\"font-size:16px;\">10) bridge1 \u5e7f\u64ad ARP \u62a5\u6587\u3002<\/span>\n<\/p>\n<p style=\"margin-top:0px;margin-bottom:0px;padding:6px 0px;border:0px;outline:0px;vertical-align:baseline;line-height:1.5em;white-space:normal;text-indent:2em;\">\n\t<span style=\"font-size:16px;\">11) \u6700\u7ec8\u53e6\u5916\u4e00\u4e2a TAP \u8bbe\u5907 tap1 \u6536\u5230\u6b64\u8bf7\u6c42\u53d1\u9001\u62a5\u6587\uff0c\u7528\u6237\u7a0b\u5e8f\u901a\u8fc7 read()\u53ef\u4ee5\u5f97\u5230\u5b83\u3002<\/span>\n<\/p>\n<h3 id=\"N100B6\" style=\"margin:5px 0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;white-space:normal;text-indent:2em;\"><span class=\"ez-toc-section\" id=\"%E4%BB%8E_vlan200_%E5%AD%90%E8%AE%BE%E5%A4%87%E5%8F%91%E9%80%81_ARP_%E6%8A%A5%E6%96%87\"><\/span>\n\t<span style=\"font-size:16px;\">\u4ece vlan200 \u5b50\u8bbe\u5907\u53d1\u9001 ARP \u62a5\u6587<\/span><br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h5 id=\"N100BC\" style=\"margin:5px 0px 0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;white-space:normal;text-indent:2em;\"><span class=\"ez-toc-section\" id=\"%E5%9B%BE_5_ARP_from_vlan200_child_device\"><\/span>\n\t<span style=\"font-size:16px;\">\u56fe 5 .ARP from vlan200 child device<\/span><br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p style=\"text-indent:2em;\">\n\t<img decoding=\"async\" alt=\"\u56fe 5 .ARP from vlan200 child device\" src=\"http:\/\/www.weizn.net\/content\/uploadfile\/201606\/af6bbb10165bb95794f85777101128c720160603125556.jpg\" width=\"582\" style=\"margin:0px;padding:0px;outline:0px;vertical-align:baseline;line-height:15.36px;white-space:normal;\" \/>\n<\/p>\n<p style=\"margin-top:0px;margin-bottom:0px;padding:6px 0px;border:0px;outline:0px;vertical-align:baseline;line-height:1.5em;white-space:normal;text-indent:2em;\">\n\t<span style=\"font-size:16px;\">\u548c\u524d\u9762\u60c5\u51b5\u7c7b\u4f3c\uff0c\u533a\u522b\u662f VLAN ID \u662f 200\uff0c\u5bf9\u7aef\u7684 vlan200 \u5b50\u8bbe\u5907\u8bbe\u7f6e\u4e3a reorder_hdr = 0\uff0c\u8868\u793a\u6b64\u8bbe\u5907\u88ab\u8981\u6c42\u4fdd\u7559\u6536\u5230\u7684\u62a5\u6587\u4e2d\u7684 VLAN Tag\u3002\u6b64\u65f6\u5b50\u8bbe\u5907\u4f1a\u6536\u5230 ARP \u62a5\u6587\uff0c\u4f46\u662f\u5e26\u4e86 VLAN ID 200 \u7684 Tag\uff0c\u65e2 ARP@vlan200\u3002<\/span>\n<\/p>\n<h3 id=\"N100C8\" style=\"margin:5px 0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;white-space:normal;text-indent:2em;\"><span class=\"ez-toc-section\" id=\"%E4%BB%8E%E4%B8%AD%E5%BF%83_bridge_%E5%8F%91%E9%80%81_ARP_%E6%8A%A5%E6%96%87\"><\/span>\n\t<span style=\"font-size:16px;\">\u4ece\u4e2d\u5fc3 bridge \u53d1\u9001 ARP \u62a5\u6587<\/span><br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h5 id=\"N100CE\" style=\"margin:5px 0px 0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;white-space:normal;text-indent:2em;\"><span class=\"ez-toc-section\" id=\"%E5%9B%BE_5_ARP_from_central_bridge\"><\/span>\n\t<span style=\"font-size:16px;\">\u56fe 5 .ARP from central bridge<\/span><br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p style=\"text-indent:2em;\">\n\t<img decoding=\"async\" alt=\"\u56fe 5 .ARP from central bridge\" src=\"http:\/\/www.weizn.net\/content\/uploadfile\/201606\/ba1b8648a84883fd3f954b406b96082a20160603125557.jpg\" width=\"582\" style=\"margin:0px;padding:0px;outline:0px;vertical-align:baseline;line-height:15.36px;white-space:normal;\" \/>\n<\/p>\n<p style=\"margin-top:0px;margin-bottom:0px;padding:6px 0px;border:0px;outline:0px;vertical-align:baseline;line-height:1.5em;white-space:normal;text-indent:2em;\">\n\t<span style=\"font-size:16px;\">\u5f53 bridge0 \u62e5\u6709 IP \u65f6\uff0c\u901a\u8fc7 Linux \u8def\u7531\u8868\u7528\u6237\u7a0b\u5e8f\u53ef\u4ee5\u76f4\u63a5\u5c06 ARP \u62a5\u6587\u53d1\u5411 bridge0\u3002\u8fd9\u65f6 tap0 \u548c\u5916\u90e8\u7f51\u7edc\u90fd\u80fd\u6536\u5230 ARP\uff0c\u4f46 VLAN \u5b50\u8bbe\u5907\u7531\u4e8e VLAN ID \u8fc7\u6ee4\u7684\u539f\u56e0\uff0c\u5c06\u6536\u4e0d\u5230 ARP \u4fe1\u606f\u3002<\/span>\n<\/p>\n<h3 id=\"N100DA\" style=\"margin:5px 0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;white-space:normal;text-indent:2em;\"><span class=\"ez-toc-section\" id=\"%E4%BB%8E%E5%A4%96%E9%83%A8%E7%BD%91%E7%BB%9C%E5%90%91%E7%89%A9%E7%90%86%E7%BD%91%E5%8D%A1%E5%8F%91%E9%80%81_ARPvlan200_%E6%8A%A5%E6%96%87\"><\/span>\n\t<span style=\"font-size:16px;\">\u4ece\u5916\u90e8\u7f51\u7edc\u5411\u7269\u7406\u7f51\u5361\u53d1\u9001 ARP@vlan200 \u62a5\u6587<\/span><br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h5 id=\"N100E0\" style=\"margin:5px 0px 0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;white-space:normal;text-indent:2em;\"><span class=\"ez-toc-section\" id=\"%E5%9B%BE_6_ARP_from_external_network\"><\/span>\n\t<span style=\"font-size:16px;\">\u56fe 6 .ARP from external network<\/span><br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p style=\"text-indent:2em;\">\n\t<img decoding=\"async\" alt=\"\u56fe 6 .ARP from external network\" src=\"http:\/\/www.weizn.net\/content\/uploadfile\/201606\/9014b297480b680c6bc3514cea72a27720160603125558.jpg\" width=\"582\" style=\"margin:0px;padding:0px;outline:0px;vertical-align:baseline;line-height:15.36px;white-space:normal;\" \/>\n<\/p>\n<p style=\"margin-top:0px;margin-bottom:0px;padding:6px 0px;border:0px;outline:0px;vertical-align:baseline;line-height:1.5em;white-space:normal;text-indent:2em;\">\n\t<span style=\"font-size:16px;\">\u5f53\u5916\u90e8\u7f51\u7edc\u8fde\u63a5\u5728\u4e00\u4e2a\u652f\u6301 VLAN \u5e76\u4e14\u5bf9\u5e94\u7aef\u53e3\u4e3a vlan200 \u65f6\uff0c\u6b64\u60c5\u51b5\u4f1a\u53d1\u751f\u3002\u6b64\u65f6\u6240\u6709\u7684 VLAN ID \u4e3a 200 \u7684 VLAN \u5b50\u8bbe\u5907\u90fd\u5c06\u63a5\u53d7\u5230\u62a5\u6587\uff0c\u5982\u679c\u8bbe\u7f6e reorder_hdr=0 \u5219\u4f1a\u6536\u5230\u5e26 Tag \u7684 ARP@vlan200\u3002<\/span>\n<\/p>\n<h3 id=\"N100EC\" style=\"margin:5px 0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;white-space:normal;text-indent:2em;\"><span class=\"ez-toc-section\" id=\"%E4%BB%8E_TAP_%E8%AE%BE%E5%A4%87%E4%BB%A5_ping_%E6%96%B9%E5%BC%8F%E5%8F%91%E9%80%81_ARP\"><\/span>\n\t<span style=\"font-size:16px;\">\u4ece TAP \u8bbe\u5907\u4ee5 ping \u65b9\u5f0f\u53d1\u9001 ARP<\/span><br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h5 id=\"N100F2\" style=\"margin:5px 0px 0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;white-space:normal;text-indent:2em;\"><span class=\"ez-toc-section\" id=\"%E5%9B%BE_7_ping_from_TAP_device\"><\/span>\n\t<span style=\"font-size:16px;\">\u56fe 7 .ping from TAP device<\/span><br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p style=\"text-indent:2em;\">\n\t<img decoding=\"async\" alt=\"\u56fe 7 .ping from TAP device\" src=\"http:\/\/www.weizn.net\/content\/uploadfile\/201606\/0254c659a541668c61105de918e7d94820160603125558.jpg\" width=\"582\" style=\"margin:0px;padding:0px;outline:0px;vertical-align:baseline;line-height:15.36px;white-space:normal;\" \/>\n<\/p>\n<p style=\"margin-top:0px;margin-bottom:0px;padding:6px 0px;border:0px;outline:0px;vertical-align:baseline;line-height:1.5em;white-space:normal;text-indent:2em;\">\n\t<span style=\"font-size:16px;\">\u7ed9 tap0 \u8d4b\u4e88 IP \u5e76\u52a0\u5165\u8def\u7531\uff0c\u6b64\u65f6\u518d Ping \u5176\u5bf9\u5e94\u7f51\u6bb5\u7684\u672a\u77e5 IP \u4f1a\u4ea7\u751f ARP \u53d1\u9001\u8bf7\u6c42\u3002\u9700\u8981\u6ce8\u610f\u7684\u662f\u6b64\u65f6\u7531\u4e8e tap0 \u4e0a\u5b58\u5728\u7684\u662f\u53d1\u9001\u800c\u4e0d\u662f\u63a5\u6536\u8bf7\u6c42\uff0c\u56e0\u6b64 ARP \u62a5\u6587\u4e0d\u4f1a\u88ab\u8f6c\u53d1\u5230\u6865\u4e0a\uff0c\u4ece\u800c\u4ec0\u4e48\u4e5f\u4e0d\u4f1a\u53d1\u751f\u3002\u56fe\u4e2d\u53f3\u8fb9\u753b\u4e86\u4e00\u4e2a\u7c7b\u4f3c\u60c5\u51b5\uff1a\u4ece vlan200 \u5b50\u8bbe\u5907\u53d1\u9001 ARP \u8bf7\u6c42\u3002\u7531\u4e8e\u7f3a\u5c11 VETH \u8bbe\u5907\u53cd\u8f6c\u8bf7\u6c42\u65b9\u5411\uff0c\u56e0\u6b64\u62a5\u6587\u4e5f\u4e0d\u4f1a\u88ab\u8f6c\u53d1\u5230\u6865\u4e0a\uff0c\u800c\u662f\u76f4\u63a5\u901a\u8fc7\u7269\u7406\u7f51\u5361\u53d1\u5f80\u5916\u90e8\u7f51\u7edc\u3002<\/span>\n<\/p>\n<h3 id=\"N100FE\" style=\"margin:5px 0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;white-space:normal;text-indent:2em;\"><span class=\"ez-toc-section\" id=\"%E4%BB%A5%E6%96%87%E4%BB%B6%E6%93%8D%E4%BD%9C%E6%96%B9%E5%BC%8F%E4%BB%8E_TAP_%E8%AE%BE%E5%A4%87%E5%8F%91%E9%80%81%E6%8A%A5%E6%96%87\"><\/span>\n\t<span style=\"font-size:16px;\">\u4ee5\u6587\u4ef6\u64cd\u4f5c\u65b9\u5f0f\u4ece TAP \u8bbe\u5907\u53d1\u9001\u62a5\u6587<\/span><br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h5 id=\"N10104\" style=\"margin:5px 0px 0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;white-space:normal;text-indent:2em;\"><span class=\"ez-toc-section\" id=\"%E5%9B%BE_8_file_operation_on_TAP_device\"><\/span>\n\t<span style=\"font-size:16px;\">\u56fe 8 .file operation on TAP device<\/span><br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p style=\"text-indent:2em;\">\n\t<img decoding=\"async\" alt=\"\u56fe 8 .file operation on TAP device\" src=\"http:\/\/www.weizn.net\/content\/uploadfile\/201606\/0ddf4ba741d7be9f6e52e155f4af888720160603125559.jpg\" width=\"582\" style=\"margin:0px;padding:0px;outline:0px;vertical-align:baseline;line-height:15.36px;white-space:normal;\" \/>\n<\/p>\n<p style=\"margin-top:0px;margin-bottom:0px;padding:6px 0px;border:0px;outline:0px;vertical-align:baseline;line-height:1.5em;white-space:normal;text-indent:2em;\">\n\t<span style=\"font-size:16px;\">\u7528\u6237\u7a0b\u5e8f\u6307\u5b9a tap0 \u8bbe\u5907\u53d1\u9001\u62a5\u6587\u6709\u4e24\u79cd\u65b9\u5f0f\uff1asocket \u548c file operation\u3002\u5f53\u7528 socket_raw \u6807\u5fd7\u65b0\u5efa socket \u5e76\u6307\u5b9a\u8bbe\u5907\u7f16\u53f7\u65f6\uff0c\u53ef\u4ee5\u8981\u6c42\u5185\u6838\u5c06\u62a5\u6587\u4ece tap0 \u53d1\u9001\u3002\u4f46\u548c\u524d\u9762\u7684 ping from tap0 \u60c5\u51b5\u7c7b\u4f3c\uff0c\u7531\u4e8e\u62a5\u6587\u65b9\u5411\u95ee\u9898\uff0c\u6d88\u606f\u5e76\u4e0d\u4f1a\u88ab\u8f6c\u53d1\u5230 bridge0 \u4e0a\u3002\u5f53\u7528 open()\u65b9\u5f0f\u6253\u5f00 tap \u8bbe\u5907\u6587\u4ef6\u65f6\uff0c\u60c5\u51b5\u6709\u6240\u4e0d\u540c\u3002\u5f53\u6267\u884c write()\u64cd\u4f5c\u65f6\uff0c\u5185\u6838\u8ba4\u4e3a tap0 \u6536\u5230\u4e86\u62a5\u6587\uff0c\u4ece\u800c\u4f1a\u89e6\u53d1\u8f6c\u53d1\u52a8\u4f5c\uff0cbridge0 \u5c06\u6536\u5230\u5b83\u3002\u5982\u679c\u53d1\u9001\u7684\u62a5\u6587\u5982\u56fe\u6240\u793a\uff0c\u662f\u4e00\u4e2a\u4ee5 A \u4e3a\u76ee\u7684\u5730\u7684\u643a\u5e26 VLAN ID 100 Tag \u7684\u5355\u70b9\u62a5\u6587\uff0cbridge0 \u5c06\u4f1a\u627e\u5230\u5bf9\u5e94\u7684\u8bbe\u5907\u8fdb\u884c\u8f6c\u53d1\uff0c\u5bf9\u5e94\u7684 VLAN \u5b50\u8bbe\u5907\u5c06\u6536\u5230\u6ca1\u6709 VLAN ID 100 Tag \u7684\u62a5\u6587\u3002<\/span>\n<\/p>\n<h2 id=\"4.Linux \u4e0a\u914d\u7f6e\u7f51\u7edc\u8bbe\u5907\u547d\u4ee4\u4e3e\u4f8b |outline\" style=\"margin:5px 0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;white-space:normal;text-indent:2em;\"><span class=\"ez-toc-section\" id=\"Linux_%E4%B8%8A%E9%85%8D%E7%BD%AE%E7%BD%91%E7%BB%9C%E8%AE%BE%E5%A4%87%E5%91%BD%E4%BB%A4%E4%B8%BE%E4%BE%8B\"><\/span>\n\t<span style=\"font-size:16px;\">Linux \u4e0a\u914d\u7f6e\u7f51\u7edc\u8bbe\u5907\u547d\u4ee4\u4e3e\u4f8b<\/span><br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"margin-bottom:0px;padding:6px 0px;border:0px;outline:0px;vertical-align:baseline;line-height:1.5em;white-space:normal;text-indent:2em;\">\n\t<span style=\"font-size:16px;\">\u4ee5 Redhat6.2 \u7ea2\u5e3d Linux \u53d1\u884c\u7248\u4e3a\u4f8b\uff0c\u5982\u679c\u5df2\u5b89\u88c5 VLAN \u5185\u6838\u6a21\u5757\u548c\u7ba1\u7406\u5de5\u5177 vconfig\uff0cTAP\/TUN \u8bbe\u5907\u7ba1\u7406\u5de5\u5177 tunctl\uff0c\u90a3\u4e48\u53ef\u4ee5\u7528\u4ee5\u4e0b\u547d\u4ee4\u8bbe\u7f6e\u524d\u8ff0\u7f51\u7edc\u8bbe\u5907\uff1a<\/span>\n<\/p>\n<p style=\"text-indent:2em;\">\n\t\n<\/p>\n<ul class=\"ibm-bullet-list\" style=\"border:0px;outline:0px;vertical-align:baseline;list-style:none;margin:0px;padding:0px 0px 8px;line-height:1.5em;white-space:normal;\">\n<li style=\"margin:0px;padding:5px 0px 5px 11px;border:0px;outline:0px;vertical-align:baseline;height:22px;clear:left;background-image:url(https:\/\/1.www.s81c.com\/i\/v17\/bullets\/ibm_lg_bullet_grey_on.gif);background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:0px 13px;background-repeat:no-repeat;\">\n\t\t<span style=\"font-size:16px;\">\u521b\u5efa Bridge\uff1abrctl addbr [BRIDGE NAME]<\/span>\n\t<\/li>\n<li style=\"margin:0px;padding:5px 0px 5px 11px;border:0px;outline:0px;vertical-align:baseline;height:22px;clear:left;background-image:url(https:\/\/1.www.s81c.com\/i\/v17\/bullets\/ibm_lg_bullet_grey_on.gif);background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:0px 13px;background-repeat:no-repeat;\">\n\t\t<span style=\"font-size:16px;\">\u5220\u9664 Bridge\uff1abrctl delbr [BRIDGE NAME]<\/span>\n\t<\/li>\n<li style=\"margin:0px;padding:5px 0px 5px 11px;border:0px;outline:0px;vertical-align:baseline;height:22px;clear:left;background-image:url(https:\/\/1.www.s81c.com\/i\/v17\/bullets\/ibm_lg_bullet_grey_on.gif);background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:0px 13px;background-repeat:no-repeat;\">\n\t\t<span style=\"font-size:16px;\">attach \u8bbe\u5907\u5230 Bridge\uff1abrctl addif [BRIDGE NAME] [DEVICE NAME]<\/span>\n\t<\/li>\n<li style=\"margin:0px;padding:5px 0px 5px 11px;border:0px;outline:0px;vertical-align:baseline;height:22px;clear:left;background-image:url(https:\/\/1.www.s81c.com\/i\/v17\/bullets\/ibm_lg_bullet_grey_on.gif);background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:0px 13px;background-repeat:no-repeat;\">\n\t\t<span style=\"font-size:16px;\">\u4ece Bridge detach \u8bbe\u5907\uff1abrctl delif [BRIDGE NAME] [DEVICE NAME]<\/span>\n\t<\/li>\n<li style=\"margin:0px;padding:5px 0px 5px 11px;border:0px;outline:0px;vertical-align:baseline;height:22px;clear:left;background-image:url(https:\/\/1.www.s81c.com\/i\/v17\/bullets\/ibm_lg_bullet_grey_on.gif);background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:0px 13px;background-repeat:no-repeat;\">\n\t\t<span style=\"font-size:16px;\">\u67e5\u8be2 Bridge \u60c5\u51b5\uff1abrctl show<\/span>\n\t<\/li>\n<li style=\"margin:0px;padding:5px 0px 5px 11px;border:0px;outline:0px;vertical-align:baseline;height:22px;clear:left;background-image:url(https:\/\/1.www.s81c.com\/i\/v17\/bullets\/ibm_lg_bullet_grey_on.gif);background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:0px 13px;background-repeat:no-repeat;\">\n\t\t<span style=\"font-size:16px;\">\u521b\u5efa VLAN \u8bbe\u5907\uff1avconfig add [PARENT DEVICE NAME] [VLAN ID]<\/span>\n\t<\/li>\n<li style=\"margin:0px;padding:5px 0px 5px 11px;border:0px;outline:0px;vertical-align:baseline;height:22px;clear:left;background-image:url(https:\/\/1.www.s81c.com\/i\/v17\/bullets\/ibm_lg_bullet_grey_on.gif);background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:0px 13px;background-repeat:no-repeat;\">\n\t\t<span style=\"font-size:16px;\">\u5220\u9664 VLAN \u8bbe\u5907\uff1avconfig rem [VLAN DEVICE NAME]<\/span>\n\t<\/li>\n<li style=\"margin:0px;padding:5px 0px 5px 11px;border:0px;outline:0px;vertical-align:baseline;height:22px;clear:left;background-image:url(https:\/\/1.www.s81c.com\/i\/v17\/bullets\/ibm_lg_bullet_grey_on.gif);background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:0px 13px;background-repeat:no-repeat;\">\n\t\t<span style=\"font-size:16px;\">\u8bbe\u7f6e VLAN \u8bbe\u5907 flag\uff1avconfig set_flag [VLAN DEVICE NAME] [FLAG] [VALUE]<\/span>\n\t<\/li>\n<li style=\"margin:0px;padding:5px 0px 5px 11px;border:0px;outline:0px;vertical-align:baseline;height:22px;clear:left;background-image:url(https:\/\/1.www.s81c.com\/i\/v17\/bullets\/ibm_lg_bullet_grey_on.gif);background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:0px 13px;background-repeat:no-repeat;\">\n\t\t<span style=\"font-size:16px;\">\u8bbe\u7f6e VLAN \u8bbe\u5907 qos\uff1a<\/span>\n\t<\/li>\n<\/ul>\n<p>\n\t\n<\/p>\n<p style=\"margin-top:0px;margin-bottom:0px;padding:6px 0px;border:0px;outline:0px;vertical-align:baseline;line-height:1.5em;white-space:normal;text-indent:2em;\">\n\t<span style=\"font-size:16px;\">vconfig set_egress_map [VLAN DEVICE NAME] [SKB_PRIORITY] [VLAN_QOS]<\/span>\n<\/p>\n<p style=\"margin-top:0px;margin-bottom:0px;padding:6px 0px;border:0px;outline:0px;vertical-align:baseline;line-height:1.5em;white-space:normal;text-indent:2em;\">\n\t<span style=\"font-size:16px;\">vconfig set_ingress_map [VLAN DEVICE NAME] [SKB_PRIORITY] [VLAN_QOS]<\/span>\n<\/p>\n<p style=\"text-indent:2em;\">\n\t\n<\/p>\n<ul class=\"ibm-bullet-list\" style=\"border:0px;outline:0px;vertical-align:baseline;list-style:none;margin:0px;padding:0px 0px 8px;line-height:1.5em;white-space:normal;\">\n<li style=\"margin:0px;padding:5px 0px 5px 11px;border:0px;outline:0px;vertical-align:baseline;height:22px;clear:left;background-image:url(https:\/\/1.www.s81c.com\/i\/v17\/bullets\/ibm_lg_bullet_grey_on.gif);background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:0px 13px;background-repeat:no-repeat;\">\n\t\t<span style=\"font-size:16px;\">\u67e5\u8be2 VLAN \u8bbe\u5907\u60c5\u51b5\uff1acat \/proc\/net\/vlan\/[VLAN DEVICE NAME]<\/span>\n\t<\/li>\n<li style=\"margin:0px;padding:5px 0px 5px 11px;border:0px;outline:0px;vertical-align:baseline;height:22px;clear:left;background-image:url(https:\/\/1.www.s81c.com\/i\/v17\/bullets\/ibm_lg_bullet_grey_on.gif);background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:0px 13px;background-repeat:no-repeat;\">\n\t\t<span style=\"font-size:16px;\">\u521b\u5efa VETH \u8bbe\u5907\uff1aip link add link [DEVICE NAME] type veth<\/span>\n\t<\/li>\n<li style=\"margin:0px;padding:5px 0px 5px 11px;border:0px;outline:0px;vertical-align:baseline;height:22px;clear:left;background-image:url(https:\/\/1.www.s81c.com\/i\/v17\/bullets\/ibm_lg_bullet_grey_on.gif);background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:0px 13px;background-repeat:no-repeat;\">\n\t\t<span style=\"font-size:16px;\">\u521b\u5efa TAP \u8bbe\u5907\uff1atunctl -p [TAP DEVICE NAME]<\/span>\n\t<\/li>\n<li style=\"margin:0px;padding:5px 0px 5px 11px;border:0px;outline:0px;vertical-align:baseline;height:22px;clear:left;background-image:url(https:\/\/1.www.s81c.com\/i\/v17\/bullets\/ibm_lg_bullet_grey_on.gif);background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:0px 13px;background-repeat:no-repeat;\">\n\t\t<span style=\"font-size:16px;\">\u5220\u9664 TAP \u8bbe\u5907\uff1atunctl -d [TAP DEVICE NAME]<\/span>\n\t<\/li>\n<li style=\"margin:0px;padding:5px 0px 5px 11px;border:0px;outline:0px;vertical-align:baseline;height:22px;clear:left;background-image:url(https:\/\/1.www.s81c.com\/i\/v17\/bullets\/ibm_lg_bullet_grey_on.gif);background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:0px 13px;background-repeat:no-repeat;\">\n\t\t<span style=\"font-size:16px;\">\u67e5\u8be2\u7cfb\u7edf\u91cc\u6240\u6709\u4e8c\u5c42\u8bbe\u5907\uff0c\u5305\u62ec VETH\/TAP \u8bbe\u5907\uff1aip link show<\/span>\n\t<\/li>\n<li style=\"margin:0px;padding:5px 0px 5px 11px;border:0px;outline:0px;vertical-align:baseline;height:22px;clear:left;background-image:url(https:\/\/1.www.s81c.com\/i\/v17\/bullets\/ibm_bullet_grey_on.png);background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:0px 13px;background-repeat:no-repeat;\">\n\t\t<span style=\"font-size:16px;\">\u5220\u9664\u666e\u901a\u4e8c\u5c42\u8bbe\u5907\uff1aip link delete [DEVICE NAME] type [TYPE]<\/span>\n\t<\/li>\n<\/ul>\n<p>\n\t\n<\/p>\n<h2 id=\"5.\u5c0f\u7ed3 |outline\" style=\"margin:5px 0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;white-space:normal;text-indent:2em;\"><span class=\"ez-toc-section\" id=\"%E5%B0%8F%E7%BB%93\"><\/span>\n\t<span style=\"font-size:16px;\">\u5c0f\u7ed3<\/span><br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"margin-bottom:0px;padding:6px 0px;border:0px;outline:0px;vertical-align:baseline;line-height:1.5em;white-space:normal;text-indent:2em;\">\n\t<span style=\"font-size:16px;\">\u7efc\u4e0a\u6240\u8ff0\uff0cLinux \u5df2\u7ecf\u63d0\u4f9b\u4e00\u5957\u57fa\u672c\u5de5\u5177\u4f9b\u7528\u6237\u521b\u5efa\u51fa\u5404\u79cd\u5185\u90e8\u7f51\u7edc\uff0c\u5229\u7528\u8fd9\u4e9b\u5de5\u5177\u53ef\u4ee5\u65b9\u4fbf\u7684\u521b\u5efa\u51fa\u7279\u5b9a\u7f51\u7edc\u7ed9\u5e94\u7528\u7a0b\u5e8f\u4f7f\u7528\uff0c\u5305\u62ec\u4e91\u8ba1\u7b97\u4e2d\u7684\u521d\u7ea7\u5185\u90e8\u865a\u62df\u7f51\u7edc\u3002<\/span>\n<\/p>\n<h2 id=\"resources\" class=\"ibm-rule\" style=\"margin:5px 0px;padding:6px 0px 0px;border-width:2px 0px 0px;border-top-style:solid;border-top-color:#666666;outline:0px;vertical-align:baseline;white-space:normal;text-indent:2em;\"><span class=\"ez-toc-section\" id=\"%E5%8F%82%E8%80%83%E8%B5%84%E6%96%99\"><\/span>\n\t<span style=\"font-size:16px;\">\u53c2\u8003\u8d44\u6599<\/span><br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3 class=\"dw-resources-category-heading\" style=\"margin:5px 0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;white-space:normal;text-indent:2em;\"><span class=\"ez-toc-section\" id=\"%E5%AD%A6%E4%B9%A0\"><\/span>\n\t<span style=\"font-size:16px;\">\u5b66\u4e60<\/span><br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-indent:2em;\">\n\t\n<\/p>\n<ul class=\"ibm-bullet-list\" style=\"border:0px;outline:0px;vertical-align:baseline;list-style:none;margin:0px;padding:0px;line-height:1.5em;white-space:normal;\">\n<li style=\"margin:0px;padding:5px 0px 5px 11px;border:0px;outline:0px;vertical-align:baseline;height:22px;clear:left;background-image:url(https:\/\/1.www.s81c.com\/i\/v17\/bullets\/ibm_lg_bullet_grey_on.gif);background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:0px 13px;background-repeat:no-repeat;\">\n\t\t<a href=\"http:\/\/www.linuxcommand.org\/man_pages\/vconfig8.html\" style=\"margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;display:inline;\"><span style=\"font-size:16px;\">Vconfig Man Page<\/span><\/a><span style=\"font-size:16px;\">\uff0cvconfig \u5de5\u5177\u5e2e\u52a9\u6587\u6863\u3002<\/span>\n\t<\/li>\n<li style=\"margin:0px;padding:5px 0px 5px 11px;border:0px;outline:0px;vertical-align:baseline;height:22px;clear:left;background-image:url(https:\/\/1.www.s81c.com\/i\/v17\/bullets\/ibm_lg_bullet_grey_on.gif);background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:0px 13px;background-repeat:no-repeat;\">\n\t\t<a href=\"http:\/\/candelatech.com\/~greear\/vlan.html\" style=\"margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;display:inline;\"><span style=\"font-size:16px;\">802.1Q VLAN implementation for Linux<\/span><\/a><span style=\"font-size:16px;\">\uff0cLinux \u4e2d VLAN \u6a21\u5757\u5982\u4f55\u5b9e\u73b0\u7684\u6587\u6863\u8bf4\u660e\u3002<\/span>\n\t<\/li>\n<li style=\"margin:0px;padding:5px 0px 5px 11px;border:0px;outline:0px;vertical-align:baseline;height:22px;clear:left;background-image:url(https:\/\/1.www.s81c.com\/i\/v17\/bullets\/ibm_lg_bullet_grey_on.gif);background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:0px 13px;background-repeat:no-repeat;\">\n\t\t<a href=\"http:\/\/www.policyrouting.org\/iproute2.doc.html\" style=\"margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;display:inline;\"><span style=\"font-size:16px;\">IPROUTE2 Utility Suite Howto<\/span><\/a><span style=\"font-size:16px;\">\uff0cLinux \u91cc\u7684 IP \u5de5\u5177\u4f7f\u7528\u8bf4\u660e\u3002<\/span>\n\t<\/li>\n<li style=\"margin:0px;padding:5px 0px 5px 11px;border:0px;outline:0px;vertical-align:baseline;height:44px;clear:left;background-image:url(https:\/\/1.www.s81c.com\/i\/v17\/bullets\/ibm_lg_bullet_grey_on.gif);background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:0px 13px;background-repeat:no-repeat;\">\n\t\t<a href=\"http:\/\/www.ibm.com\/developerworks\/linux\/library\/l-virtual-networking\" style=\"margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;display:inline;\"><span style=\"font-size:16px;\">Virtual networking in Linux<\/span><\/a><span style=\"font-size:16px;\">\uff0c\u4ee5\u865a\u62df\u5316\u5e94\u7528\u4e3a\u4e2d\u5fc3\u8bb2\u8ff0\u4e3b\u6d41\u7684\u865a\u62df\u7f51\u7edc\u6280\u672f\uff0c\u4e3b\u8981\u4ee5 openvswith \u4e3a\u4f8b\u3002<\/span>\n\t<\/li>\n<li style=\"margin:0px;padding:5px 0px 5px 11px;border:0px;outline:0px;vertical-align:baseline;height:22px;clear:left;background-image:url(https:\/\/1.www.s81c.com\/i\/v17\/bullets\/ibm_lg_bullet_grey_on.gif);background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:0px 13px;background-repeat:no-repeat;\">\n\t\t<a href=\"http:\/\/tldp.org\/HOWTO\/BRIDGE-STP-HOWTO\/index.html\" style=\"margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;display:inline;\"><span style=\"font-size:16px;\">Linux BRIDGE-STP-HOWTO<\/span><\/a><span style=\"font-size:16px;\">\uff0cLinux \u4e2d\u7684 bridge \u8bbe\u5907\u4f7f\u7528\u8bf4\u660e\u3002<\/span>\n\t<\/li>\n<li style=\"margin:0px;padding:5px 0px 5px 11px;border:0px;outline:0px;vertical-align:baseline;height:44px;clear:left;background-image:url(https:\/\/1.www.s81c.com\/i\/v17\/bullets\/ibm_lg_bullet_grey_on.gif);background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:0px 13px;background-repeat:no-repeat;\">\n\t\t<a href=\"http:\/\/www.linuxfoundation.org\/collaborate\/workgroups\/networking\/networkoverview\" style=\"margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;display:inline;\"><span style=\"font-size:16px;\">Linux Kernel Networking (Network Overview) by Rami Rosen<\/span><\/a><span style=\"font-size:16px;\">\uff0cLinux \u5185\u6838\u91cc\u7684\u5404\u79cd\u7f51\u7edc\u6982\u5ff5\u7684\u542b\u4e49\uff0c\u76ee\u7684\u53ca\u7528\u6cd5\u7b80\u5355\u4ecb\u7ecd\u3002<\/span>\n\t<\/li>\n<li style=\"margin:0px;padding:5px 0px 5px 11px;border:0px;outline:0px;vertical-align:baseline;height:44px;clear:left;background-image:url(https:\/\/1.www.s81c.com\/i\/v17\/bullets\/ibm_lg_bullet_grey_on.gif);background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:0px 13px;background-repeat:no-repeat;\">\n\t\t<span style=\"font-size:16px;\">\u5728&nbsp;<\/span><a href=\"http:\/\/www.ibm.com\/developerworks\/cn\/linux\/\" style=\"margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;display:inline;\"><span style=\"font-size:16px;\">developerWorks Linux \u4e13\u533a<\/span><\/a><span style=\"font-size:16px;\">\u5bfb\u627e\u4e3a Linux \u5f00\u53d1\u4eba\u5458\uff08\u5305\u62ec&nbsp;<\/span><a href=\"http:\/\/www.ibm.com\/developerworks\/cn\/linux\/newto\/\" style=\"margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;display:inline;\"><span style=\"font-size:16px;\">Linux \u65b0\u624b\u5165\u95e8<\/span><\/a><span style=\"font-size:16px;\">\uff09\u51c6\u5907\u7684\u66f4\u591a\u53c2\u8003\u8d44\u6599\u3002<\/span>\n\t<\/li>\n<\/ul>\n<p><span style=\"font-size:16px;\"><\/span><span style=\"font-size:16px;\"><\/span><span style=\"font-size:16px;\"><\/span><br \/>\n<span style=\"font-size:16px;\"><\/span><span style=\"font-size:16px;\"><\/span> <\/p>\n<p>\n\t\n<\/p>\n<p style=\"text-indent:2em;\">\n\t\n<\/p>\n<p style=\"text-indent:2em;\">\n\t<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\n\t\n<\/p>\n<p style=\"margin-top:0px;margin-bottom:0px;padding:0px 0px 10px;border:0px;outline:0px;font-size:inherit;vertical-align:baseline;font-family:HelveticaNeue-Light, 'Helvetica Neue Light', 'Helvetica Neue', Helvetica, Arial;width:920px;\">\n\t<span style=\"margin:0px;padding:0px;border:0px;outline:0px;font-size:inherit;vertical-align:baseline;color:#666666;\"><span style=\"margin:0px;padding:0px;border:0px;outline:0px;font-size:inherit;vertical-align:baseline;color:#B8471B;font-weight:bold;display:block;\"><\/span><\/span>\n<\/p>\n<div id=\"ibm-leadspace-body\" style=\"margin:0px auto;padding:0px;border:0px;outline:0px;vertical-align:baseline;width:940px;position:relative;min-height:0px;line-height:19.2px;white-space:normal;\">\n<p style=\"margin-top:0px;margin-bottom:0px;padding:0px 0px 10px;border:0px;outline:0px;vertical-align:baseline;width:920px;\">\n\t\t<span style=\"font-size:16px;\">\u62bd\u8c61\u7f51\u7edc\u8bbe\u5907\u7684\u539f\u7406\u53ca\u4f7f\u7528<\/span>\n\t<\/p>\n<\/div>\n<p>\n\t\n<\/p>\n<p>\n\t\n<\/p>\n<p style=\"margin-top:0px;margin-bottom:0px;padding:0px 0px 10px;border:0px;outline:0px;vertical-align:baseline;width:620px;line-height:1.3em;\">\n\t<span style=\"font-size:16px;\">\u7f51\u7edc\u865a\u62df\u5316\u662f Cloud \u4e2d\u7684\u4e00\u4e2a\u91cd\u8981\u90e8\u5206\u3002\u4f5c\u4e3a\u57fa\u7840\u77e5\u8bc6\uff0c\u672c\u6587\u8be6\u7ec6\u8bb2\u8ff0 Linux \u62bd\u8c61\u51fa\u6765\u7684\u5404\u79cd\u7f51\u7edc\u8bbe\u5907\u7684\u539f\u7406\u3001\u7528\u6cd5\u3001\u6570\u636e\u6d41\u5411\u3002\u60a8\u901a\u8fc7\u6b64\u6587\uff0c\u80fd\u591f\u77e5\u9053\u5982\u4f55\u4f7f\u7528 Linux \u7684\u57fa\u7840\u7f51\u7edc\u8bbe\u5907\u8fdb\u884c\u914d\u7f6e\u4ee5\u8fbe\u5230\u7279\u5b9a\u7684\u76ee\u7684\uff0c\u5206\u6790\u51fa Linux \u53ef\u80fd\u7684\u7f51\u7edc\u6545\u969c\u539f\u56e0\u3002<\/span>\n<\/p>\n<p style=\"margin-top:0px;margin-bottom:0px;padding:0px 0px 10px;border:0px;outline:0px;vertical-align:baseline;width:620px;line-height:1.3em;\">\n\t<span style=\"font-size:16px;line-height:1.5;\">Linux \u62bd\u8c61\u7f51\u7edc\u8bbe\u5907\u7b80\u4ecb<\/span>\n<\/p>\n<p style=\"margin-top:0px;margin-bottom:0px;padding:0px 0px 10px;border:0px;outline:0px;vertical-align:baseline;width:620px;line-height:1.3em;\">\n\t<span style=\"line-height:1.5em;font-size:16px;\">\u548c\u78c1\u76d8\u8bbe\u5907\u7c7b\u4f3c\uff0cLinux \u7528\u6237\u60f3\u8981\u4f7f\u7528\u7f51\u7edc\u529f\u80fd\uff0c\u4e0d\u80fd\u901a\u8fc7\u76f4\u63a5\u64cd\u4f5c\u786c\u4ef6\u5b8c\u6210\uff0c\u800c\u9700\u8981\u76f4\u63a5\u6216\u95f4\u63a5\u7684\u64cd&#8230;<\/span>\n<\/p>\n<p>\n\t\n<\/p>\n<p>\n\t\n<\/p>\n<p>\n\t\n<\/p>\n<p>\n\t<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[333],"tags":[],"class_list":["post-182","post","type-post","status-publish","format-standard","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v16.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>[\u8f6c]Linux\u4e0a\u7684\u57fa\u7840\u7f51\u7edc\u8bbe\u5907\u8be6\u89e3 - Wayne&#039;s Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/weizn.net\/?p=182\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"[\u8f6c]Linux\u4e0a\u7684\u57fa\u7840\u7f51\u7edc\u8bbe\u5907\u8be6\u89e3 - Wayne&#039;s Blog\" \/>\n<meta property=\"og:description\" content=\"\u62bd\u8c61\u7f51\u7edc\u8bbe\u5907\u7684\u539f\u7406\u53ca\u4f7f\u7528             \u7f51\u7edc\u865a\u62df\u5316\u662f Cloud \u4e2d\u7684\u4e00\u4e2a\u91cd\u8981\u90e8\u5206\u3002\u4f5c\u4e3a\u57fa\u7840\u77e5\u8bc6\uff0c\u672c\u6587\u8be6\u7ec6\u8bb2\u8ff0 Linux \u62bd\u8c61\u51fa\u6765\u7684\u5404\u79cd\u7f51\u7edc\u8bbe\u5907\u7684\u539f\u7406\u3001\u7528\u6cd5\u3001\u6570\u636e\u6d41\u5411\u3002\u60a8\u901a\u8fc7\u6b64\u6587\uff0c\u80fd\u591f\u77e5\u9053\u5982\u4f55\u4f7f\u7528 Linux \u7684\u57fa\u7840\u7f51\u7edc\u8bbe\u5907\u8fdb\u884c\u914d\u7f6e\u4ee5\u8fbe\u5230\u7279\u5b9a\u7684\u76ee\u7684\uff0c\u5206\u6790\u51fa Linux \u53ef\u80fd\u7684\u7f51\u7edc\u6545\u969c\u539f\u56e0\u3002    Linux \u62bd\u8c61\u7f51\u7edc\u8bbe\u5907\u7b80\u4ecb    \u548c\u78c1\u76d8\u8bbe\u5907\u7c7b\u4f3c\uff0cLinux \u7528\u6237\u60f3\u8981\u4f7f\u7528\u7f51\u7edc\u529f\u80fd\uff0c\u4e0d\u80fd\u901a\u8fc7\u76f4\u63a5\u64cd\u4f5c\u786c\u4ef6\u5b8c\u6210\uff0c\u800c\u9700\u8981\u76f4\u63a5\u6216\u95f4\u63a5\u7684\u64cd...\" \/>\n<meta property=\"og:url\" content=\"http:\/\/weizn.net\/?p=182\" \/>\n<meta property=\"og:site_name\" content=\"Wayne&#039;s Blog\" \/>\n<meta property=\"article:published_time\" content=\"2016-06-03T13:51:16+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.weizn.net\/content\/uploadfile\/201606\/b54fc2824c2f66202b62c5469aed7c9a20160603125553.jpg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"zinan\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"http:\/\/weizn.net\/#website\",\"url\":\"http:\/\/weizn.net\/\",\"name\":\"Wayne&#039;s Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"http:\/\/weizn.net\/#\/schema\/person\/e88bc12c590502d8b6249326f960b264\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/weizn.net\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"ImageObject\",\"@id\":\"http:\/\/weizn.net\/?p=182#primaryimage\",\"inLanguage\":\"zh-Hans\",\"url\":\"http:\/\/www.weizn.net\/content\/uploadfile\/201606\/b54fc2824c2f66202b62c5469aed7c9a20160603125553.jpg\",\"contentUrl\":\"http:\/\/www.weizn.net\/content\/uploadfile\/201606\/b54fc2824c2f66202b62c5469aed7c9a20160603125553.jpg\"},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/weizn.net\/?p=182#webpage\",\"url\":\"http:\/\/weizn.net\/?p=182\",\"name\":\"[\\u8f6c]Linux\\u4e0a\\u7684\\u57fa\\u7840\\u7f51\\u7edc\\u8bbe\\u5907\\u8be6\\u89e3 - Wayne&#039;s Blog\",\"isPartOf\":{\"@id\":\"http:\/\/weizn.net\/#website\"},\"primaryImageOfPage\":{\"@id\":\"http:\/\/weizn.net\/?p=182#primaryimage\"},\"datePublished\":\"2016-06-03T13:51:16+00:00\",\"dateModified\":\"2016-06-03T13:51:16+00:00\",\"breadcrumb\":{\"@id\":\"http:\/\/weizn.net\/?p=182#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/weizn.net\/?p=182\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/weizn.net\/?p=182#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\\u9996\\u9875\",\"item\":\"http:\/\/weizn.net\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"[\\u8f6c]Linux\\u4e0a\\u7684\\u57fa\\u7840\\u7f51\\u7edc\\u8bbe\\u5907\\u8be6\\u89e3\"}]},{\"@type\":\"Article\",\"@id\":\"http:\/\/weizn.net\/?p=182#article\",\"isPartOf\":{\"@id\":\"http:\/\/weizn.net\/?p=182#webpage\"},\"author\":{\"@id\":\"http:\/\/weizn.net\/#\/schema\/person\/e88bc12c590502d8b6249326f960b264\"},\"headline\":\"[\\u8f6c]Linux\\u4e0a\\u7684\\u57fa\\u7840\\u7f51\\u7edc\\u8bbe\\u5907\\u8be6\\u89e3\",\"datePublished\":\"2016-06-03T13:51:16+00:00\",\"dateModified\":\"2016-06-03T13:51:16+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\/\/weizn.net\/?p=182#webpage\"},\"wordCount\":589,\"commentCount\":0,\"publisher\":{\"@id\":\"http:\/\/weizn.net\/#\/schema\/person\/e88bc12c590502d8b6249326f960b264\"},\"image\":{\"@id\":\"http:\/\/weizn.net\/?p=182#primaryimage\"},\"thumbnailUrl\":\"http:\/\/www.weizn.net\/content\/uploadfile\/201606\/b54fc2824c2f66202b62c5469aed7c9a20160603125553.jpg\",\"articleSection\":[\"\\u7f51\\u7edc\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"http:\/\/weizn.net\/?p=182#respond\"]}]},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"http:\/\/weizn.net\/#\/schema\/person\/e88bc12c590502d8b6249326f960b264\",\"name\":\"zinan\",\"logo\":{\"@id\":\"http:\/\/weizn.net\/#personlogo\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"[\u8f6c]Linux\u4e0a\u7684\u57fa\u7840\u7f51\u7edc\u8bbe\u5907\u8be6\u89e3 - Wayne&#039;s Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/weizn.net\/?p=182","og_locale":"zh_CN","og_type":"article","og_title":"[\u8f6c]Linux\u4e0a\u7684\u57fa\u7840\u7f51\u7edc\u8bbe\u5907\u8be6\u89e3 - Wayne&#039;s Blog","og_description":"\u62bd\u8c61\u7f51\u7edc\u8bbe\u5907\u7684\u539f\u7406\u53ca\u4f7f\u7528             \u7f51\u7edc\u865a\u62df\u5316\u662f Cloud \u4e2d\u7684\u4e00\u4e2a\u91cd\u8981\u90e8\u5206\u3002\u4f5c\u4e3a\u57fa\u7840\u77e5\u8bc6\uff0c\u672c\u6587\u8be6\u7ec6\u8bb2\u8ff0 Linux \u62bd\u8c61\u51fa\u6765\u7684\u5404\u79cd\u7f51\u7edc\u8bbe\u5907\u7684\u539f\u7406\u3001\u7528\u6cd5\u3001\u6570\u636e\u6d41\u5411\u3002\u60a8\u901a\u8fc7\u6b64\u6587\uff0c\u80fd\u591f\u77e5\u9053\u5982\u4f55\u4f7f\u7528 Linux \u7684\u57fa\u7840\u7f51\u7edc\u8bbe\u5907\u8fdb\u884c\u914d\u7f6e\u4ee5\u8fbe\u5230\u7279\u5b9a\u7684\u76ee\u7684\uff0c\u5206\u6790\u51fa Linux \u53ef\u80fd\u7684\u7f51\u7edc\u6545\u969c\u539f\u56e0\u3002    Linux \u62bd\u8c61\u7f51\u7edc\u8bbe\u5907\u7b80\u4ecb    \u548c\u78c1\u76d8\u8bbe\u5907\u7c7b\u4f3c\uff0cLinux \u7528\u6237\u60f3\u8981\u4f7f\u7528\u7f51\u7edc\u529f\u80fd\uff0c\u4e0d\u80fd\u901a\u8fc7\u76f4\u63a5\u64cd\u4f5c\u786c\u4ef6\u5b8c\u6210\uff0c\u800c\u9700\u8981\u76f4\u63a5\u6216\u95f4\u63a5\u7684\u64cd...","og_url":"http:\/\/weizn.net\/?p=182","og_site_name":"Wayne&#039;s Blog","article_published_time":"2016-06-03T13:51:16+00:00","og_image":[{"url":"http:\/\/www.weizn.net\/content\/uploadfile\/201606\/b54fc2824c2f66202b62c5469aed7c9a20160603125553.jpg"}],"twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"zinan","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"http:\/\/weizn.net\/#website","url":"http:\/\/weizn.net\/","name":"Wayne&#039;s Blog","description":"","publisher":{"@id":"http:\/\/weizn.net\/#\/schema\/person\/e88bc12c590502d8b6249326f960b264"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/weizn.net\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"ImageObject","@id":"http:\/\/weizn.net\/?p=182#primaryimage","inLanguage":"zh-Hans","url":"http:\/\/www.weizn.net\/content\/uploadfile\/201606\/b54fc2824c2f66202b62c5469aed7c9a20160603125553.jpg","contentUrl":"http:\/\/www.weizn.net\/content\/uploadfile\/201606\/b54fc2824c2f66202b62c5469aed7c9a20160603125553.jpg"},{"@type":"WebPage","@id":"http:\/\/weizn.net\/?p=182#webpage","url":"http:\/\/weizn.net\/?p=182","name":"[\u8f6c]Linux\u4e0a\u7684\u57fa\u7840\u7f51\u7edc\u8bbe\u5907\u8be6\u89e3 - Wayne&#039;s Blog","isPartOf":{"@id":"http:\/\/weizn.net\/#website"},"primaryImageOfPage":{"@id":"http:\/\/weizn.net\/?p=182#primaryimage"},"datePublished":"2016-06-03T13:51:16+00:00","dateModified":"2016-06-03T13:51:16+00:00","breadcrumb":{"@id":"http:\/\/weizn.net\/?p=182#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["http:\/\/weizn.net\/?p=182"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/weizn.net\/?p=182#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"http:\/\/weizn.net\/"},{"@type":"ListItem","position":2,"name":"[\u8f6c]Linux\u4e0a\u7684\u57fa\u7840\u7f51\u7edc\u8bbe\u5907\u8be6\u89e3"}]},{"@type":"Article","@id":"http:\/\/weizn.net\/?p=182#article","isPartOf":{"@id":"http:\/\/weizn.net\/?p=182#webpage"},"author":{"@id":"http:\/\/weizn.net\/#\/schema\/person\/e88bc12c590502d8b6249326f960b264"},"headline":"[\u8f6c]Linux\u4e0a\u7684\u57fa\u7840\u7f51\u7edc\u8bbe\u5907\u8be6\u89e3","datePublished":"2016-06-03T13:51:16+00:00","dateModified":"2016-06-03T13:51:16+00:00","mainEntityOfPage":{"@id":"http:\/\/weizn.net\/?p=182#webpage"},"wordCount":589,"commentCount":0,"publisher":{"@id":"http:\/\/weizn.net\/#\/schema\/person\/e88bc12c590502d8b6249326f960b264"},"image":{"@id":"http:\/\/weizn.net\/?p=182#primaryimage"},"thumbnailUrl":"http:\/\/www.weizn.net\/content\/uploadfile\/201606\/b54fc2824c2f66202b62c5469aed7c9a20160603125553.jpg","articleSection":["\u7f51\u7edc"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["http:\/\/weizn.net\/?p=182#respond"]}]},{"@type":["Person","Organization"],"@id":"http:\/\/weizn.net\/#\/schema\/person\/e88bc12c590502d8b6249326f960b264","name":"zinan","logo":{"@id":"http:\/\/weizn.net\/#personlogo"}}]}},"_links":{"self":[{"href":"http:\/\/weizn.net\/index.php?rest_route=\/wp\/v2\/posts\/182","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/weizn.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/weizn.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/weizn.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/weizn.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=182"}],"version-history":[{"count":0,"href":"http:\/\/weizn.net\/index.php?rest_route=\/wp\/v2\/posts\/182\/revisions"}],"wp:attachment":[{"href":"http:\/\/weizn.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=182"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/weizn.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=182"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/weizn.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=182"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}