{"id":2390,"date":"2018-11-20T19:34:10","date_gmt":"2018-11-20T18:34:10","guid":{"rendered":"https:\/\/technet.cloud4you.biz\/?p=2390"},"modified":"2023-01-18T15:16:42","modified_gmt":"2023-01-18T14:16:42","slug":"cheatsheet-netplan-beispiel-mit-ipv4-und-ipv6-konfiguration","status":"publish","type":"post","link":"https:\/\/technet.cloud4you.biz\/en\/cheatsheet-netplan-beispiel-mit-ipv4-und-ipv6-konfiguration\/","title":{"rendered":"Cheatsheet: Netplan-Example containing IPv4 and IPv6 configuration"},"content":{"rendered":"<p>In the example below you can review a netplan using IPv4 as well as IPv6. We&#8217;ve replaced the addresses with casual IPs.<\/p>\n<blockquote>\n<pre><span style=\"color: #339966;\"># This file describes the network interfaces available on your system<\/span>\r\n<span style=\"color: #339966;\"># For more information, see netplan(5).<\/span>\r\n<span style=\"color: #000000;\">network:<\/span>\r\n<span style=\"color: #000000;\">  version: 2<\/span>\r\n<span style=\"color: #000000;\">  renderer: networkd<\/span>\r\n<span style=\"color: #000000;\">  ethernets:<\/span>\r\n<span style=\"color: #000000;\">    eth0:<\/span>\r\n      <span style=\"color: #339966;\"># Disable DHCP<\/span>\r\n<span style=\"color: #000000;\">      dhcp4: no<\/span>\r\n<span style=\"color: #000000;\">      dhcp6: no<\/span>\r\n      <span style=\"color: #339966;\"># Address configuration - multiple addresses can be added by adding a line<\/span> \r\n<span style=\"color: #000000;\">      addresses:<\/span>\r\n<span style=\"color: #000000;\">        - 192.168.1.123\/24<\/span>\r\n<span style=\"color: #000000;\">        - 123:4567:ab12:3:192:168:1:123\/64<\/span>\r\n      <span style=\"color: #339966;\"># Gateways<\/span>\r\n<span style=\"color: #000000;\">      gateway4: 192.168.1.1<\/span>\r\n<span style=\"color: #000000;\">      gateway6: 123:4567:ab12:3::1<\/span>\r\n      <span style=\"color: #339966;\"># Nameservers - again you can add multiple lines<\/span>\r\n<span style=\"color: #000000;\">      nameservers:<\/span>\r\n<span style=\"color: #000000;\">        addresses:<\/span>\r\n<span style=\"color: #000000;\">          - 192.168.1.1<\/span>\r\n<span style=\"color: #000000;\">          - 192.168.1.2<\/span>\r\n<span style=\"color: #000000;\">          - 123:4567:ab12:3:192:168:1:1<\/span>\r\n<span style=\"color: #000000;\">          - 123:4567:ab12:3:192:168:1:2\r\n<\/span><\/pre>\n<\/blockquote>\n<p>You can apply your netplan by using the following command:<\/p>\n<blockquote>\n<pre>sudo netplan apply<\/pre>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>In the example below you can review a netplan using IPv4 as well as IPv6. We&#8217;ve replaced the addresses with casual IPs. # This file describes the network interfaces available on your system # For more information, see netplan(5). network: version: 2 renderer: networkd ethernets: eth0: # Disable DHCP dhcp4: no dhcp6: no # Address [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[59],"tags":[239,301],"class_list":["post-2390","post","type-post","status-publish","format-standard","hentry","category-linux","tag-linux","tag-netplan"],"translation":{"provider":"WPGlobus","version":"3.0.6","language":"en","enabled_languages":["de","en"],"languages":{"de":{"title":true,"content":true,"excerpt":false},"en":{"title":true,"content":true,"excerpt":false}}},"_links":{"self":[{"href":"https:\/\/technet.cloud4you.biz\/en\/wp-json\/wp\/v2\/posts\/2390","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/technet.cloud4you.biz\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/technet.cloud4you.biz\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/technet.cloud4you.biz\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/technet.cloud4you.biz\/en\/wp-json\/wp\/v2\/comments?post=2390"}],"version-history":[{"count":8,"href":"https:\/\/technet.cloud4you.biz\/en\/wp-json\/wp\/v2\/posts\/2390\/revisions"}],"predecessor-version":[{"id":3108,"href":"https:\/\/technet.cloud4you.biz\/en\/wp-json\/wp\/v2\/posts\/2390\/revisions\/3108"}],"wp:attachment":[{"href":"https:\/\/technet.cloud4you.biz\/en\/wp-json\/wp\/v2\/media?parent=2390"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/technet.cloud4you.biz\/en\/wp-json\/wp\/v2\/categories?post=2390"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/technet.cloud4you.biz\/en\/wp-json\/wp\/v2\/tags?post=2390"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}