Ping is a utility that you use to determine whether or not a specific IP address is accessible. Ping works by sending a packet to a specified address and waiting for a reply. Ping command will tell you whether your server is accessible or not.Below you will learn how to do ping and traceroute for Windows and Mac.
Jun 18, 2017 Ok,i have a small problem on a website and i ping it. But when i write on terminal for example: ping www.google.com. The terminal response is: ping www.google.com-bash: ping: command not found. But, if i write /sbin/ping www.google.com. The terminal response is: /sbin/ping www.google.com. PING www.google.com (172.217.21.196): 56 data bytes. When you think of Terminal, you probably imagine some hacker sitting in front of their computer in a dimly lit room trying to break into an FBI database. In reality, it's just a simple tool that can make using your Mac much easier. Jul 29, 2018 Pass the -c option to the ping command to send out only the number of packets. For example, to send out only four packets to the IP address 8.8.8.8: ping -c 4 8.8.8.8. Ping using specific gateway interface. To find out your interface names on a Unix-like.
How to do ping for Window PC
Step 1: Go to the Windows Start button
Step 2: Type cmd and hit Enter
Step 3: A black window with C: prompt will open
Step 4: Type ping followed by the domain name websitename.com or an IP address, for example, ping google.com or ping 74.125.236.48
NOTE: use the domain name without the www. so only use google.com and not www.google.comIf everything is OK, you should get the following response (or something similar):
You can see this return same IP address from where it started. This means that TCP/IP is working on the machine that you are typing address that “loops back” to the machine you are pinging from. It provides you all information about how many packets sent, received and lost. More over it tells RTT(round trip time in ms)
Some websites you might not be able to ping for security reasons, and get a “Request time out” message. This is due to a Firewall being present which blocks ICMP packets. A firewall is a security device that prevents attacks or viruses entering your computer network and often can be standard practice that firewalls blocks ICMP packets.
For Mac OS, check out screenshots below:
Step 1: GO to application folder, Then utilities, then network utility
Step 2: Click on the ping tab and specify the host
Step 3: Type “ping hostname” or “ping IPaddress”. For example, to ping the google’s main web server, type “ping www.google.com”. To have your PC ping itself type “ping 127.0.0.1”. If the site is up and actively responding, you receive replies.
Now you know how to ping for Windows and Mac, now it’s time to learn about traceroute.
Traceroute is a computer network utility for displaying the route (path) and measuring transit delays of packets across an Internet Protocol (IP) network.The traceroute utility checks how many “hops” (transfers through other computers on a network) it takes for your computer to contact another computer. If you’re visiting a Web site and pages are appearing slowly, you can use traceroute to figure out where the longest delays are occurring.
The original traceroute is a UNIX utility, but nearly all platforms have something similar.
Traceroute for windows:
For windows command use for traceroute is tracert.
Follow (fig 1.1, 1.2, 1.3 above) to reach CMD prompt.
When you get the CMD prompt, type tracert followed by the domain name for example: tracert google.com You will see below screen:
Google Mac Blog
Highlighted points give you information about: Count: First column, the Hop count gives the number of stops along the route to attempt to contact the other computer.
Round trip time: Next three columns, Round trip time in milliseconds for three different attempts to reach destination.
Respond: Last column, name of the host that responded to the request.
Point here to be note is that IP address while tracerouting particular address gives back you same IP address; as shown in above e.g. it started from [74.125.236.521] and at last (at 9th count) it returns same IP. This means there is no problem in accessing the server.
If any of the hops come back with * Request timed out, this denotes network congestion and a reason for slow loading Web pages and dropped connections. then you need to contact your server host.
If any of the hops come back with * Request timed out, this denotes network congestion and a reason for slow loading Web pages and dropped connections. then you need to contact your server host.
To run traceroute on a Mac, perform the following steps:
Step 1: From your hard-drive, open the Applications folder, and click to open the Utilities folder (Fig a)
Step 2: Double-click Terminal. (Fig b)
Step 3:Type traceroute followed by your domain name, and hit Enter. (Fig c)
* In this example, yourdomain.com is used. Be sure to replace yourdomain.com with your actual domain name.
Traceroute will tell you how many routers your packets travel through, and how long it takes for them to travel between routers. If the routers have DNS entries, traceroute will list the names of the routers, their network affiliation and geographic location.
Step 4:Check for times between hops that are greater than 200 ms or that return asterisks *** which indicate that your request has timed out, and if it happen so you need to contact server host. (as shown below in fig d)
Synopsis: The main difference between the common Ping and Traceroute commands is that Ping is a quick and easy way to tell you if the destination server is onlineor accessibe and estimates how long it takes to send and receive data to the destination. Traceroute tells you the exact route (Path) you take to reach the server from your computer (ISP) and let you know which address giving problem or taking more time to reach destination.
Hope you enjoyed reading this.
Sometimes you just need an IP address to be check your internet connection. My current favourite IP address is to use the Google DNS servers. which are the IPv4 addresses 8.8.8.8 and 8.8.4.4.
I have a favourite IP address to ping in Australia at 139.130.4.5 which is the primary name server for the largest carrier in Australia. (And reminds me that latency of 500 milliseconds is normal for some people).
I’ve also used the servers at OpenDNS 208.67.222.222 and 208.67.220.220. OpenDNS (now owned by Cisco Umbrella business unit) provides a secure and safe DNS service which I recommend that you check out for home and commercial use. Note: Cisco uses DNS data to build a threat database and its highly likely that it sells data.
Cloudflare have a DNS service at 1.1.1.1 and 1.0.0.1. The goal is to have the fastest DNS service possible. Like Google they have a large number of servers around the world that should respond to the PING request (uses AnyCast if you are interested)
Norton Connectsafe also have secure DNS servers for home users at 198.153.192.1 and 198.153.194.2 that respond to ICMP requests. I do not recommend Norton due to very poor track record on basic security.
DNSResolvers.com is another DNS servers 205.210.42.205 and 64.68.200.200 as a free service from EasyDNS.
Host | IP Address |
---|---|
Cloudflare | 1.1.1.1 |
google-public-dns-a.google.com. | 8.8.8.8 |
google-public-dns-b.google.com | 8.8.4.4 |
ns1.telstra.net | 139.130.4.5 |
It should look something like this:
GF:~ etherelamind$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: icmp_seq=0 ttl=47 time=66.060 ms
64 bytes from 8.8.8.8: icmp_seq=1 ttl=47 time=114.892 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=47 time=103.609 ms
^C
--- 8.8.8.8 ping statistics ---
3 packets transmitted, 3 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 66.060/94.854/114.892/20.875 ms
GF:~ gregferro$
![Google Google](/uploads/1/2/7/2/127241306/615824943.jpg)
If you don’t get a response
Mac Terminal Ping
If you ping these addresses and get an error like this, then there is more than one thing that could be wrong with your connection.
Ping Google Mac Terminal Hacker 2
GF:etherealmind$ ping 8.8.4.4
PING 8.8.4.4 (8.8.4.4): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3
The most likely problem is that your Internet connection is down or broken. It’s also possible that Internet router or firewall is blocking ping packets. Many firewalls do block ping packets by default so this isn’t the only test you should do.
Ping Google Mac Terminal Hacker Pc
Let me know if you have any other favourite places that might be worth adding to the list.