\u7cfb\u7edf<\/a>\u754c\u9762\u53f3\u4e0a\u89d2\u53ef\u4ee5\u770b\u89c1\u7f51\u5361\u72b6\u6001\u4e3a\u672a\u8054\u63a5\uff0c\u914d\u7f6e\u597dIP\u4e4b\u540e\u4f7f\u7528servicenetworkrestart\u547d\u4ee4\u6668\u62a5\u540c\u6837\u7684\u9519\u3002<\/p>\n\u5982\u56fe\uff1a<\/p>\n
\u544a\u8b66\u4fe1\u606f<\/p>\n
<\/p>\n
\u4f7f\u7528ping\u547d\u4ee4\u67e5\u770b\u8def\u7531\u662f\u5426\u901a\u7545\uff0c\u7cfb\u7edf\u63d0\u793a\u201cnetworkisunreachable\u201d\u3002<\/p>\n
\u5904\u7406\u8fc7\u7a0b<\/p>\n
\u89e3\u51b3\u7684\u65b9\u5f0f\u5f88\u7b80\u5355\uff0c\u76f4\u63a5\u5c06NetworkManager\u670d\u52a1\u5173\u6389\u5373\u53ef\u3002\u6b65\u9aa4\u63cf\u8ff0\u5982\u4e0b\uff1a<\/p>\n
\u6b65\u9aa41\u67e5\u770bNetworkManager\u670d\u52a1\u662f\u5426\u5f00\u542f\u3002<\/p>\n
\u56e0\u7cfb\u7edf\u7248\u672c\u5404\u5f02linux site:infoq.cn\uff0cNetworkManager\u670d\u52a1\u7684\u5177\u4f53\u540d\u79f0\u53ef\u4ee5\u7528chkconfig--list\u67e5\u770b\u3002<\/p>\n
\u5982\u56fe\u6240\u793a\uff1a<\/p>\n
<\/p>\n
\u4ece\u56fe\u4e2d\uff0c\u53ef\u4ee5\u53d1\u89c9NetworkManager\u670d\u52a1\u65e9\u5df2\u5f00\u542f\u4e86\u3002<\/p>\n
\u6b65\u9aa42\u7981\u7528NetworkManager\u670d\u52a1\u3002<\/p>\n
\u5c06\u5f53\u524d\u6fc0\u6d3b\u7684\u670d\u52a1\u5173\u6389\uff0c\u4f7f\u7528\u4e0b\u8fb9\u7684\u547d\u4ee4\uff1a<\/p>\n
serviceNetworkManagerstop<\/p>\n
\u4f7f\u7528\u4e0b\u8fb9\u7684\u547d\u4ee4\u4e25\u7981\u670d\u52a1\u81ea\u542f\u52a8\u3002<\/p>\n
chkconfigNetworkManageroff<\/p>\n
\u6b65\u9aa43\u4f7f\u7528\u811a\u672c\u5f62\u5f0f\u914d\u7f6eIP\u5730\u5740\u3002<\/p>\n
\u6839\u56e0<\/p>\n
\u4f7f\u7528\/etc\/network\/interfaces\u811a\u672c\u6587\u4ef6\u914d\u7f6eIP\u4fe1\u606f\u7684\u65f6\u4faf\uff0c\u4f7f\u7528\u7684\u662fNetwork\u670d\u52a1\uff1b\u4f7f\u7528\u56fe\u5f62\u5316\u754c\u9762\u914d\u7f6eIP\u5730\u5740\u7684\u65f6\u4faf\uff0c\u4f7f\u7528\u7684\u662fNetworkManager\u670d\u52a1\u3002<\/p>\n
Netwok\u670d\u52a1\u548cNetworkManager\u670d\u52a1\u4e4b\u95f4\u5b58\u5728\u4e0b\u8fb9\u7684\u5173\u7cfb\uff1a<\/p>\n
Netwok\u670d\u52a1\u548cNetworkManager\u670d\u52a1\u4e4b\u95f4\u4e0d\u80fd\u540c\u65f6\u5171\u5b58linux\u91cd\u542f\u7f51\u7edc\u670d\u52a1<\/strong>\uff0c\u4e8c\u8005\u4e3a\u4e86\u9632\u6b62\u51b2\u7a81\uff0c\u53c8\u80fd\u5171\u4eab\u914d\u7f6e\uff0c\u5c31\u6709\u4e0b\u8fb9\u7684\u89e3\u51b3\u65b9\u6848\uff1a<\/p>\n\u4eceRedHat6\u5f00\u59cb\uff0c\u9ed8\u8ba4\u662f\u5f00\u542fNetworkManager\u670d\u52a1\u7684\uff0c\u6b64\u65f6\u901a\u8fc7\u66f4\u6539\u811a\u672c\u7684\u5f62\u5f0f\u914d\u7f6eIP\u5730\u5740\u5c06\u65e0\u6548\uff0c\u9664\u975e\u5c06\u76f8\u5173\u6807\u5fd7\u4f4d\u8bbe\u7f6e\u4e3a\u5047\u3002\u6bd4\u5982\uff0c\u4f7f\u7528DHCP\u914d\u7f6e\u7684IP\u5730\u5740\uff0c\u5176\u683c\u5f0f\u5982\u4e0b\uff1a<\/p>\n
[root@localhost~]#cat\/etc\/sysconfig\/network-scripts\/ifcfg-eth0<\/p>\n
DEVICE=\"eth0\"<\/p>\n
<\/p>\n
BOOTPROTO=\"dhcp\"<\/p>\n
HWADDR=\"00:1F:29:57:8B:A8\"<\/p>\n
NM_CONTROLLED=\"yes\"<\/p>\n
>TYPE=\"Ethernet\"<\/p>\n
\u4e0d\u540c\u7684\u7cfb\u7edf\u4e2d\uff0cNetworkManager\u670d\u52a1\u7684\u6807\u5fd7\u4f4d\u4e0d\u540c\u3002\u6bd4\u5982Ubuntu\u4e2d\u662f\u50a8\u5b58\u5728\u914d\u7f6e\u6587\u4ef6\/etc\/NetworkManager\/nm-system-settings.conf\u4e2d\uff0c\u540d\u79f0\u4e3amanaged\u3002<\/p>\n
\u914d\u7f6e\u6587\u4ef6\u66f4\u6539\u540e\uff0c\u987b\u8981\u91cd\u542fNetworkManager\u670d\u52a1\u3002<\/p>\n
\u672c\u6848\u4f8b\u4e2dlinux\u91cd\u542f\u7f51\u7edc\u670d\u52a1<\/strong>\uff0c\u7cfb\u7edf\u9ed8\u8ba4\u542f\u7528\u4e86NetworkManager\u670d\u52a1\uff0c\u8be6\u5c3d\u4fe1\u606f\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n[root@localhost~]#chkconfig|grep-inetwork<\/p>\n
NetworkManager0:off1:off2:on3:on4:on5:on6:off<\/p>\n
network0:off1:off2:on3:on4:on5:on6:off<\/p>\n
[root@localhost~]#<\/p>\n
\u6b64\u65f6\u518d\u542f\u7528Network\u670d\u52a1\u65f6\u662f\u4e0d\u751f\u6548\u7684\u3002\u6240\u4ee5\u91cd\u542fNetwork\u670d\u52a1\u4f1a\u5931\u8d25\u3002<\/p>\n
\u5efa\u8bae\u4e0e\u603b\u7ed3<\/p>\n
\u4eceRedHat6\u5f00\u59cb\uff0c\u9ed8\u8ba4\u662f\u5f00\u542fNetworkManager\u670d\u52a1\u7684\uff0c\u6b64\u65f6\u901a\u8fc7\u66f4\u6539\u811a\u672c\u7684\u5f62\u5f0f\u914d\u7f6eIP\u5730\u5740\u5c06\u65e0\u6548\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"
\u91cd\u542f\u7f51\u7edc\u670d\u52a1\u5931\u8d25\u3002\u4f7f\u7528\/etc\/network\/interfaces\u811a\u672c\u6587\u4ef6\u914d\u7f6eIP\u4fe1\u606f\u7684\u65f6\u5019\uff0c\u4f7f\u7528\u7684\u662fNetwork\u670d\u52a1\uff1b\u4f7f\u7528\u56fe\u5f62\u5316\u754c\u9762\u914d\u7f6eIP\u5730\u5740\u7684\u65f6\u5019\uff0c\u4f7f\u7528\u7684\u662fNetworkManager\u670d\u52a1\u3002\u914d\u7f6e\u6587\u4ef6\u4fee\u6539\u540e\uff0c\u9700\u8981\u91cd\u542fNetworkManager\u670d\u52a1\u3002\u672c\u6848\u4f8b\u4e2d\uff0c\u7cfb\u7edf\u9ed8\u8ba4\u542f\u7528\u4e86NetworkManager\u670d\u52a1\uff0c\u8be6\u7ec6\u4fe1\u606f\u5982\u4e0b\u6240\u793a\uff1a\u6240\u4ee5\u91cd\u542fNetwork\u670d\u52a1\u4f1a\u5931\u8d25\u3002<\/p>\n","protected":false},"author":1,"featured_media":285050,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[999],"class_list":["post-285049","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tougao","tag-999"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/285049","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\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=285049"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/285049\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/285050"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=285049"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=285049"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=285049"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}