Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I got myself a new cable internet connection with a downstream of 50Mbps and 10Mbps upstream. I realized that my D-Link home router wouldn't be able to handle that traffic (WAN<->LAN), so I set up a computer with two NIC's and Slackware 12.2 (kernel 2.6.29.4) to use as a router instead.
My problem is that I only get a throughput of about 20Mbps down and 10Mbps up (the upstream speed is fine though of course) with the linux router. Any computer connected directly to the cable modem get full speed (50/10)... any as in my usual desktop, as well as the linux router. I'm also able to send and recieve files in 100Mbps over the LAN between my router and desktop. But I just don't get full speed through the NAT routing to or from the internet.
iptables NAT is fast, so don't look too hard at that part of the configuration. I assure you, people use iptables NAT for gigabit networks with very little impact.
Quote:
Any computer connected directly to the cable modem get full speed (50/10)
Except for your router, you mean. My first guess is that there are more likely some link issues between eth0 (linux router) and your cable modem. Are there transmission errors on eth0? Try some download tests to the linux router directly to isolate the point of slowness. If there appears to be errors, try placing a switch (not a hub) between eth0 and the cable modem - that can sometimes normalize link connectivity.
Last edited by grepmasterd; 06-02-2009 at 10:34 AM.
Except for your router, you mean. My first guess is that there are more likely some link issues between eth0 (linux router) and your cable modem. Are there transmission errors on eth0? Try some download tests to the linux router directly to isolate the point of slowness. If there appears to be errors, try placing a switch (not a hub) between eth0 and the cable modem - that can sometimes normalize link connectivity.
No errors and nothing dropped, don't know what overruns might be though? I recently rebooted it btw.
With the router active my network looks like:
cable modem <-> linux router <-> 100Mbps switch <-> client
The router gets good speeds from the Internet, but the LAN clients doesn't.
If I plug one of the LAN clients like this, it get goods speeds:
cable modem <-> 100Mbps switch <-> client
hm, weird indeed. overruns means generally that packets are being received too fast, but that shouldn't be happening on a 50Mb line. Do you get the same overruns count when downloading directly to the router, or only when forwarding/routing? What drivers are being used by the cards? (try 'ethtool -i eth0')
also 1GB sounds like plenty of RAM, but I'm curious, what does the output of 'free' show?
I used watch ifconfig, and the overruns only occured when downloading some big file on a lan client from the internet, not when downloading directly to the router. Just like it can't route it quick enough?
it should have, it does for me. here's the output from iptables-save on my system (running a similar setup as yours)
Code:
iptables-save
# Generated by iptables-save v1.4.1.1 on Tue Jun 2 12:37:44 2009
*nat
:PREROUTING ACCEPT [216:46295]
:POSTROUTING ACCEPT [5:812]
:OUTPUT ACCEPT [27:2712]
-A POSTROUTING -o eth1 -j MASQUERADE
COMMIT
# Completed on Tue Jun 2 12:37:44 2009
the only real difference besides hardware and drivers is that eth0 is my LAN and eth1 is my WAN (shouldn't matter, just pointing it out for the sake of clarity).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.