DSL -> Linux gateway -> Netgear router: slow upload problem
I have a network set up as follows, using a Linux gateway machine running RedHat Enterprise Linux 4 (kernel 2.6.9):
Code:
internet Code:
iptables -F For downstream traffic from the internet, my network works fine. Upstream, however, my connection is about 50 times slower than it ought to be. Testing my bandwidth on http://www.ip-adress.com/speedtest/ and with SFTP to both internal and external servers, I get the following results: Code:
DOWN UP Matthew. |
I haven't a clue what is going on. But you might try running a packet sniffer such as tcpdump or wireshark on the two ports on your gateway to see if you see anything unusual that might give a hint.
|
I tried ethereal, but unfortunately my gateway computer is not currently connected to a monitor, so I was running the packet sniffer over the network. Inevitably the sniffer was swamped by an avalanche of traffic from its own terminal, and no amount of grepping would produce sensible output.
I did find a workaround to my problem, though I still don't know the original cause. I have now connected my gateway to one of the LAN ports on the router, instead of the internet input port, and configured a static route using the router's web interface. This ensures that all traffic to external IPs is directed to the gateway on the LAN, and not to the router's non-existent external internet connection. Now I am getting full-speed uploads and downloads. No idea why this should make a difference; maybe the router's NAT/masquerading was clashing somehow with the masquerading in my gateway?? I also had to work around another bug, which I'll mention in case anybody else finds this thread in Google. There are two problems with the Netgear interface for setting up static routes: (1) you cannot include a default route, i.e. the subnet mask 0.0.0.0 is not accepted; and (2) the router's DHCP server will mysteriously stop working if you set up a static route that includes the address 255.255.255.255. To get around problem (1), you could define a default route in two parts: Code:
IP: 1.0.0.0, SUBNET: 128.0.0.0, GATEWAY: gateway's IP on the LAN Code:
IP: 1.0.0.0, SUBNET: 128.0.0.0 (includes 0-127) Matthew. |
Quote:
tcpdump [options] -i <interface> not tcp port 22 Quote:
(BTW, I am playing close attention to your experiences since I have started playing around with a NETGEAR router somebody recently gave me.) |
Quote:
Presumably the Linux kernel knows about this, so 255.255.255.255 would always be excluded from the default route in a Linux-based router? |
Typically a card with IP address 192.168.0.1 would have a netmask of 255.255.255.0. (You could force it otherwise.) In that case the broadcast for that subnet would be 192.168.0.255. There is also the general broadcast of 255.255.255.255 which will work on any subnet. As I understand it, neither type of broadcast should be routed through any router (aka gateway). Obviously when such a broadcast originates from a Linux box, the kernel has to be able to send it. That is one of the subtleties of the Linux routing table I still haven't mastered. (On an old RH7.0 box of mine, there is an explicit entry in the routing table for 255.255.255.255/255.255.255.255. But I notice this entry is absent on newer software.)
The times I've looked at network traffic from DHCP clients, they have used the general broadcast (255.255.255.255) for DHCPDISCOVER. I've presumed they do this because they do not yet know what subnet they belong to. |
All times are GMT -5. The time now is 09:56 AM. |