1

The same cable when connected with my Mac works perfectly but when connected to my Raspberry Pi 3 model b i can't connect to internet. This is the new output of the ifconfig:

eth0      Link encap:Ethernet  HWaddr b8:27:eb:97:57:e6  
          inet addr:169.254.179.161  Bcast:169.254.255.255  Mask:255.255.0.0
          inet6 addr: fe80::ba27:ebff:fe97:57e6/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:325 errors:0 dropped:0 overruns:0 frame:0
          TX packets:144 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:26577 (25.9 KiB)  TX bytes:26146 (25.5 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:936 errors:0 dropped:0 overruns:0 frame:0
          TX packets:936 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:73608 (71.8 KiB)  TX bytes:73608 (71.8 KiB)

I changed interfaces file and now looks like this

auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
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

And this is view from my Mac

Wojtek
  • 11
  • 3

2 Answers2

2

Your interface configuration file (/etc/network/interfaces/) tells me that your Ethernet interface eth0 is set to manual rather than to communicate with a DHCP server to obtain an IP address, which is what you want your Pi to do. Your interfaces file looked like this:

auto lo 
iface lo inet loopback

iface eth0 inet manual 
...

Remove the line iface eth0 inet manual and add at least these two lines to your interfaces configuration file:

auto eth0
iface eth0 inet dhcp

auto eth0: This line will attempt to bring your Ethernet interface up when your Raspberry Pi boots.

iface eth0 inet dhcp: This line instructs your Raspberry Pi to attempt to obtain a DHCP lease for your Ethernet interface. You previously had your Ethernet interface set to manual, which is used for bridged connections.

You may also consider adding this line to your interfaces file:

allow-hotplug eth0: This line attempts to bring up your Ethernet interface when a hotplug event (i.e. an Ethernet cable is plugged in) occurs.

A detailed description of many, if not all, parameters that may be entered in your interfaces file can be found here.

0

If time, date is not correctly set, the DNS resolving is not working.
To setup time, date and timezone do:


Check time, date and timezone

timedatectl status

Chose you're timezone:

timedatectl list-timezones

Disable ntp

sudo timedatectl set-ntp false

Set correct timezone, example: Buenos Aires

sudo timedatectl set-timezone "America/Argentina/Buenos_Aires"

Set correct date and time

sudo timedatectl set-time "2020-08-27 13:08:27"

Enable ntp

sudo timedatectl set-ntp true

Recheck time, date and timezone

timedatectl status

or

timedatectl show

---EDIT---

The Raspberry Pi has no battery, so time and date get reseted as soon as the rbp remains without power.

Teso
  • 121
  • 1
  • 4