3. Ubuntu 18.04.3 Server Networking

In this post, I would be discussing about the network configuration of the Ubuntu OS we have setup on VMware. This post tries to bring in all the relevant articles in one place to easily configure the Ubuntu 18.04.3 machine.

For the network configuration of Ubuntu 18.04.3 it uses a mechanism called as netplan.

Their website is quite good and informative on how it works and its configuration. But still in this post I would highlight few of its features in relation to the actual findings on the Ubuntu OS.

The above commands are used to find the network configuration of our Ubuntu server.

The netplan configuration is located as follows:

This config file can be backed up for reverting back to original in case of any issues , via the following command, but make sure the extension *.yaml is not left in the backup file.

Usually I create a copy of the file as follows:

Now we are good to edit the file as per the required config suggested at the following URL:

https://netplan.io/examples
https://vitux.com/how-to-configure-networking-with-netplan-on-ubuntu/
https://linuxconfig.org/how-to-configure-static-ip-address-on-ubuntu-18-10-cosmic-cuttlefish-linux

The above articles are well written and explained as per the scenario being faced by the user.

Post the configuration the settings can be applied

The above setting can be applied using the debug switch to get more information in case of an error.
but some of my findings for the above configuration were:

– Do not use tabs in the YAML file, the apply command doesn’t like it. Just use plain spaces to move text around
– Use the nano editor than vi, its more user friendly

Additionally to test the server connectivity settings post configuration via netplan use ping to test to host or any other PC on the network.

Ping from Ubuntu (guest) to Windows (host) – On windows to find IP use ipconfig command in command prompt

Ping from Windows (Host) to Ubuntu (Guest)

– Setting up the DNS Name Server on Ubuntu 18.04 (Bug)

There is a flaw which has been identified in the Ubuntu 18.04 while setting up the DNS name server ,so to fix the issue the following commands come in handy to setup the server back to normal and work with netplan mechanism to setup the DNS name server:


sudo rm -f /etc/resolv.conf
sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
sudo service systemd-resolved restart

#check the contents of the resolv.conf
cat /etc/resolv.conf

Reference:
https://askubuntu.com/questions/973017/wrong-nameserver-set-by-resolvconf-and-networkmanager

https://askubuntu.com/questions/1045278/ubuntu-server-18-04-temporary-failure-in-name-resolution

Hope the above helps.

Leave a Reply

Your email address will not be published. Required fields are marked *

*