2

I have looked at several posts on this issue but none seem to address what I am seeing.

First, I had issues with what this post details https://raspberrypi.stackexchange.com/questions/43560/raspberry-pi-3-eth0-wrongfully-named-enx

Apparently, there is some new way of naming eth0 consistent with "consistent network device naming". Great except it would not allow me to connect to the ethernet at all.

Therefore, I followed the post above and added a rule to: /etc/udev/rules.d/70-persistent-net.rules

which by my estimations forces the pi to name my ethernet card eth0 again.

This worked! I actually have two PIs which were having the same issue.

Ok, so why the post. Well, one pi is having no difficulties and connects on startup without any issues now. However, the other will not automatically connect to the ethernet. The IP listed when I run:

ifconfig -a

Is not on my subnet? Not sure if I have my lingo right here but... It has an IP of 192.168.0.1 for example when it should be 192.168.127.X

My knowledge of networking is growing because of these issues but I am no expert. I am curious about what is going on with the above problem and wondering if anyone has had similar issues.

The pi I am having issues with will connect eventually to the ethernet but I have to disconnect and then reconnect to obtain a valid IP. I would like to avoid this nonsense if possible.

I have seen solutions recommending editing the

/etc/network/interfaces

Network not starting up on boot

The issue here is when I edit in my eth0 it will not connect at all. I found this odd and the fact that when I edit the interfaces file, there is no mention of eth0 at all, yet on one machine, it connects fine. The other machine and the one I made this post about appears to have an intermittent problem with connecting where sometimes it picks up an IP no problem but other times it does not. this is what my interfaces file looks like now and today, upon startup, they both hooked up to the ethernet fine and got their IPs with no problem.

# The loopback network interface
auto lo
iface lo inet loopback

The pi that has been working fine and now the other pi seem to connect and get an IP but are missing eth0 in this file. I do not know tons about this but I assumed the interfaces file was similar to a startup file that setup these devices.

Any advice or thoughts would be appreciated as I would like to know more about why it is in fact working and what is going on when it doesn't connect right off the bat. It seems I have patched together a working environment but perhaps it is a little unstable.

UPDATE: In addition to adding the 70-persistent-net.rules file as described above, I ended up following another poster's advice from the first link above and did the following because it has continued to be intermittent with connecting.

  1. I copied /lib/udev/rules.d/73-usb-net-by-mac.rules over to /etc/udev/rules.d/73-usb-net-by-mac.rules
  2. I changed the name to >> NAME="eth0" as poster Luis Godinez suggested.

On reboot it connected right up but I will not be able to tell how stable it is for a bit I guess... Hopefully these two changes get me going in the right direction. I will update again on how this is working out if it doesn't work.

Final Update I still encountered ethernet problems so I just gave up at this point. All those rule fixes did not work on this machine which is weird because the first pi is still connecting fine and I used the same instructions. This is so odd. I am praying the pi that is working now continues to purr along because I can not deal with anymore ethernet issues at this point.

0

If you want to go back to the old style network names, you can also pass net.ifnames=0 on the kernel commandline - which you can set in /etc/default/grub - though I don't really recommend that.

GRUB_CMDLINE_LINUX=net.ifnames=0

The "better" but equally valid solution would be to modify /etc/network/interfaces and replace eth0 with the actual interface name you have or otherwise configure the interfaces file with the network configuration you require.

With regards to the questions about the IP not matching up, I would suggest posting a copy of your current /etc/network/interfaces so we can check about the subnet issues (192.168.x.x) as well as checking if NetworkManager is running using this command:

systemctl status NetworkManager.service
  • Changing the ethernet "handle", (correct term?), from enxMACADDRESS to eth0 works after using the tip from the first link above. This is listed when you call ifconfig -a I initially tried to edit /etc/network/interfaces and include enxMACADDRESS in it. However, this did not work. Also, it seemed odd that only: # The loopback network interface auto lo iface lo inet loopback was in this file as so many talked about editing eth0 out and subbing in enxMACADDRESS as a solution. I could never get the ethernet to load properly with either enxMACADDRESS to eth0 in it. Why? – TotoTornado Mar 24 '17 at 3:14

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.