
{"id":3268,"date":"2019-10-05T09:27:35","date_gmt":"2019-10-05T01:27:35","guid":{"rendered":"https:\/\/www.webteach.tw\/?p=3268"},"modified":"2019-10-05T09:27:35","modified_gmt":"2019-10-05T01:27:35","slug":"netplan","status":"publish","type":"post","link":"https:\/\/www.webteach.tw\/?p=3268","title":{"rendered":"[ Linux ] &#8211; Ubuntu 18.04 \u56fa\u5b9aip netplan"},"content":{"rendered":"<div style='text-align:center' class='yasr-auto-insert-overall'><\/div><div style='text-align:center' class='yasr-auto-insert-visitor'><\/div><div style=\"margin-top: 0px; margin-bottom: 0px;\" class=\"sharethis-inline-share-buttons\" ><\/div>\n<p>\u4e4b\u524dUbuntu \u8a2d\u5b9a\u56fa\u5b9aip\u7684\u65b9\u4e4b\u5728Ubuntu 18.04 \u5df2\u7d93\u6539\u7528 netplan\uff0c\u8a18\u9304\u4e00\u4e0b\u76f8\u95dc\u7684\u53c3\u6578\u8a2d\u5b9a\u3002<\/p>\n\n\n<p>\u7de8\u8f2f\u8a2d\u5b9a\u6a94<br \/>\n\u6307\u4ee4\uff1a nano \/etc\/netplan\/01-network-manager-all.yaml<\/p>\n\n\n<p>\u958b\u555f\u5f8c\u5167\u5bb9<\/p>\n\n\n<pre class=\"wp-block-code\"><code># Let NetworkManager manage all devices on this system\nnetwork:\n   version: 2\n # renderer: NetworkManager\n   ethernets:\n     eno1:\n       addresses: &#091;192.168.123.111\/24]\n       gateway4: 192.168.111.1\n       nameservers:\n         addresses: &#091;8.8.8.8,8.8.4.4]\n       dhcp4: no<\/code><\/pre>\n\n\n<p> \u53c3\u6578\u8aaa\u660e\uff1a<br \/> eno1 \u7db2\u5361\u540d\u7a31<br \/> addresses ip<br \/> gateway4 \u9598\u9053 ip4<br \/> gateway6 \u9598\u9053 ip6<br \/> nameservers \u6307\u5b9adns \u591a\u7d44\u4ee5\u9017\u865f\u968e\u9694<br \/> dhcp4 \u81ea\u52d5\u53d6\u5f97ip ip4<br \/> dhcp6 \u81ea\u52d5\u53d6\u5f97ip ip6<\/p>\n\n\n<p>\u8a3b1\uff1a\u8a18\u5f97\u4e0d\u53ef\u4f7f\u7528TAB \uff0c\u6bcf\u500b\u53c3\u6578\u90fd\u4ee5\u5169\u500b\u7a7a\u767d\u4f86\u7e2e\u6392\u5373\u53ef\u3002<br \/>\u8a3b2\uff1a<br \/>         \/32 \u6307\u7684\u662f network mask of 255.255.255.255<br \/>         \/24 \u6307\u7684\u662f network mask of 255.255.255.0<\/p>\n\n\n<p>\u8a2d\u5b9a\u5b8c\u5f8c\u57f7\u884c\u8b8a\u66f4<\/p>\n\n\n<p>\u6307\u4ee4\uff1asudo netplan apply<\/p>\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"709\" height=\"350\" src=\"https:\/\/www.webteach.tw\/wp-content\/uploads\/2019\/10\/Selection_038.png\" alt=\"\" class=\"wp-image-3269\" srcset=\"https:\/\/www.webteach.tw\/wp-content\/uploads\/2019\/10\/Selection_038.png 709w, https:\/\/www.webteach.tw\/wp-content\/uploads\/2019\/10\/Selection_038-300x148.png 300w\" sizes=\"auto, (max-width: 709px) 100vw, 709px\" \/><\/figure>\n\n\n<p class=\"has-medium-font-size\">01-network-manager-all.yaml \u9810\u8a2d\u503c\uff1a<br \/><\/p>\n\n\n<p>#Let NetworkManager manage all devices on this system<br \/>network:<br \/>   version: 2<br \/>   renderer: NetworkManager<\/p>\n\n\n<p><br \/><\/p>\n<div style='text-align:center' class='yasr-auto-insert-overall'><\/div><div style='text-align:center' class='yasr-auto-insert-visitor'><\/div>","protected":false},"excerpt":{"rendered":"<p>\t\t\t\t\u4e4b\u524dUbuntu \u8a2d\u5b9a\u56fa\u5b9aip\u7684\u65b9\u4e4b\u5728Ubuntu 18.04 \u5df2\u7d93\u6539\u7528 netplan\uff0c\u8a18\u9304\u4e00\u4e0b\u76f8\u95dc\u7684\u53c3\u6578\u8a2d\u5b9a\u3002\t\t<\/p>\n","protected":false},"author":1,"featured_media":3269,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"yasr_overall_rating":0,"yasr_post_is_review":"","yasr_auto_insert_disabled":"","yasr_review_type":"","footnotes":""},"categories":[32,41],"tags":[411,577,744],"class_list":["post-3268","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","category-ubuntu","tag-netplan","tag-ubuntu-18-04","tag-ip"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>[ Linux ] - Ubuntu 18.04 \u56fa\u5b9aip netplan - \u6df7\u6c34\u6478\u9b5a<\/title>\n<meta name=\"description\" content=\"\u4e4b\u524dUbuntu \u8a2d\u5b9a\u56fa\u5b9aip\u7684\u65b9\u4e4b\u5728Ubuntu 18.04 \u5df2\u7d93\u6539\u7528 netplan\uff0c\u8a18\u9304\u4e00\u4e0b\u76f8\u95dc\u7684\u53c3\u6578\u8a2d\u5b9a\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.webteach.tw\/?p=3268\" \/>\n<meta property=\"og:locale\" content=\"zh_TW\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"[ Linux ] - Ubuntu 18.04 \u56fa\u5b9aip netplan - \u6df7\u6c34\u6478\u9b5a\" \/>\n<meta property=\"og:description\" content=\"\u4e4b\u524dUbuntu \u8a2d\u5b9a\u56fa\u5b9aip\u7684\u65b9\u4e4b\u5728Ubuntu 18.04 \u5df2\u7d93\u6539\u7528 netplan\uff0c\u8a18\u9304\u4e00\u4e0b\u76f8\u95dc\u7684\u53c3\u6578\u8a2d\u5b9a\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webteach.tw\/?p=3268\" \/>\n<meta property=\"og:site_name\" content=\"\u6df7\u6c34\u6478\u9b5a\" \/>\n<meta property=\"article:published_time\" content=\"2019-10-05T01:27:35+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webteach.tw\/wp-content\/uploads\/2019\/10\/Selection_038.png\" \/>\n\t<meta property=\"og:image:width\" content=\"709\" \/>\n\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"jeff\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005:\" \/>\n\t<meta name=\"twitter:data1\" content=\"jeff\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/?p=3268#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/?p=3268\"},\"author\":{\"name\":\"jeff\",\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/#\\\/schema\\\/person\\\/d434d754fd581338113eecfa923d7520\"},\"headline\":\"[ Linux ] &#8211; Ubuntu 18.04 \u56fa\u5b9aip netplan\",\"datePublished\":\"2019-10-05T01:27:35+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/?p=3268\"},\"wordCount\":52,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/?p=3268#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.webteach.tw\\\/wp-content\\\/uploads\\\/2019\\\/10\\\/Selection_038.png\",\"keywords\":[\"netplan\",\"Ubuntu 18.04\",\"\u56fa\u5b9aip\"],\"articleSection\":[\"Linux\",\"Ubuntu\"],\"inLanguage\":\"zh-TW\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.webteach.tw\\\/?p=3268#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/?p=3268\",\"url\":\"https:\\\/\\\/www.webteach.tw\\\/?p=3268\",\"name\":\"[ Linux ] - Ubuntu 18.04 \u56fa\u5b9aip netplan - \u6df7\u6c34\u6478\u9b5a\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/?p=3268#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/?p=3268#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.webteach.tw\\\/wp-content\\\/uploads\\\/2019\\\/10\\\/Selection_038.png\",\"datePublished\":\"2019-10-05T01:27:35+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/#\\\/schema\\\/person\\\/d434d754fd581338113eecfa923d7520\"},\"description\":\"\u4e4b\u524dUbuntu \u8a2d\u5b9a\u56fa\u5b9aip\u7684\u65b9\u4e4b\u5728Ubuntu 18.04 \u5df2\u7d93\u6539\u7528 netplan\uff0c\u8a18\u9304\u4e00\u4e0b\u76f8\u95dc\u7684\u53c3\u6578\u8a2d\u5b9a\u3002\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/?p=3268#breadcrumb\"},\"inLanguage\":\"zh-TW\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.webteach.tw\\\/?p=3268\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-TW\",\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/?p=3268#primaryimage\",\"url\":\"https:\\\/\\\/www.webteach.tw\\\/wp-content\\\/uploads\\\/2019\\\/10\\\/Selection_038.png\",\"contentUrl\":\"https:\\\/\\\/www.webteach.tw\\\/wp-content\\\/uploads\\\/2019\\\/10\\\/Selection_038.png\",\"width\":709,\"height\":350,\"caption\":\"\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/?p=3268#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9801\",\"item\":\"https:\\\/\\\/www.webteach.tw\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"[ Linux ] &#8211; Ubuntu 18.04 \u56fa\u5b9aip netplan\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/#website\",\"url\":\"https:\\\/\\\/www.webteach.tw\\\/\",\"name\":\"\u6df7\u6c34\u6478\u9b5a\",\"description\":\"\u5b78\u7121\u6b62\u5883,\u6559\u5b78\u76f8\u9577\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.webteach.tw\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-TW\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/#\\\/schema\\\/person\\\/d434d754fd581338113eecfa923d7520\",\"name\":\"jeff\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-TW\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5797200e421b670a2ce64d6e7382054c69b231d4aab55742c96bb1e51bc9fefc?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5797200e421b670a2ce64d6e7382054c69b231d4aab55742c96bb1e51bc9fefc?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5797200e421b670a2ce64d6e7382054c69b231d4aab55742c96bb1e51bc9fefc?s=96&d=mm&r=g\",\"caption\":\"jeff\"},\"sameAs\":[\"http:\\\/\\\/35.72.55.111\"],\"url\":\"https:\\\/\\\/www.webteach.tw\\\/?author=1\"},false]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"[ Linux ] - Ubuntu 18.04 \u56fa\u5b9aip netplan - \u6df7\u6c34\u6478\u9b5a","description":"\u4e4b\u524dUbuntu \u8a2d\u5b9a\u56fa\u5b9aip\u7684\u65b9\u4e4b\u5728Ubuntu 18.04 \u5df2\u7d93\u6539\u7528 netplan\uff0c\u8a18\u9304\u4e00\u4e0b\u76f8\u95dc\u7684\u53c3\u6578\u8a2d\u5b9a\u3002","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":"https:\/\/www.webteach.tw\/?p=3268","og_locale":"zh_TW","og_type":"article","og_title":"[ Linux ] - Ubuntu 18.04 \u56fa\u5b9aip netplan - \u6df7\u6c34\u6478\u9b5a","og_description":"\u4e4b\u524dUbuntu \u8a2d\u5b9a\u56fa\u5b9aip\u7684\u65b9\u4e4b\u5728Ubuntu 18.04 \u5df2\u7d93\u6539\u7528 netplan\uff0c\u8a18\u9304\u4e00\u4e0b\u76f8\u95dc\u7684\u53c3\u6578\u8a2d\u5b9a\u3002","og_url":"https:\/\/www.webteach.tw\/?p=3268","og_site_name":"\u6df7\u6c34\u6478\u9b5a","article_published_time":"2019-10-05T01:27:35+00:00","og_image":[{"width":709,"height":350,"url":"https:\/\/www.webteach.tw\/wp-content\/uploads\/2019\/10\/Selection_038.png","type":"image\/png"}],"author":"jeff","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005:":"jeff"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webteach.tw\/?p=3268#article","isPartOf":{"@id":"https:\/\/www.webteach.tw\/?p=3268"},"author":{"name":"jeff","@id":"https:\/\/www.webteach.tw\/#\/schema\/person\/d434d754fd581338113eecfa923d7520"},"headline":"[ Linux ] &#8211; Ubuntu 18.04 \u56fa\u5b9aip netplan","datePublished":"2019-10-05T01:27:35+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webteach.tw\/?p=3268"},"wordCount":52,"commentCount":0,"image":{"@id":"https:\/\/www.webteach.tw\/?p=3268#primaryimage"},"thumbnailUrl":"https:\/\/www.webteach.tw\/wp-content\/uploads\/2019\/10\/Selection_038.png","keywords":["netplan","Ubuntu 18.04","\u56fa\u5b9aip"],"articleSection":["Linux","Ubuntu"],"inLanguage":"zh-TW","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webteach.tw\/?p=3268#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webteach.tw\/?p=3268","url":"https:\/\/www.webteach.tw\/?p=3268","name":"[ Linux ] - Ubuntu 18.04 \u56fa\u5b9aip netplan - \u6df7\u6c34\u6478\u9b5a","isPartOf":{"@id":"https:\/\/www.webteach.tw\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webteach.tw\/?p=3268#primaryimage"},"image":{"@id":"https:\/\/www.webteach.tw\/?p=3268#primaryimage"},"thumbnailUrl":"https:\/\/www.webteach.tw\/wp-content\/uploads\/2019\/10\/Selection_038.png","datePublished":"2019-10-05T01:27:35+00:00","author":{"@id":"https:\/\/www.webteach.tw\/#\/schema\/person\/d434d754fd581338113eecfa923d7520"},"description":"\u4e4b\u524dUbuntu \u8a2d\u5b9a\u56fa\u5b9aip\u7684\u65b9\u4e4b\u5728Ubuntu 18.04 \u5df2\u7d93\u6539\u7528 netplan\uff0c\u8a18\u9304\u4e00\u4e0b\u76f8\u95dc\u7684\u53c3\u6578\u8a2d\u5b9a\u3002","breadcrumb":{"@id":"https:\/\/www.webteach.tw\/?p=3268#breadcrumb"},"inLanguage":"zh-TW","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webteach.tw\/?p=3268"]}]},{"@type":"ImageObject","inLanguage":"zh-TW","@id":"https:\/\/www.webteach.tw\/?p=3268#primaryimage","url":"https:\/\/www.webteach.tw\/wp-content\/uploads\/2019\/10\/Selection_038.png","contentUrl":"https:\/\/www.webteach.tw\/wp-content\/uploads\/2019\/10\/Selection_038.png","width":709,"height":350,"caption":""},{"@type":"BreadcrumbList","@id":"https:\/\/www.webteach.tw\/?p=3268#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9801","item":"https:\/\/www.webteach.tw\/"},{"@type":"ListItem","position":2,"name":"[ Linux ] &#8211; Ubuntu 18.04 \u56fa\u5b9aip netplan"}]},{"@type":"WebSite","@id":"https:\/\/www.webteach.tw\/#website","url":"https:\/\/www.webteach.tw\/","name":"\u6df7\u6c34\u6478\u9b5a","description":"\u5b78\u7121\u6b62\u5883,\u6559\u5b78\u76f8\u9577","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webteach.tw\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-TW"},{"@type":"Person","@id":"https:\/\/www.webteach.tw\/#\/schema\/person\/d434d754fd581338113eecfa923d7520","name":"jeff","image":{"@type":"ImageObject","inLanguage":"zh-TW","@id":"https:\/\/secure.gravatar.com\/avatar\/5797200e421b670a2ce64d6e7382054c69b231d4aab55742c96bb1e51bc9fefc?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/5797200e421b670a2ce64d6e7382054c69b231d4aab55742c96bb1e51bc9fefc?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5797200e421b670a2ce64d6e7382054c69b231d4aab55742c96bb1e51bc9fefc?s=96&d=mm&r=g","caption":"jeff"},"sameAs":["http:\/\/35.72.55.111"],"url":"https:\/\/www.webteach.tw\/?author=1"},false]}},"views":1648,"yasr_visitor_votes":{"stars_attributes":{"read_only":false,"span_bottom":false},"number_of_votes":0,"sum_votes":0},"_links":{"self":[{"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/posts\/3268","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3268"}],"version-history":[{"count":0,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/posts\/3268\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/media\/3269"}],"wp:attachment":[{"href":"https:\/\/www.webteach.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3268"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3268"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3268"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}