elektito
Posts: 6
Joined: Mon Oct 27, 2014 7:00 pm

RPi connects to the network but cannot be ping'ed

Tue Oct 28, 2014 7:44 am

I just got my RPi yesterday and have been trying to set it up without a monitor using SSH. My problem is that although I'm pretty sure that the raspberry pi does connect to the network (I see it in my router's DHCP clients list), I cannot ssh into it, ping it or access it in any other way.

This is a B+ model with the latest version of Raspbian installed. I'll much appreciate any help.

User avatar
lmarmisa
Posts: 1265
Joined: Thu Feb 14, 2013 2:22 am
Location: Jávea, Spain

Re: RPi connects to the network but cannot be ping'ed

Tue Oct 28, 2014 10:02 am

If you have another Linux computer connected to your LAN, you can use these commands to list the devices connected to LAN (change the subnet number if required):

Code: Select all

sudo nmap -sP 192.168.1.0/24
fping -a -g 192.168.18.0/24 2> /dev/null
If the commands are not available, install them. This is the install command for Debian distros:

Code: Select all

sudo apt-get install nmap fping

User avatar
B.Goode
Posts: 10356
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: RPi connects to the network but cannot be ping'ed

Tue Oct 28, 2014 10:11 am

In my experience, networking with a wired ethernet connection and ssh 'just works' out-of-the-box with recent versions of Raspbian, provided your local area network infrastructure supports it.

It seems you have a dhcp server that is handing out an IP address to the RPi, which is good. Are you confident that there isn't any firewalling or routing policy that prevents clients on your lan from communicating with each other?

Bottom line is that I'd be looking for a problem elsewhere, not on the RPi.

elektito
Posts: 6
Joined: Mon Oct 27, 2014 7:00 pm

Re: RPi connects to the network but cannot be ping'ed

Tue Oct 28, 2014 10:20 am

@lmarmisa: I did try nmap and it doesn't find the IP address my modem says it assigned to raspberry pi. I didn't know about fping but I will try it as soon as I get home in a few hours. Still, it's weird that nmap cannot find the RPi although I know for certain it does get an IP from the DHCP server. Or is it possible for RPi to obtain an IP address and then something else stop the TCP/IP stack from working?

@B.Goode: I am as much certain as I can be that there is no firewall and no particular network policy. I set up my home network myself and I didn't do anything fancy. I have lots of devices on my network. At the moment all my devices connect through WiFi but I have had other wired devices before. I can test connecting another wired device when I get home and report back.

User avatar
lmarmisa
Posts: 1265
Joined: Thu Feb 14, 2013 2:22 am
Location: Jávea, Spain

Re: RPi connects to the network but cannot be ping'ed

Tue Oct 28, 2014 10:52 am

If you have a computer with a card reader running Linux, you will be able to insert the raspbian SD, mount the raspbian root partition and then edit the file /mnt/etc/network/interfaces (I suppose you have mounted the partition on /mnt).

Code: Select all

sudo fdisk -l
sudo mount /dev/sdxy /mnt
cd /mnt/etc/network
sudo cp interfaces interfaces.bak
sudo nano interfaces
Finally define a static IP address for your RPi:

http://elinux.org/Configuring_a_Static_ ... spberry_Pi

User avatar
DougieLawson
Posts: 39121
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: RPi connects to the network but cannot be ping'ed

Tue Oct 28, 2014 10:59 am

Is your home router blocking traffic between LAN devices?

Check the configuration pages at http://192.168.1.1 (or whatever your gateway address is).
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

elektito
Posts: 6
Joined: Mon Oct 27, 2014 7:00 pm

Re: RPi connects to the network but cannot be ping'ed

Tue Oct 28, 2014 11:30 am

I'm pretty sure my router does not block traffic between devices since I frequently connect from one device to another.

itsmedoofer
Posts: 402
Joined: Wed Sep 25, 2013 8:43 am

Re: RPi connects to the network but cannot be ping'ed

Tue Oct 28, 2014 12:20 pm

Hi,

I had a similar issue when connected with WiFi, I could see the world (ping external sites) but could not ping or SSH into the Pi, connecting with Ethernet it worked fine.

It seems to be an issue introduced in the September release of Raspbian, releases prior to that worked fine, for me its related to the rt2800usb driver not being well in this release.

I didnt find a workaround other than going back to wired, although I have ordered a new WiFi dongle with a different chipset see if thats any better...

elektito
Posts: 6
Joined: Mon Oct 27, 2014 7:00 pm

Re: RPi connects to the network but cannot be ping'ed

Tue Oct 28, 2014 12:57 pm

Well my problem is not with wifi but with a normal wired ethernet connection.

itsmedoofer
Posts: 402
Joined: Wed Sep 25, 2013 8:43 am

Re: RPi connects to the network but cannot be ping'ed

Tue Oct 28, 2014 1:01 pm

I'll shut up then :)

elektito
Posts: 6
Joined: Mon Oct 27, 2014 7:00 pm

Re: RPi connects to the network but cannot be ping'ed

Tue Oct 28, 2014 1:08 pm

Hey, don't take it that way. It's reassuring to know that other people have problems too! :)

Ollie97
Posts: 7
Joined: Fri Aug 22, 2014 4:12 pm

Re: RPi connects to the network but cannot be ping'ed

Tue Oct 28, 2014 4:58 pm

Try setting up using Ethernet only, then shutdown and connect wifi and Ethernet try ssh it should work, if it does, shut down and remove Ethernet hopefully it should still work

elektito
Posts: 6
Joined: Mon Oct 27, 2014 7:00 pm

Re: RPi connects to the network but cannot be ping'ed

Tue Oct 28, 2014 6:00 pm

I finally got an HMDI-to-DVI cable, connected the pi to a monitor and managed to set up wifi. At first I was connected to the Internet but still I couldn't ping it from somewhere else. And then I don't know what happened, but everything was working. I swear I didn't do anything! :)

I'm not sure if Ethernet is going to work or not, but I'm happy at the moment. I hope Ethernet is going to work later because I mean to turn my raspberry pi into a wireless access point/router.

User avatar
lmarmisa
Posts: 1265
Joined: Thu Feb 14, 2013 2:22 am
Location: Jávea, Spain

Re: RPi connects to the network but cannot be ping'ed

Tue Oct 28, 2014 6:50 pm

These are useful RPi commands:

Code: Select all

ifconfig        #shows info about network interfaces

iwconfig       #shows a lot of wifi info

sudo nmap -sP 192.168.1.0/24  #shows the list of devices detected on your LAN. Change subnet 192.168.x.0 if necessary 


Return to “Troubleshooting”