{"id":5388,"date":"2013-07-22T11:26:01","date_gmt":"2013-07-22T03:26:01","guid":{"rendered":"http:\/\/jpuyy.com\/?p=5388"},"modified":"2015-03-20T14:14:02","modified_gmt":"2015-03-20T06:14:02","slug":"centos-add-network-device","status":"publish","type":"post","link":"https:\/\/jpuyy.com\/?p=5388","title":{"rendered":"CentOS\u66f4\u6362\u6216\u6dfb\u52a0\u7f51\u5361"},"content":{"rendered":"<p>\u6709\u65f6\u66f4\u6362\u7f51\u5361\u6216\u6362\u4e3b\u677f\uff0c\u539f\u6709\u7684\u8bbe\u5907\u4fe1\u606f\u4f1a\u5b58\u653e\u5728\u539f\u6765\u7684\u78c1\u76d8\u3002\u8fd9\u65f6\u9700\u8981\u66f4\u65b0\u78c1\u76d8\u4e0a\u5bf9\u5e94\u7684\u4e00\u4e9b\u4fe1\u606f\uff0c\u6709\u4e9b\u60c5\u51b5\u4e0b\u78c1\u76d8\u4e0a\u7684\u4fe1\u606f\u4f1a\u81ea\u52a8\u66f4\u65b0\uff0c\u4f46\u81ea\u52a8\u66f4\u65b0\u4e0d\u751f\u6548\u65f6\uff0c\u8981\u624b\u52a8\u64cd\u4f5c\u3002<\/p>\n<p>\u5728CentOS6\u4e0b\uff0c\u6dfb\u52a0\u7f51\u5361\u4e4b\u540e\uff0c\u5148\u53bb\u67e5\u770b\u7f51\u5361\u7684mac\u5730\u5740\u3002<\/p>\n<pre>cat \/sys\/class\/net\/eth1\/address<\/pre>\n<p>\u63a5\u4e0b\u6765\u7f16\u8f91\/etc\/udev\/rules.d\/70-persistent-net.rules\uff08\u672c\u6765\u4f1a\u81ea\u52a8\u751f\u6210\uff09\uff0c\u52a0\u4e0a\u4e00\u884ceth1\u76f8\u5173\u7684\u4fe1\u606f\u3002<\/p>\n<pre># This file was automatically generated by the \/lib\/udev\/write_net_rules\r\n# program, run by the persistent-net-generator.rules rules file.\r\n#\r\n# You can modify it, as long as you keep each rule on a single\r\n# line, and change only the value of the NAME= key.\r\n# PCI device 0x8086:0x10c9 (igb)\r\nSUBSYSTEM==\"net\", ACTION==\"add\", DRIVERS==\"?*\", ATTR{address}==\"00:a0:d1:ea:7a:68\", ATTR{type}==\"1\", KERNEL==\"eth*\", NAME=\"eth0\"\r\n# PCI device 0x8086:0x10c9 (igb)\r\nSUBSYSTEM==\"net\", ACTION==\"add\", DRIVERS==\"?*\", ATTR{address}==\"00:a0:d1:ea:7a:69\", ATTR{type}==\"1\", KERNEL==\"eth*\", NAME=\"eth1\"<\/pre>\n<p>\u6700\u540e\u5230\/etc\/sysconfig\/network-scripts\/ifcfg-eth1\uff0c\u5c06hwaddr\u548cuuid\u68c0\u67e5\u4e0b\uff0c\u6ce8\u91ca\u6216\u5220\u9664\u6389\u90fd\u53ef\u4ee5\u3002<\/p>\n<p>\u6700\u540ereboot\u91cd\u542f\u5373\u53ef\u4ee5\u7528\u3002<\/p>\n<p>udev\u77e5\u8bc6\uff1a<a href=\"http:\/\/zh.wikipedia.org\/wiki\/Udev\">http:\/\/zh.wikipedia.org\/wiki\/Udev<\/a><\/p>\n<p>\u53c2\u8003\uff1a<a href=\"http:\/\/superuser.com\/questions\/332593\/how-do-you-automatically-detect-a-new-network-card-in-centos-6-redhat\">http:\/\/superuser.com\/questions\/332593\/how-do-you-automatically-detect-a-new-network-card-in-centos-6-redhat<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6709\u65f6\u66f4\u6362\u7f51\u5361\u6216\u6362\u4e3b\u677f\uff0c\u539f\u6709\u7684\u8bbe\u5907\u4fe1\u606f\u4f1a\u5b58\u653e\u5728\u539f\u6765\u7684\u78c1\u76d8\u3002\u8fd9\u65f6\u9700\u8981\u66f4\u65b0\u78c1\u76d8\u4e0a\u5bf9\u5e94\u7684\u4e00\u4e9b\u4fe1\u606f\uff0c\u6709\u4e9b\u60c5\u51b5\u4e0b\u78c1\u76d8\u4e0a\u7684\u4fe1\u606f\u4f1a\u81ea\u52a8\u66f4\u65b0\uff0c\u4f46\u81ea\u52a8\u66f4\u65b0\u4e0d\u751f\u6548\u65f6\uff0c\u8981\u624b\u52a8\u64cd\u4f5c\u3002 \u5728CentOS6\u4e0b\uff0c\u6dfb\u52a0\u7f51\u5361\u4e4b\u540e\uff0c\u5148\u53bb\u67e5\u770b\u7f51\u5361\u7684mac\u5730\u5740\u3002 cat \/sys\/class\/net\/eth1\/address \u63a5\u4e0b\u6765\u7f16\u8f91\/etc\/udev\/rules.d\/70-persistent-net.rules\uff08\u672c\u6765\u4f1a\u81ea\u52a8\u751f\u6210\uff09\uff0c\u52a0\u4e0a\u4e00\u884ceth1\u76f8\u5173\u7684\u4fe1\u606f\u3002 # This file was automatically generated by the \/lib\/udev\/write_net_rules # program, run by the persistent-net-generator.rules rules file. # # You can modify it, as long as you keep each rule on a single # line, and change only the value of the NAME= key. # PCI device 0x8086:0x10c9 (igb) SUBSYSTEM==&#8221;net&#8221;, [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-5388","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts\/5388","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5388"}],"version-history":[{"count":5,"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts\/5388\/revisions"}],"predecessor-version":[{"id":7232,"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts\/5388\/revisions\/7232"}],"wp:attachment":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5388"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5388"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5388"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}