How to Configure Network in Ubuntu Server with Netplan Easily (Example)

While technological and digital tools present great and constant advances, people must find a way to adapt to all the new functions that these new tools or the update of them bring.

One of the most used learning routes in recent times has been the internet, in which videos shared in different sharing platforms all kinds of knowledge with a large community of users.

Managing a server

One of those things that everyone at some point should take into account to learn, refers to the operation of a web server. When talking about servers, we do not refer only to a web server, since a server can also be used for the storage or containment of a database, for example.

managing a server

In this sense, it is important to note that a server perfectly adapts to the description of a technological and digital tool, since it should not necessarily be related to a physical device, since the necessary efforts have been made to turn it into a powerful program for facilitate its handling.

Let’s learn more about Ubuntu Server

One of the most powerful servers you could use is the Linux operating system, more specifically in its Ubuntu distribution.

This open source operating system has great benefits, due to the incredible collaboration by its large community of users, who make important contributions to the refinement and optimization of each of its tools.

So in this case, how about we explore some Ubuntu Server features that will help you set up a network easily? It will only be a matter of putting into practice all the knowledge you acquire here.

Let’s also talk about Netplan

To achieve the objective of configuring a network thanks to the benefits offered by the Ubuntu Server Linux distribution, it is necessary to talk about the most outstanding utility of the aforementioned operating system and that is Netplan.

This tool is the one that will allow you to configure the network, (by means of quick and simple commands), to which you are connected.


It is important to note that this utility is included within the functions of the operating system, so you do not need to perform any type of download or installation to use it.

How to use

Netplan has made network interface configurations a thing of the past, implementing YAML functions to put a configuration file to work.

  • The Netplan configuration file may vary depending on the installed distribution. In this case, this file could be located using the command sudo nano /etc/netplan/01-netcfg.yaml.
  • If you do not know the name of your interface, enter the command sudo ip addr to obtain the necessary information to identify it.
  • Once you know the identity of your interface, proceed to use the file 01-netcfg.yaml, this file may also vary in its structure depending on the distribution you have.
  • After the previous step, a series of elements related to the network configuration will be displayed, which can be modified to suit your needs. Said list must have this structure:
    • network:
    • version: 2
    • renderer: networkd
    • ethernets:
    • eno1:
    • dhcp4: no
    • dhcp6: no
    • addresses:
    • –
    • gateway4:
    • nameservers:
    • search: [dominio.local]
    • addresses: []
    • eno2:
    • dhcp4: no
    • dhcp6: no
    • addresses:
    • –
    • nameservers:
    • search: [dominio.local]
    • addresses: []

Once the modifications that you think are pertinent or necessary have been made, it only remains to proceed with updating or restarting the configuration file, for this, you will have to use the netplan apply command.

Configure your network easily with Netplan!

Thanks to this important utility that is part of Ubuntu, you will be able to configure your network in a much easier way.

For all the configuration carried out by Netplan to be really effective, you must make sure you have all the information of your network, such as IP address or network mask. If you do not have more knowledge about these elements, you can always make use of a network calculator for it.

How useful did you find this content?

Click on a star to rate!

Average score 0 / 5. Counting of votes: 0

So far, no votes. Be the first to rate this content.

I'm sorry this content was not useful for you!

Let me improve this content!

Tell me, how can I improve this content?

Deja un comentario