[SOLVED] Ethernet auto-connect, auto-sense doesn't work
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have noticed that a common issue to several distros is the fact that the networking subsystem doesn't automatically detect the link if an ethernet connection is disconnected and then re-connected to the NIC after boot. If the ethernet cable is connected after the system is up and running, nothing happens - ethtool eth0 shows link detected: no, and you have to restart the network service to let the NIC know that there is in fact a link, and actually connect.
I have a Fedora14 (KDE) box with a brand new Asus motherboard with embedded NIC. Everything works great except the auto-detect of a freshly connected ethernet connection if the link is down to begin with.
Am I missing a ethernet link sentinel utility or something, or is this just the way linux works?
I have done plenty of research on plenty of posts, and it seems this is a common problem, with no solution other than manually or programatically restarting the network service in a script to detect the link after a disconnect.
I have noticed that a common issue to several distros is the fact that the networking subsystem doesn't automatically detect the link if an ethernet connection is disconnected and then re-connected to the NIC after boot.
That depends on your definition of "detect". Ubuntu will actually notify you on your desktop that you've lost the link. Others report to syslog. At the very least, the card knows the link is dead and reports to the drive.
Quote:
Originally Posted by mikevandeberg
If the ethernet cable is connected after the system is up and running, nothing happens - ethtool eth0 shows link detected: no, and you have to restart the network service to let the NIC know that there is in fact a link, and actually connect.
That may be true for DHCP clients, however an "ifconfig eth# down" and "ifconfig eth# up" might fix it in most cases. I've seen several opensource projects dedicated to "do stuff when the NIC loses it's connection, do more stuff when the connection comes back", but I can't think of any off the top of my head (I only use DHCP for my WiFi now a days).
Quote:
Originally Posted by mikevandeberg
Am I missing a ethernet link sentinel utility or something, or is this just the way linux works?
Yes, there are things that can watch & configure NICs based on link activity...
Quote:
Originally Posted by mikevandeberg
I have done plenty of research on plenty of posts, and it seems this is a common problem, with no solution other than manually or programatically restarting the network service in a script to detect the link after a disconnect.
Something like ifplugd, perhaps?
I would imagine the reason this isn't implemented across-the-board on most distros is because of this;
When you "ifconfig eth# down", what stops the daemon from upping the NIC again?
I don't really know what happened, but for some reason, without changing anything in the config, the NIC started negotiating to 1 gig with my router, and began auto-connecting when the cable was disconnected and re-connected again!! Weird! I swear I didn't change a thing....
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.