eth0 doesn't work on new slackware 14.2 installation
Slackware - InstallationThis forum is for the discussion of installation issues with Slackware.
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.
eth0 doesn't work on new slackware 14.2 installation
Hi,
Just finished to install slackware but the network doesn't work.
At boot time, I have a message "eth0: no carrier". I tried to configure the network with KDE Network Manager, I can't even add a new wired connection. ifconfig says the interface is UP but no IPv4 information.
The network works well with w10 on this machine.
add manually an address to eth0 (192.168.0.100), I can only ping the self address. Any ping on other hosts on the subnet results in "Destination host unreachable".
@odjb
Since you've excluded the cable connection (link) by saying that it works under W10, then it might be caused by the "aggressive" power management of the PCI controller, especially if it's a new laptop (new Intel CPU/chipset).
Check the status of the device by issuing what bassmadrigal suggested:
Code:
lspci -k | grep -iA3 net
-or simple:
Code:
lspci
and look for your network adapter PCI address - the first digits before the name/description (Ethernet controller) in the form: XX:XX:X
Then check the power status of the device:
Below the results from asked actions. I go check the power managament
Code:
lspci -k | grep -iA3 net
1e:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)
Subsystem: Micro-Star International Co., Ltd. [MSI] RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
Kernel driver in use: r8169
Kernel modules: r8169
22:00.0 USB controller: ASMedia Technology Inc. Device 2142
ifconfig -a
eth0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 4c:cc:6a:fe:d4:c0 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1 (Local Loopback)
RX packets 2 bytes 100 (100.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2 bytes 100 (100.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
dhcpcd eth0
Internet Systems Consortium DHCP Server 4.3.4
Copyright 2004-2016 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Config file: /etc/dhcpd.conf
Database file: /var/state/dhcp/dhcpd.leases
PID file: /var/run/dhcpd.pid
Wrote 0 leases to leases file.
No subnet declaration for eth0 (no IPv4 addresses).
** Ignoring requests on eth0. If this is not what
you want, please write a subnet declaration
in your dhcpd.conf file for the network segment
to which interface eth0 is attached. **
Not configured to listen on any interfaces!
If you think you have received this message due to a bug rather
than a configuration issue please read the section on submitting
bugs on either our web page at www.isc.org or in the README file
before submitting a bug. These pages explain the proper
process and the information we find helpful for debugging..
exiting.
dhcpcd eth0
Internet Systems Consortium DHCP Server 4.3.4
Copyright 2004-2016 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Config file: /etc/dhcpd.conf
Database file: /var/state/dhcp/dhcpd.leases
PID file: /var/run/dhcpd.pid
Wrote 0 leases to leases file.
No subnet declaration for eth0 (no IPv4 addresses).
** Ignoring requests on eth0. If this is not what
you want, please write a subnet declaration
in your dhcpd.conf file for the network segment
to which interface eth0 is attached. **
Not configured to listen on any interfaces!
If you think you have received this message due to a bug rather
than a configuration issue please read the section on submitting
bugs on either our web page at www.isc.org or in the README file
before submitting a bug. These pages explain the proper
process and the information we find helpful for debugging..
exiting.
Based on the quoted output, I'm wondering if you forgot to set up your networking during the install. I've never seen this error before, but you shouldn't need to declare anything in your dhcpcd.conf like it states if you are using Slackware's rc.inet scripts. To ensure those scripts are set up properly, run netconfig as root and first select loopback to reset any possible problems, then run it again and set it up for DHCP. Once that's done, either reboot or run /etc/rc.d/rc.inet1 restart and see if you get internet access.
The Realtek r8169 driver looks to be problematic (kernel related and not Slackware related) and apparently you'll need to turn the autonegotiation off with the help of ethtool before bringing the interface up and trying to obtain an IP address with dhcpd/dhclient:
Code:
/usr/sbin/ethtool -s eth0 autoneg off
As previously advised, put these lines in the very beginning of your /etc/rc.d/rc.inet1 script, before any network definitions, in order to have a permanent fix.
Code:
/sbin/ifconfig eth0 down
/usr/sbin/ethtool -s eth0 autoneg off
/sbin/ifconfig eth0 up
Try not to stop it (bring it down) but while on (up) only change the autonegotiation with:
Code:
/usr/sbin/ethtool -s eth0 autoneg off
Check if it's tuning it on off and then try a dhcpd/dhclient on it.
There were reports that the r8169 Linux driver doesn't support gigabit on the adapter and additionally to disabling the autonegotiation you need to tune it to 100Mbit. To do this, execute:
Code:
/usr/sbin/ethtool -s eth0 speed 100 duplex full autoneg off
You could take a different approach, tune the autoneg on off while loading the driver, like described here: https://forums.fedoraforum.org/showp...07&postcount=1
On the latest Slackware you need to define the r8169.conf in the /lib/modprobe.d/ directory like this:
Content of /lib/modprobe.d/r8169.conf
Code:
# turn off autonegotiation on the r8169 ethernet driver
install r8169 /sbin/modprobe --ignore-install r8169 && /usr/sbin/ethtool -s eth0 autoneg off
Then reboot the system and check if it's working / autoneg stays deactivated.
look for "parm:" and maybe you have some driver parameters you could tune in /lib/modprobe.d/r8169.conf
with:
Code:
options r8169 your_option=value
(substitute your_option with the appropriate option (autoneg/speed/etc.) you get in the parm: section from modinfo)
restart the system and check the functionality.
Last edited by abga; 11-04-2017 at 06:51 PM.
Reason: completion & alternatives
I tried the following without stopping eth0 and it worked.
Code:
ethtool -s eth0 speed 100 duplex full autoneg off
I didn't have time to tune the driver but at last, the network worked. I think it's a pity that I can't use the network card at 1gb so maybe I will purchase another card later. ASAP, I try to add the modification so it can boot in the correct state and I will mark the post as solved.
@objb
Happy to hear that you've got it working. You should follow the history on the development of the r8169 driver, maybe it'll get fixed in the following kernel releases. https://github.com/torvalds/linux/co...ealtek/r8169.c
@odjb
I just recalled that your NIC isn't really working well with the ethtool workaround and considered that you might want to try the r8168 driver and blacklist the r8169.
Check this thread for the instructions on where to get and compile the driver: https://www.linuxquestions.org/quest...7/#post5784210
Posts:10-14
After the compilation & installation of the r8168 run the following (comment your ethtool workaround command if you inserted it into /etc/rc.d/rc.inet1):
Code:
ifconfig eth0 down
rmmod r8169
modprobe r8168
# check dmesg for potential r8168 related issues - if any - STOP
ifconfig eth0 up
/etc/rc.d/rc.inet1 restart
# check network functionality ifconfig/ping/traceroute and NIC properties (Gigabit?) with ethtool
If the above is working - then go for a permanent fix:
-create a file /lib/modprobe.d/blacklist-r8169.conf with the following content:
Code:
blacklist r8169
- comment your ethtool command if you have inserted it into some startup script:
Code:
#ethtool -s eth0 speed 100 duplex full autoneg off
- reboot your computer and check if the NIC/r8168 driver are happy
Wait (check from time to time) for a r8169 driver fix in newer kernels.
Last edited by abga; 11-23-2017 at 03:49 PM.
Reason: typo
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.