52midnight
Posts: 22
Joined: Fri Nov 09, 2012 3:46 pm

Can't ping router.

Fri Nov 09, 2012 3:51 pm

I've just fired up my new Rpi and am suitably impressed. My ethernet router has assigned it an IP address (192.168.1.103) and ifconfig verifies this. However, I can't ping the router, and of course there's no connection via Midori.

Is there a firewall or other impediment to LAN connection?

hunternet93
Posts: 336
Joined: Mon Dec 12, 2011 4:34 pm

Re: Can't ping router.

Fri Nov 09, 2012 7:57 pm

The firewall is disabled by default, so it's probably not the issue. Could you post the output of the commands (it will ask for your password):

Code: Select all

sudo ifconfig
sudo route -n
sudo dhclient -v eth0
Last edited by hunternet93 on Fri Nov 09, 2012 8:11 pm, edited 1 time in total.

flyinghappy
Posts: 115
Joined: Mon Nov 05, 2012 5:31 pm

Re: Can't ping router.

Fri Nov 09, 2012 8:00 pm

hunternet93 wrote:The firewall is disabled by default, so it's probably not the issue. Could you post the output of the commands (it will ask for your password):

Code: Select all

sudo ifconfig
sudo route -n
sudo dhclient -v wlan0
Wouldn't he want eth0 instead of wlan0 since it is a wired connection?
Pi with ArchLinux running a minidlna/samba home server

hunternet93
Posts: 336
Joined: Mon Dec 12, 2011 4:34 pm

Re: Can't ping router.

Fri Nov 09, 2012 8:11 pm

flyinghappy wrote:
hunternet93 wrote:The firewall is disabled by default, so it's probably not the issue. Could you post the output of the commands (it will ask for your password):

Code: Select all

sudo ifconfig
sudo route -n
sudo dhclient -v wlan0
Wouldn't he want eth0 instead of wlan0 since it is a wired connection?
Right, my bad. I edited my post to fix.

52midnight
Posts: 22
Joined: Fri Nov 09, 2012 3:46 pm

Re: Can't ping router.

Fri Nov 09, 2012 8:31 pm

Tnaks for the prompt reply. As requested:

pi@raspberrypi ~ $ sudo ifconfig
eth0 Link encap:Ethernet HWaddr b8:27:eb:55:f5:8b
inet addr:192.168.1.103 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:887 errors:0 dropped:0 overruns:0 frame:0
TX packets:292 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:135028 (131.8 KiB) TX bytes:26132 (25.5 KiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

pi@raspberrypi ~ $ sudo route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0

pi@raspberrypi ~ $ sudo dhclient -v eth0
Internet Systems Consortium DHCP Client 4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/b8:27:eb:55:f5:8b
Sending on LPF/eth0/b8:27:eb:55:f5:8b
Sending on Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPOFFER from 192.168.1.1
DHCPACK from 192.168.1.1
RTNETLINK answers: File exists
bound to 192.168.1.103 -- renewal in 3490 seconds.

pi@raspberrypi ~ $ ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
^C
--- 192.168.1.1 ping statistics ---
14 packets transmitted, 0 received, 100% packet loss, time 13001ms

hunternet93
Posts: 336
Joined: Mon Dec 12, 2011 4:34 pm

Re: Can't ping router.

Fri Nov 09, 2012 8:47 pm

Hmm. Can you try connecting the Pi to a different network and see if it'll connect? And try pinging your router from a different computer?

52midnight
Posts: 22
Joined: Fri Nov 09, 2012 3:46 pm

Re: Can't ping router.

Sat Nov 10, 2012 1:13 am

Sorry guys, my mistake. Figured it was, but since I couldn't find any relevant material I thought I'd post it for future reference by others.

The problem was in the router (as many of you will have suspected). I'd set up IP-MAC binding for my other machines, and it had been working fine. However, when the Rpi connected, it was assigned an address bound to a different MAC.

Solution: I hadn't ALSO set up an IP reservation on the bound address, so the router used it. However, this appears to be what prevented the ping from responding. Tricky!

BTW, I've just got Gentoo installed on the Rpi and it's now configuring itself. Is there any interest in Gentoo on this Forum? If so, I'll keep an eye on it.

Thanks to all who responded.

hunternet93
Posts: 336
Joined: Mon Dec 12, 2011 4:34 pm

Re: Can't ping router.

Sat Nov 10, 2012 1:59 am

Glad you got it working. There's a Gentoo section of this forum under Distributions, you have to scroll down a bit to get to it.

newencn
Posts: 1
Joined: Tue Mar 12, 2013 3:50 pm

Re: Can't ping router.

Mon Mar 18, 2013 4:18 pm

Hi guys, this issue is cased by the router arp setting, the router must be disable the arp binding.
Good luck for you and enjoying raspberry pi!

rosales
Posts: 1
Joined: Wed Sep 19, 2018 5:47 pm

Re: Can't ping router.

Wed Sep 19, 2018 6:17 pm

Hi all, this is my 1st post in here, but it's really worth the effort to register and post here. Finding a related solution for this incident took me some days, and I'm proud of being able to share the solution I found.

I was able to ping successfully:
i) from my RPI (v3 B+) to loopback.
ii) from my RPI to OUTSIDE my local network e. g. Google.
iii) from my RPI to my RPI via internet! (bouncing on a dynamically leased IP from no-ip.org)

I was NOT able to ping:
i) from intranet router (I've got a bridged edge router too) to RPI local IP.
ii) from RPI to intranet router.
iii) from RPI to any machine in local network using private IPs.

So I got access either to CLI or Web GUI across internet every case!, no way across local network.

I set up my intranet router to provide 3 WiFi ESSIDs: 2 hidden, native ones and one public, guest one (derived from the former). RPI comes ready to get connected to visible ESSIDs so I decided to bind mine to visible, guest's ESSID.

FAIL!

As long as I managed to customize wpa_supplicant.conf for RPI to bind to one of my *private*, hidden, native ESSIDs, incident was gone forever.

My router is a TP-Link one, and I've concluded that TP-LINK router software really limits some functionality on guest-ready ESSIDs, due to security reasons. It's a reasonable matter indeed.

Thanks to the forum for related posts that made me think and find this solution. Hope it works for other users.

Greetings from Spain,

rompelstilchen
Posts: 49
Joined: Thu Mar 03, 2016 10:37 am

Re: Can't ping router.

Sun Aug 04, 2019 7:25 am

got the exact same issue on wlan0 rpi zero
I cant find any setting on the router related to arp, so I changed the ip range of the dhcp, finaly get a different ip but the problem persists

pinging the router hangs there forever, as a workaround, I use an ethernet usb dongle, so it's definetely a MAC address issue

I guess I'll have to reset my router to factory settings

Return to “Beginners”