LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-16-2009, 01:14 PM   #1
ks8
Member
 
Registered: May 2003
Posts: 38

Rep: Reputation: 15
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.
 
Old 08-16-2009, 01:57 PM   #2
windtalker10
Member
 
Registered: Nov 2007
Location: Kentucky
Distribution: Slackware13.1
Posts: 214

Rep: Reputation: 38
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.
 
Old 08-16-2009, 04:07 PM   #3
ks8
Member
 
Registered: May 2003
Posts: 38

Original Poster
Rep: Reputation: 15
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.
 
Old 08-16-2009, 08:43 PM   #4
mushroomboy
Member
 
Registered: Jan 2006
Distribution: Debian Testing ALWAYS!!!
Posts: 363

Rep: Reputation: 43
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.
 
Old 08-16-2009, 09:03 PM   #5
windtalker10
Member
 
Registered: Nov 2007
Location: Kentucky
Distribution: Slackware13.1
Posts: 214

Rep: Reputation: 38
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.
 
Old 08-16-2009, 10:35 PM   #6
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: Slackware®
Posts: 12,541
Blog Entries: 23

Rep: Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943
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.
 
Old 08-16-2009, 11:05 PM   #7
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,362

Rep: Reputation: 172Reputation: 172
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).
 
Old 08-17-2009, 09:36 AM   #8
ks8
Member
 
Registered: May 2003
Posts: 38

Original Poster
Rep: Reputation: 15
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.
 
Old 08-17-2009, 09:58 AM   #9
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: Slackware®
Posts: 12,541
Blog Entries: 23

Rep: Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943
Hi,

Find out why the WinXP is showing or throttling to 10MB? You are sure that the WinXP supports your device properly?
 
Old 08-17-2009, 10:17 AM   #10
ks8
Member
 
Registered: May 2003
Posts: 38

Original Poster
Rep: Reputation: 15
As I said before, when win7 connects to winxp, both show connection speed of 1 Gbps. So, the ethernet cable is a good one.
 
Old 08-17-2009, 10:47 AM   #11
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: Slackware®
Posts: 12,541
Blog Entries: 23

Rep: Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943
Hi,
Quote:
Originally Posted by ks8 View Post
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 View Post
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?
 
Old 08-17-2009, 11:46 AM   #12
ks8
Member
 
Registered: May 2003
Posts: 38

Original Poster
Rep: Reputation: 15
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.
 
Old 08-22-2009, 10:33 PM   #13
ks8
Member
 
Registered: May 2003
Posts: 38

Original Poster
Rep: Reputation: 15
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.
 
Old 08-22-2009, 10:48 PM   #14
ks8
Member
 
Registered: May 2003
Posts: 38

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by windtalker10 View Post
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.
 
Old 08-23-2009, 02:33 AM   #15
windtalker10
Member
 
Registered: Nov 2007
Location: Kentucky
Distribution: Slackware13.1
Posts: 214

Rep: Reputation: 38
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.

Last edited by windtalker10; 08-23-2009 at 02:34 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
1 Gbps NIC Recommendations Woodsman Slackware 5 05-19-2009 01:58 PM
Compaq nx9000 laptop connects only on 10Mbps arunabh_biswas Linux - Hardware 4 02-12-2009 12:03 PM
SATA link up 1.5 Gbps with Seagate ST3320620AS + Asus P5LD2 Deluxe, should be 3.0? [GOD]Anck Slackware 8 08-30-2007 11:06 PM
Change ethernet card to 10Mbps (ethtool doesn’t work for FC1) pwangee Fedora 6 07-08-2004 09:30 AM
Change ethernet card to 10Mbps (ethtool doesn’t work for FC1) pwangee Linux - Networking 0 07-07-2004 10:45 AM


All times are GMT -5. The time now is 12:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration