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

  • What is the cable connected to? Is it a router or the Mac? Whatever it is it is not allocating an address using DHCP. Do not fiddle with the interfaces file, it should work out of the box; see How do I set up networking/WiFi/Static IP – Milliways Mar 20 '17 at 4:52
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.

  • 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 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 – Wojtek Mar 19 '17 at 13:19
  • Yeah, there's the problem. inet manual is used for bridged connections, which is not what you want (read more here). Try changing manual to dhcp and then restart networking with sudo service networking restart. – Pencil Von Radiergummi Mar 19 '17 at 13:22
  • You may also want to add the lines auto eth0, which starts that interface at boot, and allow-hotplug eth0 to your interaces file. As explained here auto brings up this interface at boot, and allow-hotplug brings up the interface when a cable is plugged in or some other "hot plug" event. – Pencil Von Radiergummi Mar 19 '17 at 13:26
  • Comments should not be used for extended discussions. Please could you add the additional information as an edit to your question. – Darth Vader Mar 19 '17 at 14:01
  • iface eth0 inet manual is the STANDARD correct setting. See How do I set up networking/WiFi/Static IP – Milliways Mar 20 '17 at 4:55

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.