Share on Social Media

Learn how to configure IPv6 networking on Linux using nmcli commands. Follow our detailed guide for setting up IPv6 addresses on a Linux Server. #centlinux #linux #networking

Problem Statement

Red Hat Enterprise Linux (RHEL) 7 fully supports IPv6 network. It is not much difficult to configure an IPv6 network, if you have some basic understanding of IPv6 addressing scheme.

In this article, we will configure Linux IPv6 Networking between two Red Hat Enterprise Linux (RHEL) 7 machines by setting static IPv6 addresses using nmcli commands.

What is IPv6?

Internet Protocol version 6 (IPv6) is the most recent version of the Internet Protocol (IP), the communications protocol that provides an identification and location system for computers on networks and routes traffic across the Internet. IPv6 was developed by the Internet Engineering Task Force (IETF) to deal with the long-anticipated problem of IPv4 address exhaustion, and is intended to replace IPv4. In December 1998, IPv6 became a Draft Standard for the IETF, which subsequently ratified it as an Internet Standard on 14 July 2017.

Devices on the Internet are assigned a unique IP address for identification and location definition. With the rapid growth of the Internet after commercialization in the 1990s, it became evident that far more addresses would be needed to connect devices than the IPv4 address space had available. By 1998, the IETF had formalized the successor protocol. IPv6 uses 128-bit addresses, theoretically allowing 2128, or approximately 3.4×1038 total addresses.

The actual number is slightly smaller, as multiple ranges are reserved for special use or completely excluded from use. The two protocols are not designed to be interoperable, and thus direct communication between them is impossible, complicating the move to IPv6. However, several transition mechanisms have been devised to rectify this.

IPv6 provides other technical benefits in addition to a larger addressing space. In particular, it permits hierarchical address allocation methods that facilitate route aggregation across the Internet, and thus limit the expansion of routing tables. The use of multicast addressing is expanded and simplified, and provides additional optimization for the delivery of services. Device mobility, security, and configuration aspects have been considered in the design of the protocol.

IPv6 addresses are represented as eight groups of four hexadecimal digits each, separated by colons. The full representation may be shortened; for example, 2001:0db8:0000:0000:0000:8a2e:0370:7334 becomes 2001:db8::8a2e:370:7334. (Source: Wikipedia)

Recommended Online Training: Learn Bash Shell in Linux for Beginners

745772 0021

Linux Server Specification

We have two RHEL 7 virtual machines. for which, we have allocated the following IPv6 addresses.

Machine IPv6 Address
server1.example.comfddb:fe2a:ab1e::c0a8:94/64
desktop1.example.comfddb:fe2a:ab1e::c0a8:95/64
Gatewayfddb:fe2a:ab1e::c0a8:50/64

Configure Linux IPv6 Networking

Connect to server1.example.com using ssh and configure IPv6 addresses as follows.

# nmcli connection modify eno16777728 ipv6.method manual ipv6.addresses "fddb:fe2a:ab1e::c0a8:94/64 fddb:fe2a:ab1e::c0a8:50"
# nmcli c down eno16777728 ; nmcli c up eno16777728
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/1)
# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
      link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
      inet 127.0.0.1/8 scope host lo
         valid_lft forever preferred_lft forever
      inet6 ::1/128 scope host
         valid_lft forever preferred_lft forever 2: eno16777728: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
      link/ether 00:0c:29:63:0c:9a brd ff:ff:ff:ff:ff:ff
      inet 192.168.116.11/24 brd 192.168.116.255 scope global eno16777728
         valid_lft forever preferred_lft forever
      inet6 fddb:fe2a:ab1e::c0a8:94/64 scope global
         valid_lft forever preferred_lft forever
      inet6 fe80::20c:29ff:fe63:c9a/64 scope link
         valid_lft forever preferred_lft forever 3: eno33554968: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
      link/ether 00:0c:29:63:0c:a4 brd ff:ff:ff:ff:ff:ff

Now, connect to desktop1.example.com and configure IPv6 network as follows.

# nmcli connection modify eno16777728 ipv6.method manual ipv6.addresses "fddb:fe2a:ab1e::c0a8:95/64 fddb:fe2a:ab1e::c0a8:50"
# nmcli c down eno16777728 ; nmcli c up eno16777728
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/2)
# ip addr
1: lo:  mtu 65536 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eno16777728:  mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:0c:29:68:ae:66 brd ff:ff:ff:ff:ff:ff
    inet 192.168.116.12/24 brd 192.168.116.255 scope global eno16777728
       valid_lft forever preferred_lft forever
    inet6 fddb:fe2a:ab1e::c0a8:95/64 scope global
       valid_lft forever preferred_lft forever
    inet6 fe80::20c:29ff:fe68:ae66/64 scope link
       valid_lft forever preferred_lft forever
3: eno33554968:  mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:0c:29:68:ae:70 brd ff:ff:ff:ff:ff:ff

Ping both IPv6 addresses from any machine to confirm the network connectivity.

# ping6 fddb:fe2a:ab1e::c0a8:94
PING fddb:fe2a:ab1e::c0a8:94(fddb:fe2a:ab1e::c0a8:94) 56 data bytes
64 bytes from fddb:fe2a:ab1e::c0a8:94: icmp_seq=4 ttl=64 time=0.268 ms
64 bytes from fddb:fe2a:ab1e::c0a8:94: icmp_seq=5 ttl=64 time=0.257 ms
^C
--- fddb:fe2a:ab1e::c0a8:94 ping statistics ---
5 packets transmitted, 4 received, 20% packet loss, time 4019ms
rtt min/avg/max/mdev = 0.257/0.271/0.299/0.020 ms

# ping6 fddb:fe2a:ab1e::c0a8:95
PING fddb:fe2a:ab1e::c0a8:95(fddb:fe2a:ab1e::c0a8:95) 56 data bytes
64 bytes from fddb:fe2a:ab1e::c0a8:95: icmp_seq=2 ttl=64 time=0.056 ms
64 bytes from fddb:fe2a:ab1e::c0a8:95: icmp_seq=3 ttl=64 time=0.060 ms
^C
--- fddb:fe2a:ab1e::c0a8:95 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 0.056/0.062/0.071/0.009 ms

We have successfully configured static IPv6 networking between two Red Hat Enterprise Linux (RHEL) 7 by setting IPv6 addresses using nmcli command.

If you are new to Linux and facing difficulty in working at Linux Bash prompt. We recommend that, you should read The Linux Command Line, 2nd Edition: A Complete Introduction by William Shotts.

Final Thoughts

Congratulations on learning how to configure IPv6 networking on Linux using nmcli commands! With the knowledge from this guide, you can effectively manage your IPv6 addresses, configure network interfaces, and troubleshoot any networking issues you might encounter.

If you found this guide helpful and are looking for additional support or expert assistance with IPv6 configuration, Linux networking, or other technical tasks, feel free to explore my Fiverr profile. I offer a range of services including:

  • IPv6 Networking Configuration: Professional setup and management of IPv6 addresses and network interfaces.
  • Linux Network Administration: Comprehensive network configuration, troubleshooting, and optimization.
  • Network Security and Monitoring: Implement security measures and monitor network performance.
  • Custom Scripts and Automation: Create and deploy scripts to automate network tasks and processes.

Check out my Fiverr profile to find the perfect solution for your networking needs. I’m here to help you with all your Linux and network administration challenges!

Thank you for reading, and best of luck with your IPv6 networking setup!

Leave a Reply