I have discovered the I can improve LAN performance from ~ 30 kB/s to ~3 Mb/s on file transfers by using the "ethtool" package. As root bash the command ethtool -s eth0 autoneg on turns on the autonegotiation of the RTL 8139 NIC chip. I could not find a command to do this via modprobe parameters but since ethtool works nicely all that I need to do now is have the ethtool command execute during the boot sequence. Where should the ethtool command string be placed for execution during boot ? - John
On Sunday 27 July 2003 06:06 am, John Sved wrote: [...]
Where should the ethtool command string be placed for execution during boot ?
- John =============
/etc/init.d/boot.local -- --- KMail v1.5.2 --- SuSE Linux Pro v8.2 --- Registered Linux User #225206 On any other day, that might seem strange...
I tried this by simply adding the line /usr/sbin/ethtool -s eth0 autoneg on at the end of the boot.local During the boot sequence the following message appeared after the execution of boot.local Cannot get current device settings: Invalid argument Any suggestions ? BandiPat wrote:
On Sunday 27 July 2003 06:06 am, John Sved wrote: [...]
Where should the ethtool command string be placed for execution during boot ?
- John
=============
/etc/init.d/boot.local
On Sunday 27 July 2003 02:20 pm, Philipp Thomas wrote:
BandiPat
[Sun, 27 Jul 2003 07:59:28 -0400]: /etc/init.d/boot.local
No use. boot.local is run before the network has been set up, so you can't use it for configuring network devices.
Philipp ==============
Thanks Philipp for correcting my yet inexperienced Linux mind. I didn't understand the network needed to be activated first in order for his command to work, but did know to activate some things early, you added them to boot.local. This is why we depend on all the "guru" folks here on the list! ;o) Pat -- --- KMail v1.5.2 --- SuSE Linux Pro v8.2 --- Registered Linux User #225206 On any other day, that might seem strange...
John Sved
I could not find a command to do this via modprobe parameters but since ethtool works nicely all that I need to do now is have the ethtool command execute during the boot sequence.
Where should the ethtool command string be placed for execution during boot ?
See 'man modules.conf' for the description of the various possible options you have. In your case the 'post-install' option is what you're searching for. A line like post-install 8139too ethtool -s eth0 autoneg on should do the trick. Philipp
I also tried post-install 8139too /usr/sbin/ethtool -s eth0 autoneg on It still does not work. I do not have a list of 8139too module options. "autoneg on" does not work. Any other suggestions ? -- John Philipp Thomas wrote:
John Sved
[Sun, 27 Jul 2003 12:06:54 +0200]: I could not find a command to do this via modprobe parameters but since ethtool works nicely all that I need to do now is have the ethtool command execute during the boot sequence.
Where should the ethtool command string be placed for execution during boot ?
See 'man modules.conf' for the description of the various possible options you have. In your case the 'post-install' option is what you're searching for. A line like
post-install 8139too ethtool -s eth0 autoneg on
should do the trick.
Philipp
John Sved wrote, On 07/28/2003 05:39 AM:
I also tried
post-install 8139too /usr/sbin/ethtool -s eth0 autoneg on
It still does not work.
I do not have a list of 8139too module options. "autoneg on" does not work.
Any other suggestions ?
modinfo 8139too to get the module options. AFAIK, autonegotiation is
the default, so I don't really understand what you are wanting to
accomplish. What does /usr/sbin/mii-diag
Hi, On 8.2 I can't find mii-diag. Is it a part of a package? PeterB On Sunday 27 July 2003 07:35 pm, Joe Morris (NTM) wrote:
John Sved wrote, On 07/28/2003 05:39 AM:
I also tried
post-install 8139too /usr/sbin/ethtool -s eth0 autoneg on
It still does not work.
I do not have a list of 8139too module options. "autoneg on" does not work.
Any other suggestions ?
modinfo 8139too to get the module options. AFAIK, autonegotiation is the default, so I don't really understand what you are wanting to accomplish. What does /usr/sbin/mii-diag
tell you? -- Joe Morris New Tribes Mission Email Address: Joe_Morris@ntm.org Web Address: http://www.mydestiny.net/~joe_morris Registered Linux user 231871 God said, I AM that I AM. I say, by the grace of God, I am what I am.
-- -- Proud to use SuSE Linux, since 5.2 Loving using SuSE Linux 8.2 MyBlog http://vancampen.org/blog/ "Non Sanz Capsicum" "Not Without Cayenne" --
Peter B Van Campen wrote, On 07/28/2003 09:13 AM:
On 8.2 I can't find mii-diag. Is it a part of a package?
joe@jmorris:~> rpm -qf /usr/sbin/mii-diag netdiag-20010114-188 -- Joe Morris New Tribes Mission Email Address: Joe_Morris@ntm.org Web Address: http://www.mydestiny.net/~joe_morris Registered Linux user 231871 God said, I AM that I AM. I say, by the grace of God, I am what I am.
John Sved
post-install 8139too /usr/sbin/ethtool -s eth0 autoneg on
It still does not work.
Sorry, I should have asked first which driver is being used. I simply assumed that 8139too was being used. Is there a line beginning with alias eth0 in your /etc/modules.conf? If yes, which network driver does it point to (the second parameter for alias)? If there isn't such a line, what does 'lsmod' show? Philipp
Here is some information:
xxxx1:~ # modinfo 8139too
filename: /lib/modules/2.4.20-4GB-athlon/kernel/drivers/net/8139too.o
description: "RealTek RTL-8139 Fast Ethernet driver"
author: "Jeff Garzik
John Sved
[Sun, 27 Jul 2003 23:39:31 +0200]: post-install 8139too /usr/sbin/ethtool -s eth0 autoneg on
It still does not work.
Sorry, I should have asked first which driver is being used. I simply assumed that 8139too was being used.
Is there a line beginning with
alias eth0
in your /etc/modules.conf? If yes, which network driver does it point to (the second parameter for alias)? If there isn't such a line, what does 'lsmod' show?
Philipp
John Sved wrote, On 07/28/2003 04:14 PM:
Jul 28 08:03:46 xxxx1 kernel: 8139too Fast Ethernet driver 0.9.26 Jul 28 08:03:46 xxxx1 kernel: PCI: Found IRQ 11 for device 00:0b.0 Jul 28 08:03:46 xxxx1 kernel: eth0: RealTek RTL8139 Fast Ethernet at 0xd912e000,
00:e0:7d:78:ae:0d, IRQ 11 Jul 28 08:03:46 xxxx1 kernel: eth0: Identified 8139 chip type 'RTL-8139B' Jul 28 08:03:46 xxxx1 kernel: eth0: Setting half-duplex based on auto-negotiated
partner ability 0000.
This is saying the hub/switch you are plugging into has the problem with autonegotiation.
As you can seen the auto negotiation set half-duplex. using
xxxx1:~ # ethtool -s eth0 autoneg on <snip>
So, as you can see, the autonegotiation during boot forced half-duplex. the ethtool command to autonegotiate forced full duplex.
I'm sorry, I didn't see where the ethtool forced full-duplex.
I do not know why. Maybe its a timing thing. In any case the "fix" is to execute the ethtool command later or after the 8139too module has been loaded. That is why I asked where one can insert the ethtool command.
It has been my experience that since the speed was slowed based on what you are connecting to, it is probably correct (unless you are connected via cross-over with the other computer off). I know you said it is much faster, but is it reliable?
Note, mii-diag is not provided with 8.2 or earlier versions.
I have used it since 6.4. It is in the netdiag package. I am using 8.2 presently. BTW, rtl8139-diag will tell you exactly what it is running. Maybe between modinfo and rtl8138-diag and mii-diag, you can figure out what will work for forcing full-duplex. You might want to check your collisions when set that fast to be sure it is the autonegotiation of your connection that is not working. HTH -- Joe Morris New Tribes Mission Email Address: Joe_Morris@ntm.org Web Address: http://www.mydestiny.net/~joe_morris Registered Linux user 231871 God said, I AM that I AM. I say, by the grace of God, I am what I am.
Joe Morris (NTM) wrote:
This is saying the hub/switch you are plugging into has the problem with autonegotiation.
Windoze boxes on the same Hub/switch seem to be OK. (100Mb/s full duplex) Now that I have installed the netdiag package, mii-diag says: xxxx1:~ # mii-diag Using the default interface 'eth0'. Basic registers of MII PHY #32: 2100 780d 0000 0000 05e1 0000 0000 0000. Basic mode control register 0x2100: Auto-negotiation disabled, with Speed fixed at 100 mbps, full-duplex. You have link beat, and everything is working OK. Link partner information is not exchanged when in fixed speed mode. End of basic transceiver information. xxxx1:~ # after invoking ethtool -s eth0 autoneg on mii-diag gives: xxxx1:~ # mii-diag Using the default interface 'eth0'. Basic registers of MII PHY #32: 3100 782d 0000 0000 05e1 45e1 0001 0000. The autonegotiated capability is 01e0. The autonegotiated media type is 100baseTx-FD. Basic mode control register 0x3100: Auto-negotiation enabled. You have link beat, and everything is working OK. Your link partner advertised 45e1: Flow-control 100baseTx-FD 100baseTx 10baseT-FD 10baseT, w/ 802.3X flow control. End of basic transceiver information. xxxx1:~ # With autoneg on file transfer rates are fine.
I'm sorry, I didn't see where the ethtool forced full-duplex.
To be correct, ethtool forces autonegotiation on. Then 100 Mb/s full duplex is set.
It has been my experience that since the speed was slowed based on what you are connecting to, it is probably correct (unless you are connected via cross-over with the other computer off). I know you said it is much faster, but is it reliable?
With autoneg on it is reliable enough for file transfers, LAN printing etc.
You might want to check your collisions when set that fast to be sure it is the autonegotiation of your connection that is not working. HTH
What ever the cause, the fix is to force autonegotiation on. It seems that when module 8139too is loaded the outcome is that autoneg is disabled. The "ethtool eth0 -s autoneg on" command as root gets autonegotiation going. The equivalent mii-diag command is mii-diag -r #restarts the autonegotiation post-install 8139too mii-diag -r did not work in modules.conf mii-diag -r as root worked OK But where should this command be placed to automate it during boot ? -- John
On Monday 28 July 2003 09:51 am, John Sved wrote:
after invoking ethtool -s eth0 autoneg on
mii-diag gives:
xxxx1:~ # mii-diag Using the default interface 'eth0'. Basic registers of MII PHY #32: 3100 782d 0000 0000 05e1 45e1 0001 0000. The autonegotiated capability is 01e0. The autonegotiated media type is 100baseTx-FD. Basic mode control register 0x3100: Auto-negotiation enabled. You have link beat, and everything is working OK. Your link partner advertised 45e1: Flow-control 100baseTx-FD 100baseTx 10baseT-FD 10baseT, w/ 802.3X flow control. End of basic transceiver information.
xxxx1:~ #
With autoneg on file transfer rates are fine.
I'm sorry, I didn't see where the ethtool forced full-duplex.
To be correct, ethtool forces autonegotiation on. Then 100 Mb/s full duplex is set.
It has been my experience that since the speed was slowed based on what you are connecting to, it is probably correct (unless you are connected via cross-over with the other computer off). I know you said it is much faster, but is it reliable?
With autoneg on it is reliable enough for file transfers, LAN printing etc.
You might want to check your collisions when set that fast to be sure it is the autonegotiation of your connection that is not working. HTH
What ever the cause, the fix is to force autonegotiation on. It seems that when module 8139too is loaded the outcome is that autoneg is disabled. The "ethtool eth0 -s autoneg on" command as root gets autonegotiation going. The equivalent mii-diag command is mii-diag -r #restarts the autonegotiation
post-install 8139too mii-diag -r did not work in modules.conf
mii-diag -r as root worked OK
But where should this command be placed to automate it during boot ?
-- John
Hi Guys, I have a similar network and rtl8139 cards. On a stock 8.2 pro install the switch it is plugged into shows "FD=NO" (via LED) for default, but after 'ethtool -s eth0 autoneg on' the switches FD indicator for that PC turns to "FD=YES" as the info from the cmd line queries indicate. I don't know about performance but I also wondered about the missing FD LED on the switch for my 8.2 PCs. Juast where is the best place to put that ethtool cmd? Thanks ....................... PeterB -- -- Proud to use SuSE Linux, since 5.2 Loving using SuSE Linux 8.2 MyBlog http://vancampen.org/blog/ "Non Sanz Capsicum" "Not Without Cayenne" --
Peter B Van Campen wrote, On 07/29/2003 06:03 AM:
I have a similar network and rtl8139 cards. On a stock 8.2 pro install the switch it is plugged into shows "FD=NO" (via LED) for default, but after 'ethtool -s eth0 autoneg on' the switches FD indicator for that PC turns to "FD=YES" as the info from the cmd line queries indicate. <snip> Juast where is the best place to put that ethtool cmd?
Nowhere. Autonegotiate is the default, unless the NIC has been programmed to something else (which in my experience is not a good thing, auto does work as intended). It is better to reprogram the NIC to the correct default via the diag program for the NIC (or mii-diag and rtl8139-diag). Then it works like expected, without a kludge. -- Joe Morris New Tribes Mission Email Address: Joe_Morris@ntm.org Web Address: http://www.mydestiny.net/~joe_morris Registered Linux user 231871 God said, I AM that I AM. I say, by the grace of God, I am what I am.
The 03.07.28 at 17:03, Peter B Van Campen wrote:
Juast where is the best place to put that ethtool cmd?
I would write my own service script and place it after 'network'. See 'man init.d' for more info. -- Cheers, Carlos Robinson
On Sunday 27 July 2003 01:31 pm, Philipp Thomas wrote:
post-install 8139too ethtool -s eth0 autoneg on
Dear Phillipp, Should this go into modules.conf.local instead of modules.conf? Thanks ............. PeterB -- -- Proud to use SuSE Linux, since 5.2 Loving using SuSE Linux 8.2 MyBlog http://vancampen.org/blog/ "Non Sanz Capsicum" "Not Without Cayenne" --
participants (6)
-
BandiPat
-
Carlos E. R.
-
Joe Morris (NTM)
-
John Sved
-
Peter B Van Campen
-
Philipp Thomas