Discussion:
Cleanest way to force network speed on NIC
(too old to reply)
Jérôme Warnier
2005-12-07 16:03:01 UTC
Permalink
Hello,

Due to a problem with auto-negociation on a switch the IPcop machine is
connected, I would like to know what is the «cleanest» way to set speed
(and keep it at reboot and preferably on upgrades, of course).
I currently used mii-tool in command-line as there seems to be no way to
do it in the web interface.

Thanks
John Edwards
2005-12-07 23:08:14 UTC
Permalink
Post by Jérôme Warnier
Hello,
Due to a problem with auto-negociation on a switch the IPcop machine is
connected, I would like to know what is the «cleanest» way to set speed
(and keep it at reboot and preferably on upgrades, of course).
I currently used mii-tool in command-line as there seems to be no way to
do it in the web interface.
Thanks
Hi
The "Cleanest" way is to replace the faulty device (switch or NIC) and
return it to the manufacturer. Old Cisco switches used to have a whole
bunch of auto-negotiation problems (especially full/half duplex) that
they didn't fix until people started buying alternatives instead.

Alternative is to add the mii-tool command to the '/etc/rc.d/rc.local'
file that is run at the end of the boot procedure. Make a note about
this because if you change the switch then you will probably need to
change or remove that command.
--
#---------------------------------------------------------#
| John Edwards Email: ***@cornerstonelinux.co.uk |
| |
| A. Because it breaks the logical sequence of discussion |
| Q. Why is top posting bad ? |
#---------------------------------------------------------#
Jérôme Warnier
2005-12-08 01:50:02 UTC
Permalink
Post by John Edwards
Post by Jérôme Warnier
Hello,
Due to a problem with auto-negociation on a switch the IPcop machine is
connected, I would like to know what is the «cleanest» way to set speed
(and keep it at reboot and preferably on upgrades, of course).
I currently used mii-tool in command-line as there seems to be no way to
do it in the web interface.
Thanks
Hi
The "Cleanest" way is to replace the faulty device (switch or NIC) and
return it to the manufacturer. Old Cisco switches used to have a whole
bunch of auto-negotiation problems (especially full/half duplex) that
they didn't fix until people started buying alternatives instead.
The switch is an HP ProCurve, and the speed of the port on it is already
forced to 100Mbits/s full-duplex, but the NIC on the PC is loosing the
speed after some time (upon re-negociation actually).
I'm not sure the switch is to blame and not the NIC, but as it is a
LexSystems mini-PC, it is impossible to replace (at least for testing).
What makes me wonder is that it worked for monthes now (starting in
April, I think) without problems...
Without forcing the interface, it would lose the network after only a
few minutes after reboot.
Post by John Edwards
Alternative is to add the mii-tool command to the '/etc/rc.d/rc.local'
file that is run at the end of the boot procedure. Make a note about
this because if you change the switch then you will probably need to
change or remove that command.
I will do that. I wondered if there were a yet better place to do it,
for example where the NIC is setup at startup, as for
example /var/ipcop/ethernet/settings.

Thanks
John Edwards
2005-12-08 02:17:16 UTC
Permalink
<snip>
Post by Jérôme Warnier
Post by John Edwards
Alternative is to add the mii-tool command to the '/etc/rc.d/rc.local'
file that is run at the end of the boot procedure. Make a note about
this because if you change the switch then you will probably need to
change or remove that command.
I will do that. I wondered if there were a yet better place to do it,
for example where the NIC is setup at startup, as for
example /var/ipcop/ethernet/settings.
Yes, some ethernet drivers can accept options when they are loaded.
You can use modinfo or the online documentation for the driver to
see if they are useful to you.

The online documentation will probably be clearer, as the output of
modinfo tends to be rather terse - below is an example:
----------------------------------------------------------------------
# /sbin/modinfo /lib/modules/2.4.31/kernel/drivers/net/3c59x.o.gz
filename: /lib/modules/2.4.31/kernel/drivers/net/3c59x.o.gz
description: "3Com 3c59x/3c9xx ethernet driver LK1.1.18 1 July 2002"
author: "Donald Becker <***@scyld.com>"
license: "GPL"
parm: debug int, description "3c59x debug level (0-6)"
parm: global_options int, description "3c59x: same as options, but applies to all NICs if options is unset"
parm: options int array (min = 1, max = 8), description "3c59x: Bits 0-3: media type, bit 4: bus mastering, bit 9: full duplex"
parm: global_full_duplex int, description "3c59x: same as full_duplex, but applies to all NICs if options is unset"
parm: full_duplex int array (min = 1, max = 8), description "3c59x full duplex setting(s) (1)"
parm: hw_checksums int array (min = 1, max = 8), description "3c59x Hardware checksum checking by adapter(s) (0-1)"
parm: flow_ctrl int array (min = 1, max = 8), description "3c59x 802.3x flow control usage (PAUSE only) (0-1)"
parm: global_enable_wol int, description "3c59x: same as enable_wol, but applies to all NICs if options is unset"
parm: enable_wol int array (min = 1, max = 8), description "3c59x: Turn on Wake-on-LAN for adapter(s) (0-1)"
parm: rx_copybreak int, description "3c59x copy breakpoint for copy-only-tiny-frames"
parm: max_interrupt_work int, description "3c59x maximum events handled per interrupt"
parm: compaq_ioaddr int, description "3c59x PCI I/O base address (Compaq BIOS problem workaround)"
parm: compaq_irq int, description "3c59x PCI IRQ number (Compaq BIOS problem workaround)"
parm: compaq_device_id int, description "3c59x PCI device ID (Compaq BIOS problem workaround)"
parm: watchdog int, description "3c59x transmit timeout in milliseconds"
----------------------------------------------------------------------
--
#---------------------------------------------------------#
| John Edwards Email: ***@cornerstonelinux.co.uk |
| |
| A. Because it breaks the logical sequence of discussion |
| Q. Why is top posting bad ? |
#---------------------------------------------------------#
Rainer Zocholl
2005-12-08 14:59:01 UTC
Permalink
Post by Jérôme Warnier
Post by John Edwards
Post by Jérôme Warnier
Hello,
Due to a problem with auto-negociation on a switch the IPcop
machine is connected, I would like to know what is the «cleanest»
way to set speed (and keep it at reboot and preferably on upgrades,
of course). I currently used mii-tool in command-line as there
seems to be no way to do it in the web interface.
Thanks
Hi
The "Cleanest" way is to replace the faulty device (switch or NIC)
and return it to the manufacturer. Old Cisco switches used to have a
whole bunch of auto-negotiation problems (especially full/half
duplex) that they didn't fix until people started buying
alternatives instead.
The switch is an HP ProCurve, and the speed of the port on it is
already forced to 100Mbits/s full-duplex,
As already written: It is not wise to to setup 100mbit/s to
"fixed".
Post by Jérôme Warnier
but the NIC on the PC is loosing the speed after some time
(upon re-negociation actually).
Falling to half-duplex so you get a duplex missmatch.
Or 10Mb/s?
Post by Jérôme Warnier
I'm not sure the switch is to blame and not the NIC, but as it is a
LexSystems mini-PC, it is impossible to replace (at least for
testing). What makes me wonder is that it worked for monthes now
(starting in April, I think) without problems...
So: have you checked your cables?
How long are your cables?
Post by Jérôme Warnier
Without forcing the interface, it would lose the network after only a
few minutes after reboot.
Does ifconfig show erros?

Rainer
Jérôme Warnier
2005-12-09 01:23:01 UTC
Permalink
Post by Rainer Zocholl
Post by Jérôme Warnier
Post by John Edwards
Post by Jérôme Warnier
Hello,
Due to a problem with auto-negociation on a switch the IPcop
machine is connected, I would like to know what is the «cleanest»
way to set speed (and keep it at reboot and preferably on upgrades,
of course). I currently used mii-tool in command-line as there
seems to be no way to do it in the web interface.
Thanks
Hi
The "Cleanest" way is to replace the faulty device (switch or NIC)
and return it to the manufacturer. Old Cisco switches used to have a
whole bunch of auto-negotiation problems (especially full/half
duplex) that they didn't fix until people started buying
alternatives instead.
The switch is an HP ProCurve, and the speed of the port on it is
already forced to 100Mbits/s full-duplex,
As already written: It is not wise to to setup 100mbit/s to
"fixed".
When it is not, the network falls within minutes on that interface.
Post by Rainer Zocholl
Post by Jérôme Warnier
but the NIC on the PC is loosing the speed after some time
(upon re-negociation actually).
Falling to half-duplex so you get a duplex missmatch.
Or 10Mb/s?
Again see hereup.
Post by Rainer Zocholl
Post by Jérôme Warnier
I'm not sure the switch is to blame and not the NIC, but as it is a
LexSystems mini-PC, it is impossible to replace (at least for
testing). What makes me wonder is that it worked for monthes now
(starting in April, I think) without problems...
So: have you checked your cables?
Yes, and they have been changed several times too.
Post by Rainer Zocholl
How long are your cables?
Very short: about 1m.
Post by Rainer Zocholl
Post by Jérôme Warnier
Without forcing the interface, it would lose the network after only a
few minutes after reboot.
Does ifconfig show erros?
When the speed is not fixed, yes.

I should have told you that I'm (almost) a guru in Linux. The problem
comes from the communication between the NIC and the switch. As this is
one of those tiny machines, where you cannot change the NIC, hardware
change is not an option.
Furthermore the switch is an expensive one, and is used with success by
many other machines, so they will not accept to change it. And we have
here a software solution, so why bother?
My initial question was just about the best way to do it with IPcop.

Anyway, auto-negociation does not always work as expected, far from it.
Many bandwidth problems are related to it, and forcing speed is a good
solution, otherwise it would not exist ;-). I try to never force it on
both sides: the switch port or the NIC.
Post by Rainer Zocholl
Rainer
Loading...