Linux based router slow

K3NS31

Expert Member
Joined
Jul 19, 2009
Messages
4,105
Reaction score
449
Got a very strange problem and I'm looking for some ideas as to what could be causing it. I don't know what to try next.

I'm running a Zentyal gateway (Ubuntu 10.04, with squid etc. on top); which is being used as a proxy / firewall and a mail forwarder. Small network, maybe 15 people and the hardware is reasonable - A current gen Celeron CPU and 2gig RAM.
Recently they've been getting inconsistent Internet speeds so I ran speedtests:
1. From within the network - download speed yoyo's up and down. Starts off fast, then basically stops, then speeds up again, then crawls to an eventual average speed aof 300 to 400 Kb/s on a 6meg line!
Here's the weird part - upload speed is 500Kb/s, consistent.
2. From within the network, but bypassing the proxy (i.e. no squid, just routing through the Zentyal box) - same as above.
3. From the firewall (Zentyal box) itself / a laptop plugged directly into the router - consistent flat line at 6meg when downloading, and 500K when uploading, as it should be.

SO at first I thought this was a Squid issue (even though it's been working fine for ages and nothing's changed), but then I realised it was slow when bypassing Squid too. Confirmed this by disabling Squid on the firewall, just to make sure.
I've also disabled bandwidth shaping and monitoring software on the machine.

So just plain old normal Internet routing is slowing down the connection dramatically. But not at first, the initial download speed on the tests is always high, then it drops to a crawl after a few seconds.
What on earth could be causing this? Where to look next? Any ideas?

Thanks
 
Got a very strange problem and I'm looking for some ideas as to what could be causing it. I don't know what to try next.

I'm running a Zentyal gateway (Ubuntu 10.04, with squid etc. on top); which is being used as a proxy / firewall and a mail forwarder. Small network, maybe 15 people and the hardware is reasonable - A current gen Celeron CPU and 2gig RAM.
Recently they've been getting inconsistent Internet speeds so I ran speedtests:
1. From within the network - download speed yoyo's up and down. Starts off fast, then basically stops, then speeds up again, then crawls to an eventual average speed aof 300 to 400 Kb/s on a 6meg line!
Here's the weird part - upload speed is 500Kb/s, consistent.
2. From within the network, but bypassing the proxy (i.e. no squid, just routing through the Zentyal box) - same as above.
3. From the firewall (Zentyal box) itself / a laptop plugged directly into the router - consistent flat line at 6meg when downloading, and 500K when uploading, as it should be.

SO at first I thought this was a Squid issue (even though it's been working fine for ages and nothing's changed), but then I realised it was slow when bypassing Squid too. Confirmed this by disabling Squid on the firewall, just to make sure.
I've also disabled bandwidth shaping and monitoring software on the machine.

So just plain old normal Internet routing is slowing down the connection dramatically. But not at first, the initial download speed on the tests is always high, then it drops to a crawl after a few seconds.
What on earth could be causing this? Where to look next? Any ideas?

Thanks

I would have a look at the network adapters on the ubuntu box and try different ports on the switch and just for good measure try another cable as well. Routing will not slow traffic down and anything that can run Ubuntu will have no problem with routing traffic for 15 users.

The problem seems hardware based to me unless you did something really funky with your routing tables.

Try the following:

1. Swap out both network cards on the Ubuntu gateway.
2. Swap out the CAT5/6 cable and use a new pair. (Even if there's a problem with the cable it will show connected unless all the 8 cables inside is not making contact)
3. Do a tcpdump on the internal network interface of the Ubuntu gateway and see if no one is running anything that might open allot of connections to the outside and not necessaries using bandwidth).
4. Run top on the Ubuntu gateway and see how much CPU usage iptables uses while the users are actively busy, if the process is not hitting 99% cpu then the routing is not slowing you down.
5. Check if your QoS is not effecting the slowdown of traffic.
6. Check your MTU settings and play around a bit and see if thats not the problem.
7. Check for packet loss.
8. Check and swapout any switches/hubs inbetween the users and the gateway.
9. Change the users network adapter and OS to make sure its not caused from that end.

Once you do all the steps above you should have a pretty good idea or indication where the problem lies.
 
Sounds like a firewall or LAN issue (as described by GoofySmurf. Check firewall LAN NIC, network cable, network point etc)

If it's not a LAN issue then I'd suggest turning off firewall service and running some tests from LAN.
 
@Gooby
I think you're right. I installed SAMBA to test the speed of the internal NIC - created a share and tried to copy a file - extremely slow.
Plugged my laptop into the server to bypass their switch - still slow.
Ironically, this is the newer NIC in the machine, as it's an onboard Gigabit NIC, as opposed to an old PCI thing I had lying around which I'm using for the external link and is working perfectly!

Now I know where the problem is I need to figure out how to fix it.

Thanks for the help so far
 
For anyone who might happen across this thread looking for help on a similar issue - it turns out it was an issue with the NIC. I managed to find an updated driver online and after installing that everything was golden.

Thanks for the pointers guys.
 
I was just about to say it's a driver issue,had same problem on mine,lucky it was a VM so changed the virtual NIC type to a different model and it worked
 
Top
Sign up to the MyBroadband newsletter
X