Short answer
Test IPv6 one layer at a time: check that the address is on the interface with ip -6 addr and that a default route exists with ip -6 route. Then ping -6 the gateway, followed by an outside IPv6 address that needs no DNS. Try name resolution with dig AAAA and HTTP with curl -6, and finally connect to your server from another machine that has IPv6. Whichever step fails is the layer where the problem sits.
The commands work as written on Ubuntu and Debian and are the same on AlmaLinux and Rocky Linux; only the package names differ. The examples use the 2001:db8::/32 block reserved for documentation (RFC 3849): server address 2001:db8:1234:5678::10, gateway 2001:db8:1234:5678::1, interface eth0. If you have not set up the address yet, start with the steps in “How to configure IPv6 on an Ubuntu server with netplan”.
In what order should you test IPv6 connectivity?
ping and ip ship with the system. traceroute, mtr and dig are missing from most minimal images: install them with apt install traceroute mtr-tiny dnsutils on Ubuntu and Debian, or dnf install traceroute mtr bind-utils on AlmaLinux and Rocky Linux. Run the tests in this order; each one assumes the previous one passed.
- Address: ip -6 addr show dev eth0 scope global. Your address should appear with its prefix length. If it is marked tentative, it has not been confirmed yet, so check again in a few seconds. dadfailed means another device on the network already uses that address.
- Route: ip -6 route show default. You should see a line like default via 2001:db8:1234:5678::1 dev eth0. If the output is empty, the server has nowhere to send IPv6 packets and every outbound test fails with “Network is unreachable”.
- Gateway: ping -6 -c 3 2001:db8:1234:5678::1. If nothing comes back, look at ip -6 neigh show dev eth0; FAILED or INCOMPLETE next to the gateway means neighbour discovery (NDP) cannot find it. For a link-local gateway such as fe80::1, include the interface: ping -6 -c 3 fe80::1%eth0. Some gateways never answer pings; in that case go by the result of the next step.
- Outside address without DNS: ping -6 -c 4 2606:4700:4700::1111. If this passes, the server reaches the internet over IPv6. If the gateway answers but this step fails, the problem may be in the provider’s routing; send the traceroute output described below to the support team.
- DNS: dig AAAA example.com +short should return an IPv6 address. To check that DNS queries also travel over IPv6, use dig -6 @2606:4700:4700::1111 example.com AAAA. The AAAA record of your own domain should match the server’s address.
- HTTP: curl -6 -sS -o /dev/null -w "%{http_code} %{remote_ip}" https://example.com. An HTTP status code and an IPv6 address in the output mean outbound IPv6 web connections work. If curl says “Could not resolve host”, go back to the DNS step; “Couldn’t connect to server” or a timeout points to the outside-address step and the firewall.
How can you tell whether the server is reachable over IPv6 from outside?
The tests above only cover traffic leaving the server. To see whether visitors can reach you over IPv6, test from another machine that has IPv6: ping -6 2001:db8:1234:5678::10, then nc -6 -vz 2001:db8:1234:5678::10 443 or curl -6 -I https://yourdomain.com. If your own internet connection has no IPv6, these commands fail on your side with “Network is unreachable” and tell you nothing about the server.
If ping works but the port looks closed, check two things. First, whether the service listens on IPv6 at all: ss -6 -tlnp should show [::]:443 or the server’s IPv6 address. In Nginx, listen 443 ssl; only covers IPv4, so add listen [::]:443 ssl; to the same server block. Second, the firewall: with ufw, /etc/default/ufw must contain IPV6=yes, and ufw status should list a (v6) counterpart for every rule.
Do not block ICMPv6 wholesale. Neighbour discovery and path MTU discovery both rely on ICMPv6 messages, so a rule that drops them breaks normal connections along with ping. RFC 4890 lists the ICMPv6 types that need to pass; ufw’s default IPv6 rules already allow them.
How do you trace the IPv6 path with traceroute and mtr?
When an outside address is unreachable or the connection is slow, tracing the path shows where packets get stuck. traceroute -6 2606:4700:4700::1111 lists each hop in order. tracepath -6 does the same without root and also prints the MTU measured along the path (pmtu). mtr -6 -rwc 50 2606:4700:4700::1111 sends 50 packets to every hop and reports loss and latency as a table.
A * * * line in the middle is not a problem on its own; many routers ignore trace probes but keep forwarding traffic. If the asterisks start at some hop and continue all the way to the destination, the path is broken there. In mtr, high loss at an intermediate hop that drops back to zero on the following lines usually means that router rate-limits its ICMP replies. Real loss is loss that carries on through every line to the destination.
A trace that stops at the first hop points to a problem between the server and its gateway, so go back to the route and gateway steps. If it breaks further along and your server settings are correct, send the mtr report, the target you tested and the time to the support team. That output makes it much quicker to find which network is at fault.
Ping works but pages will not load: how do you test the MTU?
When small packets get through and large ones stall, the MTU is the likely culprit: ping -6 gets replies and curl -6 connects, but the page or file times out mid-transfer. Routers along an IPv6 path never fragment packets. The router in front of a narrower link sends an ICMPv6 “Packet Too Big” message back to the sender, which then shrinks its packets (RFC 8201). If a firewall drops that message, the connection hangs.
To test it, give ping a packet size and forbid fragmentation: ping -6 -c 3 -M do -s 1452 2606:4700:4700::1111. 1452 bytes of data plus an 8-byte ICMPv6 header and a 40-byte IPv6 header make a 1500-byte packet. If the command reports “message too long” or gets no reply, try again with -s 1232. 1232 + 48 = 1280 bytes, the smallest MTU every IPv6 link has to carry (RFC 8200). If the small size works and the large one does not, check the pmtu value in tracepath -6 and tell the support team at which hop it drops.
Why do applications use IPv4 instead of IPv6?
Even with every test passing, you may notice an application still leaving over IPv4. When a destination has both A and AAAA records, the operating system and the application decide which address to try first. The default order prefers IPv6 (RFC 6724). On Linux that order comes from /etc/gai.conf: if the # in front of precedence ::ffff:0:0/96 100 has been removed, the system prefers IPv4. Comment the line out again and the default order returns.
The “Trying” lines at the top of curl -v https://example.com show which address is attempted. If an application tries IPv6 first, gets an error and falls back to IPv4 (Happy Eyeballs, RFC 8305), users will not notice anything except a slower connection. In that case, go back through the tests in order. Turning IPv6 off hides the symptom and leaves the actual fault in place.
How do you test IPv6 connectivity on a Windows server?
On Windows Server, follow the same order with these commands in Command Prompt or PowerShell:
- Address and gateway: the IPv6 Address and Default Gateway lines in ipconfig; in PowerShell, Get-NetIPAddress -AddressFamily IPv6.
- Default route: Get-NetRoute -AddressFamily IPv6 -DestinationPrefix ::/0.
- Outside address: ping -6 2606:4700:4700::1111.
- Path: tracert -6 2606:4700:4700::1111. For per-hop loss, run pathping -6 against the same target.
- Port test: Test-NetConnection 2606:4700:4700::1111 -Port 443. The line TcpTestSucceeded : True means the connection was made.
- Ping from outside: Windows Firewall blocks incoming pings by default. To ping the server from outside, enable the “File and Printer Sharing (Echo Request - ICMPv6-In)” rule.
Common IPv6 test errors and how to fix them
- “connect: Network is unreachable”. Cause: the server has no IPv6 default route, or you are testing from a machine without IPv6. Fix: check ip -6 route show default; if it is empty, add the gateway to your network configuration.
- “Destination unreachable: Address unreachable”. Cause: neighbour discovery cannot find the gateway because its address is wrong or outside the prefix. Fix: look at ip -6 neigh and compare the gateway with the details from your provider. If it is outside the prefix, netplan needs on-link: true.
- ping -6 to a hostname returns “Name or service not known” or “Address family for hostname not supported”. Cause: the host has no AAAA record or the DNS lookup failed. Fix: check the record with dig AAAA. If pinging the IP address works, the problem is DNS only.
- Ping works, curl times out. Cause: the target port is closed, a firewall blocks TCP, or there is an MTU problem. Fix: test the port with nc -6 -vz; if it is open but no data arrives, run the MTU test.
- The server answers pings from outside but the site does not load over IPv6. Cause: the web server listens on IPv4 only, or the AAAA record points to an old address. Fix: check listening ports with ss -6 -tlnp and the record with dig AAAA; add listen [::]:443 ssl; to Nginx.
- The address disappears after a reboot. Cause: the setting was never written to a persistent file, or cloud-init rewrote the netplan file. Fix: apply the 99-disable-network-config.cfg step from the netplan article and define the address again.
Frequently asked questions
Is there any difference between ping6 and ping -6? They do the same job. Older systems had a separate ping6 command for IPv6; in current iputils versions ping -6 covers it, and on some distributions ping6 remains as a symlink to ping. The same goes for traceroute6 and traceroute -6.
Which target address should I use for IPv6 tests? For results that do not depend on DNS, the IPv6 addresses of public DNS resolvers are handy, for example 2606:4700:4700::1111 and 2001:4860:4860::8888. Test against at least two different targets so that a problem at one of them does not mislead you.
If ping gets no reply, is the server down? Not necessarily. A firewall may be blocking ICMPv6 echo requests; on Windows Server that is the default. Testing a port you know is open with nc -6 -vz or Test-NetConnection gives a more reliable answer.
On an IPv6 Subnet VDS, should every address in the block be tested separately? You can ping -6 each address you added to the interface from outside, one at a time. To test outbound traffic from a specific address, curl -6 --interface 2001:db8:1234:5678::11 https://example.com sends the request from that address. Whether the block is routed to the server or delivered on-link affects these results; see “IPv6 /48 vs /64 subnet: what is the difference and which should you choose?” for details.
