# New Gentoo server - really slow internet connection

## MrSums

I've been searching these forums for a while, but can't find the answer.

I have just built a new Gentoo server based on the very fine documentation. I checked it all out and it worked just fine. Then I replaced my trusty old Netwinder with the new server and rebooted the network. The download speed from the internet is appalling so I ran some speed checks. With the Netwinder I get around 8-9mb/s - with the new box I get around 300kbp/s.

Some of the comments I have seen talk about iptables. I have set up iptables with masquerading, and this is the output from iptables -L

 *Quote:*   

> Chain INPUT (policy DROP)
> 
> target     prot opt source               destination         
> 
> ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED 
> ...

 

This is my conf.d/net

 *Quote:*   

> config_eth0=( "dhcp" )
> 
> config_eth1=( "192.168.1.1 netmask 255.255.255.0 brd 192.168.1.255" )
> 
> dns_servers_ESSID=( "myisp.dns1 myisp.dns2" )

 

This is dnsmasq.conf

 *Quote:*   

> domain-needed
> 
> bogus-priv

 

What else can I tell you? I don't think it is hardware, the eth0 is on-board and worked perfectly well when it was configured as a network machine prior to putting in another card to use it as a server. It is probably something stupid I have done. 

Robert

----------

## MrSums

Be really grateful for any help on this - the server is completely useless as it stands

Thanks

Robert

----------

## Cyker

The only thing that springs to mind is a badly set MTU (And only because I was reading about it in another thread...!)

Run ifconfig and post the results.

What's the ping and tracepath stats look like also?

----------

## MrSums

Yes, I saw the MTU post as well, but it is set at 1500 which is the same as the server which works fast. Also, the ifconfig shows no errors so I don't think that one helps.

I'll check out ping and tracepath and post results

----------

## MrSums

Ok here is a fair amount of detail. I have run the same tests on a) the fast server b) the slow server and c) & d) same tests on the same machine sitting behind the servers.

a). Output of ifconfig, route, ping and traceroute for the fast server:

 *Quote:*   

> Output from #ifconfig
> 
> eth0      Link encap:Ethernet  HWaddr 00:10:57:00:21:84  
> 
>           inet addr:82.0.173.18  Bcast:255.255.255.255  Mask:255.255.252.0
> ...

 

b). Now the same tests on the slow server:

 *Quote:*   

> Output of #ifconfig
> 
> eth0      Link encap:Ethernet  HWaddr 00:40:63:C0:94:25  
> 
>           inet addr:82.0.171.224  Bcast:255.255.255.255  Mask:255.255.252.0
> ...

 

c). Now the output of ping and traceroute from the machine sitting behind the fast server

 *Quote:*   

> Output from #traceroute 66.102.9.99 (www.google.co.uk)
> 
>  1  192.168.1.1 (192.168.1.1)  0.345 ms  6.886 ms  7.901 ms
> 
>  2  * * *
> ...

 

d). and the same output from the same machine behind the slow server:

 *Quote:*   

> Output from #traceroute 66.102.9.99 (www.google.co.uk)
> 
>  1  192.168.1.1 (192.168.1.1)  0.344 ms  0.106 ms  0.086 ms
> 
>  2  * * *
> ...

 

In each case I checked the speed of the connection and was getting similar results to previous.

I hope someone can make head or tail of this, 'cos I am stumped

Robert

----------

## MrSums

Anyone - please believe me, any help is better than no help at this time.

Should I erase iptables and start again?

Robert

----------

## kg

Check out the ifconfig output on the slow server again.

 *Quote:*   

> eth0 Link encap:Ethernet HWaddr 00:40:63:C0:94:25
> 
> inet addr:82.0.171.224 Bcast:255.255.255.255 Mask:255.255.252.0
> 
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> ...

 

64075 RX packets of which 20035 reported frame errors?   :Shocked: 

As I recall (been a while), those are errors with the actual ethernet frames (length)

as opposed to say a checksum error.  Points to a hardware problem.  

Are you using the same cable for both systems? Is it plugged into the same 

port on the other end?  

If yes, I'd try to get a different card to test with (otherwise I'd try a different cable   :Wink:   )

Or even swap your config so eth1 goes to the WAN and eth0 is to the LAN.  See if the errors stay with

the card.

----------

## MrSums

I am using the same cable in testing both machines as it is the one to connect to the cable modem directly.

If I swap the config for eth0 and eth1 then eth1 reports frame errors too.

I don't think it is hardware, as when I connect either card to the internal network, no errors are reported.

QUESTION: could it be to do with the card speed? The fast machine only has a 10mb card on the cable modem side, whereas the slow machine has two 100mb cards. On the detail reported above, the fast machine states a  *Quote:*   

> txqueuelen:100

 

whereas the slow machines reports a  *Quote:*   

> txqueuelen:1000

 

Could this be a clue?

Thanks

Robert

----------

## defenderBG

according to this site: http://www.hep.ucl.ac.uk/~ytl/tcpip/linux/txqueuelen/datatag-tcp/ tqlenght should be txqueuelen of 1000 is good. 

check the differences betwen ur old and new kernel. might be a clue there... dma or something like this might be a problem...

----------

## MrSums

Not sure what help the kernel will be.

The fast server is running a 2.2.14 kernel from Red Hat on an arm-based Netwinder.

The new slow machine is running 2.6.17 on Gentoo on a Via mini-itx 

Doesn't seem to make any difference when I turn off the firewall, so iptables is unlikely to be the problem.

Can anyone point me in the direction of help on the ethernet frame errors?

Thanks

Robert

----------

## kg

 *Quote:*   

> QUESTION: could it be to do with the card speed? The fast machine only has a 10mb card on the cable modem side, whereas the slow machine has two 100mb cards. 

 

You can check to see if there is some issue with ethernet autonegotiation between the slow server and the modem.

```
# /sbin/mii-tool -v eth0
```

(I think it is from sys-apps/net-tools)

This will give you the status of the ethernet link -- link speed, autonegotiation enabled, complete, capabilities, etc.

For the NIC connected to the cable modem, it should match whatever the modem says it is capable of (10baseT-[HD|FD] or whatever).    

Check this on both machines (fast and slow).  

You can also usually get the NIC speed setting from 

```
dmesg | grep eth
```

If the autonegotiation is failing, you'll need to force it to whatever speed the cable modem can handle (as you've said the fast machine has only a 10Mbps NIC, match the settings of the slow machine to those on the fast).

----------

## defenderBG

why don't u use wireshark (before ethereal) to check what kind of error u get?

----------

