{"id":573,"date":"2020-01-28T12:32:55","date_gmt":"2020-01-28T07:02:55","guid":{"rendered":"http:\/\/192.168.0.6\/linuxbots\/?p=573"},"modified":"2021-05-16T20:24:51","modified_gmt":"2021-05-16T14:54:51","slug":"netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04","status":"publish","type":"post","link":"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/","title":{"rendered":"Netplan Static IP &#8211; Configure static IP address on Ubuntu 18.04"},"content":{"rendered":"\n<p>Netplan, the new interface configuration utility in Ubuntu introduced in Ubuntu 17.10. For configuring static IP in Ubuntu 18.04 we will use Netplan. In the same vein, all the latest versions of Ubuntu Server and Desktop uses Netplan to manage and configure network settings.<\/p>\n\n\n\n<p>Netplan reads network configuration from <em><strong>\/etc\/netplan\/*.yaml<\/strong><\/em>. <a rel=\"noreferrer noopener\" href=\"https:\/\/yaml.org\/\" target=\"_blank\">YAML<\/a> is a commonly used human-readable programming language used for configuration files. Netplan currently works with <strong>NetworkManager<\/strong> and <strong>Systemd-networkd<\/strong> as supported renderers. <strong>NetworkManager<\/strong> commonly used for Desktop and <strong>Systemd-networkd<\/strong> used for Server. However, we can make a choice between them.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Also Read: <a href=\"https:\/\/oracle.itsupportwale.com\/blog\/install-php-in-ubuntu-18-04\/\" target=\"_blank\" rel=\"noreferrer noopener\" label=\"How To Install PHP 7.4 on Ubuntu Server (opens in a new tab)\">How To Install PHP 7.4 on Ubuntu Server<\/a><\/li><\/ul>\n\n\n\n<p>Here at <a rel=\"noreferrer noopener\" label=\" (opens in a new tab)\" href=\"https:\/\/oracle.itsupportwale.com\/blog\/\" target=\"_blank\">LinuxBots<\/a>, we try to make your work as simple as we can. That&#8217;s why we do most of the work in simple and easy steps. So if you do not want to read the full article, here is the short how-to of configuring static IP address in Ubuntu 18.04 using the Netplan utility.<\/p>\n\n\n\n<div class=\"schema-how-to wp-block-yoast-how-to-block\"><p class=\"schema-how-to-total-time\"><span class=\"schema-how-to-duration-time-text\">Time needed:&nbsp;<\/span>5 minutes<\/p><p class=\"schema-how-to-description\">Configure Static IP in Ubuntu 18.04 using Netplan Utility<\/p> <ol class=\"schema-how-to-steps\"><li class=\"schema-how-to-step\" id=\"how-to-step-1580193863359\"><strong class=\"schema-how-to-step-name\">List all available network interfaces<\/strong> <p class=\"schema-how-to-step-text\"><code>ip -a<\/code><\/p> <\/li><li class=\"schema-how-to-step\" id=\"how-to-step-1580193954454\"><strong class=\"schema-how-to-step-name\">Find the Netplan Configuration file in \/etc\/netplan<\/strong> <p class=\"schema-how-to-step-text\"><code>ls \/etc\/netplan<\/code><\/p> <\/li><li class=\"schema-how-to-step\" id=\"how-to-step-1580193994567\"><strong class=\"schema-how-to-step-name\">Generate the configuration if not found<\/strong> <p class=\"schema-how-to-step-text\"><code>sudo netplan generate<\/code><\/p> <\/li><li class=\"schema-how-to-step\" id=\"how-to-step-1580194018077\"><strong class=\"schema-how-to-step-name\">Edit the Netplan configuration<\/strong> <p class=\"schema-how-to-step-text\"><code>enp0s3:                <br\/>       dhcp4: no<br\/>       dhcp6: no<br\/>       addresses: [172.16.8.220\/24, ]<br\/>       gateway4:  172.16.0.1<br\/>       nameservers:<br\/>               addresses: [8.8.8.8, 8.8.4.4]<\/code><\/p> <\/li><li class=\"schema-how-to-step\" id=\"how-to-step-1580194195942\"><strong class=\"schema-how-to-step-name\">Save and apply changes<\/strong> <p class=\"schema-how-to-step-text\"><code>netplan apply<\/code><\/p> <\/li><li class=\"schema-how-to-step\" id=\"how-to-step-1580194259679\"><strong class=\"schema-how-to-step-name\">Verify changes by list all interfaces<\/strong> <p class=\"schema-how-to-step-text\"><code>ip -a<\/code><\/p> <\/li><\/ol><\/div>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_80 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69d79e027ff62\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69d79e027ff62\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/#Prerequisite\" >Prerequisite:<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/#List_available_network_interfaces_on_Ubuntu\" >List available network interfaces on Ubuntu<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/#Configure_Netplan_Static_IP\" >Configure Netplan Static IP<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/#Configure_Netplan_Dynamic_IP\" >Configure Netplan Dynamic IP<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/#Conclusion\" >Conclusion:<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Prerequisite\"><\/span>Prerequisite:<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>During this tutorial, Privileged access to Ubuntu 18.04 will be required.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"List_available_network_interfaces_on_Ubuntu\"><\/span>List available network interfaces on Ubuntu<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Above all, we have to find the available network interfaces on our system. You can list all the network interfaces by using the below command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ip -a<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"263\" src=\"https:\/\/oracle.itsupportwale.com\/blog\/wp-content\/uploads\/2021\/05\/list-all-interface-in-ubuntu-1024x263.jpg\" alt=\"list-all-interface-in-ubuntu\" class=\"wp-image-3552\" srcset=\"https:\/\/itsupportwale.com\/blog\/wp-content\/uploads\/2021\/05\/list-all-interface-in-ubuntu-1024x263.jpg 1024w, https:\/\/itsupportwale.com\/blog\/wp-content\/uploads\/2021\/05\/list-all-interface-in-ubuntu-300x77.jpg 300w, https:\/\/itsupportwale.com\/blog\/wp-content\/uploads\/2021\/05\/list-all-interface-in-ubuntu-768x197.jpg 768w, https:\/\/itsupportwale.com\/blog\/wp-content\/uploads\/2021\/05\/list-all-interface-in-ubuntu.jpg 1130w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>List all Interface in Ubuntu<\/figcaption><\/figure>\n\n\n\n<p>As a result, we have two network interfaces available in our system. One is <strong>Ethernet<\/strong> and the other one is the <strong>loopback interface<\/strong>. We will configure static IP for the <strong>enp0s3<\/strong> ethernet interface. However, it&#8217;s currently using DHCP for IP address.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Configure_Netplan_Static_IP\"><\/span>Configure Netplan Static IP<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The default configuration file was generated during installation which has DHCP as the default method for IP address. Look for a <strong>.yaml<\/strong> file in the <strong>\/etc\/netplan<\/strong> directory by the below command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ls \/etc\/netplan\/<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">Output:\n        root@linuxbots:~# ls \/etc\/netplan\/\n        50-cloud-init.yaml<\/pre>\n\n\n\n<p><strong>Important<\/strong>: If you did not find the YAML file in <strong>\/etc\/netplan<\/strong> than you can generate it by the below command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo netplan generate<\/code><\/pre>\n\n\n\n<p>By default, you can find content like below in the configuration file.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">root@linuxbots:~# cat \/etc\/netplan\/50-cloud-init.yaml \n This file is generated from information provided by\n the datasource.  Changes to it will not persist across an instance.\n To disable cloud-init's network configuration capabilities, write a file\n \/etc\/cloud\/cloud.cfg.d\/99-disable-network-config.cfg with the following:\n network: {config: disabled}\n network:\n     ethernets:\n         enp0s3:\n             addresses: []\n             dhcp4: true\n     version: 2<\/pre>\n\n\n\n<p>In the above output, the DHCP method is set for interface <strong>enp0s3<\/strong>. So now, for Setting up Static IP Address for interface enp0s3 edit the configuration file and put the details like below.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vim \/etc\/netplan\/50-cloud-init.yaml<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>enp0s3:\t\t\t\t\n      dhcp4: no\n      dhcp6: no\n      addresses: &#91;172.16.8.220\/24, ]\n      gateway4:  172.16.0.1\n      nameservers:\n              addresses: &#91;8.8.8.8, 8.8.4.4]<\/code><\/pre>\n\n\n\n<p>Here:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>enp0s3<\/strong> &#8211; Name of the network interface<\/li><li><strong>dhcp4 and dhcp6<\/strong> &#8211; DHCP method selection for IPV4 and IPV6<\/li><li><strong>addresses<\/strong>: IP address which we want to configure for interface<\/li><li><strong>gateway4<\/strong>: IPV4 address for the default gateway<\/li><li><strong>nameservers<\/strong>:  list of nameservers uses for DNS resolution<\/li><\/ul>\n\n\n\n<p>After that, your configuration file will look like the below image.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"821\" height=\"357\" src=\"https:\/\/oracle.itsupportwale.com\/blog\/wp-content\/uploads\/2021\/05\/netplan-static-ip-example-1.jpg\" alt=\"netplan-static-ip-example-1\" class=\"wp-image-3554\" srcset=\"https:\/\/itsupportwale.com\/blog\/wp-content\/uploads\/2021\/05\/netplan-static-ip-example-1.jpg 821w, https:\/\/itsupportwale.com\/blog\/wp-content\/uploads\/2021\/05\/netplan-static-ip-example-1-300x130.jpg 300w, https:\/\/itsupportwale.com\/blog\/wp-content\/uploads\/2021\/05\/netplan-static-ip-example-1-768x334.jpg 768w\" sizes=\"auto, (max-width: 821px) 100vw, 821px\" \/><figcaption>netplan-static-ip-example-1<\/figcaption><\/figure>\n\n\n\n<p>After that, Save the configuration file.<\/p>\n\n\n\n<p>Apply the changes we made in the previous step by using the below command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo netplan apply<\/code><\/pre>\n\n\n\n<p>After that, verify that the network interface is using static IP by list all network interfaces.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ip a<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">OUTPUT:\nroot@linuxbots:~# ip a\n 1: lo:  mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000\n     link\/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00\n     inet 127.0.0.1\/8 scope host lo\n        valid_lft forever preferred_lft forever\n     inet6 ::1\/128 scope host \n        valid_lft forever preferred_lft forever\n 2: enp0s3:  mtu 1500 qdisc fq_codel state UP group default qlen 1000\n     link\/ether 08:00:27:3b:ae:03 brd ff:ff:ff:ff:ff:ff\n     inet 172.16.8.220\/24 brd 172.16.8.255 scope global enp0s3\n        valid_lft forever preferred_lft forever\n     inet6 fe80::a00:27ff:fe3b:ae03\/64 scope link \n        valid_lft forever preferred_lft forever<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Configure_Netplan_Dynamic_IP\"><\/span>Configure Netplan Dynamic IP<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Similarly, to configure a Dynamic IP address for the same network interface simply use the below configuration.<\/p>\n\n\n\n<p>enp0s3:                <br>       dhcp4: yes<\/p>\n\n\n\n<p>Save the config and apply it by the below command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo netplan apply<\/code><\/pre>\n\n\n\n<p>after that, verify the changes by listing all the interfaces by the below command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ip -a<\/code><\/pre>\n\n\n\n<p>That&#8217;s it, now your system will get the IP by DHCP method.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion:<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>In conclusion, we have successfully configured static IP using Netplan in Ubuntu. We also covered how to configure dynamic IP using Netplan. You share your views in the comment section.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Also Read: <a href=\"https:\/\/oracle.itsupportwale.com\/blog\/install-nextcloud-server-by-manual-method-on-ubuntu-16-04-18-04-with-apache2-mariadb-and-php-7-3\/\" target=\"_blank\" rel=\"noreferrer noopener\" label=\"Install NextCloud On Ubuntu 18.04 With Apache2, MariaDB And PHP 7.3 (opens in a new tab)\">Install NextCloud On Ubuntu 18.04 With Apache2, MariaDB And PHP 7.3<\/a><\/li><\/ul>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Netplan, the new interface configuration utility in Ubuntu introduced in Ubuntu 17.10. For configuring static IP in Ubuntu 18.04 we will use Netplan. In the same vein, all the latest versions of Ubuntu Server and Desktop uses Netplan to manage and configure network settings. Netplan reads network configuration from \/etc\/netplan\/*.yaml. YAML is a commonly used &#8230; <a title=\"Netplan Static IP &#8211; Configure static IP address on Ubuntu 18.04\" class=\"read-more\" href=\"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/\" aria-label=\"Read more  on Netplan Static IP &#8211; Configure static IP address on Ubuntu 18.04\">Read more<\/a><\/p>\n","protected":false},"author":2,"featured_media":601,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[498,500],"tags":[534,537,565,8,566,567,576],"class_list":["post-573","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-foss","category-linux","tag-linux-tools","tag-netplan","tag-tools","tag-ubuntu","tag-ubuntu-18-04-netplan-static-ip","tag-ubuntu-18-04-static-ip","tag-ubuntu-set-static-ip"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Netplan Static IP - Configure static IP address on Ubuntu 18.04 - ITSupportWale<\/title>\n<meta name=\"description\" content=\"For configuring static IP in Ubuntu 18.04 we will use Netplan. All the latest versions of Ubuntu uses Netplan to manage and configure network settings.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Netplan Static IP - Configure static IP address on Ubuntu 18.04 - ITSupportWale\" \/>\n<meta property=\"og:description\" content=\"For configuring static IP in Ubuntu 18.04 we will use Netplan. All the latest versions of Ubuntu uses Netplan to manage and configure network settings.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/\" \/>\n<meta property=\"og:site_name\" content=\"ITSupportWale\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Itsupportwale-298547177495978\" \/>\n<meta property=\"article:published_time\" content=\"2020-01-28T07:02:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-05-16T14:54:51+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/itsupportwale.com\/blog\/wp-content\/uploads\/2021\/05\/android-chrome-512x512-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"512\" \/>\n\t<meta property=\"og:image:height\" content=\"512\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Techie\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Techie\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/\"},\"author\":{\"name\":\"Techie\",\"@id\":\"https:\/\/itsupportwale.com\/blog\/#\/schema\/person\/8c5a2b3d36396e0a8fd91ec8242fd46d\"},\"headline\":\"Netplan Static IP &#8211; Configure static IP address on Ubuntu 18.04\",\"datePublished\":\"2020-01-28T07:02:55+00:00\",\"dateModified\":\"2021-05-16T14:54:51+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/\"},\"wordCount\":599,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/itsupportwale.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/#primaryimage\"},\"thumbnailUrl\":\"\",\"keywords\":[\"linux tools\",\"netplan\",\"tools\",\"ubuntu\",\"ubuntu 18.04 netplan static ip\",\"ubuntu 18.04 static ip\",\"ubuntu set static ip\"],\"articleSection\":[\"FOSS\",\"Linux\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/\",\"url\":\"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/\",\"name\":\"Netplan Static IP - Configure static IP address on Ubuntu 18.04 - ITSupportWale\",\"isPartOf\":{\"@id\":\"https:\/\/itsupportwale.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/#primaryimage\"},\"thumbnailUrl\":\"\",\"datePublished\":\"2020-01-28T07:02:55+00:00\",\"dateModified\":\"2021-05-16T14:54:51+00:00\",\"description\":\"For configuring static IP in Ubuntu 18.04 we will use Netplan. All the latest versions of Ubuntu uses Netplan to manage and configure network settings.\",\"breadcrumb\":{\"@id\":\"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/#primaryimage\",\"url\":\"\",\"contentUrl\":\"\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/itsupportwale.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Netplan Static IP &#8211; Configure static IP address on Ubuntu 18.04\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/itsupportwale.com\/blog\/#website\",\"url\":\"https:\/\/itsupportwale.com\/blog\/\",\"name\":\"ITSupportWale\",\"description\":\"Tips, Tricks, Fixed-Errors, Tutorials &amp; Guides\",\"publisher\":{\"@id\":\"https:\/\/itsupportwale.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/itsupportwale.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/itsupportwale.com\/blog\/#organization\",\"name\":\"itsupportwale\",\"url\":\"https:\/\/itsupportwale.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/itsupportwale.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/itsupportwale.com\/blog\/wp-content\/uploads\/2023\/09\/cropped-Logo-trans-without-slogan.png\",\"contentUrl\":\"https:\/\/itsupportwale.com\/blog\/wp-content\/uploads\/2023\/09\/cropped-Logo-trans-without-slogan.png\",\"width\":1119,\"height\":144,\"caption\":\"itsupportwale\"},\"image\":{\"@id\":\"https:\/\/itsupportwale.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/Itsupportwale-298547177495978\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/itsupportwale.com\/blog\/#\/schema\/person\/8c5a2b3d36396e0a8fd91ec8242fd46d\",\"name\":\"Techie\",\"sameAs\":[\"https:\/\/itsupportwale.com\",\"iswblogadmin\"],\"url\":\"https:\/\/itsupportwale.com\/blog\/author\/iswblogadmin\/\"},{\"@type\":\"HowTo\",\"@id\":\"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/#howto-1\",\"name\":\"Netplan Static IP &#8211; Configure static IP address on Ubuntu 18.04\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/#article\"},\"description\":\"Configure Static IP in Ubuntu 18.04 using Netplan Utility\",\"totalTime\":\"P0DT0H5M\",\"step\":[{\"@type\":\"HowToStep\",\"url\":\"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/#how-to-step-1580193863359\",\"name\":\"List all available network interfaces\",\"itemListElement\":[{\"@type\":\"HowToDirection\",\"text\":\"ip -a\"}]},{\"@type\":\"HowToStep\",\"url\":\"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/#how-to-step-1580193954454\",\"name\":\"Find the Netplan Configuration file in \/etc\/netplan\",\"itemListElement\":[{\"@type\":\"HowToDirection\",\"text\":\"ls \/etc\/netplan\"}]},{\"@type\":\"HowToStep\",\"url\":\"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/#how-to-step-1580193994567\",\"name\":\"Generate the configuration if not found\",\"itemListElement\":[{\"@type\":\"HowToDirection\",\"text\":\"sudo netplan generate\"}]},{\"@type\":\"HowToStep\",\"url\":\"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/#how-to-step-1580194018077\",\"name\":\"Edit the Netplan configuration\",\"itemListElement\":[{\"@type\":\"HowToDirection\",\"text\":\"enp0s3:                <br\/>       dhcp4: no<br\/>       dhcp6: no<br\/>       addresses: [172.16.8.220\/24, ]<br\/>       gateway4:  172.16.0.1<br\/>       nameservers:<br\/>               addresses: [8.8.8.8, 8.8.4.4]\"}]},{\"@type\":\"HowToStep\",\"url\":\"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/#how-to-step-1580194195942\",\"name\":\"Save and apply changes\",\"itemListElement\":[{\"@type\":\"HowToDirection\",\"text\":\"netplan apply\"}]},{\"@type\":\"HowToStep\",\"url\":\"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/#how-to-step-1580194259679\",\"name\":\"Verify changes by list all interfaces\",\"itemListElement\":[{\"@type\":\"HowToDirection\",\"text\":\"ip -a\"}]}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Netplan Static IP - Configure static IP address on Ubuntu 18.04 - ITSupportWale","description":"For configuring static IP in Ubuntu 18.04 we will use Netplan. All the latest versions of Ubuntu uses Netplan to manage and configure network settings.","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:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/","og_locale":"en_US","og_type":"article","og_title":"Netplan Static IP - Configure static IP address on Ubuntu 18.04 - ITSupportWale","og_description":"For configuring static IP in Ubuntu 18.04 we will use Netplan. All the latest versions of Ubuntu uses Netplan to manage and configure network settings.","og_url":"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/","og_site_name":"ITSupportWale","article_publisher":"https:\/\/www.facebook.com\/Itsupportwale-298547177495978","article_published_time":"2020-01-28T07:02:55+00:00","article_modified_time":"2021-05-16T14:54:51+00:00","og_image":[{"width":512,"height":512,"url":"https:\/\/itsupportwale.com\/blog\/wp-content\/uploads\/2021\/05\/android-chrome-512x512-1.png","type":"image\/png"}],"author":"Techie","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Techie","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/#article","isPartOf":{"@id":"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/"},"author":{"name":"Techie","@id":"https:\/\/itsupportwale.com\/blog\/#\/schema\/person\/8c5a2b3d36396e0a8fd91ec8242fd46d"},"headline":"Netplan Static IP &#8211; Configure static IP address on Ubuntu 18.04","datePublished":"2020-01-28T07:02:55+00:00","dateModified":"2021-05-16T14:54:51+00:00","mainEntityOfPage":{"@id":"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/"},"wordCount":599,"commentCount":0,"publisher":{"@id":"https:\/\/itsupportwale.com\/blog\/#organization"},"image":{"@id":"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/#primaryimage"},"thumbnailUrl":"","keywords":["linux tools","netplan","tools","ubuntu","ubuntu 18.04 netplan static ip","ubuntu 18.04 static ip","ubuntu set static ip"],"articleSection":["FOSS","Linux"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/","url":"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/","name":"Netplan Static IP - Configure static IP address on Ubuntu 18.04 - ITSupportWale","isPartOf":{"@id":"https:\/\/itsupportwale.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/#primaryimage"},"image":{"@id":"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/#primaryimage"},"thumbnailUrl":"","datePublished":"2020-01-28T07:02:55+00:00","dateModified":"2021-05-16T14:54:51+00:00","description":"For configuring static IP in Ubuntu 18.04 we will use Netplan. All the latest versions of Ubuntu uses Netplan to manage and configure network settings.","breadcrumb":{"@id":"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/#primaryimage","url":"","contentUrl":""},{"@type":"BreadcrumbList","@id":"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/itsupportwale.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Netplan Static IP &#8211; Configure static IP address on Ubuntu 18.04"}]},{"@type":"WebSite","@id":"https:\/\/itsupportwale.com\/blog\/#website","url":"https:\/\/itsupportwale.com\/blog\/","name":"ITSupportWale","description":"Tips, Tricks, Fixed-Errors, Tutorials &amp; Guides","publisher":{"@id":"https:\/\/itsupportwale.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/itsupportwale.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/itsupportwale.com\/blog\/#organization","name":"itsupportwale","url":"https:\/\/itsupportwale.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/itsupportwale.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/itsupportwale.com\/blog\/wp-content\/uploads\/2023\/09\/cropped-Logo-trans-without-slogan.png","contentUrl":"https:\/\/itsupportwale.com\/blog\/wp-content\/uploads\/2023\/09\/cropped-Logo-trans-without-slogan.png","width":1119,"height":144,"caption":"itsupportwale"},"image":{"@id":"https:\/\/itsupportwale.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/Itsupportwale-298547177495978"]},{"@type":"Person","@id":"https:\/\/itsupportwale.com\/blog\/#\/schema\/person\/8c5a2b3d36396e0a8fd91ec8242fd46d","name":"Techie","sameAs":["https:\/\/itsupportwale.com","iswblogadmin"],"url":"https:\/\/itsupportwale.com\/blog\/author\/iswblogadmin\/"},{"@type":"HowTo","@id":"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/#howto-1","name":"Netplan Static IP &#8211; Configure static IP address on Ubuntu 18.04","mainEntityOfPage":{"@id":"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/#article"},"description":"Configure Static IP in Ubuntu 18.04 using Netplan Utility","totalTime":"P0DT0H5M","step":[{"@type":"HowToStep","url":"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/#how-to-step-1580193863359","name":"List all available network interfaces","itemListElement":[{"@type":"HowToDirection","text":"ip -a"}]},{"@type":"HowToStep","url":"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/#how-to-step-1580193954454","name":"Find the Netplan Configuration file in \/etc\/netplan","itemListElement":[{"@type":"HowToDirection","text":"ls \/etc\/netplan"}]},{"@type":"HowToStep","url":"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/#how-to-step-1580193994567","name":"Generate the configuration if not found","itemListElement":[{"@type":"HowToDirection","text":"sudo netplan generate"}]},{"@type":"HowToStep","url":"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/#how-to-step-1580194018077","name":"Edit the Netplan configuration","itemListElement":[{"@type":"HowToDirection","text":"enp0s3:                <br\/>       dhcp4: no<br\/>       dhcp6: no<br\/>       addresses: [172.16.8.220\/24, ]<br\/>       gateway4:  172.16.0.1<br\/>       nameservers:<br\/>               addresses: [8.8.8.8, 8.8.4.4]"}]},{"@type":"HowToStep","url":"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/#how-to-step-1580194195942","name":"Save and apply changes","itemListElement":[{"@type":"HowToDirection","text":"netplan apply"}]},{"@type":"HowToStep","url":"https:\/\/itsupportwale.com\/blog\/netplan-static-ip-configure-static-ip-address-on-ubuntu-18-04\/#how-to-step-1580194259679","name":"Verify changes by list all interfaces","itemListElement":[{"@type":"HowToDirection","text":"ip -a"}]}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/itsupportwale.com\/blog\/wp-json\/wp\/v2\/posts\/573","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itsupportwale.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itsupportwale.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itsupportwale.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/itsupportwale.com\/blog\/wp-json\/wp\/v2\/comments?post=573"}],"version-history":[{"count":0,"href":"https:\/\/itsupportwale.com\/blog\/wp-json\/wp\/v2\/posts\/573\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/itsupportwale.com\/blog\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/itsupportwale.com\/blog\/wp-json\/wp\/v2\/media?parent=573"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itsupportwale.com\/blog\/wp-json\/wp\/v2\/categories?post=573"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itsupportwale.com\/blog\/wp-json\/wp\/v2\/tags?post=573"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}