jimb137
Posts: 14
Joined: Thu Dec 20, 2012 1:31 am
Location: Sacramento, California, USA

RPi 3B+ Ethernet not working

Mon Apr 16, 2018 3:00 am

Help!!!

I've read, and tried about everything I can think of and I still can't
get the Ethernet port on my new RPi 3B+ to work.

First my environment:
Hardware: Raspberry Pi 3B+
Software: NOOBS 2.7.0, (Stretch) updated/upgraded April 15, 2018.
Router: TpLink AC1200 Dual Band WIFI router AKA Archer C50

I have been using WIFI from the RPi since it was first set-up. No issues.
My router uses MAC/IP Address Reservation in its DHCP tables and those
work correctly.

My problem: I plan on installing this and a couple other RPi3s in a metal
cabinet (probably a good Faraday shield). I need to get the Ethernet
working so I can use these computers as headless servers for S/W builds,
and/or other server duties. All of the clients connect to the router via
WIFI. The servers connect via Cat 5e cable to the same router. Everything
works except the Ethernet connections. OBTW, the Ethernet from the router
also works correctly with a couple of PCs, a RPI2, and some other stuff.
Cables have been tested, and are known good.


I've tried all of the old school tricks I know of, and those didn't work.
These include /etc/defaultrouter, /etc/hosts, /etc/nsswitch.conf, &
/etc/resolv.conf. Maybe one or two more?

Ive created an "ethernet" file in /etc/network/interfaces.d/ that looks
like this:

# ethernet startup definition - custom by JWB 04/14/18

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 10.10.10.151
gateway 10.10.10.254
network 10.10.10.0
netmask 255.255.255.0
broadcast 10.10.10.255

After a reboot that gave proper values for the eth0 interface (with
ifconfig -a), but ping router (yes, it's in /etc/hosts as 10.10.10.254)
yielded:

From bison (10.10.10.151) icmp_seq=1 Destination Host Unreachable


Removing that file, I tried adding to /etc/wpa_supplicant/wpa_supplicant.conf
as:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=US

network={
ssid="someSSID"
psk="somesecretstuff"
key_mgmt=WPA-PSK
}

network={
ssid="someSSID5G"
psk="somesecretstuff"
key_mgmt=WPA-PSK
}

ap_scan=0
network={
key_mgmt=IEEE8021X
eapol_flags=0
}

This, too, met with mixed results. So I jumped onto the web and found
another 'perfect' solution to my dilema. This one involved /etc/dhcpcd.conf.
Doing as instructed I added stuff to the tail end of the file as:

interface eth0
static routers=10.10.10.254
static domain_name_servers=10.10.10.254
noipv6
static ip_address=10.10.10.151/24
static routers=10.10.10.254
static domain_search=

Yet another reboot (is that 50, yet???), and some combination of these
changes and even my WIFI broke.

I even tried to force a route out the eth0 port with:

route add default gw router dev eth0

Please help!!! This isn't rocket science, or is it? I've read soo many
different opinions on how to fix this issue, tried them all, in one flavor
or another, and it still doesn't work.

All I want is the access the network via a wired connection, with WIFI
turned OFF.

Thanks. And sorry for being so wordy (concise).

jahboater
Posts: 4840
Joined: Wed Feb 04, 2015 6:38 pm

Re: RPi 3B+ Ethernet not working

Mon Apr 16, 2018 3:49 am

You can turn off the Wifi with:

Code: Select all

rfkill block all
put it in /etc/rc.local

The wired ethernet usually should "just work"

There is also:

Code: Select all

dtoverlay=pi3-disable-bt
dtoverlay=pi3-disable-wifi
In /boot/config.txt, but I am not sure if thats actually needed.

pcmanbob
Posts: 7281
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: RPi 3B+ Ethernet not working

Mon Apr 16, 2018 10:56 am

If you are using raspbian stretch you should not be setting static IP's in /etc/network/interfaces you should be using /etc/dhcpcd.conf to set static IP's.

if you have not returned /etc/network/interfaces to its default state that can cause problems with your networking

this is the default interfaces file

Code: Select all

# interfaces(5) file used by ifup(8) and ifdown(8)

# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'

# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
you should not be editing /etc/network/interfaces.d at all.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 24152
Joined: Sat Jul 30, 2011 7:41 pm

Re: RPi 3B+ Ethernet not working

Mon Apr 16, 2018 12:17 pm

Will you be able to test with an unaltered Raspbian install? As someone says above, the wired ethernet should `just work`.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

jimb137
Posts: 14
Joined: Thu Dec 20, 2012 1:31 am
Location: Sacramento, California, USA

Re: RPi 3B+ Ethernet not working

Wed Apr 18, 2018 5:15 pm

Thanks, all!

Starting from scratch was a viable solution. Load NOOBS, update, upgrade copy stuff, configure CUPS, etc. Unfortunately, its taken the better part of two days to fully recover. I did take the time to create a couple of tools (shell scripts) to help, if/when I ever need to do this again. The new 3B+ is running, all of the many pieces of software restored (but not all tested). A few things missing (can't find lshw or nmap).

Mannnny thanks, I could have wasted a fortnight trying to fix the old OS, instead of simply beginning anew.

I guess its sorta like the old PC days... if it don't work, reload and start over. :^(

jahboater
Posts: 4840
Joined: Wed Feb 04, 2015 6:38 pm

Re: RPi 3B+ Ethernet not working

Wed Apr 18, 2018 5:34 pm

jimb137 wrote:
Wed Apr 18, 2018 5:15 pm
A few things missing (can't find lshw or nmap).
These are both available with:-
sudo apt update
sudo apt install nmap lshw

Return to “Troubleshooting”