Questions tagged [ping]

Ping is a computer network administration utility used to test the reachability of a host on an Internet Protocol (IP) network and to measure the round-trip time for messages sent from the originating host to a destination computer.

Ping is a computer network administration utility used to test the reachability of a host on an Internet Protocol (IP) network and to measure the round-trip time for messages sent from the originating host to a destination computer. The ping utility uses the network protocol, which is often filtered by firewalls, so its usefulness is usually limited in corporate environments.

Examples

ping -n 5 www.example.com #pings 5 times the server named www.example.com

A domain name or IP address can be used.

See also

References

2853 questions
14
votes
2 answers

Making a "ping" inside of my C# application

I need my application to ping an address I'll specify later on and just simply copy the Average Ping Time to a .Text of a Label. Any help? EDIT: I found the solution in case anyone is interested: Ping pingClass = new Ping(); PingReply…
Sergio Tapia
  • 40,006
  • 76
  • 183
  • 254
13
votes
3 answers

IPv6 link-local address format

I am working on a project related to networking/compression. One of the machines is Windows Vista, which already has IPv6 configured. When I try ipconfig, I see an address in the following format: fe80::9dc8:72fa:aacd:76e2%10 But when I try to ping…
pdk
  • 535
  • 3
  • 5
  • 16
13
votes
2 answers

How is ping for non-root user implemented on Linux distros?

I was browsing through the code for ping form iputils package for Linux. I noticed that ping uses raw sockets SOCK_RAW, which any userspace application requires root privilege to use. How do the developers of Linux distros manage to provide the…
HungryFoolish
  • 542
  • 1
  • 9
  • 27
13
votes
2 answers

Why does ping works on some devices and not others?

I have the following code in my app: Runtime runtime = Runtime.getRuntime(); Process process = runtime.exec("/system/bin/ping -c 1 8.8.8.8"); return process.waitFor(); I see that it works (i.e. returns 0) on some devices (e.g. Motorola G) but…
Adil Hussain
  • 30,049
  • 21
  • 112
  • 147
13
votes
9 answers

Should I ping mysql server before each query?

So I was wondering whether I should or should not ping the mysql server (mysqli_ping) to ensure that the server is always alive before running query?
Rihards
  • 10,241
  • 14
  • 58
  • 78
13
votes
1 answer

How to ping a URL in an Android Service?

How can I use Android Service to do a ping callback? I need to open a webpage on a button click, but in the background, go ping another URL for stats collection.
Chris
  • 3,787
  • 13
  • 42
  • 49
13
votes
3 answers

Website not pinging but is opened by Web browser

Friends, I think it is a strange thing (at least for me). Coz I have learnt that every domain name on the Internet has itself a corresponding IP address. And it is stored at some place on a DNS. Now, This is what I get when I ping google.com from my…
Benison Sam
  • 2,755
  • 7
  • 30
  • 40
13
votes
7 answers

Check for Active internet connection Android

I am trying to write a part in my app that will differentiate between an Active Wifi connection and an actual connection to the internet. Finding out if there is an active Wifi connection is pretty simple using the connection manager however every…
user1528944
  • 223
  • 1
  • 3
  • 8
13
votes
9 answers

how to use ping in a script

I want a bash script that'll do: for c in computers: do ping $c if ping is sucessfull: ssh $c 'check something' done If I only do ssh and the computer is iresponsive, it takes forever for the timeout. So I was thinking of using the…
Guy
  • 14,178
  • 27
  • 67
  • 88
13
votes
1 answer

Default ping timeout

What is the default time of ping? I use the code below to send ping to tcp devices. When does IPStatus fall to timeout? private static void ApplyPing(Topology.Runtime rt) { try { if (rt.TcpClient != null) { string…
sanchop22
  • 2,729
  • 12
  • 43
  • 66
13
votes
5 answers

How to ping MAC address in Linux

I want to ping a known MAC address, I tried to use nmap: sudo nmap -sP 192.168.15.1/24 | grep 20:64:32:3F:B1:A9 But in this case its ping all the 255 IP address (from 192.168.15.1 to 192.168.15.255) until get my MAC address, and that take a long…
Linux
  • 325
  • 2
  • 6
  • 17
13
votes
6 answers

How to Perform Multiple "Pings" in Parallel using C#

I am trying to calculate the average round-trip time for a collection of servers. In order to speed things up, I would like to perform the pings in parallel. I have written a function called AverageRoundtripTime() and it seems to work, however,…
HydroPowerDeveloper
  • 3,302
  • 7
  • 31
  • 38
13
votes
7 answers

How to get only the reply line of a ping test on Windows

Usually, when pinging a server IP address we have this in return: Pinging with 32 bytes of data: Reply from : bytes=32 time=151 TTL=121 Reply from : bytes=32 time=151 TTL=121 Reply from : bytes=32 time=151 TTL=121 Reply…
mastermind
  • 161
  • 1
  • 2
  • 8
12
votes
13 answers

Batch ERRORLEVEL ping response

I'm trying to use a batch file to confirm a network connection using ping. I want to do batch run and then print if the ping was successful or not. The problem is that it always displays 'failure' when run as a batch. Here is the code: @echo…
LastStar007
  • 725
  • 1
  • 8
  • 21
12
votes
4 answers

.NET2 DNS rejects hostnames over 126 characters as "too long"

While working on a program I recently found that hostnames in .net (or at least in the ping class) are not supposed to have more than 126 characters. The ping class throws an exception if a hostname is longer. However Wikipedia states that up to 255…
FinalNotriX
  • 385
  • 2
  • 13