'ping localhost' or 'ipconfig' , which of these 2 gives the correct IP address.?
EAMONN
2007-10-14 11:46:55 UTC
I always thought 'ping localhost' would give me my correct IP address, but I have found that using 'ipconfig' not only gives a different number, but clearly states it as 'an' IP address. I am setting up my home VPN so need to know the correct method please.
Thank you.
Five answers:
keyvan n
2007-10-14 12:47:17 UTC
the correct way to find your ip address is ipconfig command , ping command is a troubleshooting command that use to testing cabling of network or routing and localhost is a default row in your host file ( what is host file ? ) . host file is an local name resolution solution that was in your PC as following path : C:\WINDOWS\system32\drivers\etc\hosts
this file is system file and you can not see it normally .
so if you want to found out your ip you must use ipconfig and if you want to find out other servers ip address you can use ping for example : ping yahoo.com will gave you yahoo's server ip address and test your connection with this server .
ericsestak
2007-10-14 18:54:34 UTC
ipconfig is the way to get your ip address from the command prompt. You can also use ipconfig /all to get more information, such as the MAC address. Ping localhost is just going to give you '127.0.0.1' on ANY machine you do. 127.0.0.1 is the loop back address, it is only used to test your network card to confirm that it is working properly.
2007-10-14 19:31:18 UTC
Localhost will always return 127.0.0.1. This is every computer's internal only network address, or loopback address.
2007-10-14 18:59:45 UTC
ipconfig is definately right. I use that all the time and it gives the right result.
Neurotic_Fish
2007-10-14 18:57:33 UTC
Hi Eamonn
You will need to use IPConfig, this will give you your IP address.
hope this helps...
ⓘ
This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.