Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am using the linux ping command from a linux machine to test connection to a windows machine:

I first find my windows machine IP address using ipconfig and then do this from the linux machine:

ping my.ip.add.ress

The command just hangs until I cancel with control-C.

Are there any obvious things that I should be doing first?

What should I see if the ping command works?

share|improve this question
2  
For whatever reason your linux machine is not seeing your Windows machine. Are you able to ping the linux box from Windows? Can you ping Google's DNS (8.8.8.8) from the linux machine? Can you verify that both are connected to your network? –  Callen L Sep 30 '13 at 13:49
1  
What sort of network configuration do you have? You will be unable to ping your public ip address inside of a local network unless the network is configured a certain way ( no need to do this unless your hosting a server ). You should be pinging the intranet ip address of the computers. –  Ramhound Sep 30 '13 at 13:56
    
@Callen L, yes both able to ping 8.8.8.8. Also, I can ssh into linux box from windows. I think I may not be pinging the correct IP address as Ramhound suggests. But I'm unsure how to get this. –  atomh33ls Sep 30 '13 at 14:02

5 Answers 5

up vote 3 down vote accepted

IIRC, the default setting in Windows shifted to not responding to pings some time ago. You have to change that in either network or firewall/security settings. If you are using something other than Windows Defender (ie, Norton) you may have to look in more places to find where it's being blocked.

But. You should be getting notices from ping that packets have failed, unless you are killing it really quickly.

If you'd like to not have to kill it, use the -c option to specify a number of packets:

ping -c 5 my.ip.add.ress

and then wait - if no response, you should get 5 failure messages and a summary noting 0 of 5 packets, 100% loss, etc.

You could also try pinging the other direction (from windows to linux)

share|improve this answer
    
Pinging works from windows box to linux box. –  atomh33ls Sep 30 '13 at 14:18
    
Then it's most likely the firewall settings on the Windows box. I don't have Win7box here on my desk, but somewhere in the network panel there's something like "properties" or "diagnostics" that will show you the current IP address - you should also see it in the logs on the linux box from when you ssh into it. –  Ecnerwal Sep 30 '13 at 14:23
    
You are correct. I allowed echo response as per this –  atomh33ls Sep 30 '13 at 14:25

Is your firewall getting in the way?

When the ping command works you should see something like this:

$ ping 192.168.103.140
PING 192.168.103.140: 64 byte packets
64 bytes from 192.168.103.140: icmp_seq=0. time=18. ms
64 bytes from 192.168.103.140: icmp_seq=1. time=18. ms
64 bytes from 192.168.103.140: icmp_seq=2. time=18. ms
64 bytes from 192.168.103.140: icmp_seq=3. time=18. ms
share|improve this answer
    
If the firewall is getting in the way, you should eventually get timeouts. –  Michael Kjörling Sep 30 '13 at 13:54

To test if the ping command works, on the linux machine type ping localhost which should resolve to the linux machine's local IP. You should get a response. It could be that there is a local or remote firewall that is preventing the pings from going through, but I wouldnt expect it to lock up requiring you to use a break.

share|improve this answer

To verify the PC's address, use the command "IPCONFIG" from the command line. Then look for the adapter you are using, i.e. wired Ethernet (sometimes says "LAN0" or similar) or Wireless. Each adapter could have a separate address.

I agree with the posts that suggest that your firewall could be blocking the PING response. If so, in Windows 7 you would open the Network & Sharing Center, then click on "Windows Firewall" at the bottom left. The easiest thing for TESTING ONLY is to turn off the firewall completely. But then if you find it is the firewall, you can just enable a PING through it: In Windows Firewall, click Advanced Settings, Inbound Rules, New Rule and create a custom rule:

Protocol and ports: Protocol: ICMPv4 on the same panel go to customize, choose "Specific ICMP types", check the box "echo request", OK etc.

share|improve this answer

if the ping was successful you should see something like:

pinging your.ip.add.ress
reply from your.ip.add.ress bytes=** time=<1ms
reply from your.ip.add.ress bytes=** time=<1ms
reply from your.ip.add.ress bytes=** time=<1ms
reply from your.ip.add.ress bytes=** time=<1ms

Packets sent = 4, packets received = 4, packets lost = 0

and something to do with the time it took.

Try pinging in safe mode..and turn your firewall off for that short time.

it sounds like although you are cancelling it...if you were to leave it it would time out.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.