View Full Version : How to use Windows Command Prompt to get an IP address and ping a website:


iTom
05-31-2005, 06:42 PM
Ok, i'm fairly good at using computers, i know quite a lot on Windows. Anyway, here's a small tutorial to help you ping or get an IP address using Windows Command Prompt:

So, first of all, you need Command Prompt. You can:
Start > Run > type 'cmd'
or:
Start > Programs > Accessories > Command Prompt.
either one works.

Next, you need a website to ping. How about Google, CNET or the highest uptime, NASA. Yep, according to web stats, Nasa's website has the quickest ping time and the highest uptime.

So now you've chosen a website, lets assume it is Google.com, so in Command Prompt, type:
ping google.com
Wait a few seconds and the results appear. Here are the results I got when I was posting:


Pinging google.com [216.239.39.99] with 32 bytes of data:

Reply from 216.239.39.99: bytes=32 time=91ms TTL=245
Reply from 216.239.39.99: bytes=32 time=88ms TTL=245
Reply from 216.239.39.99: bytes=32 time=89ms TTL=245
Reply from 216.239.39.99: bytes=32 time=91ms TTL=245

Ping statistics for 216.239.39.99:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss)
Approximate round trip times in milli-seconds:
Minimum = 88ms, Maximum = 91ms, Average = 89ms

OK, so you got four results, but you want to see the pinging more than four times?

Well, that is easy:
Ping -t google.com

You can just leave it pinging, and when you want it to stop, press: Ctrl-C, or if you want to see the current results without stopping, then press Ctrl-Break.

But do you want an IP address?

Well, that is once again easy:
In the pings, it shows Reply from:....

The IP address is a four decimal number which identifies your webhost and more....

Example:
216.239.39.99
is google.com's main ip, but it could change.

Other commands:

You can find out which servers your computer goes through: use the command tracert.

tracert <WEB ADDRESS>, will show up to 30 servers that your computer goes throught to get to the destination server.

ping -n <NUMBER OF PINGS> <WEB ADDRESS> pings exactly the number of times you want.

for more commands, in command prompt type:
ping /?

Hope this tutorial helps.