Using Ping Command to test your connection to WiFI router

In some cases, if you are experienced problems and  need to call ISP Support they can claim that everything is fine on their site and you will be stuck with your internal network problems. So, you as user may need be able to debug and fix certain network problems and it could be of a great help to you.

Common Network layout (topology)

First make sure that you know your network layout. Most probably it will be one of the following:

a) Modem -> Router (Cable+Wi-Fi) -> PC
b) Modem (Cable+Wi-Fi) -> PC
c) Modem ->  Switch -> Router (Cable+Wi-Fi) -> AP (Repeater)  -> PC

If router is not present in your network, it means that modem is working  as a router and it is important to know how to connect to modem administrative interface.
In Windows, to get some details about your network type ipconfig/all from cmd.exe launched under Administrative privileges. This command will show you lots of useful information about your network including address of the default gateway (for example we will use 192.168.1.254).
In case of layout a) this address will be of your router. And in case of b) and c) it will be the modem address. 
In Linux, the equivalent command is ifconfig -a.

Check connection to default gateway

In Windows and Linux you can type the following command either in cmd.exe or Terminal emulator (Linux).

ping 192.168.1.254

Instead of 192.168.1.254 you should use default gateway address you got in previous step (ipconfig /all or ifconfig -a)
The replies (no errors) means that your computer can see modem or router without any problems.
When you use ping command you can see some parameters like the length of the packet, icmp_seq, time to life and time of response. There could have some three options:

  •     All the package received (0% packages lost)  what means that the connection is fine.
  •     Some packages received (0%<packages lost<100%) what it means there must be some interferences or other problems.
  •     All packages lost (100% packages lost) means that there is not connection between PC and router.

The time of response is important too what means the delay of receiving packages and is subject to interference, obstacles, among others..