{"id":1099,"date":"2026-07-08T08:12:38","date_gmt":"2026-07-08T05:12:38","guid":{"rendered":"https:\/\/itgen.itbumper.com\/?page_id=1099"},"modified":"2026-07-08T08:21:33","modified_gmt":"2026-07-08T05:21:33","slug":"0042-netplan-templates","status":"publish","type":"page","link":"https:\/\/itgen.itbumper.com\/?page_id=1099","title":{"rendered":"0042-Netplan templates"},"content":{"rendered":"\n<div class=\"otQkpb\" role=\"heading\" aria-level=\"3\" data-animation-nesting=\"\" data-sfc-cp=\"\" data-sfc-root=\"ep\" data-sfc-cb=\"\" data-complete=\"true\" data-processed=\"true\" data-sae=\"\" data-copy-service-computed-style=\"font-family: &quot;Google Sans&quot;, Roboto, Arial, sans-serif; font-size: 20px; font-weight: 600; margin: 24px 0px 12px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);\">Important Rules for Working with Netplan Templates<!--TgQPHd||[]--><\/div>\n<ul class=\"KsbFXc U6u95\" data-sfc-root=\"ep\" data-sfc-cb=\"\" data-ved=\"2ahUKEwjp7dnTqMKVAxVHPkQIHXJQHXIQ-7AUegYIAQgEEAA\" data-hveid=\"CAEIBBAA\" data-complete=\"true\" data-processed=\"true\" data-copy-service-computed-style=\"font-family: &quot;Google Sans&quot;, Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 12px 0px 16px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);\">\n<li style=\"list-style-type: none;\">\n<ul class=\"KsbFXc U6u95\" data-sfc-root=\"ep\" data-sfc-cb=\"\" data-ved=\"2ahUKEwjp7dnTqMKVAxVHPkQIHXJQHXIQ-7AUegYIAQgEEAA\" data-hveid=\"CAEIBBAA\" data-complete=\"true\" data-processed=\"true\" data-copy-service-computed-style=\"font-family: &quot;Google Sans&quot;, Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 12px 0px 16px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);\">\n<li class=\"Z1qcYe\" data-sfc-cp=\"\" data-sfc-root=\"ep\" data-sfc-cb=\"\" data-hveid=\"CAEIBBAB\" data-complete=\"true\" data-sae=\"\" data-copy-service-computed-style=\"font-family: &quot;Google Sans&quot;, Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px 0px 12px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);\"><span class=\"T286Pc\" data-sfc-cp=\"\" data-sfc-root=\"ep\" data-sfc-cb=\"\" data-complete=\"true\" data-copy-service-computed-style=\"font-family: &quot;Google Sans&quot;, Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);\"><strong class=\"Yjhzub\" data-sfc-root=\"ep\" data-sfc-cb=\"\" data-complete=\"true\" data-copy-service-computed-style=\"font-family: &quot;Google Sans&quot;, Roboto, Arial, sans-serif; font-size: 16px; font-weight: 700; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);\">Spaces<!--TgQPHd||[]--><\/strong>: Never use the <code class=\"KDcb0c\" dir=\"ltr\" data-sfc-root=\"ep\" data-sfc-cb=\"\" data-complete=\"true\" data-sae=\"\" data-copy-service-computed-style=\"font-family: monospace; font-size: 14px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0.8px solid rgb(44, 46, 53);\">Tab<!--TgQPHd||[]--><\/code> key for indentation. Use spaces only (typically a 2-space or 4-space indentation step).<!--TgQPHd||[]--><\/span><!--TgQPHd||[]--><\/li>\n<li class=\"Z1qcYe\" data-sfc-cp=\"\" data-sfc-root=\"ep\" data-sfc-cb=\"\" data-hveid=\"CAEIBBAC\" data-complete=\"true\" data-sae=\"\" data-copy-service-computed-style=\"font-family: &quot;Google Sans&quot;, Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px 0px 12px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);\"><span class=\"T286Pc\" data-sfc-cp=\"\" data-sfc-root=\"ep\" data-sfc-cb=\"\" data-complete=\"true\" data-copy-service-computed-style=\"font-family: &quot;Google Sans&quot;, Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);\"><strong class=\"Yjhzub\" data-sfc-root=\"ep\" data-sfc-cb=\"\" data-complete=\"true\" data-copy-service-computed-style=\"font-family: &quot;Google Sans&quot;, Roboto, Arial, sans-serif; font-size: 16px; font-weight: 700; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);\">Validation<!--TgQPHd||[]--><\/strong>: Always run the <code class=\"KDcb0c\" dir=\"ltr\" data-sfc-root=\"ep\" data-sfc-cb=\"\" data-complete=\"true\" data-sae=\"\" data-copy-service-computed-style=\"font-family: monospace; font-size: 14px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0.8px solid rgb(44, 46, 53);\">sudo netplan try<!--TgQPHd||[]--><\/code> command before applying changes permanently. This prevents you from losing remote access to your server if there is a syntax error.<!--TgQPHd||[]--><\/span><!--TgQPHd||[]--><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><!--TgQPHd||[]--><\/p>\n<div class=\"Fsg96\" data-sfc-cp=\"\" data-sfc-root=\"ep\" data-sfc-cb=\"\" data-complete=\"true\" data-processed=\"true\" data-sfc-inited=\"2\" data-copy-service-computed-style=\"font-family: &quot;Google Sans&quot;, Roboto, Arial, sans-serif; font-size: 14px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(230, 232, 240);\"><!--TgQPHd||[]--><\/div>\n<p>To find out interfaces name use <strong>ip link or networkctl status<\/strong><\/p>\n<p>\u00a0<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n# DHCP\nnetwork:\n  version: 2\n  renderer: networkd\n  ethernets:\n    ens18:\n      dhcp4: true\n\n\n# IP Static\nnetwork:\n  version: 2\n  renderer: networkd\n  ethernets:\n    ens18:\n      dhcp4: false\n      addresses:\n        - 192.168.1.100\/24\n      nameservers:\n        addresses:\n          - 8.8.8.8\n          - 1.1.1.1\n      routes:\n        - to: default\n          via: 192.168.1.1\n\n# More than one IP on the interface\nnetwork:\n  version: 2\n  renderer: networkd\n  ethernets:\n    ens18:\n      dhcp4: false\n      addresses:\n        - 192.168.1.100\/24\n        - 10.0.0.50\/24\n      routes:\n        - to: default\n          via: 192.168.1.1\n\n# IP Static + rename the interface. Exm: ens18 to eth0 using a MAC address\nnetwork:\n  version: 2\n  renderer: networkd\n  ethernets:\n    eth0:\n      match:\n        macaddress: 00:00:00:00:20:04\n      set-name: eth0\n      dhcor4: false\n      addresses:\n        - 192.168.88.104\/24\n      nameservers:\n        addresses:\n          - 8.8.8.8\n      routes:\n        - to: default\n          via: 192.168.88.254\n\n# Bonding \/ LACP\nnetwork:\n  version: 2\n  renderer: networkd\n  ethernets:\n    ens18:\n      dhcp4: false\n    ens19:\n      dhcp4: false\n  bonds:\n    bond0:\n      interfaces:\n        - ens18\n        - ens19\n      dhcp4: true\n      parameters:\n        mode: 802.3ad\n        mii-monitor-interval: 100\n\n# Bridge (KVM\/LXC)\nnetwork:\n  version: 2\n  renderer: networkd\n  ethernets:\n    ens18:\n      dhcp4: false\n  bridges:\n    br0:\n      interfaces:\n        - ens18\n      dhcp4: false\n      addresses:\n        - 192.168.1.150\/24\n      routes:\n        - to: default\n          via: 192.168.1.1\n      nameservers:\n        addresses:\n          - 8.8.8.8\n      parameters:\n        stp: false\n        forward-delay: 0\n<\/pre><\/div>","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"categories":[21],"tags":[],"_links":{"self":[{"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=\/wp\/v2\/pages\/1099"}],"collection":[{"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1099"}],"version-history":[{"count":2,"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=\/wp\/v2\/pages\/1099\/revisions"}],"predecessor-version":[{"id":1103,"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=\/wp\/v2\/pages\/1099\/revisions\/1103"}],"wp:attachment":[{"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1099"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1099"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1099"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}