windows return ::1: for ping

Jasmin shahrzad
Jasmin shahrzad used Ask the Experts™
on
i stop ip6 in windows but for ping a hostname in windows 10 i have return   ::1:
how to change it?
it should return ip address
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Distinguished Expert 2018

Commented:
write
ping targetname -4
ste5anSenior Developer

Commented:
::1: is an IP address. Its localhost/loopback. The equivalent of 127.0.0.1.

Author

Commented:
@ste5en: i know it's loopback for localhost but how to disable that. what i want is ping should show ip address.
@McKnife: tagetname -4 show correct but i want ping target show that.
it was always did. i don't now what happen
Acronis in Gartner 2019 MQ for datacenter backup

It is an honor to be featured in Gartner 2019 Magic Quadrant for Datacenter Backup and Recovery Solutions. Gartner’s MQ sets a high standard and earning a place on their grid is a great affirmation that Acronis is delivering on our mission to protect all data, apps, and systems.

Distinguished Expert 2018

Commented:
That happens, because IPv6 is in use. What's so bad about writing -4 to activate IPv4 pings?

Author

Commented:
Then i should change all my scripts. i don't understand i disabled ip6 in my windows network.
why should it return ::1: .  where is it in regedit to say what it should return?
ste5anSenior Developer

Commented:
This normally means deactivating the entire IPv6 stack on all interfaces. Seeing ::1:, means that the IPv6 stack is not disabled.

Thus, how did you "stop" IPv6?

Author

Commented:
from ethernet properties i remove tic from tcp/ipv6
ste5anSenior Developer

Commented:
Did you remove it from all interfaces? Did you restart your machine before testing?

Author

Commented:
i remove it from ethernet properties and not other (i do not know where it should appear ).  i restart after removing.
after removing coming ::1: but before it show ip6 ip address.
ste5anSenior Developer

Commented:
When PowerShell is enabled, run

Get-NetAdapterBinding -ComponentID ms_tcpip6

Open in new window

to show your current state. Maybe you want to post the output.

Run
Disable-NetAdapterBinding -Name "*" -ComponentID ms_tcpip6

Open in new window

from an elevated prompt for deactivating it.

Author

Commented:
ok. then first line show:
name                                 .....         ...    enabled
----------------                                              ----------------
ethernet 3                                                  false

it is already disabled. And there is only one.
Distinguished Expert 2018

Commented:
@jasmin: no offense, but what script would require the ping response to be in ipv4 notation? I see no use case - please explain.
David FavorFractional CTO
Distinguished Expert 2018

Commented:
Tip: Best to always leave the localhost IPV6 address working, as some code completely bypasses the resolver code, to use this interface.

If you remove this interface completely, some code may fail oddly.
Senior Developer
Commented:
hmm, after some research: IPv6 is activated for the loopback interface per default and design. MS recommends not to change this behavior.

So changing your scripts is the way to go or set prefer IPv4 over IPv6 and test what ping returns.

Author

Commented:
Thanks

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial