Bruizar
Posts: 2
Joined: Thu Feb 11, 2016 11:23 am

Ethernet doesn't work anymore

Thu Feb 11, 2016 11:59 am

Upon fresh install, the ethernet connection worked by default. This ethernet cable comes from my digital television, and this still works so I think the problem is on the RPi side.

After setting up my RPi and doing some other things with, I decided to install the Edimax WiFi dongle.

This worked. I could simply connect using the Linux GUI in the top right corner, connect to my network by supplying my password and configuring it such that it obtains all the relevant information of my network automatically. (Right click on the symbol in the top right corner, WiFi Networks (dhcpcdui) settings, configure SSID, choose my network and press apply)

So, I unplug the ethernet cable and everything works via WiFI.

Next step: trying to get SSH to work. I follow several tutorials on how to enable SSH. I edit the raspi-config to enable SSH in the menu, and try to SSH from my macbook to the Raspberry Pi. For this, I need to obtain my RPI's IP address.
On the RPi I type:

Code: Select all

$ hostname -I
192.168.1.1
Well, that's weird. $ ifconfig shows the same. 192.168.1.1 is the ip of my router. Why is RPi taking it up the same IP address? I Google several hours to get an explanation of why my RPi is using the same IP Address but I don't get a good explanation.

I figure I need to set up a static IP address to enable SSH anyway, but before I mess around in /etc/network/interfaces, I look at my router homepage. The tutorials I used recommended I view the device list on my router to figure out which one is the Raspberry Pi (For when you don't have a monitor installed, but I do). I go to my router and don't see a device list (Comtrend 1). I figure I might have to add the RPi's MAC address to my MAC filters to allow the hardware to be detected.
I add my HWaddr in my router and press save using

Code: Select all

 Wireless -- MAC Filter


First. Add specific MAC address which you want to allow or deny
MAC Address	Remove
[MAC ADDRES OBTAINED FROM HWADDR]

Second. Choose MAC restrict mode.

Notice: If you choose "Allow" without specifying you own wireless MAC address, your wireless connection will be lost.
MAC Restrict Mode:    Disabled    Allow    Deny
[ ] [x] [ ]
I press save and I lost internet on all my devices, including my phone, television, 2 ipads and laptop. That might not have been the best thing to do, and I figure I shouldn't have to mess with my router in the first place. I try to revert it but can't connect to my router homepage so I unplug everything and get it up and running again for everything but my Raspberry Pi. I remove the Mac Filter figuring that this isn't the solution to my problem.

I now also remove the Edimax WiFI dongle and just try to fix the problem solely for my ethernet port. I still don't have internet even with the Edimax WiFi dongle removed, even though I didn't actually change anything on my RPi and it used to work out of the box with no configuration needed.

I google a little further and use netstat:

Code: Select all

$ netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
It seems that my gateway is ill-defined because I am missing a line. The tutorials I follow suggest

Code: Select all

$ sudo route add default gw 192.168.1.1
$ netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
192.168.0.1 0.0.0.0 255.255.255.0 U 0 0 0 eth0
I decide that by now I probably just need help because I'm making matters worst than they already are.

Ping to 192.168.1.1 works (is it pinging itself or the router? I don't know...

Code: Select all

$ sudo ping 192.168.1.1
62 bytes from 192.168.1.1: icmp_seq=47 ttl=64 time=0.144ms
etcetera

Ping to an outside source doesn't work:

Code: Select all

$ ping www.google.com
ping: unknown host www.google.com
Again, this is witouth the WiFI dongle.
Some more information:

Code: Select all

$ cat /etc/network/interfaces
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
Any help is much appreciated. The ethernet cable is the one used for my television and the television works fine. Also want to restate that I reverted my router such that it doesn't have the MAC address filter for the RPi.

Bruizar
Posts: 2
Joined: Thu Feb 11, 2016 11:23 am

Re: Ethernet doesn't work anymore

Thu Feb 11, 2016 2:49 pm

I've gotten a little bit further.

Code: Select all

$hostname -I gives:
192.168.1.1

Code: Select all

I then use:
$sudo ifup eth0
bound to 192.168.1.17
If I now try hostname -I

Code: Select all

$hostname -I 
192.168.1.1 1.92.168.1.17
I can still name go online (I suspect there is a DNS issue?) but I can now use SSH.

Code: Select all

ssh pi@192.168.1.17
works

Works, and I'm now connected to the Raspberry Pi from my Macbook Air using SSH. However, I haven't tried to plug in the Edimax WiFi dongle yet because I can't resolve the host name.

A new problem I have created now is that I can't visit my routers homepage anymore (192.168.1.1). Not from my Raspberry Pi but also not from my Macbook Air (But I am using my Macbook Air with internet fine). I think this is related to the fact that the Raspberry Pi now has 2 ip addresses.

Code: Select all

pi@raspberrypi:~ $ ifconfig 
eth0      Link encap:Ethernet  HWaddr b8:27:eb:95:ba:e7  
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::a1d2:2edc:480e:5b5/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:15698 errors:0 dropped:9 overruns:0 frame:0
          TX packets:1703 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2802763 (2.6 MiB)  TX bytes:232108 (226.6 KiB)

Code: Select all

pi@raspberrypi:~ $ hostname -I
192.168.1.1 192.168.1.17 

Code: Select all

i@raspberrypi:~ $ sudo ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
^C
--- 192.168.1.1 ping statistics ---
5 packets transmitted, 0 received, 100% packet loss, time 4008ms

bricolodu13
Posts: 38
Joined: Tue Aug 07, 2012 2:05 pm

Re: Ethernet doesn't work anymore

Fri Jun 10, 2016 10:02 pm

Hello,

I'm experimenting the exact same problem with a brand new Pi Zero.

It worked out of the box with a ethernet / usb adaptator..

I then switched to a wifi dongle, it worked fine, then during the installation it losts its ethernet connection. Since then, no way to reconnect.
I have flashed the OS, switched back to the ethernet adaptator, changed the os, no more ethernet although the adaptator and my ethernet hub leds are flashing.
And unfortunately, my usb hub is not working anymore so I can't try a keyboard and the ethernet...

Did you ever solve your issue ?

Best regards,
Jean

bricolodu13
Posts: 38
Joined: Tue Aug 07, 2012 2:05 pm

Re: Ethernet doesn't work anymore

Sat Jun 11, 2016 8:06 am

Hello,

I made the usb hub working again, unfortunately it doesn't work on the pi zero.

I have checked connections on the Pi usb pins, it is ok.

Should I plug in my keyboard in, I can use it.
Should I plug a usb soundcard, it looks like working.
Should I plug the Ethernet adaptor, it also looks like working, but the Pi zero never show on the network.

Any idea ?
What should I do ?

Best regards,
Jean

User avatar
pi-anazazi
Posts: 543
Joined: Fri Feb 13, 2015 9:22 pm
Location: EU

Re: Ethernet doesn't work anymore

Sat Jun 11, 2016 5:33 pm

Hy!

Had some strange things with LAN recently on some jessie installs, as in the config file the raspi automagically switched from "dhcp" to "manual" and lost its IP.

In your output I also see a lot of "manual" interfaces. Do you rely on DHCP from your router normally or have you assigned fixed IP addresses to your interfaces?
Kind regards

anazazi

User avatar
rpdom
Posts: 15184
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Ethernet doesn't work anymore

Sat Jun 11, 2016 5:39 pm

pi-anazazi wrote:Hy!

Had some strange things with LAN recently on some jessie installs, as in the config file the raspi automagically switched from "dhcp" to "manual" and lost its IP.

In your output I also see a lot of "manual" interfaces. Do you rely on DHCP from your router normally or have you assigned fixed IP addresses to your interfaces?
The RPF Jessie installation uses dhcpcd to manage the interfaces and leaves them all set to "manual" in the legacy /etc/network/interfaces file. You shouldn't need to change that file at all (see the warning at the start of the file). Any address settings should be made in the /etc/dpcpcd.conf file instead.

Return to “Troubleshooting”