{"id":5543,"date":"2022-07-15T10:59:56","date_gmt":"2022-07-15T01:59:56","guid":{"rendered":"https:\/\/www.chihayafuru.jp\/tech\/?p=5543"},"modified":"2022-07-24T15:01:43","modified_gmt":"2022-07-24T06:01:43","slug":"ubuntu-%e3%83%8d%e3%83%83%e3%83%88%e3%83%af%e3%83%bc%e3%82%af%e8%a8%ad%e5%ae%9a","status":"publish","type":"post","link":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/archives\/5543","title":{"rendered":"[ubuntu] \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u8a2d\u5b9a"},"content":{"rendered":"<p>Ubuntu 17.10 \u4ee5\u964d (18.04 LTS\u4ee5\u964d)<\/p>\n<h3>netplan<\/h3>\n<h4>1. \u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb<\/h4>\n<ul>\n<li><code>\/etc\/netplan\/50-cloud-init.yaml<\/code> : \u81ea\u52d5\u751f\u6210\u30d5\u30a1\u30a4\u30eb\u3002\u30e6\u30fc\u30b6\u306b\u3088\u308b\u7de8\u96c6\u306f\u975e\u63a8\u5968\u3002<\/li>\n<li><code>\/etc\/netplan\/99_config.yaml<\/code> : Ubuntu\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u4f8b\u793a\u30d5\u30a1\u30a4\u30eb\u540d<\/li>\n<\/ul>\n<p><!--more--><\/p>\n<h4>2. \u8a2d\u5b9a\u53cd\u6620\u30b3\u30de\u30f3\u30c9<\/h4>\n<pre class=\"lang:default highlight:0 decode:true \" >$ sudo netplan apply<\/pre>\n<h4>3. \u8a2d\u5b9a\u4f8b<\/h4>\n<h5>3.1. WiFi<\/h5>\n<pre class=\"lang:default highlight:0 decode:true \" ># 99_config.yaml\r\nnetwork:\r\n    version: 2\r\n    wifis:\r\n        wlan0:\r\n            dhcp4: true\r\n            access-points:\r\n                SSID_NAME:\r\n                    password: \"password\"<\/pre>\n<pre class=\"lang:default highlight:0 decode:true \" ># 99_config.yaml\r\nnetwork:\r\n    version: 2\r\n    wifis:\r\n        wlan0:\r\n            dhcp4: true\r\n            access-points:\r\n                Buffalo-G-XXXX:\r\n                    password: \"1234567890abc\"<\/pre>\n<h5>3.2. \u56fa\u5b9aIP\u30a2\u30c9\u30ec\u30b9<\/h5>\n<pre class=\"lang:default highlight:0 decode:true \" ># 99_config.yaml\r\nnetwork:\r\n    version: 2\r\n    ethernets:\r\n        eth0:\r\n            dhcp4: false\r\n            addresses: [192.168.1.10\/24]\r\n            nameservers:\r\n                addresses: [192.168.1.1, 8.8.8.8]\r\n            routes:\r\n              - to: default\r\n                via: 192.168.1.1<\/pre>\n<h5>3.3. Gateway\u30a2\u30c9\u30ec\u30b9\u306e\u6307\u5b9a\u65b9\u6cd5<\/h5>\n<pre class=\"lang:default highlight:0 decode:true \" ># \u524d\u7565\r\n        eth0:\r\n            dhcp4: false\r\n            addresses: [192.168.1.10\/24]\r\n            gateway4: 192.168.1.1<\/pre>\n<p>\u4e0a\u8a18\u306fGateway\u30a2\u30c9\u30ec\u30b9\u306e\u6307\u5b9a\u65b9\u6cd5\u3068\u3057\u3066\u975e\u63a8\u5968(deprecated)\u3067\u3042\u308b\u3002<\/p>\n<h6>\u975e\u63a8\u5968\u306eGateway\u30a2\u30c9\u30ec\u30b9\u6307\u5b9a\u306b\u5bfe\u3059\u308b\u8b66\u544a<\/h6>\n<pre class=\"lang:default highlight:0 decode:true \" >** (generate:1510): WARNING **: 00:39:37.596: `gateway4` has been deprecated, use default routes instead.\r\nSee the 'Default routes' section of the documentation for more details.\r\n\r\n** (generate:1510): WARNING **: 00:39:37.597: Problem encountered while validating default route consistency.Please set up multiple routing tables and use `routing-policy` instead.\r\nError: Conflicting default route declarations for IPv4 (table: main, metric: default), first declared in eth0 but also in eth0\r\n\r\n** (process:1508): WARNING **: 00:39:40.572: `gateway4` has been deprecated, use default routes instead.\r\nSee the 'Default routes' section of the documentation for more details.\r\n\r\n** (process:1508): WARNING **: 00:39:40.574: Problem encountered while validating default route consistency.Please set up multiple routing tables and use `routing-policy` instead.\r\nError: Conflicting default route declarations for IPv4 (table: main, metric: default), first declared in eth0 but also in eth0<\/pre>\n<h3>4. \u95a2\u9023\u30ea\u30f3\u30af<\/h3>\n<ul>\n<li><a href=\"https:\/\/netplan.io\/\">netplan website<\/a><\/li>\n<li><a href=\"https:\/\/ubuntu.com\/server\/docs\/network-configuration\">Ubuntu &raquo; Docs &raquo; Network Configuration<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Ubuntu 17.10 \u4ee5\u964d (18.04 LTS\u4ee5\u964d) netplan 1. \u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb \/etc\/netplan\/50-cloud-init.yaml : \u81ea\u52d5\u751f\u6210\u30d5\u30a1\u30a4\u30eb\u3002\u30e6\u30fc\u30b6\u306b\u3088\u308b\u7de8\u96c6\u306f\u975e\u63a8\u5968\u3002 \/etc\/ [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[54],"class_list":["post-5543","post","type-post","status-publish","format-standard","hentry","category-memo","tag-ubuntu"],"_links":{"self":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts\/5543","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/comments?post=5543"}],"version-history":[{"count":29,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts\/5543\/revisions"}],"predecessor-version":[{"id":5585,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts\/5543\/revisions\/5585"}],"wp:attachment":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/media?parent=5543"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/categories?post=5543"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/tags?post=5543"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}