LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Ethernet connects at 10Mbps only instead of 1 Gbps (https://www.linuxquestions.org/questions/linux-newbie-8/ethernet-connects-at-10mbps-only-instead-of-1-gbps-747951/)

ks8 08-16-2009 12:14 PM

Ethernet connects at 10Mbps only instead of 1 Gbps
 
I installed Debian 502 AMD64 on my new desktop which has a built in gigabyte ethernet. I believe it uses Realtek 8111 chip. I connect the ethernet cable to another desktop of mine to access internet, and the connection speed is only 10 Mbps. While I was installing, the installer had configured the network on dhcp, and I swear the speed of download was really fast. I checked /etc/network/interfaces, and it is still on dhcp. So, what can I do to make it work at 1.0 Gbps? When I use win7 on this destop, it connects at 1.0 Gbps, so my other destop is working properly.

windtalker10 08-16-2009 12:57 PM

I don't use Debian so I dunno if you have the conf file or not.

As root:

nano /etc/sysctl.conf enter

If a file shows up then you may be in luck.
If not skip to the bottom of the post.

The first four line deal with window size and you need to enter numbers that are best for you (because these ones may be too high). Here is what I mean by this:
Computers communicate by sending packets of data back and forth. When they connect with each other to send these packets they use the TCP (Transmission Control Protocol).

Your computer could begin the connection with a small package size, then the other computer might respond with a larger one. In turn your computer will reduce (scale down) the size of the package (to a bit more that your original package size). The other computer again responds with a larger packet size. This cycle continues until your computer or the responding computer meets their maximum package size.

If you choose a windows packet size that is too big, you will notice slower broadband performance (524288 works for me). If you notice a slow down, then reduce your window size.
The largest size you can use is 65536, however these are the three settings that seem to work best:

524288
262144
131072
Which are all multiples of 1024 (or 1K).
Now add the following to the end of the file:

net.core.rmem_default = 524288
net.core.rmem_max = 524288
net.core.wmem_default = 524288
net.core.wmem_max = 524288
net.ipv4.tcp_wmem = 4096 87380 524288
net.ipv4.tcp_rmem = 4096 87380 524288
net.ipv4.tcp_mem = 524288 524288 524288
net.ipv4.tcp_rfc1337 = 1
net.ipv4.ip_no_pmtu_disc = 0
net.ipv4.tcp_sack = 1
net.ipv4.tcp_fack = 1
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_timestamps = 1
net.ipv4.tcp_ecn = 0
net.ipv4.route.flush = 1

After adding these line you do not need to reboot, instead just reset the file by issuing this command as root:

sysctl -p


Check your repositories for powertweak.
If you hhave it, install it and make your tweaks from there.
I don't use it nor ever have,, just read about it.
If it isn't available, you may consider downloading and trying it from

http://sourceforge.net/projects/powertweak/

Debian as well as most other distro's try to discourage installing from outside sources so use at your own risk.
Debian also has a wiki, you may find help there if someone can't help here.

ks8 08-16-2009 03:07 PM

Thanks. I'll try it when I get home later this week. I have posted the same question in the Debian forum, but no responses. You are the only one who responded so far. I hope it will work.

mushroomboy 08-16-2009 07:43 PM

Well first it will only connect at the speed of your internet.... Right now you would have to be using something pretty crazy fast to get 1Gbps, and even if you could get that you have to have hdd's that would even support those write speeds.

windtalker10 08-16-2009 08:03 PM

I saw that also and don't think anyone is going to get a gig per second.
10 mbps is pretty slow though unless you're on dial up.

onebuck 08-16-2009 09:35 PM

Hi,

The NIC will only link with the current access speed. If the unit is linked with a slower unit then it will be set to that rate. Therefore you will be limited on your LAN to the slowest on that LAN.

lazlow 08-16-2009 10:05 PM

1Gbps is only 95MB/s. A lot of current hard drives transfer at a 100MB/s and I do not know of any raid0 setup that will not do at least 100MB/s (some are hitting over 250). However those number are just for on the lan, going on the wan (internet) will be limited to whatever speed it is. In the same line of thought you are also limited to the slowest machine you are transferring to/from(lan or wan).

ks8 08-17-2009 08:36 AM

Both my desktops have 1 gigabyte ethernet. When connected with win 7 on the new desktop and winxp on the old desktop (both showed 1 Gbps connection), I transferred 800 photo files, it took about 2 minutes. When I connect using Debian on new desktop and winxp on old desktop (winxp showed 10 Mbps), for the same 800 photo files, it says it will take over 2 hours to transfer. My point is not if it can do 1 Gbps, but 10 Mbps is really slow indeed.

@wintalker10: thanks for pointing out the debian wiki. They have this command:

ethtool -s eth0 autoneg off speed 100 duplex full (assuming 100 Mbps)

I found ethtool before, and had installed it (from repository), but did not know the arguments. So, hopefully it will work. I'll report back later this week when I get home.

onebuck 08-17-2009 08:58 AM

Hi,

Find out why the WinXP is showing or throttling to 10MB? You are sure that the WinXP supports your device properly?

ks8 08-17-2009 09:17 AM

As I said before, when win7 connects to winxp, both show connection speed of 1 Gbps. So, the ethernet cable is a good one.

onebuck 08-17-2009 09:47 AM

Hi,
Quote:

Originally Posted by ks8 (Post 3646535)
As I said before, when win7 connects to winxp, both show connection speed of 1 Gbps. So, the ethernet cable is a good one.

Quote:

Originally Posted by ks8 (Post 3646451)
Both my desktops have 1 gigabyte ethernet. When connected with win 7 on the new desktop and winxp on the old desktop (both showed 1 Gbps connection), I transferred 800 photo files, it took about 2 minutes. When I connect using Debian on new desktop and winxp on old desktop (winxp showed 10 Mbps), for the same 800 photo files, it says it will take over 2 hours to transfer. My point is not if it can do 1 Gbps, but 10 Mbps is really slow indeed.

Which is it?

If you say your debian is connected to the WinXP desk and it's 10MbitPerSec is your XP setup and your debian system set to the proper drivers on each? Do you have the debian system setup to 1 G? You said that you looked at ethtool, what is the output for the debian system?

ks8 08-17-2009 10:46 AM

Sorry if I am not clear. I just found the ethtool command (reading from the DebianWiki) to set the speed. I have not done it yet, as I am away from home. I'll do it the coming weekend, and report back.

ks8 08-22-2009 09:33 PM

I used the ethtool command as shown above. It shows that I am running ethernet at 1000 Mb/s, autonegotiate, full duplex. But, my winxp or my vista laptop shows 100 Mb/s. In winxp or vista, there is only these choices, 10, 100 and full autonegotiate which is the default. My guess is that the autonegotiate process somehow stops at 100 Mb/s, whereas between my vista laptop and my winxp desktop, they negotiated at 1000 Mb/s.

ks8 08-22-2009 09:48 PM

Quote:

Originally Posted by windtalker10 (Post 3645545)
I don't use Debian so I dunno if you have the conf file or not.

As root:

nano /etc/sysctl.conf enter

If a file shows up then you may be in luck.
If not skip to the bottom of the post.

The first four line deal with window size and you need to enter numbers that are best for you (because these ones may be too high). Here is what I mean by this:
Computers communicate by sending packets of data back and forth. When they connect with each other to send these packets they use the TCP (Transmission Control Protocol).

Your computer could begin the connection with a small package size, then the other computer might respond with a larger one. In turn your computer will reduce (scale down) the size of the package (to a bit more that your original package size). The other computer again responds with a larger packet size. This cycle continues until your computer or the responding computer meets their maximum package size.

If you choose a windows packet size that is too big, you will notice slower broadband performance (524288 works for me). If you notice a slow down, then reduce your window size.
The largest size you can use is 65536, however these are the three settings that seem to work best:

524288
262144
131072
Which are all multiples of 1024 (or 1K).
Now add the following to the end of the file:

net.core.rmem_default = 524288
net.core.rmem_max = 524288
net.core.wmem_default = 524288
net.core.wmem_max = 524288
net.ipv4.tcp_wmem = 4096 87380 524288
net.ipv4.tcp_rmem = 4096 87380 524288
net.ipv4.tcp_mem = 524288 524288 524288
net.ipv4.tcp_rfc1337 = 1
net.ipv4.ip_no_pmtu_disc = 0
net.ipv4.tcp_sack = 1
net.ipv4.tcp_fack = 1
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_timestamps = 1
net.ipv4.tcp_ecn = 0
net.ipv4.route.flush = 1

After adding these line you do not need to reboot, instead just reset the file by issuing this command as root:

sysctl -p


Check your repositories for powertweak.
If you hhave it, install it and make your tweaks from there.
I don't use it nor ever have,, just read about it.
If it isn't available, you may consider downloading and trying it from

http://sourceforge.net/projects/powertweak/

Debian as well as most other distro's try to discourage installing from outside sources so use at your own risk.
Debian also has a wiki, you may find help there if someone can't help here.

Thanks for your suggestions. I found the file, but all the lines are commented out and the file looks like this:

# /etc/sysctl.conf - Configuration file for setting system variables
# See /etc/sysctl.d/ for additonal system variables
# See sysctl.conf (5) for information.
#

#kernel.domainname = example.com

# Uncomment the following to stop low-level messages on console
#kernel.printk = 4 4 1 7

##############################################################3
# Functions previously found in netbase
#

# Uncomment the next two lines to enable Spoof protection (reverse-path filter)
# Turn on Source Address Verification in all interfaces to
# prevent some spoofing attacks
#net.ipv4.conf.default.rp_filter=1
#net.ipv4.conf.all.rp_filter=1

# Uncomment the next line to enable TCP/IP SYN cookies
# This disables TCP Window Scaling (http://lkml.org/lkml/2008/2/5/167),

So, I am not sure if this is the file you are talking about. I'll try powertweek and see what happens. As in the previous post, it seems the autonegotaite stops at 100 Mb/s.

windtalker10 08-23-2009 01:33 AM

From your post:

Quote:

# See /etc/sysctl.d/ for additonal system variables
The file may be in there.
Again, I don't run Debian so I really don't know how they have things set up.
Beyond the suggestions I've already made, I myself wouldn't be of any more help beyond probably helping to make things worse.

In the event you do make any changes, make sure you make a note of where the change was and what it was so you can change things back if necessary.


All times are GMT -5. The time now is 05:45 PM.