Ask Ubuntu Asked by TotoTornado on November 21, 2021
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:
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.
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.
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
Answered by Trent Lloyd on November 21, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP