-1

Yesterday i got my Raspberry Pi 3 model B and I have internet problem. I have Ethernet cable to my computer (mac) and I use my mac as a router. Everything works fine on my phone, but when i connected my RPi chromium show an error "This site can’t be reached (ERR_NAME_RESOLUTION_FAILED)" to all pages. But it's not wifi problem beacuse i connected the same cable into RPi the same error ocurs.

Hopefully I can connect my RPi to internet throught my smartphone: phone is connected by Wi-Fi and to RPi by usb cable, then I turn on sharing by USB. So I upgraded software to latest version.

Please talk clearly and tell me what i have to do, because I have 14 years :)

This is ifconfig when i am connected to Wifi:

eth0      Link encap:Ethernet  HWaddr b8:27:eb:97:57:e6  
      inet6 addr: fe80::11be:9dac:f7f9:e058/64 Scope:Link
      UP BROADCAST MULTICAST  MTU:1500  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:1000 
      RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
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:1524 errors:0 dropped:0 overruns:0 frame:0
      TX packets:1524 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1 
      RX bytes:122928 (120.0 KiB)  TX bytes:122928 (120.0 KiB)
wlan0     Link encap:Ethernet  HWaddr b8:27:eb:c2:02:b3  
      inet addr:169.254.212.12  Bcast:169.254.255.255  Mask:255.255.0.0
      inet6 addr: fe80::7961:7e92:5b57:1cac/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:2437 errors:0 dropped:2132 overruns:0 frame:0
      TX packets:99 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:597394 (583.3 KiB)  TX bytes:25236 (24.6 KiB)
0

Your wifi isn't connected, ip 169.254.212.12 is not valid address. Do you have DHCP serwer in this network? Is it running and MAC of Raspberry is configured? If not then assign proper ip address by editing file /etc/network/interfaces and setting something like this:

iface vlan0 inet static
address 192.168.0.100
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
  • That's not woking :(. I don't know how to check if have DHCP in my network. Also how to check if MAC if Raspberry is configured – Wojtek Jan 8 '17 at 20:10
  • But in my opinion the problem has nothing with my wifi because when I use ethernet port it also doesn't work – Wojtek Jan 8 '17 at 20:25
  • DO NOT advise people to put static in /etc/network/interfaces unless you are also going to tell them how to make it work by disabling dhcpcd. – Milliways Jan 8 '17 at 21:27
  • @Milliways isn't that obvious that he need to replace existing configuration? – Vir Jan 9 '17 at 17:56
  • @Wojtek because on eth0 you probably also don't have proper ip configured either by static or dhcp server – Vir Jan 9 '17 at 17:57
0

You appear to have the Pi directly connected to the Mac but have obviously not configured the Mac ICS correctly to allocate IP address, as the Pi is using a Link-local address.

Even if you sort this out you WILL NOT be able to both access the Pi from the Mac AND access internet from the Pi. Nothing you can go on the Pi is going to change this (although advanced setup on the Mac to set up a bridge is possible).

If you have a router connect the Pi to this (via Ethernet or WiFi).

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.