How to Ping IPv6 Address from Windows and Linux CLI

Written by: Linuxopsys   |   Last updated: June 18, 2022

IPV6 stands for 'Internet Protocol Version 6' and this was introduced to replace IPV4 due to the exhaustion of IPv4 addresses. Due to IPV4 having a limited number of IP addresses and with the expansion of IoT (Internet of Things) number of IP addresses that can be used in IPV4 have started to run out and IPV6 was introduced as a solution to this problem.

There are various benefits IPV6 has over IPV4 and some of them are;

  • IPV6 provides a large pool of addresses, theoretical maximum of 2^128 addresses to be exact
  • Auto Configuration: IPv6 devices can independently auto-configure themselves when connected with other IPv6 devices
  • Better authentication and privacy mechanisms in IPV6
  • More efficient routing due to having unique IP addresses

Pinging to IPV6 Addresses

In order to check the IPV6 connectivity from your machine, you need to have one of the below prerequisites.

  • Install IPV6 tunnel in your machine
  • Have native IPV6 transport from your ISP to use IPv6 over the Internet
  • Have IPv6 enabled networking gears such as routers, in order to use IPV6 inside your LAN/WAN

If you have any of these methods configured you can test the connectivity to IPV6 addresses using the 'Ping' command as below.

Using Ping Command

Ping command is used to check the connectivity to a given destination over the network and this is widely used between various parties all over the world for network troubleshooting purposes.
The ping command operates by sending Internet Control Message Protocol (ICMP) Echo Request messages to the destination and waiting for a response. By using this command we can get details such as the number of responses received from the destinations and the time it took for them to return.
The Ping command is available from within the Command Prompt in Windows 7/8/10, Windows Vista, Windows XP and all of the Linux operating systems.

You can follow below steps to ping to IPV6 addresses from your Windows machine

Step 1: Open the Command prompt of your Windows machine as described in one of the previous steps

Step 2: Type below command in Command Prompt to ping to an IPV6 address
Command : ping -6 [IPV6 address]

For testing purposes, you can simply use the IPV6 address of Google, which is 'ipv6.google.com'

testing ping of IPV6 address of google

As you can see, 3 packets have been transmitted and 3 have received with 0% packet loss, which means the connectivity to the IPV6 address of Google is successful.

Using Ping6 Command

Use the following steps to check the connectivity to IPV6 addresses from your Linux machine by pinging to that address

Step 1: Open the Terminal as described in one of the previous steps

Step 2: Type the below command in Terminal to ping to an IPV6 address
Command : ping6 -c [Count] -I [Interface] [Destination Address/Hostname]

example of ping6 to ping eth0

In here, with -C you can specify the number of packets you need to transfer and with -I you can specify the Interface.

In this example, after the destination IPV6 address '%eth0' is added since it is a link-local address, and the machine has multiple interfaces (Wi-Fi/eth0), so you need to tell your device the interface/link you want to use with this link-local address. But this is not needed for other types of addresses.

How to find the IPV6 address of your PC?

There are several ways that you can find the IPV6 address of your PC and this article shows the easiest ways to find it out on both Windows and Linux OSs (Operating Systems)

On Windows :

Not all the Windows distributions support IPV6 because the deployment of Internet Protocol Version 6 (IPv6) has only been in progress since the mid-2000s and because of this Microsoft Windows has supported IPv6 only since Windows 2000.

Windows distributions that support IPV6 :

  • Windows Vista
  • Windows Server 2008
  • Windows XP with SP1 or later
  • Windows version 7/8/10
  • Windows Server 2003 or above

Use the below steps to find the IPV6 address of your Windows machine.

Step 1: Go to the Windows search bar and search for the Command prompt by typing 'cmd'. There you will see the Command Prompt suggesting as below and select it

windows show all current network configuration

Step 2: In the Command Prompt type 'ipconfig' and it will then show all the current TCP/IP network configuration values in your machine

Step 3: In there, under your ethernet connection details you will be able to see your IPV6 address

in cmd showing IPv6 address

On Linux :

All the modern Linux distributions higher than Kernal 2.2 support IPV6 and below some of the examples

  • Ubuntu
  • RedHat
  • CentOS Stream
  • Linux Mint

Below are the steps you can use to find out the IPV6 address of your Linux machine. In this example, we have shown you the way to find IPV6 address of an Ubuntu machine

Step 1: Go to the search bar of the Ubuntu machine that is located on the top left corner

Step 2: Search for the word 'Terminal' and then you will see Terminal in your search results. Select it

search terminal app from GUI

Step 3 : Type 'ifconfig' in the terminal to see all the network configurations in your Linux machine. There under eth0 configurations you will be able to see your IPV6 address

Alternatively, you can use ip -6 addr command to show IPv6 addresses.

Discover Routes of IPV6 Packets

Out of all the network diagnostic tools that is available to view route information, traceroute is the most popular tool. Traceroute tracks the route packets taken from an IP network on their way to a given host. It utilizes the IP protocol's time to live (TTL) field and attempts to elicit an ICMP TIME_EXCEEDED response from each gateway along the path to the host.

Traceroute6 on Linux

Below is the command to view the route details of IPV6 packets in a Linux machine. It displays the routes the IPV6 packets went through and the time they took to pass through them as well.

Command : traceroute6 [IPV6 IP Address]

using traceroute6 command IPv6

tracert -6 on Windows

Similar to traceroute6 tool, in Windows machines tracert -6 command can be used to trace the routes of IPV6 packets. It traces path to destination discovering MTU along this path and uses UDP port port or some random port.

Command :tracert -6 [IPV6 IP Address]

output of tracert -6 on Windows

Conclusion

Same as the above commands, there are more commands that can be used to analyze IPV6 packets. They differ from commands that are used to analyze IPV4 packets as the packet structure of IPV6 packets is different than the packet structure of IPV4 packets.

Thanks for reading, please leave your suggestions and comments.

SHARE

Comments

Please add comments below to provide the author your ideas, appreciation and feedback.

Leave a Reply

Leave a Comment