The Easy Way to Check If Your Computer Is Connected to the Internet

toggle-button

It happens sometimes. You sit down at the computer, fire up the browser—and nothing connects. Is it the computer or the Internet that is not working? Is it the router? Get some help from the command line to find out.

Use "ping" in the command line to test connections

Windows comes with a substantial set of command-line tools for managing networks. Among these is the very old command called "ping" that is included in all common operating systems. It is a simple command that is indispensable for checking network and Internet connections.

Ping sends out a signal (called a packet) to a designated address and measures its response time. It does this four times. The target will return (hopefully) a signal. For example, you can “ping” Yahoo by entering (without quotes) “ping yahoo.com” into the command line. (Not everybody will accept pings. For example, don’t expect any response from pinging microsoft.com) Note that you never use “http” or “www” in pings, just the domain name.

If Yahoo responds, you know you are connected to the Internet. If you get no response, you can check if you are connected to your local network by pinging the local IP address assigned to the router or “gateway”. If you have a router, the local gateway IP address will be something like 192.168.1.1 or a similar group of numbers. So you would enter “ping 192.168.1.1" in the command line. If that doesn’t work, then your problem is that you are not connected to the local network (or your router isn’t working). 

Use "ipconfig" in the command line to find local addresses

How do you know what the local gateway IP address is? Use another of the command-line tools called "ipconfig". Entering (without quotes) “ipconfig” in the command line will display both the numerical address assigned to your computer  and the router or gateway address. It will also display something called the “subnet mask”. For home setups the subnet mask is almost always 255.255.255.0 and is not usually a parameter that needs attention.

Don’t wait until you have a problem to find out what the IP address of your router is. Use ipconfig and write the information down before trouble starts.

Related link: TCP/IP and Networking Tools

Get your own favorite tip published!  Know a neat tech tip or trick?  Then why not have it published here and receive full credit?  Click here to tell us your tip.


This tips section is maintained by Vic Laurie. Vic runs a Windows blog called The PC Informant and also operates a computer education website.

Click here for more items like this. Better still, get Tech Tips delivered via your RSS feeder or alternatively, have the RSS feed sent as email direct to your in-box.

Please rate this article: 

Your rating: None
3.916665
Average: 3.9 (24 votes)
toggle-button

Comments

How to check whether internet connectivity is there on PC without using ping command in command prompt and windows power shell too

kindly do the needful

Thanks for the tip! Just tried it.
The icon in your task bar (lower right corner, Win7) that looks like a computer screen - usually shows if there is internet access. Usually that's all you need - or...?

Ping is a standard old command used for testing networks. It has several uses and can tell you more than the icon you refer to.