If your computer and a remote device are located on the same IP network, VLAN, or subnet – you will probably notice that if you ping such a device by its hostname it will return an IPv6 address. For example, we will try to ping Windows Server on our network with the command:
The fact is that the IPv6 protocol in Windows Vista and newer is the preferred protocol over IPv4.
If you want to still see an IPv4 address of a remote device in the ping command result, then simply use the command below:
ping hostname -4
Simply add a parameter “-4” after your usual ping command:
Ping srv01 -4 Pinging srv01.contoso.com [192.168.10.21] with 32 bytes of data Reply from 192.168.10.21: bytes=32 time<1ms TTL=128 Reply from 192.168.10.21: bytes=32 time<1ms TTL=128
Global Web Hosting Services, Start with our Free Tier