tcp speed problem

Place to discuss Fedora and/or Red Hat
Post Reply
caveman
programmer
programmer
Posts: 130
Joined: Sun Feb 09, 2003 1:08 pm
Location: Midrand Gauteng, South Africa

tcp speed problem

Post by caveman » Sun Jun 27, 2004 1:52 am

Hi.

For a while now I saw things like file copies etc. taking forever plus
a few minutes to complete. I could see by the flickering of the led's and
the usage indicator on the hub that it was not running at nearly full
speed. (new genius fast ethernet hub I installed about 2 months ago).

Then ran ethtool and discovered.....
On both my 7.3 and Fedora machines - on boot up they default
to 10Mb/s half duplex and autoneg on. If I then manually put autoneg
off and change the speed to 100Mb/s half duplex - the network performs
at the speed I expect.

I have searched the net and cannot really get a satisfactory answer
and or explanation for this - must say that my knowledge about
networks on that low a level is limited.

Q. Why does it boot up like this?
Is it the autoneg that somehow allows settings from the hub?
Where in the bootup sequence can I run ethtool to set
the speeds and autoneg to what I want them to be - and
should this be needed at all?

Thanks in advance.

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Sun Jun 27, 2004 7:57 am

This is a very common issue. I believe it's a problem with differences in autonegotiation in the switch and in the card (compatibility). I always force everything to 100FD and turn off autonegotion where possible, unless I have a reason to force something to 10 (usually no reason to do this).

To do this I add ethtool options to the interface configuration file:

ETHTOOL_OPTS="speed 100 duplex full autoneg off"

The config files I am referring to are in /etc/sysconfig/network-scripts (on Red Hat and Fedora boxes) and called "ifcfg-eth0" (depending on the interface name of course). I should probably write a tip on this because most people probably don't even know to check this type of thing. For the record, at work we have this issue no matter what OS is running on the client machines. It seems to be an incompatability in hardware autonegotiation (and we run nothing but Cisco switches and routers at work which you would think be the most industry standard equipment on the market).

The main thing you need to be sure of is that both the switch and the NIC are running at exactly the same speed and duplex. If you have one running at full duplex and the other running at half duplex you will have *extremely* poor performance. This is called a duplex mismatch.

caveman
programmer
programmer
Posts: 130
Joined: Sun Feb 09, 2003 1:08 pm
Location: Midrand Gauteng, South Africa

Post by caveman » Sun Jun 27, 2004 12:30 pm

Tx Void..

It is about as I figured it as well..

Only one question - if I set my 7.3 box to full-duplex - its goes stinking slow.
How do I check the duplex om by hub - cannot find anything in the docs
or on the net regarding the duplex setting of the hub - maybe I'm searching
in the wrong place?

It is a genius fast ethernet hub model gf4080se

regards

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Sun Jun 27, 2004 2:23 pm

At minimum you should be able to tell by the lights on the hub. The equipment at work are all managed switches so you can telnet into the switch and query the port to see what it is connected at. Sometimes we have to set the ports on the switch manually to 100FD.

Of course you do not have this option on unmanaged switches and hubs (like the one you probably have). On unmanaged switches and hubs the indicator lights should tell you at what speed and duplex each port is linked at and most are set to autonegotiate speed and duplex.

I just looked at the manual for your hub and it doesn't appear that you can tell the link status by the lights. In fact I don't see any way in the manual to determine at what speed and duplex the ports are linked at. I guess that's not all that unusual on cheap "hubs" but most "switches" I have ever seen (even the cheap ones) will indicate this by how the lights are lit on each port.

ZiaTioN
administrator
administrator
Posts: 460
Joined: Tue Apr 08, 2003 3:28 pm
Contact:

Post by ZiaTioN » Mon Jun 28, 2004 10:17 am

Even the cheap hubs should be lit by a green LED for 10 MB/s and an orange LED for 100 MB/s.

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Mon Jun 28, 2004 10:20 am

It's actually the "duplex" that is the important part in this case. If your NIC is running half duplex and your switch port is running full duplex your gonna have big problems.

Post Reply