Changing Your IPv6 Address from Command Prompt

You can change your IPv6 address directly from Command Prompt on Windows by using the netsh command, which is the built-in tool for managing network settings. The process involves opening Command Prompt as administrator, identifying your network adapter, and then running a single command to set a new IPv6 address. This method works on Windows 7, Windows 10, and Windows 11.

The command you'll use follows this pattern: netsh interface ipv6 set address "Ethernet" [new IPv6 address] [prefix length]. You replace "Ethernet" with your actual adapter name, the IPv6 address with the one you want to assign, and the prefix length (usually 64 for most home networks). The entire process takes just a few minutes once you have the information you need.

Key Takeaways

  • Open Command Prompt as administrator by right-clicking the Command Prompt app and selecting "Run as administrator".
  • Find your network adapter name by typing ipconfig and looking for the adapter you want to change (usually "Ethernet" or "Wi-Fi").
  • Use the netsh command with your adapter name, desired IPv6 address, and prefix length to make the change permanent until you restart.
  • Verify the change worked by running ipconfig again and checking that your new IPv6 address appears in the output.
  • If you need the change to survive a restart, you must set it as static in your network adapter settings rather than relying on the command alone.

Opening Command Prompt as Administrator

Command Prompt must run with administrator privileges to change network settings. On Windows 10 and Windows 11, press the Windows key, type "cmd", right-click "Command Prompt" in the results, and select "Run as administrator". A dialog box will ask for permission—click "Yes" to proceed. On Windows 7, the process is the same: search for "cmd", right-click it, and choose "Run as administrator".

If you see a message saying "Access Denied" when you try to run a netsh command, it means Command Prompt is not running as administrator. Close it and repeat the steps above. You'll know you have the right permissions when the title bar shows "Administrator: Command Prompt".

Finding Your Network Adapter Name

Before you can change an IPv6 address, you need to know the exact name of the network adapter you want to modify. Type ipconfig in Command Prompt and press Enter. The output will show all your network adapters with their current settings.

Look for the adapter you use—it will be labeled "Ethernet adapter" or "Wireless LAN adapter" followed by a name. Common names are "Ethernet", "Wi-Fi", "Local Area Connection", or a longer name like "Ethernet 2". Write down the exact name as it appears, including capitalization and spaces. You'll also see the current IPv6 address listed under "IPv6 Address" if one is already assigned.

Running the netsh Command to Change IPv6

Once you have your adapter name and your new IPv6 address, type the following command and press Enter:

netsh interface ipv6 set address "Ethernet" 2001:db8::1 64

Replace "Ethernet" with your actual adapter name (keep the quotation marks if the name contains spaces). Replace 2001:db8::1 with the IPv6 address you want to assign. The 64 at the end is the prefix length, which is the standard for most networks—do not change this unless you have a specific reason to use a different prefix.

If the command runs without error, your IPv6 address has been changed. If you see an error message, double-check that Command Prompt is running as administrator and that you typed the adapter name exactly as it appeared in the ipconfig output.

Verifying the Change Worked

To confirm your new IPv6 address is active, type ipconfig again and press Enter. Find your adapter in the output and look at the "IPv6 Address" line. It should now show the address you just set. If it does, the change is complete and working.

Keep in mind that this change is temporary—it will revert to your previous address when you restart your computer. If you need the new IPv6 address to remain after a restart, you must configure it as a static address in your network adapter settings through the Windows Control Panel or Settings app instead of using Command Prompt alone.

Making the Change Permanent Across Restarts

The netsh command changes your IPv6 address only until the next restart. To make it permanent, you need to set it as a static address in your network adapter properties. Open Settings, go to Network & Internet, select your adapter, and choose "Edit" next to your IP settings. Change the setting from "Automatic (DHCP)" to "Manual", then enter your IPv6 address and prefix length.

Alternatively, you can create a batch file that runs the netsh command automatically each time Windows starts. Open Notepad, paste your netsh command, save it as a .bat file, and add it to your Startup folder. This approach is less reliable than static settings but works if you prefer to use Command Prompt.

Troubleshooting Common Issues

If you get an error saying "The parameter is incorrect", check that your IPv6 address is formatted properly. IPv6 addresses use hexadecimal notation (0-9 and a-f) and are separated by colons. A valid address looks like 2001:db8::1 or fe80::1. If your address contains invalid characters or is formatted wrong, the command will fail.

If the command says "The object already exists", it means an IPv6 address is already assigned to that adapter. You can replace it by adding the word "overload" to the end of your command: netsh interface ipv6 set address "Ethernet" 2001:db8::1 64 overload. This tells Windows to replace the existing address rather than trying to add a second one.

Frequently Asked Questions

Will changing my IPv6 address break my internet connection?

Not if you use a valid IPv6 address that is routable on your network. If you assign an address that conflicts with another device or is not valid for your network, you may lose connectivity. Test the change on a non-critical device first, or have a way to revert quickly by restarting your computer.

What prefix length should I use for my IPv6 address?

Use 64 for most home and office networks. This is the standard subnet size for IPv6. Only use a different prefix length if your network administrator or ISP has told you to use one.

Can I set multiple IPv6 addresses on one adapter?

Yes. Run the netsh command multiple times with different addresses. Each new address will be added to the adapter. Use ipconfig to see all assigned addresses.

How do I remove an IPv6 address I set with netsh?

Type netsh interface ipv6 delete address "Ethernet" 2001:db8::1, replacing the adapter name and address with your own. This removes only that specific address.

Does this method work on Mac or Linux?

No. This guide covers Windows only. Mac and Linux use different command-line tools—ifconfig or ip commands—to change IPv6 addresses. Consult your operating system's documentation for those steps.