A tool commonly used to test the reachability of a given host, either on the internet or in a local network.

learn more… | top users | synonyms

4
votes
1answer
103 views

Redirection to file does not work properly

I have here a bash script: #!/bin/bash TARGET_FILE=ping_result.txt # declare the target ip addresses declare -a ips=("XXX.XXX.XXX.XXX" "YYY.YYY.YYY.YYY") function print_and_log() { echo "$1" ...
1
vote
2answers
72 views

Ping a host, check if alive or not, and send result to file via a shell script

To clean out my custom hosts file and remove dead domains on Windows I ping the hosts from domains.txt, and if I get a reply I add that host to result.txt: @echo off >result.txt ( for /f %%i ...
1
vote
0answers
12 views

Prioritize virtual machine bandwidth

I installed a Windows Server 2012 virtual machine (VM Ware Workstation) on my Debian server that I rented (to which I have SSH access only, and which is in another city with over 1 GB bandwidth) to ...
0
votes
2answers
73 views

How can I filter ping results by time?

How do I filter out any pings that are under a certain ms, ie, only echo ping responses above 500ms to the text file? IP=$1 SECONDS_Between_Pings=$2 ping -i $2 $1 | while read pong; do echo $(date) ...
2
votes
2answers
226 views

Running an infinite loop on startup

I'd like to run a command at startup which pings a certain address every 10 minutes and writes the result to a file. I've figured out now how to do the pinging and file writing and the 10 min ...
5
votes
1answer
256 views

Shell command/script to see if a host is alive?

I'm trying to figure out more ways to see if a given host is up, solely using shell commands (primarily bash). Ideally, it would be able to work with both hostnames and IP addresses. Right now the ...
0
votes
2answers
88 views

Display hostname in ping output

When I ping my Linux server (running in a VM on my Windows7 host) with the following command: ping -a 192.168.56.*** I get the results shown below. Why isn't it resolving my server's name? ...
0
votes
3answers
633 views

Bash ping script file for checking host availability

I am trying to write a bash script in a file that would, when run start pinging a host until it becomes available, when the host becomes reachable it runs a command and stops executing, i tried ...
0
votes
2answers
50 views

Can't browse Internet in Redhat 7

I installed RHEL 7 using server with GUI with no added option on my local virtualbox, but I cannot get Firefox connected to the Internet. I checked /etc/resolv.conf contains nameserver setting I ...
3
votes
3answers
135 views

For some IPs, ping -c 4 -W 1 ip | cat does not output anything until ping has finished, whereas it does for others

Why do $ ping -c 4 -W 1 127.0.0.1 | cat and $ ping -c 4 -W 1 1.1.1.1 print their output immediately, whereas $ ping -c 4 -W 1 1.1.1.1 | cat prints nothing for four seconds, then prints all ...
0
votes
1answer
39 views

Force ping to write before interrupt

I am trying to get ping to continuously write some times to a file. When I run $ ping 10 10.1.10.28 | perl -ne '/time=(\d+\.\d+)/ && print "$1\n"' It returns one number every several ...
0
votes
1answer
109 views

Received DUP when using ping. What should I do?

I was pinging Google last night and one of them came back as DUP(!). I did some reading and I found this in the man pages on ping(8): Damaged packets are obviously serious cause for alarm and ...
2
votes
1answer
1k views

recvmsg returns 'EAGAIN (Resource temporarily unavailable)'

After a recent server move, we are troubleshooting this wierd issue of one of the server losing n/w connectivity for no apparent reason and regaining the connectivity in a few seconds or minutes. ...
1
vote
0answers
37 views

Which Privileges Should Assign For Create Raw Sockets

I want to run an ICMP command to ping an IP Adress at Java: InetAddress.getByAddress("XXX.XXX.XXX.XXX".getBytes()).isReachable(1000); However there is a security restriction that: Normal users are ...
2
votes
1answer
335 views

I can ping internal to outside but not from outside to internal (Static IP)?

I have a static IP provided by the administrator of my Linux CentOS 6.5. The problem is that while I can ping this machine, connect to it and use it to access the internet from within my network, I ...
1
vote
0answers
112 views

openconnect - I can ping a website but can't wget or access by browser

I need to access the VPN of my university. On their website they provide the following solution: install openconnect install vpnc login to vpn via: # openconnect --script /etc/vpnc/vpnc-script ...
2
votes
2answers
233 views

How can you get ping to print human readable timestamps?

Ping can print you a timestamp on every line but its in unix date format :( ping -D localhost PING localhost.localdomain (127.0.0.1) 56(84) bytes of data. [1415629479.482938] 64 bytes from ...
0
votes
1answer
174 views

Unix shell script for server alerts

Below is my shell script which is written in another x to find the health of server y. ( I have not written in server y because there is no functionality of getting mails) #!/bin/bash ...
6
votes
2answers
447 views

Why is ping much faster when using -f

I'm pinging the same host from the same machine at the same time. And when using -f, the result is almost twice as good: [root@localhost Desktop]# ping 196.1.6.16 PING 196.1.6.16 (196.1.6.16) 56(84) ...
6
votes
2answers
155 views

Is there an ICMP echo request service?

Often, in applications that I develop, I like to include a network status indicator for various devices on the network. The easiest way to monitor these devices is by pinging them. But ICMP echoes are ...
1
vote
2answers
1k views

ping: unknown host with iptables enabled

I can't ping www.google.com. However I can ping the IP address: ping 74.125.237.142 At first, I thought it is a problem with my DNS settings. But I checked my resolv.conf, hosts, and hostname ...
0
votes
1answer
114 views

IP access okay but ping doesn't work

I have a laptop connected to a Wi-Fi, and let's say I am testing the connection to a website ("randomwebsite.com", IP:123.123.123.123) Through a terminal I have tested ping: ...
0
votes
1answer
223 views

Why can I ping google.com but not www.google.com [closed]

I can $ping google.com and get data back PING google.com (74.125.227.96): 56 data bytes 64 bytes from 74.125.227.96: icmp_seq=0 ttl=56 time=26.939 ms 64 bytes from 74.125.227.96: icmp_seq=1 ttl=56 ...
3
votes
1answer
126 views

Why doesn't Ubuntu use capabilities on ping?

After running, $ ls -l /bin/ping -rwsr-xr-x 1 root root 34740 Nov 5 2012 /bin/ping I wonder, why doesn't Ubuntu use capabilities (i.e. raw sockets) rather than setuid?
2
votes
2answers
2k views

Ping multiple hosts and execute command

I'm very new in bash scripting and unix so I will need some help on this.I have 7-10 hosts which I want to ping from one of the servers via cronjobs. What I want is when host is up to execute command ...
3
votes
2answers
454 views

Why am I getting DUP! reply when using ping -A

We have 2 VM's running on ESX 5.1. When I do a ping -A, after a while I get every second ping as a DUP!. When doing a normal ping, I get 5 or 6 DUP!s, and then it returns to normal. Any ideas what to ...
0
votes
1answer
433 views

Why ping an IP is different to ping a website?

I've noticed a strange behaviour (at least, I can't get out). Ping IP, specifying packet size: ping -s 128 8.8.8.8 I get: PING 8.8.8.8 (8.8.8.8) 128(156) bytes of data. 72 bytes from 8.8.8.8: ...
5
votes
1answer
1k views

Check ping statistics without stopping

Is there a way to tell ping to show its usual termination statistics without stopping the execution? For instance, I'd like to quickly view: --- 8.8.8.8 ping statistics --- 2410 packets transmitted, ...
2
votes
0answers
2k views

Ping command results in packet loss

Whenever I ping on my personal computer, nothing gets displayed other than a single statement. Upon stopping execution, I see that several packets were transmitted in the statistics. On top of all ...
1
vote
1answer
1k views

Using ping on multiple interfaces on a NIC

I have two systems and each have a NIC with two ethernet ports. One system has a verified NIC card, but the other has a NIC which has to be verified. I use ping to verify whether the interfaces on ...
3
votes
3answers
443 views

Is there some way I can start a (repeating) ping while the network is unreachable?

My ping command (on Debian 6 or 7) will repeatedly attempt to ping a server even while the network is down, if the network was up when it was started. Is there some way to start ping while the network ...
0
votes
1answer
159 views

Route a local connection via an ethernet link in QNX

I am currently facing a challenge in QNX, where I have 2 Network Interfaces - viz. one Network port from PCIe Ethernet Expansion card (wm0) and other from the normal Ethernet port (en0). I have ...
2
votes
1answer
157 views

Most reliable way to check for connected client?

I have an embedded Linux OS developed from scratch using Yocto. This talks to a Windows XP/7 client. The embedded OS runs a DHCP server and gives an address to the client. The problem is that the ...
0
votes
1answer
140 views

Get a faster response for a ping

I noticed that the answer to my ping is slower in one debian machine that another. For the first one when i ping to 8.8.8.8: 64 bytes from 8.8.8.8: icmp_req=1 ttl=47 time=29.6 ms For the second ...
1
vote
2answers
2k views

traceroute gives only stars + how to fix

Please advise about the following problem. When I do: $ traceroute 8.8.8.8 I get in the output showing only stars, even though pinging to google.com ( 8.8.8.8) appears to be working. Please ...
-1
votes
1answer
2k views

Bash Ping to return 'alive' IP addresses

(Disclaimer- I know this can be done more easily with nmap, but its supposed to be practice for bash shell scripting). $ scriptname 192.168.42 18 23 Checking: 192.168.42.18 19 20 21 22 23 Live ...
2
votes
1answer
212 views

How do I create an IPv6 overlay network?

I would like to create host-only IPv6 networks on two hosts and then route between them. On each host, there will be a dummy interface, at ipv6_prefix::9. I would like to be able to ping that ...
1
vote
2answers
152 views

What could cause a ping request to return inconsistently timed results

Here is a sample run: 64 bytes from 192.168.1.9: icmp_seq=27 ttl=64 time=8852.917 ms 64 bytes from 192.168.1.9: icmp_seq=28 ttl=64 time=7918.074 ms 64 bytes from 192.168.1.9: icmp_seq=29 ttl=64 ...
4
votes
2answers
108 views

Did this tutorial block pings to my server?

I am a programmer teaching myself linux admin stuff. I followed this tutorial to setup a firewall on a VPS. As a part of that tutorial, I block all traffic except for web traffic and SSH traffic. I ...
0
votes
2answers
11k views

How do I access files on an external hard drive? [closed]

edited 02-25: I thank @Anthon for his replies. I still do not, however, understand the meaning or the how of "pinging" ("Once you update your Q, ping the commenters..."). I also do not understand the ...
10
votes
3answers
3k views

How to redirect the output of any command?

I'm trying to write a simple script to monitor my network status, without all of ping's output: ping -q -c 1 google.com > /dev/null && echo online || echo offline The problem is that ...
4
votes
3answers
20k views

Why can't I ping Google?

I can't ping google.com (unknown host). But I can ping IP addresses. I tried to ping the IP address of Google but it doesn't work. resolv.conf nameserver 8.8.8.8 nameserver 209.139.209.33 ...
1
vote
0answers
120 views

High ping/latency on Xen box

I am having problems with my Xen box. Once in a while it has too high ping/latency and it is very annoying. It does not matter if I am pinging server from outer network (LAN0) or inner network ...
5
votes
2answers
990 views

My Ping command does not seem to ever finish. Does that mean it is suceeeding?

I am pinging a remote IP. I know very little about the Ping command. When I ping the IP, it keeps going and going... I am not using the -t option. Me$ ping 137.30.124.104 PING 137.30.124.104 ...
3
votes
1answer
582 views

Suppress “Alarm clock: 14” from ping

I've made a simple script for rebooting my router and afterwards showing a progress bar until my computer has an internet connection again. When running the script I get the following output: The ...
1
vote
2answers
18k views

How to check whether certain port is opened or block on any other servers from a dev box?

I am trying to connect to one of our staging Cassandra servers on port 9042 and 9160 here in our company from a dev box.. Through the code, I am not able to connect to it... The program gets hanged at ...
2
votes
2answers
467 views

ssh reverse tunneling not working

So, I have a server and a home machine. My server can't talk to internet, but my home machine can. So, I set up a reverse tunnel through home to server using: ssh -R 9001:www.google.com:80 server ...
0
votes
0answers
63 views

Ping wireless interface from wired interface

I'm performing some wireless measurements. The setup I'm now using is composed of a WiFi AP and two laptops. One laptop (A) and the AP are connected to a common switch, while the second laptop (B) ...
4
votes
1answer
212 views

Strange ping behavior

I built a linux distribution using the Yocto Project, with little customization. It runs on a Single Board Computer. When I ping this machine, I get the following result: PING 10.128.11.1 ...
11
votes
2answers
8k views

Can one ping a NIC by MAC

I have an NIC card on a Debian machine somewhere. The machine is turned off, but I need to know whether the NIC card is turned on so that I can send a wake-on-lan magic packet later (from another ...