Advance

Tutorial Set IPv6 on Ubuntu 20.04 LTS Server with netplan

Tutorial Set IPv6 on Ubuntu 20.04 LTS Server with netplan

Nowadays, setting up your server with IPv6 and accessing it via IPv6 is very important. This article will teach you How to Set IPv6 on Ubuntu 20.04 LTS Server with netplan. You can apply the instructions we used in this tutorial to any public network setup where you want to set default routing. Eldernode website offers economical Ubuntu VPS servers, which you can check out the offered package to purchase it.

How to Set IPv6 on Ubuntu 20.04 LTS Server with netplan

There are several ways to set up IPv6 on an Ubuntu 20.04 VPS. One of these methods is using netplan, which is one of the most reliable. Netplan is a tool for configuring and managing the network in Ubuntu, which is added along with other methods such as Network Manager in the Ubuntu operating system. This method can control NetworkManager and network backend systems and uses YAML to define your network settings.

Recommended Article: How to install Python 3 on Ubuntu 20.04

How to Enable IPv6 on Ubuntu 20.04 LTS Server

First, you need to find the allocated IPv6 subnet. To do this, log in to your Ubuntu server and check the Service details section from the Client Area to see both IPv4 and IPv6. From the assigned IPv6 subnet you can easily extend the default gateway for your assigned subnet.

After you have this information, create your netplan configuration file. Since netplan reads network configuration files from /etc/netplan/*.yaml, you can create the file with any name ending in .yaml. If you have multiple interdependent configuration files, it is better to implement numbered naming to control the loading sequence.

Since the Ubuntu 20.04 templates have DHCP configuration for IPv4 in 01-netcfg.yaml, now you should extend the Ubuntu 20.04 templates with the following configuration parameters:

 

Configuration-parameters

 

Then run the following command to apply the changes:

netplan apply

Check if the netplan configuration is applied successfully. For this, you can check the server syslog or the IPv6 routes:

ip -6 route show

Finally, advertise your IPv6 address on the network with Neighbor Solicitation Protocol with the following command. This makes the allocated IP available from all over the Internet:

ping -6 black.host

How to Add IPv6 on Ubuntu 20.04 LTS Server with netplan

After setting up IPv6 on your Ubuntu server, you can add additional addresses under the address key in your configuration file. You can add the addresses as an additional list item in the current format or as an object sequence containing all addresses. As in the following example:

 

Add-additional-address

 

Don’t forget to apply the changes.

Lastly, you need to announce the added IPs by running the following command and at the same time specify the output interface/IP address:

ping -6 -I 2a07:85XX:0:XXX::3 black.host

That’s it!

Recommended Article: How to run or repeat a Linux command every X seconds forever

Conclusion

Netplan is a tool for configuring and managing the network in Ubuntu. In this article, we taught you how to set IPv6 on Ubuntu 20.04 LTS server with netplan. I hope you found this tutorial useful and that it helps you to set up IPv6 on Ubuntu 20.04. If you encounter a problem or have any questions during the setup process, you can contact us in the comments section.

View More Posts
Tom Veitch
Eldernode Writer
We Are Waiting for your valuable comments and you can be sure that it will be answered in the shortest possible time.

Leave a Reply

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

We are by your side every step of the way

Think about developing your online business; We will protect it compassionately

We are by your side every step of the way

+8595670151

7 days a week, 24 hours a day