You can change your IPv6 address through Windows Command Prompt, but the method depends on whether you want a temporary change (until reboot) or a permanent one
The fastest temporary change uses the netsh command, which takes effect immediately but resets when you restart your computer. For a permanent change, you configure IPv6 settings in your network adapter properties or use netsh with the right syntax to write the change to your system configuration.
Before you start, open Command Prompt as administrator — right-click the Command Prompt icon and select "Run as administrator". Without admin access, the commands will fail with a permission error.
Key Takeaways
- Temporary IPv6 changes through Command Prompt last only until your next restart, while permanent changes require you to configure your network adapter settings or use specific netsh commands that write to your system.
- You must run Command Prompt as administrator, or the netsh commands will return a permission denied error.
- The netsh interface ipv6 set address command is the primary tool, but you need your network adapter name and the IPv6 address you want to assign.
- If you assign a static IPv6 address manually, your computer will no longer receive addresses automatically from your router's DHCPv6 server.
- Incorrect IPv6 configuration can break your internet connection, so write down your current settings before making changes.
Finding your network adapter name
The netsh commands require the exact name of your network adapter. Most computers have one called "Ethernet" or "Wi-Fi", but yours might be named differently. To find it, type this in Command Prompt and press Enter:
netsh interface ipv6 show interface
The output lists all your network adapters with their index numbers and names. Look for the one you use to connect to the internet — usually "Ethernet" for wired connections or "Wi-Fi" for wireless. Write down the exact name, including any spaces or numbers.
Making a temporary IPv6 address change
A temporary change works immediately but disappears when you restart your computer. This is useful for testing or troubleshooting. The command structure is:
netsh interface ipv6 add address "AdapterName" IPv6Address
Replace "AdapterName" with the name you found above (keep the quotes if the name has spaces), and replace IPv6Address with the address you want to assign. For example, if your adapter is "Ethernet" and you want to add the address 2001:db8::1, type:
netsh interface ipv6 add address "Ethernet" 2001:db8::1
Press Enter. If the command succeeds, you see no error message. To verify the change took effect, type netsh interface ipv6 show address and press Enter. Your new address should appear in the list.
Making a permanent IPv6 address change
To keep an IPv6 address after restart, you need to set it as the primary address on your adapter. First, remove any existing IPv6 addresses you added temporarily by typing:
netsh interface ipv6 delete address "AdapterName" IPv6Address
Then add the new address and mark it as permanent:
netsh interface ipv6 add address "AdapterName" IPv6Address
This adds the address, but it still disappears on reboot. To make it truly permanent, you must disable DHCPv6 on that adapter and set the address as static. Open Settings, go to Network & Internet, then Network settings. Find your adapter, click "Edit", and under "IPv6 settings" select "Manual". Enter your IPv6 address, prefix length (usually 64), and gateway address, then save.
Alternatively, you can use netsh to disable DHCPv6 and set a static address in one step, but the Settings method is more reliable for most users because it stores the configuration in your network adapter's properties rather than in netsh's temporary state.
Understanding IPv6 address format and prefix length
IPv6 addresses are 128-bit numbers written in hexadecimal (using 0–9 and a–f). A full address looks like 2001:0db8:85a3:0000:0000:8a2e:0370:7334, but you can shorten it by removing leading zeros and replacing consecutive zero groups with ::. The same address becomes 2001:db8:85a3::8a2e:370:7334.
When you assign an IPv6 address, you also need a prefix length, which tells your computer how much of the address is the network portion. For most home and office networks, the prefix length is 64. If you are assigning an address from your router's local network, ask your network administrator or check your router's documentation for the correct prefix length.
If you assign an IPv6 address that conflicts with another device on your network, both devices may lose connectivity. Always verify the address is not already in use before assigning it.
Removing or resetting IPv6 addresses
If your changes broke your connection, you can remove the address you added by typing:
netsh interface ipv6 delete address "AdapterName" IPv6Address
To reset your adapter to receive IPv6 addresses automatically from your router (DHCPv6), go to Settings, Network & Internet, Network settings, find your adapter, click "Edit", and under "IPv6 settings" select "Automatic". This restores the default behavior and usually reconnects you within a few seconds.
If you are still disconnected after removing the address, restart your computer. This clears any temporary netsh changes and forces your adapter to request a new address from your router.
When to use IPv6 changes and when to avoid them
Change your IPv6 address if you are setting up a static address for a server, testing network configuration, or troubleshooting connectivity issues. Most everyday users should leave IPv6 on automatic — your router assigns addresses that work with your network, and manual changes often cause problems.
Do not change your IPv6 address if you do not understand what address to assign. Assigning a random address or one from a different network segment can disconnect you. If you are not sure, contact your network administrator or router manufacturer before making changes.
Frequently Asked Questions
What is the difference between adding and setting an IPv6 address?
Adding an address with netsh creates a secondary address that coexists with your existing one. Setting an address replaces your current configuration. For most users, adding is safer because you keep your original address as a fallback if something goes wrong.
Why does my IPv6 address disappear after I restart?
Changes made with netsh alone are temporary and stored in memory, not on disk. When you restart, Windows reloads your network configuration from your adapter settings, which do not include the netsh changes. Use the Settings app to make permanent changes, or use netsh with the correct syntax to write to your adapter configuration.
Can I have both IPv4 and IPv6 addresses at the same time?
Yes. Most modern networks run both IPv4 and IPv6 simultaneously. Changing your IPv6 address does not affect your IPv4 address. You can verify both are present by typing ipconfig in Command Prompt and looking for both IPv4 and IPv6 entries for your adapter.
What should I do if I cannot connect to the internet after changing my IPv6 address?
Remove the address you added by typing netsh interface ipv6 delete address "AdapterName" IPv6Address, then restart your computer. If you still have no connection, go to Settings, Network & Internet, Network settings, and reset your adapter to automatic IPv6. Contact your network administrator if the problem persists.
Do I need to change my IPv6 address for security reasons?
Changing your IPv6 address does not improve security by itself. Your router assigns addresses that are already isolated from the public internet by your firewall. If you are concerned about privacy or tracking, focus on your browser settings and firewall rules rather than manually changing your IPv6 address.