{"id":120815,"date":"2018-09-26T08:32:29","date_gmt":"2018-09-26T00:32:29","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=120815"},"modified":"2018-09-25T10:33:59","modified_gmt":"2018-09-25T02:33:59","slug":"linux-rtnetlink-answers-exists","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/linux-rtnetlink-answers-exists.html","title":{"rendered":"\u542f\u52a8\u7f51\u5361RTNETLINK answers: File exists\u9519\u8bef\u89e3\u51b3\u65b9\u6cd5"},"content":{"rendered":"
\u4e00\u3001\u95ee\u9898\u63cf\u8ff0<\/strong><\/span><\/div>\n

VMware\u4e2d\u514b\u9686\u865a\u62df\u673a\u662f\u7ecf\u5e38\u7684\u4e8b\u60c5\uff0c\u867d\u7136\u5982\u6b64\uff0c\u7528\u5230\u865a\u62df\u673a\u65f6\uff0c\u672c\u4eba\u8fd8\u662f\u559c\u6b22\u65b0\u5b89\u88c5\u4e00\u4e2a\u64cd\u4f5c\u7cfb\u7edf\uff0c\u9488\u5bf9\u670d\u52a1\u5668\u7684\u5e94\u7528\uff0c\u5728\u5b89\u88c5\u64cd\u4f5c\u7cfb\u7edf\u65f6\uff0c\u4e00\u5e76\u5b89\u88c5\u597d\uff0c\u5e76\u4e14\u4e5f\u82b1\u4e0d\u4e86\u591a\u5c11\u65f6\u95f4\u3002\u4f46\u6700\u8fd1\u9700\u8981\u5927\u91cf\u7684\u914d\u7f6e\u4e00\u6837\u7684\u865a\u62df\u673a\u8fdb\u884c\u6d4b\u8bd5\uff0c\u6545\u5b89\u88c5\u4e86\u4e00\u4e2a\u6a21\u677f\u865a\u62df\u673a\uff0c\u7136\u540e\u76f4\u63a5\u590d\u5236\u6a21\u677f\u865a\u62df\u673a\u5230\u4e0d\u540c\u7684\u6587\u4ef6\u5939\uff0c\u7136\u540e\u4f7f\u7528VMware \u76f4\u63a5\u6253\u5f00\u4f7f\u7528\uff0c\u4f46\u95ee\u9898\u51fa\u6765\u4e86\uff0c\u6253\u5f00\u8fd9\u4e9b\u590d\u5236\uff08\u514b\u9686\uff09\u7684\u865a\u62df\u673a\u5168\u90e8\u4f1a\u51fa\u73b0\u7f51\u7edc\u65e0\u6cd5\u542f\u52a8\u7684\u95ee\u9898\u3002\u4f7f\u7528 service network start\u00a0 \u547d\u4ee4\u51fa\u73b0\u62a5\u9519\u5982\u4e0b\uff1a<\/p>\n

device eth0 does not seem to be present\r\nRTNETLINK answers: File exists\r\nRTNETLINK answers: File exists\r\nRTNETLINK answers: File exists\r\n<\/pre>\n

\u73a9Linux\u86ee\u591a\u5e74\u4e86\uff0c\u81ea\u8ba4\u4e3a\u5bf9linux\u7f51\u7edc\u914d\u7f6e\u5f88\u719f\u6089\u4e86\uff0c\u6211\u7b2c\u4e00\u76f4\u89c9\u5c31\u662fMAC\u5730\u5740\u7684\u95ee\u9898\uff0c\u600e\u4e48\u66f4\u6539\u914d\u7f6e\u90fd\u4e0d\u884c\uff0c\u767e\u5ea6\u534a\u5929\uff0c\u7f51\u4e0a\u5f88\u591a\u5904\u7406\u65b9\u6cd5\u90fd\u662f\u8bf4\u4e0eNetworkManager\u670d\u52a1\u51b2\u7a81\u5bfc\u81f4\uff0c\u53ea\u8981\u628a\u8be5\u670d\u52a1\u505c\u6b62\u5373\u53ef\uff0c\u67e5\u534a\u5929\uff0c\u672c\u4eba\u5b89\u88c5\u7684\u64cd\u4f5c\u7cfb\u7edf\u6839\u672c\u5c31\u6ca1\u8fd9\u4e2a\u670d\u52a1\uff0c\u54ea\u6765\u7684\u51b2\u7a81\uff1f<\/p>\n

\u76f4\u5230\u4eca\u5929\u624d\u53d1\u73b0\u539f\u6765\u8fd8\u6709\u592a\u591a\u7684\u4e1c\u897f\u9700\u8981\u5b66\u4e60\u3002\u4e0d\u8fc7\u6211\u76f8\u4fe1\u53ea\u8981\u80af\u94bb\u7814\u53ca\u5584\u7528\u8c37\u6b4c\u4e0e\u767e\u5ea6\uff0c\u8fd8\u662f\u627e\u5230\u4e86\u89e3\u51b3\u65b9\u6cd5\u3002<\/p>\n

\u4e8c\u3001\u539f\u56e0\u5206\u6790<\/strong><\/span><\/div>\n

\u4f7f\u7528VMware \u6253\u5f00\u590d\u5236\u8fc7\u6765\u7684\u64cd\u4f5c\u7cfb\u7edf\u6587\u4ef6\uff0cVMware\u4f1a\u4e3a\u65b0\u4ea7\u751f\u7684\u865a\u62df\u673a\u914d\u7f6e\u4e00\u4e2a\u4e0e\u539f\u59cb\u865a\u62df\u673a\u7f51\u5361MAC\u5730\u5740\u4e0d\u540c\u7684\u7f51\u5361\u3002\u5bf9\u4e8eCentOS\u8fd9\u6837\u7684Linux\u7cfb\u7edf\uff0c\u4f1a\u628a\u8fd0\u884c\u65f6\u7684\u7f51\u5361MAC\u5730\u5740\u8bb0\u5165\u5230 \/etc\/udev\/rules.d\/70-persistent-net.rules<\/span> \u6587\u4ef6\u4e2d\u3002\u8fd9\u6837\u514b\u9686\u597d\u7684\u65b0\u7cfb\u7edf\u91cc\u4e5f\u4fdd\u5b58\u4e86\u8fd9\u4e2a\u8bb0\u5f55\u3002\u5f53\u65b0\u7cfb\u7edf\u542f\u52a8\u65f6\uff0c\u7531\u4e8evmware\u5df2\u7ecf\u4e3a\u5176\u914d\u7f6e\u4e86\u4e0d\u540c\u7684MAC\u5730\u5740\uff0c\u56e0\u6b64\u7cfb\u7edf\u4f1a\u5728\u542f\u52a8\u626b\u63cf\u786c\u4ef6\u65f6\u628a\u8fd9\u4e2a\u65b0\u7684MAC\u5730\u5740\u7684\u7f51\u5361\u5f53\u505a\u662feth1\uff0c\u5e76\u4e14\u589e\u52a0\u8bb0\u5165\u4e0a\u8ff0\u6587\u4ef6\u4e2d\u3002\u800c\u6b64\u65f6\u914d\u7f6e\u6587\u4ef6\u91cc\u7684\/etc\/sysconfig\/network-scripts\/ifcfg-eth0<\/span> \u91cc\u8bb0\u5f55\u7684\u8fd8\u662f\u539f\u6765\u7684MAC\u5730\u5740\uff0c\u800c\u8fd9\u4e2aMAC\u5730\u5740\u5728\u65b0\u7cfb\u7edf\u91cc\u662f\u4e0d\u5b58\u5728\u7684\uff0c\u6240\u4ee5\u65e0\u6cd5\u542f\u52a8\u3002<\/p>\n

\u4e09\u3001\u89e3\u51b3\u65b9\u6cd5<\/strong><\/span><\/div>\n

\u7f16\u8f91\/etc\/udev\/rules.d\/70-persistent-net.rules<\/span>
\n\u627e\u5230\u542bNAME=\"eth0\"\u7684\u90a3\u884c\u76f4\u63a5\u5220\u9664\uff0c\u5982\u4e0b\uff1a<\/p>\n

SUBSYSTEM==\"net\", ACTION==\"add\", DRIVERS==\"?*\", ATTR{address}==\"00:0c:29:ac:95:31\", ATTR{type}==\"1\", KERNEL==\"eth*\", NAME=\"eth0\"\r\n--------------------------------------------------------------------------------\r\n\u7f16\u8f91\u542bNAME=\"eth1\"\u7684\u90a3\u884c\uff1a\"eth1\"\u66f4\u6539\u4e3a\"eth0\"\r\n--------------------------------------------------------------------------------\r\n\u7f16\u8f91\/etc\/sysconfig\/network-scripts\/ifcfg-eth0\r\n\u66f4\u6539HWADDR\u5730\u5740\u8ddf\u4e0a\u9762rules\u6587\u4ef6\u7684MAC\u5730\u5740\u4e00\u6837\u3002\r\n--------------------------------------------------------------------------------\r\n<\/pre>\n

\u6700\u540e init 6 \u6216\u8005reboot \u7cfb\u7edf\u641e\u5b9a.<\/p>\n

\n

\u539f\u6587\u6765\u81ea\uff1ahttps:\/\/www.linuxidc.com\/Linux\/2014-01\/95253.htm<\/a><\/p>\n

\u672c\u6587\u5730\u5740\uff1ahttps:\/\/lrxjmw.cn\/linux-rtnetlink-answers-exists.html<\/a>\u7f16\u8f91\uff1a\u5f20\u96c4\uff0c\u5ba1\u6838\u5458\uff1a\u9004\u589e\u5b9d<\/span><\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"

\u4e00\u3001\u95ee\u9898\u63cf\u8ff0 VMware\u4e2d\u514b\u9686\u865a\u62df\u673a\u662f\u7ecf\u5e38\u7684\u4e8b\u60c5\uff0c\u867d\u7136\u5982\u6b64\uff0c\u7528\u5230\u865a\u62df\u673a\u65f6\uff0c\u672c\u4eba\u8fd8\u662f\u559c\u6b22\u65b0\u5b89\u88c5\u4e00\u4e2a\u64cd\u4f5c\u7cfb\u7edf\uff0c\u9488 […]<\/p>\n","protected":false},"author":643,"featured_media":120932,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-120815","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/120815","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/643"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=120815"}],"version-history":[{"count":6,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/120815\/revisions"}],"predecessor-version":[{"id":121483,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/120815\/revisions\/121483"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/120932"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=120815"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=120815"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=120815"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}