0

I'm new to Raspberry Pi and have had an issue which has bugged me for quite some time. I'm running Raspian Jessie on my Model B Computer, and Ethernet seems to be working because all three of the yellow and green lights are on and the two arrows are blue. But when I go onto Chromium and search something it's not available. The same goes for APT commands.

Thanks.

Update: Here are the results of ifconfig and cat /etc/network/interfaces/

ifconfig:

eth0      Link encap:Ethernet  HWaddr b8:27:eb:99:e9:ec  
          inet addr:169.254.208.241  Bcast:169.254.255.255  Mask:255.255.0.0
          inet6 addr: fe80::9ae4:ae1e:7e1d:1888/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:175 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:42646 (41.6 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:817 errors:0 dropped:0 overruns:0 frame:0
          TX packets:817 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:64848 (63.3 KiB)  TX bytes:64848 (63.3 KiB)



cat /etc/network/interfaces:


# interfaces(5) file used by ifup(8) and ifdown(8)

# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'

# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

auto lo
iface lo inet loopback

iface eth0 inet manual

allow-hotplug wlan0
iface wlan0 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

allow-hotplug wlan1
iface wlan1 inet manual
 wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
5
  • What does ifconfig show?
    – Milliways
    Apr 18, 2017 at 8:08
  • Also, did you update the system time. It would fail because it thought it was 2014 something and because of that all the certificates were deemed invalid.
    – Dr_Bunsen
    Apr 18, 2017 at 8:12
  • during the first start system must have asked you the internet country. Have you selected the right one. Also do try to run sudo apt-get update Apr 18, 2017 at 12:35
  • @Milliways I have made a text document with the restults of ifconfig and cat /etc/network/interfaces/ it is stored on my raspberry Pi but I'll get it soon.
    – Hamez
    Apr 22, 2017 at 0:55
  • @Dmitry Grigoryev Thankyou for the information. Although I think DHCP is working on my router I will sure investigate.
    – Hamez
    Apr 28, 2017 at 13:49

2 Answers 2

1

ifconfig shows an address starting with 169.254, a link-local address. It gets assigned when there's no DHCP server in your network which tells the RPi (among other things) what network route to take to reach the Internet.

You should connect your RPi to a router which has DHCP enabled, and actually connected to the Internet.

6
  • I think it's /etc/network/interfaces that's the problem. But I'm still confused what's causing problems.
    – Hamez
    Apr 30, 2017 at 1:19
  • Your /etc/network/interfaces seems fine to me. If your router is working (i.e. when you plug a laptop instead of the RPi, it gets Internet access), then something else on your RPi is misconfigured. Did you change any config files, started/stopped services etc? Alternatively, look into dhcpcd logs and see what happens there when you plug the network cable. May 2, 2017 at 10:23
  • I tried re-installing raspbian and changing dhcpcd.conf but that hasn't worked.
    – Hamez
    May 28, 2017 at 2:58
  • I've checked my router's page and it says dhcp is enabled.
    – Hamez
    May 28, 2017 at 2:59
  • Hello sorry for my absence. I've reinstalled raspbian this time without NOOBS yet still my Rapberry Pi fails to connect to the internet or obtain an IP.
    – Hamez
    Jul 18, 2017 at 13:37
1

All along my switch was not properly connected to my router. Thanks for helping everyone!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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