How can I get windows to release an IPv6 address
I have a windows system with an IPv4 address and an IPv6 address and I'm trying to figure out how to release my IPv6 address.
I've tried ipconfig /release6 and I get this error
An error occurred while releasing interface Local Area Connection : The system cannot find the file specified.
An error occurred while releasing interface Loopback Pseudo-Interface 1 : The system cannot find the file specified.
No operation can be performed on isatap.{6B874193-B28A-4446-B6E6-8ADAC22E5090} while it has its media disconnected.
No operation can be performed on IP6Tunnel while it has its media disconnected.I still have my IPv6 address at the end. I can release IPv4 address using ipconfig /release
- the command prompt is running elevated
- the IPv6 address was assigned by DHCP
3 Answers
ipconfig /release6
ipconfig /renew6 1 Powershell with Administrator Rights
Try delete IP6Tunnelnetsh interface ipv6 delete interface IP6Tunnel
or
Show ip addres: netsh interface ipv6 show address
Delete ip/use Interface name: netsh interface ipv6 delete address Ethernet0 200x:x:x:x:x:x:x:x
netsh interface ipv6 delete address (Interface index or name) (ipv6address)
Show routes: netsh interface ipv6 show route
Delete route: netsh interface ipv6 route delete 200x:x:x:x::/64 Ethernet0 store=persistent
netsh interface ipv6 route delete (ipv6prefix::/64) (Interface Index or Name)
A completely powershell way to do this is:
Get-NetAdapter...locate the ifIndex number of the adapter you wish to modify. Then verify the IPv6 address you wish to release is on that interface index number.
Get-NetIPAddress -ifIndex *number* | where-object {$_.PrefixOrigin -notlike "WellKnown" -and $_.AddressFamily -like "IPv6"}If you want to get rid of all non-well-known IPv6 addresses (i.e. addresses other than fe80::) ...
Get-NetIPAddress -ifIndex *number* | where-object {$_.PrefixOrigin -notlike "WellKnown" -and $_.AddressFamily -like "IPv6"} | Remove-NetIPAddress..then answer yes .. or add -Confirm:$False to the end to not prompt for confirmation.