1. Home
  2. How To Guides
  3. How To Configure IPv6 on a MacOS

How To Configure IPv6 on a MacOS

Here’s how you can add IPv6 DNS addresses using the Terminal on macOS:

Steps to Add IPv6 DNS Addresses Using Terminal on macOS

Open Terminal:

Go to Applications > Utilities > Terminal or search for “Terminal” using Spotlight (Command + Space).

List Network Interfaces:

First, list all network services to identify which one you want to configure:

networksetup -listallnetworkservices

Note the exact name of the network service you want to configure (e.g., “Wi-Fi” or “Ethernet”).

Add IPv6 DNS Addresses:

Use the following command to add the primary and secondary IPv6 DNS addresses to the desired network service. Replace "Wi-Fi" with your network service name, and replace the IP addresses with the ones provided:

sudo networksetup -setv6dns "Wi-Fi" 2a0d:2a00:0001:0000:0000:0000:0000:0000 2a0d:2a00:0002:0000:0000:0000:0000:0000

This example makes use of the Free Family filter but you can replace the values with the ones issued in your dashboard.

Verify the Configuration:

To ensure that the IPv6 DNS addresses have been set correctly, run:

networksetup -getdnsservers "Wi-Fi"

This should display the IPv6 addresses you just added.

Repeat for Other Network Services:

If you need to configure additional network services (like “Ethernet”), repeat the steps with the appropriate service name. You can also string the command like this:

sudo networksetup -setv6dns "Wi-Fi" 2a0d:2a00:0001:0000:0000:0000:0000:0000 2a0d:2a00:0002:0000:0000:0000:0000:0000 && sudo networksetup -setv6dns "Ethernet" 2a0d:2a00:0001:0000:0000:0000:0000:0000 2a0d:2a00:0002:0000:0000:0000:0000:0000

Notes:

The first address (2a0d:2a00:0001:0000:0000:0000:0000:0000) is the primary DNS server, and the second (2a0d:2a00:0002:0000:0000:0000:0000:0000) is the secondary DNS server.

If you need to revert to automatic DNS settings for both interfaces, you can use:

sudo networksetup -setdnsservers "Wi-Fi" "Empty" && sudo networksetup -setdnsservers "Ethernet" "Empty"

This command will apply the IPv6 DNS settings to both Wi-Fi and Ethernet simultaneously, ensuring consistent DNS configuration across both network services.

Updated on October 21, 2024
Was this article helpful?

Related Articles

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Contact Support