How to Find Your IPv6 Default Gateway

What is an IPv6 Default Gateway?

The default gateway is a critical component of network connectivity that serves as the "exit point" from your local network to the broader internet. When your device needs to communicate with an IP address outside your local network, it sends traffic to the default gateway, which then forwards it to the appropriate destination.

In IPv6 networks, the default gateway functions similarly to IPv4, but with some important differences. Most notably, IPv6 default gateways typically appear as link-local addresses starting with fe80::, rather than the global addresses you might expect. This is completely normal and by design.

IPv6 link-local addresses are defined by RFC 4291 and use the prefix fe80::/10, though in practice only fe80::/64 is used. When a router sends an ICMPv6 Router Advertisement (RA) message in response to a host's Router Solicitation (RS), it uses its own link-local address as the source. Your device then uses this link-local address as the next-hop for the default route (::/0).

Link-local addresses are sufficient for default gateways because the router only needs to connect to devices on the same network segment (link). These addresses are not routable beyond the local link, but that's exactly what's needed - your device communicates with the gateway on the local link, and the gateway handles routing to external networks using its global IPv6 addresses.

Some network administrators simplify configuration by using fe80::1 as a standard link-local address across all network segments, making it easier to manage servers with static IPv6 addresses.

Finding Your IPv6 Default Gateway: Platform-Specific Commands

Windows

Windows provides several methods to view your IPv6 default gateway:

Method 1: ipconfig (Simplest)

ipconfig

Look for the "Default Gateway" entry under your active network adapter's IPv6 configuration. You'll see an address starting with fe80::.

Method 2: netsh (Detailed routing information)

netsh interface ipv6 show route

This displays the complete IPv6 routing table. Look for the route with destination ::/0 (which represents "all IPv6 addresses").

Method 3: PowerShell (Modern approach)

Get-NetRoute -DestinationPrefix "::/0" | Select-Object -ExpandProperty "NextHop"

This PowerShell command specifically queries the default route (::/0) and returns the next-hop address, which is your default gateway.

Method 4: route print (Traditional)

route print -6

The -6 flag filters to show only IPv6 routes. Look for the route with Network Destination ::/0.

macOS

macOS users have multiple command-line options:

Method 1: netstat (Most common)

netstat -rn -f inet6 | grep default

This filters the routing table to show only IPv6 routes (-f inet6) and displays default route entries. Look for lines containing "default" with a gateway starting with fe80::.

Method 2: Specific interface query

netstat -rn inet6 | grep def | grep en0

Replace en0 with your network interface name (common interfaces include en0 for Ethernet/Wi-Fi, en1 for secondary adapters). This shows the default gateway specifically for that interface.

Method 3: Show all IPv6 routes

netstat -nr -f inet6

This displays the complete IPv6 routing table. The gateway column shows the next-hop address for each route.

Linux

Linux distributions offer several tools for viewing IPv6 routing information:

Method 1: ip command (Modern and recommended)

ip -6 route show

Or the abbreviated version:

ip -6 r s | grep default

This shows all IPv6 routes. The default route appears as default via fe80::xxxx:xxxx:xxxx:xxxx dev eth0 (where eth0 is your network interface).

Method 2: netstat (Traditional)

netstat -nr -A inet6 | grep default

Filter the routing table to show IPv6 routes and look for the "default" or ::/0 destination.

Method 3: route command (Older systems)

route -A inet6

Displays the kernel IPv6 routing table with destination, gateway, and interface information.

GUI Methods for Finding IPv6 Gateway

Windows GUI

  1. Open Settings > Network & Internet
  2. Click on your active connection (Wi-Fi or Ethernet)
  3. Click Properties
  4. Scroll down to the IPv6 section
  5. Look for IPv6 Default Gateway - it will display the fe80:: address

Alternatively, in Control Panel:

  1. Go to Network and Sharing Center
  2. Click your active connection
  3. Click Details
  4. Look for IPv6 Default Gateway

macOS GUI

  1. Open System Preferences (or System Settings on macOS 13+)
  2. Click Network
  3. Select your active network connection (Wi-Fi or Ethernet)
  4. Click Advanced
  5. Go to the TCP/IP tab
  6. Look for the IPv6 Router field

Note: On macOS, the router address displayed in the GUI is your default gateway. By default, macOS enables IPv6 automatically and obtains configuration through Router Advertisements. If you need to configure manually, click the "Configure IPv6" dropdown and select "Manually", then you can enter the IPv6 address, router (gateway), and prefix length.

Linux GUI (GNOME/KDE)

The exact steps vary by desktop environment:

GNOME (Ubuntu, Fedora):

  1. Open Settings
  2. Go to Network or Wi-Fi
  3. Click the gear icon next to your connection
  4. Select the IPv6 tab
  5. View the Default Route field

KDE Plasma:

  1. Open System Settings
  2. Navigate to Network > Connections
  3. Select your connection and click Edit
  4. Go to the IPv6 tab
  5. View gateway information in the routing section

Understanding the Router Advertisement Mechanism

IPv6 hosts typically learn their default gateway through a process called Stateless Address Autoconfiguration (SLAAC), which uses ICMPv6 Router Advertisement messages. This is part of the Neighbor Discovery Protocol (NDP):

  1. Router Solicitation (RS): When your device's network interface becomes active, it sends an ICMPv6 Router Solicitation message to the all-routers multicast address (ff02::2)

  2. Router Advertisement (RA): Routers on the network respond with Router Advertisement messages containing:

    • Network prefix information (for address autoconfiguration)
    • Default route information
    • Flags indicating whether to use DHCPv6 for additional configuration
    • Router lifetime and preference values
  3. Gateway Configuration: Your device uses the source address of the RA packet (the router's link-local address) as the default gateway

This process happens automatically and continuously - routers periodically send unsolicited RAs to keep network information current.

DHCPv6 Note

Unlike DHCPv4, DHCPv6 does not provide default gateway information. The only way for IPv6 hosts to dynamically obtain a default gateway is through Router Advertisements. DHCPv6 is used for other configuration options like DNS servers and domain names.

Multiple Gateway Scenarios

In some network configurations, you may encounter multiple IPv6 default gateways:

Multiple Routers on the Same Network

When multiple routers are present on a single network segment, each may send Router Advertisements. Your device will:

You can view all default routes using the commands mentioned earlier. On Linux, for example:

ip -6 route show | grep default

Might show:

default via fe80::1 dev eth0 proto ra metric 100
default via fe80::2 dev eth0 proto ra metric 200

Lower metric values indicate higher priority.

Multiple Network Interfaces

If your device has multiple network interfaces (Ethernet and Wi-Fi, for example), each interface may have its own default gateway:

Troubleshooting Missing or Incorrect IPv6 Gateways

Problem: No IPv6 Default Gateway Listed

Common causes:

  1. Router not sending RAs: The router must have IPv6 routing enabled. On Cisco routers, for example, the ipv6 unicast-routing command must be configured.

  2. RA acceptance disabled: On Linux, check system parameters:

    cat /proc/sys/net/ipv6/conf/all/accept_ra
    cat /proc/sys/net/ipv6/conf/eth0/accept_ra_defrtr
    

    Both should be set to 1. If not:

    sudo sysctl -w net.ipv6.conf.all.accept_ra=1
    sudo sysctl -w net.ipv6.conf.eth0.accept_ra_defrtr=1
    
  3. IPv6 disabled: Verify IPv6 is enabled on your system and network interface.

  4. Firewall blocking ICMPv6: Ensure ICMPv6 packets (especially types 133 and 134 for RS/RA) are not blocked.

  5. Wrong network configuration: The prefix advertised must be /64. Other prefix lengths prevent proper SLAAC operation.

Troubleshooting steps:

  1. Verify you have an IPv6 address:

    • Windows: ipconfig
    • macOS/Linux: ip -6 addr show or ifconfig
  2. Check if Router Advertisements are being received:

    # Linux - capture RAs
    sudo tcpdump -i eth0 -vv icmp6 and 'ip6[40] == 134'
    
  3. Manually solicit router advertisements:

    # Linux
    sudo rdisc6 eth0
    
  4. Verify router configuration if you have access to it.

Problem: IPv6 Address Present but No Default Route

This occurs on some systems (particularly FreeBSD and some Linux configurations) where addresses are configured via SLAAC but the default route isn't installed. Check:

Problem: Cannot Reach External IPv6 Addresses

Even with a default gateway configured, you might face connectivity issues:

  1. Test basic gateway connectivity (see next section)
  2. Verify router has IPv6 internet connectivity: The gateway needs its own upstream IPv6 connection
  3. Check DNS: Ensure you can resolve AAAA records (IPv6 DNS records)
  4. Test your connectivity: Visit https://test-ipv6.run for comprehensive connectivity testing

Verifying Gateway Connectivity

Once you've found your default gateway, verify it's working correctly:

Ping the Gateway

Linux/macOS:

ping6 -c 4 fe80::xxxx:xxxx:xxxx:xxxx%eth0

Note the %eth0 suffix - you must specify the interface when pinging link-local addresses because these addresses are only unique within a network segment.

Windows:

ping -6 fe80::xxxx:xxxx:xxxx:xxxx%12

On Windows, use the interface index number (found in ipconfig) instead of the interface name.

Test Internet Connectivity

Ping a well-known IPv6 address to verify end-to-end connectivity:

Google Public DNS:

# Linux/macOS
ping6 -c 4 2001:4860:4860::8888

# Windows
ping -6 2001:4860:4860::8888

CloudFlare DNS:

ping6 -c 4 2606:4700:4700::1111

Traceroute to See Path

Trace the route packets take to verify gateway is the first hop:

Linux/macOS:

traceroute6 google.com

Windows:

tracert -6 google.com

The first hop should be your default gateway's address.

Comprehensive Connectivity Testing

For a complete analysis of your IPv6 connectivity, including gateway functionality, visit test-ipv6.run. This tool performs:

The site runs entirely in your browser and provides a comprehensive score based on your network's IPv6 readiness. If you have a properly configured default gateway, you should see successful results for IPv6 connectivity tests.

While most IPv6 default gateways use link-local addresses, you might occasionally encounter global addresses:

Advantages:

Limitations:

Global Address Gateways - Rare

When used:

Considerations:

Bottom line: Seeing a fe80:: address as your default gateway is not only normal, it's the expected and preferred configuration for IPv6 networks.

Key Takeaways

  1. IPv6 default gateways typically appear as link-local addresses starting with fe80:: - this is normal and expected behavior

  2. Platform commands to find your gateway:

    • Windows: ipconfig or Get-NetRoute -DestinationPrefix "::/0"
    • macOS: netstat -rn -f inet6 | grep default
    • Linux: ip -6 route show | grep default
  3. Router Advertisements (RAs) are the primary mechanism for learning default gateway information in IPv6, unlike IPv4's reliance on DHCP

  4. DHCPv6 does not provide gateway information - only Router Advertisements do

  5. When pinging link-local addresses, always specify the interface (e.g., ping6 fe80::1%eth0)

  6. Troubleshoot missing gateways by checking IPv6 enablement, RA acceptance parameters, router configuration, and firewall rules

  7. Test your complete IPv6 connectivity including gateway functionality at test-ipv6.run

Understanding your IPv6 default gateway is essential for diagnosing network issues and ensuring proper connectivity. With the commands and concepts covered in this guide, you should be able to find, verify, and troubleshoot your IPv6 gateway configuration on any platform.