2

EDIT: This is a brand-new Pi 3 board running raspbian

I just got my Pi, and for whatever reason I can't access the Internet. Ethernet will try and configure forever, and when I try to connect to WiFi, the connection breaks down entirely. I'm at university, so all wireless access points and all Ethernet ports go back to the school network. I think that might have something to do with it, but all of my other devices connect to my roommate's wireless router (connected to the school network) just fine, and the old Dell desktop I have, on which I installed Xfce for kicks, connects via Ethernet just fine.

No matter what network I try to connect to, the same things happen. Here's the information I have:

  • As soon as I boot up the Pi, I shut off WiFi. If I let it try and connect, nothing will happen. If I turn WiFi off and then turn it back on, everything goes to dirt.
  • On the Ethernet port, there are two lights: one is solid amber and the other is flashing green
  • The up/down arrows on the network/Internet icon on the taskbar are flashing blue. The icon stays that way. When I hover over it, the following is displayed ('Kisha's Wifi' is my roommate's network's SSID):

    eth0: Link is up, configuring
    wlan0: Disassociated from Kisha's Wifi
    
  • Here's what I see when I run ifconfig -a:

    pi@raspberrypi:~$ ifconfig -a
    eth0:  flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 150
         inet 192.168.1.84  netmask 255.255.255.0  broadcast 192.168.1.255
         inet6 fe80::ba27::ebff:feb3:7ece prefixlen 64  scopeid 0x20<link>
         ether b8:27:eb:b3:7e:ce  txqueuelen 1000  (Ethernet)
         RX packets 2926  bytes 451348 (440.7 KiB)
         RX errors 0  dropped 5  overruns 0  frame 0
         TX packets 41  bytes 7435 (7.2 KiB)
         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    lo:  flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
         inet 127.0.0.1  netmask 255.0.0.0
         inet6 ::1  prefixlen 128  scopeid 0x10<host>
         loop  txqueuelen 1  (Local Loopback)
         RX packets 0  bytes 0 (0.0 B)
         RX errors 0  dropped 0  overruns 0  frame 0
         TX packets 0  bytes 0 (0.0 B)
         TX errors 0 dropped 0 overruns 0  carrier 0  collisions 0
    
    wlan0:  flags=4098<BROADCAST,MULTICAST>  mtu 1500
         ether b8:27:eb:e6:2b:9b  txqueueln 1000  (Ethernet)
         RX packets 13  bytes 2360 (2.3 KiB)
         RX errors 0  dropped 0  overruns 0  frame 0
         TX packets 31  bytes 4671 (4.5 KiB0
         TX errors 0  dropped 0 overruns 0  carrier 0 collisions 0
    
    pi@raspberrypi:~$
    
  • So, I try to pull a webpage. I get the 'This site can't be reached' message, with the error ERR_NAME_RESOLUTION_FAILED
  • When I try to ping www.google.com, nothing happens. Then I ping the loopback. Stuff happens:

    pi@raspberrypi:~$ ping www.google.com
    ping: www.google.com: Temporary failure in name resolution
    pi@raspberrypi:~$ ping 127.0.0.1
    PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
    64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.107ms
    64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.107ms
    64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.111ms
    64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.104ms
    64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.103ms
    64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.106ms
    64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.105ms
    ^C
    --- 127.0.0.1 ping statistics ---
    7 packets trasmitted, 7 received, 0% packet loss, time 6230ms
    rtt min/avg/max/mdev = 0.103/0.107/0.115/0.011 ms
    pi@raspberrypi:~$
    
  • So, I turn WiFi back on, and select my roommates SSID. As soon as I make the selection, the arrows in the network/Internet icon go gray with a little red 'x' on the end of each arrow. Now, the dropdown menu for the network/Internet icon reads No wireless interfaces found
  • I run ifconfig -a again, for good measure:

     pi@raspberrypi:~$ ifconfig -a
     eth0:  flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 150
          inet 192.168.1.84  netmask 255.255.255.0  broadcast 192.168.1.255
          inet6 fe80::ba27::ebff:feb3:7ece prefixlen 64  scopeid 0x20<link>
          ether b8:27:eb:b3:7e:ce  txqueuelen 1000  (Ethernet)
          RX packets 27469  bytes 3393710 (3.8 MiB)
          RX errors 0  dropped 40  overruns 0  frame 0
          TX packets 79  bytes 19422 (18.9 KiB)
          TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    lo:  flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
         inet 127.0.0.1  netmask 255.0.0.0
         inet6 ::1  prefixlen 128  scopeid 0x10<host>
         loop  txqueuelen 1  (Local Loopback)
         RX packets 14  bytes 1176 (1.1 KiB)
         RX errors 0  dropped 0  overruns 0  frame 0
         TX packets 14  bytes 1176 (1.1 KiB)
         TX errors 0 dropped 0 overruns 0  carrier 0  collisions 0
    
    wlan0:  flags=4098<BROADCAST,MULTICAST>  mtu 1500
         ether b8:27:eb:e6:2b:9b  txqueueln 1000  (Ethernet)
         RX packets 15  bytes 2614 (2.5 KiB)
         RX errors 0  dropped 1  overruns 0  frame 0
         TX packets 36  bytes 5297 (5.1 KiB)
         TX errors 0  dropped 0 overruns 0  carrier 0 collisions 0
    
    pi@raspberrypi:~$       
    
  • When I hover over the icon again, another message is displayed, this time reading:

    dhcpcd not running
    
  • I read somewhere that I could restart dhcpcd with sudo dhcpcd, so I try that:

    pi@raspberrypi:~$ sudo dhcpcd
    unknown option: SSID
    unknown option: SSID
    unknown option: SSID
    control_open: Connection refused
    unknown option: SSID
    unknown option: SSID
    unknown option: SSID
    unknown option: SSID
    unknown option: SSID
    unknown option: SSID
    wlan0: starting wpa_supplicant
    wlan0: waiting for carrier
    wlan0: carrier acquired
    unknown option: SSID
    unknown option: SSID
    unknown option: SSID
    Segmentation fault
    pi@raspberrypi:~$
    

That's it. No matter what access point I try, whether wireless or wired, nothing changes. It always ends the same way. Maybe there's some kind of DNS issue? But would that be on my side or the school's? How would I figure that out? How could I approach fixing it? Why would that break my ability to access the Wired & Wireless Settings window, or to view any WiFi access points?

Any help would be really appreciated.

EDIT 2: Here is the output for route -n:

    pi@raspberrypi:~$ route -n
    Kernel IP routing table
    Distination     Gateway         Genmask         Flags Metric Ref    Use Iface
    192.168.1.0     0.0.0.0         255.255.255.0   U     202    0        0 eth0
    pi@raspberrypi:~$
11
  • 1
    If you want help YOU have to provide more info. You haven't said what Pi, what OS, what YOU have done, how it is connected. Concentrate on 1 interface - don't ask confusing questions about changing. dhcpcd not running implies you have fiddled with something.
    – Milliways
    Jan 17, 2018 at 6:58
  • 1
    @Milliways I just got this Pi. It's a Pi 3 running raspbian. "You haven't said what...YOU have done" It's right in the post. I laid out a list of things I've done, and what happens when I do them. I've tried connecting it via Ethernet and via WiFi, and neither has worked. If there's any more information I can provide, I'd be happy to do so, but I'm very new to all of this. Besides what I've done in the above post, I have no idea how to even approach this. The information I've given is all of what I know to give (besides board and OS, that's my bad) Jan 17, 2018 at 16:05
  • @Milliways "dhcpcd not running implies you have fiddled with something" With what could I have fiddled? Where might I look? Jan 17, 2018 at 16:10
  • Don't those ifconfig responses show that he is connected via ethernet? It shows an IP address.
    – John Mc
    Jan 17, 2018 at 18:17
  • @JohnMc it has an IP address, yes, but I can't ping anything but the loopback, and I can't pull webpages. Jan 17, 2018 at 18:57

3 Answers 3

0

Your Raspberry Pi is not able to access a nameserver (or the dhcp server). If you assigned an ip address to your Raspberry Pi, it might have duplicated another working machine, or it could have somehow been wrong.

Would you please try accessing any computer on your local net by their ip address?

Once possible problem is that the machine with the dhcp server on it has a firewall protecting it from systems it doesn't now about.

I am about to bring up a new Raspberry Pi with the latest Raspian and I can give you more details once this happens.

2
  • All of my other devices are connected to my roommate's wifi, which is on a different subnet (my laptop's subnet is 192.168.0.x, my Pi's is 192.168.1.x). I've still got my Pi hooked up via Ethernet because turning on wifi kills dhcpcd and kills my ability to further mess with network/Internet configs, for some reason. I tried pinging the default gateway for my roommate's wireless router (on my laptop the IPv4 Default Gateway is listed as 192.168.0.1) from the Pi, and it responded connect: network is unreachable. Jan 17, 2018 at 19:02
  • I know I can't ping directly across subnets, but I tried to ping my laptop from my Pi and vise versa anyways (because at this point, whatever) and got the same connect: network is unreachable message. "Once possible problem is that the machine with the dhcp server on it has a firewall protecting it from systems it doesn't now about." Is there anything I could do about that on my end, or am I going to have to call my school's IT for that? Jan 17, 2018 at 19:03
0

Your route -n query shows that you don't have a proper route gateway setting.

Distination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     0.0.0.0         255.255.255.0   U     202    0        0 eth0

Try to run the following command to add a gateway:

route add default gw 192.168.1.1 eth0

If 192.168.1.1 is not your route gateway ip, find out from your router under DHCP settings. The general format for adding a route is:

route add default gw {IP-ADDRESS} {INTERFACE-NAME}
0

I would like to comment, but my reputation only allowes me to use the answer button.

NomadMaker is right with his suggestion. Your DNS does not work. You could setup a fixed DNS adress in your configuartion @ sudo nano /etc/dhcpcd.conf

interface eth0
static ip_address=192.168.1.184/24  # static IP that you want your raspberry to have 
static routers=192.168.1.1 # the IP of your router / gateway
static domain_name_servers=192.168.1.1 # the IP of your DNS-server, in general your router. Alternative DNS would be 8.8.8.8 for google dns for example.

The second problem you have is your wifi card. You say: and when I try to connect to WiFi, the connection breaks down entirely. Does this mean that you are able to see SSID? If yes, what do you mean by: the connection breaks down entirely. What connection are you refering to? Also the ehternet connection? In any case this wifi issue should have nothing to do with DNS. It might be a driver problem. But you are using raspbian, so that shouldn't be the case either.

Once i had the problem that my wifi card frequency was not setup for the region i was. To check your wifi region type

sudo iw reg get
country DE: DFS-ETSI
    (2400 - 2483 @ 40), (N/A, 20), (N/A)
    (5150 - 5250 @ 80), (N/A, 20), (N/A), NO-OUTDOOR
    (5250 - 5350 @ 80), (N/A, 20), (0 ms), NO-OUTDOOR, DFS
    (5470 - 5725 @ 160), (N/A, 26), (0 ms), DFS
    (57000 - 66000 @ 2160), (N/A, 40), (N/A)

In my case i have selected country DE for germany.

For selecting a country type sudo iw reg set regionCODE for example sudo iw reg set DE.

If you want to scan for wifi networks via command line:

sudo iw dev wlan0 scan

Regarding to reg set command check also https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=147151

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