1

I have a problem to connect the Raspberry Pi to the Internet.

ping 8.8.8.8 does not work, but the Pi can be accessed using SSH with my laptop on the same network.

My laptop and the Pi use ethernet and are plugged directly into the router (Freebox). For my laptop, ping 8.8.8.8 works.

Some set up from the Pi:

/etc/network/interfaces

auto lo
iface lo inet loopback
auto eth0
allow-hotplug eth0

iface eth0 inet static
    address 88.168.64.5
    netmask 255.255.255.0
    gateway 88.168.64.254

/etc/resolv.conf

nameserver 88.168.64.254

route -n

Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

0.0.0.0         88.168.64.254   0.0.0.0         UG    0      0        0 eth0

88.168.64.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0

I noticed that my laptop had a third route:

169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 eth0

Thus I added this route to the Pi but it didn't change anything.

I wondered whether the MAC address of the Pi (b8:xx:xx:xx:xx:xx) was accepted by the router because I also tried DHCP and in the logs I had no IP returned by dhcpoffer:

dhclient: DHCPOFFER from 88.168.64.254

Thus, maybe I should check the router configuration but I need a password to connect to it and I don't have it. Another solution may be to connect the Pi to my laptop, but I have only one ethernet port. I could also use WiFi but I have no idea of SSID + password.

Why can I not get connectivity from the Ethernet side?

  • 3
    I doubt you can just use the IP address 88.168.64.5. That's a proxad owned IP. Try giving it a similar IP to what your PC is getting. Something like 192.168.xxx.xxx – Gerben Jul 21 '13 at 14:03
1

What sort of router is this ? Is it actually a modem ? Will it only let one device online at a time ?

We need some more details on how things are setup, Which ISP you are with, what modem or router you're using etc.
The fact that your Pi is getting a 88.168.64.x IP Address is suspect...

I'm suspecting you have a modem, and not a router, which will only let one device online at a time, even if it keeps handing out IP Addresses.

0

you should replace static ip address with:

iface eth0 inet dhcp

and enjoy DHCP assigned address along with the internet connection.

  • I tried DHCP by replacing iface eth0 inet static address 88.168.64.5 netmask 255.255.255.0 gateway 88.168.64.254 by iface eth0 inet dhcp But I did not find the Pi using nmap -sP 88.168.64.*, no new IP and watching the Pi logs, no IP returned by DHCPOFFER. – user8583 Jul 21 '13 at 14:57
  • your router is supposed to give away DHCP address in the range 192.168.XX.XXX, no wonder you cannot find anything in 88.168.64.* – lenik Jul 21 '13 at 15:04
  • even if the netmask was 255.255.255.0 ? My laptop uses DHCP but its local IP is 88.168.64.188. – user8583 Jul 21 '13 at 15:06
  • routers are supposed to give away addresses in preallocated ranges, for home routers it's usually 192.168.xx.yyy, usually xx is fixed to some small number, like 15, and the last three digits are incremented for every new device requesting DHCP address. – lenik Jul 21 '13 at 15:08
  • but in my case 192 is 88 right ? – user8583 Jul 21 '13 at 15:15
0

I realize now that my Pi is only connected to my laptop :

arp -n :

Address HWtype HWaddress Flags Mask Iface

88.168.64.188 ether 00:1e:ec:ba:b2:8a C eth0

whereas my laptop is connected to my Pi but also to the router :

88.168.64.254 ether 00:24:d4:c3:d2:53 C eth0

88.168.64.189 ether b8:27:eb:fb:6d:68 C eth0

That's strange because the Pi routes mentions the default one with the router IP :

0.0.0.0 88.168.64.254 0.0.0.0 UG 0 0 0 eth0

I tried to use a static IP address for the Pi : 169.254.64.189, but impossible to connect.

Thus, what explains the fact that the Pi has a route through the router (route -n shows the router) but does not get the router IP while doing an ARP (arp -n) ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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