On Fri, Apr 24, 2009 at 12:29:23AM +0100, Ben Hutchings wrote: > Do you also expect to get a gigabit link or only 100 megabit?
The other end is set to 100/full. That is what I want to set the NIC to. > Please run "mii-tool -v eth0". img2:~# uptime 08:37:59 up 1 min, 1 user, load average: 0.28, 0.12, 0.04 img2:~# uname -a Linux img2 2.6.26-2-686 #1 SMP Thu Mar 26 01:08:11 UTC 2009 i686 GNU/Linux img2:~# mii-tool -v eth0 eth0: no autonegotiation, 100baseTx-HD, link ok product info: vendor 00:08:18, model 24 rev 0 basic mode: autonegotiation enabled basic status: autonegotiation complete, link ok capabilities: 1000baseT-HD 1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD advertising: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control link partner: 100baseTx-HD > Is autonegotiation enabled at the other end of the link? No. The networking department here has a Policy of not using autonegotiation, ever. Every single machine is expected to be set explicitly to the speed and duplex of the port. You REALLY don't want to know what I did on the machines that move around from place to place on wheeled carts. Truly. > So you enable autonegotiation and then use mii-tool to override it > behind the driver's back, and you expect this to work somehow? I have been Googling intermittently for things like "Debian tg3 force full duplex" for years and I have NEVER found a straight answer to the relatively simple question of "How do you force a NIC to 100/full?" I am not explicitly setting autonegotiation. The driver module is probably doing so when it's loaded by udev or discover or magical leprechauns or whatever it is that Linux/Debian are using this year. And since nobody can tell me how NOT to do that, that's what ends up happening. If you can tell me how to set my NIC to 100/full in the Correct Debian Way, then I will happily try your suggestions. > Forget > it; this is not a bug. Either use autonegotiation and fix whatever is > wrong with the other end of the link, or disable autonegotiation and > force settings with ethtool. That's precisely what I don't know HOW to do. How do I "disable autonegotiation"? Where do I do it? In /etc/network/interfaces? What's the syntax? Do I have to set driver-module-specific black magic options? Where do I do that? Which man page documents all of this stuff? #debian seems to think I can try "ethtool -s eth0 autoneg off duplex full". So let's give that a whirl: img2:~# ethtool -s eth0 autoneg off duplex full img2:~# ethtool eth0 | grep -i duplex Duplex: Full img2:~# cd /usr/bin img2:/usr/bin# ftp vue10 ... 226 Transfer complete. 4508444 bytes sent in 0.79 secs (5599.2 kB/s) Wow, I think that actually worked. mg2:/usr/bin# mii-tool -v eth0 eth0: 100 Mbit, full duplex, link ok product info: vendor 00:08:18, model 24 rev 0 basic mode: 100 Mbit, full duplex basic status: link ok capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD advertising: 100baseTx-FD flow-control Final test: img2:/usr/bin# tail /etc/network/interfaces # The primary network interface allow-hotplug eth0 #iface eth0 inet dhcp iface eth0 inet static address 139.137.100.23 netmask 255.255.255.0 gateway 139.137.100.100 up ethtool -s eth0 autoneg off duplex full # up sleep 5; mii-tool -F 100baseTx-FD eth0 img2:/usr/bin# shutdown -r now ... ... ... OK, that didn't work. I walked over to it, found it stuck on resolving every single hostname in /etc/exports and timing out. Individually. Obviously there was no working network. Rebooted into single-user mode and confirmed that eth0 wasn't working. So, now, the REALLY final test: img2:~# tail /etc/network/interfaces # The primary network interface allow-hotplug eth0 #iface eth0 inet dhcp iface eth0 inet static address 139.137.100.23 netmask 255.255.255.0 gateway 139.137.100.100 up ethtool -s eth0 autoneg off speed 100 duplex full # up sleep 5; mii-tool -F 100baseTx-FD eth0 img2:~# shutdown -r now ... img2:~# uname -a Linux img2 2.6.26-2-686 #1 SMP Thu Mar 26 01:08:11 UTC 2009 i686 GNU/Linux img2:~# mii-tool -v eth0 eth0: 100 Mbit, full duplex, link ok product info: vendor 00:08:18, model 24 rev 0 basic mode: 100 Mbit, full duplex basic status: link ok capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD advertising: 100baseTx-FD flow-control OK! We're back in action. With any luck, Google will index this and the next poor sap who has to try to figure out "How do I set my NIC to full duplex in Debian?" will find this. (Not that this will answer every question. I'm sure it will still fail for lots of other people, because the correct answer seems to be something along the lines of "It depends on which driver your NIC uses. You're probably screwed. Try some other operating system and pray, or buy a different NIC and pray, or both.") -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org