{"id":8545,"date":"2020-08-28T13:16:27","date_gmt":"2020-08-28T05:16:27","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=8545"},"modified":"2020-08-28T13:16:27","modified_gmt":"2020-08-28T05:16:27","slug":"netplan","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/netplan","title":{"rendered":"netplan\u547d\u4ee4 – \u7f51\u7edc\u914d\u7f6e\u5de5\u5177"},"content":{"rendered":"\n
netplan \u662f\u4e00\u4e2a\u547d\u4ee4\u884c\u5de5\u5177\uff0c\u7528\u4e8e\u5728\u67d0\u4e9b Linux \u53d1\u884c\u7248\uff08\u4f8b\u5982 Ubuntu Linux 18.04\uff09\u4e0a\u914d\u7f6e\u7f51\u7edc\u3002<\/p>\n\n\n\n
\u4ee5\u524d\u6211\u4eec\u914d\u7f6e\u7f51\u7edc\u90fd\u662f\u5728 \/etc\/network\/interfaces \u6587\u4ef6\u91cc\u914d\u7f6e\u3002\u4f46\u662f\u73b0\u5728\u6211\u4eec\u4e0d\u7528\u8fd9\u4e48\u9ebb\u70e6\u4e86\uff0c\u56e0\u4e3a\u6709\u4e86netplan\u3002<\/p>\n\n\n\n
netplan \u4f7f\u7528 yaml \u63cf\u8ff0\u6587\u4ef6\u6765\u914d\u7f6e\u7f51\u7edc\u63a5\u53e3\uff0c\u7136\u540e\uff0c\u901a\u8fc7\u8fd9\u4e9b\u63cf\u8ff0\u4e3a\u4efb\u4f55\u7ed9\u5b9a\u7684\u5448\u73b0\u5de5\u5177\u751f\u6210\u5fc5\u8981\u7684\u914d\u7f6e\u9009\u9879\u3002<\/p>\n\n\n\n
\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>netplan [\u53c2\u6570]<\/p>\n\n\n\n \u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n \u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n \u4ece\u7cfb\u7edf\u4e2d\u83b7\u53d6IP\u4fe1\u606f\uff1a<\/p>\n\n\n\n \u663e\u793a\u5f53\u524d\u7f51\u7edc\u8ba1\u5212\u7684\u7248\u672c\u548c\u53ef\u7528\u529f\u80fd\uff1a<\/p>\n\n\n\n \u5c06\u5f53\u524d\u7684netplan\u914d\u7f6e\u5e94\u7528\u5230\u6b63\u5728\u8fd0\u884c\u7684\u7cfb\u7edf\u4e2d\uff1a<\/p>\n\n\n\n netplan \u662f\u4e00\u4e2a\u547d\u4ee4\u884c\u5de5\u5177\uff0c\u7528\u4e8e\u5728\u67d0\u4e9b Linux \u53d1\u884c\u7248\uff08\u4f8b\u5982 Ubuntu Linux 18.04\uff09 […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[7],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/8545"}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=8545"}],"version-history":[{"count":2,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/8545\/revisions"}],"predecessor-version":[{"id":8547,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/8545\/revisions\/8547"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=8545"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=8545"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=8545"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}apply<\/td> \u5c06\u5f53\u524d\u7684netplan\u914d\u7f6e\u5e94\u7528\u5230\u6b63\u5728\u8fd0\u884c\u7684\u7cfb\u7edf\u4e2d<\/td><\/tr> generate<\/td> \u751f\u6210\u540e\u53f0\u7279\u5b9a\u7684\u914d\u7f6e\u6587\u4ef6<\/td><\/tr> info<\/td> \u663e\u793a\u5f53\u524d\u7f51\u7edc\u8ba1\u5212\u7684\u7248\u672c\u548c\u53ef\u7528\u529f\u80fd<\/td><\/tr> ip<\/td> \u4ece\u7cfb\u7edf\u4e2d\u83b7\u53d6IP\u4fe1\u606f<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n [root@linuxcool ~]# netplan ip<\/pre>\n\n\n\n
[root@linuxcool ~]# netplan info<\/pre>\n\n\n\n
[root@linuxcool ~]# netplan apply<\/pre>\n","protected":false},"excerpt":{"rendered":"