# Slow Internet connection under Gentoo (normal under Windows)

## kirikou

Hello!

I have a problem using my home's internet connection. I can connect, get an IP by DHCP, but the speed is awfuly slow (using wired or wireless connection).

The problem is that the speed is "normal" under Windows, but slow under Gentoo. 

The speed of my connection is download = 3500 Kbit/s, upload = 300 Kbit/s.

I really don't know from where the problem can come...

The wireless is protected by a filter based on MAC address.

Do you have any idea ?

Thanks a lot!

P.S.: I posted no configuration files, because I really don't know which one could be interesting for this topic. But if some are needed, I'll post them! Thanks!

----------

## UberLord

What's the MTU of the interface?

----------

## kirikou

The MTU of both interfaces (the wireless and the wired one) are 1500.

----------

## UberLord

Post the output of route -n

----------

## kirikou

The interface used (eth0) is the wired one.

route -n

```
Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0

127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo

0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 eth0
```

----------

## UberLord

OK, I have no more ideas  :Sad: 

Sometimes you can get network slowdowns when you have two interfaces on the same subnet with the same metric, but you don't seem to have that.

----------

## kirikou

 :Sad: 

Anyway, thanks for your help!

I found a topic similar saying that to correct this problem, I have to disable IPV6.

What do you think about this solution ?

If it sounds good, how can I do it ?

Thanks!!!

----------

## mrbig4545

Yeh that is a good ideda, i had similar problems with a friends kubuntu machine, and disabling ip6 helped loads. Add this line to /ect/modules.d/aliases, that should disable ip6.

```

alias net-pf-10 off      # IPv6

```

----------

## kirikou

I've added this line and rebooted, but it doesn't seem to change a lot.

Do you think that removing all IPV6 support in the kernel and doing a 

```
USE="-ipv6" emerge -uavDN world
```

 could help ?

----------

## UberLord

If you don't actually use ipv6 it sure won't hurt to try!

----------

## kirikou

I remove the ipv6 use flag from /etc/make.conf and rebuild my kernel without all IPV6 support.

Despite the problem remain...  :Sad: 

Any other suggestions?

Anyway, thanks everyone for your help!!

----------

## padoor

how make.conf change can help

i think you have to remake the bzImage with new .config of the kernel  without ipv6 support.

i have not altered any selection in default  for network and others except for alsa and toshib asupport.

actually my gentoo connection is faster than the windows the connected isp same and intel chip e100  eth0

----------

## sschlueter

Do you get any kernel error messages? You could post the output of

```
dmesg | tail
```

----------

## freedomeagle1967

I have a similar problem I have noticed if I am in X using firefox it is awfully slow but on the command line with portage/emerge/rsync and links the speed is very fast  I just have not had time yet to troubleshoot do you see a difference between command line and X???

----------

## padoor

there is no appreciable difference in net speed if X or verbose

the text browser appears to load faster as no images are loaded which take the time.

i usually open 10 windows of opera and 6 windows in firefox

after everything loaded any window is as fasi as other in firefox opera takes a time to connect abt 6 sec

while firefox delays 4 sec to start loading the site

the same sites internet explorer in windows 2000 p start delay is 8 sec firefox even longer in XP pro it is still slower than all these.

i use kde. knemo shows total download speed same both in windows and gentoo in windows i use free netmeter 

i feel the packets recieved are processed faster in gentoo than in windows

----------

## kirikou

Thanks! Here is the output of dmesg | tail. I don't see anything interesting in there...  :Sad: 

dmesg | tail

```
PM: Writing back config space on device 0000:02:00.0 at offset 2 (was 2000000, writing 2000001)

PM: Writing back config space on device 0000:02:00.0 at offset 1 (was 2b00000, writing 2b00106)

PM: Writing back config space on device 0000:02:00.0 at offset b (was 165d14e4, writing 865d1028)

PM: Writing back config space on device 0000:02:00.0 at offset 3 (was 0, writing 2008)

PM: Writing back config space on device 0000:02:00.0 at offset 2 (was 2000000, writing 2000001)

PM: Writing back config space on device 0000:02:00.0 at offset 1 (was 2b00000, writing 2b00106)

agpgart: Found an AGP 2.0 compliant device at 0000:00:00.0.

agpgart: Putting AGP V2 device at 0000:00:00.0 into 4x mode

agpgart: Putting AGP V2 device at 0000:01:00.0 into 4x mode

Hangcheck: hangcheck value past margin!
```

----------

## nano_o

Hi, I've also got the same problem : everyting is slow on gentoo but normal on windows.

I've removed ipv6 everywhere I could but I've noticed that for dns resolution, two queries are still sent (over ipv4) : one of type A and the other of type AAAA, which times out.

Does anyone know how to eliminate this behaviour (AAAA queries) ?

Thanks

----------

## mrbig4545

Do you have iptables setup, and if so can you post the output of iptables-save

----------

## nano_o

I don't have iptables setup, but how could it change something ?

----------

## mrbig4545

Don't know really, it was just a thought,    :Rolling Eyes: 

----------

## xbmodder

Post your entire dmesg

----------

## wrc1944

I guess this is still on topic, but what other network protocols can be turned off, for a simple home desktop ipv4 cable ethernet connection? I've been reading about ipv6 degrading performance on certain systems and conditions for a while now.  I guess I'm questioning why we have the ipv6 USE flag enabled by default on a Gentoo installation. I never really thought about it much before now.

I mean, why have all those unneeded modules loaded, even if they don't affect performance? I would assume everything but ipv4 and maybe Unix can be turned off?  Is X.25 still in use, and needed?  The X.25 Wiki says:  *Quote:*   

> X.25 remains in use for certain applications and for some marginal transmission media performance conditions. Its major application is in transaction processing for credit card authorization and for automatic teller machines.

 

```
Here's what is in my etc/modules.d/aliases file:

# Uncomment the network protocols you don't want loaded:

# alias net-pf-1 off      # Unix

# alias net-pf-2 off      # IPv4

# alias net-pf-3 off      # Amateur Radio AX.25

# alias net-pf-4 off      # IPX

# alias net-pf-5 off      # DDP / appletalk

# alias net-pf-6 off      # Amateur Radio NET/ROM

# alias net-pf-9 off      # X.25

# alias net-pf-10 off      # IPv6

# alias net-pf-11 off      # ROSE / Amateur Radio X.25 PLP

# alias net-pf-19 off      # Acorn Econet
```

 Anybody see anything wrong with turning ipv6 and some of these other modules off, and doing an emerge -uDN world?  I did a USE="-ipv6" emerge -upDN world, and got 30 packages to be remerged- quite frankly I expected more- some of them I can't understand why they need to be built with ipv6 support in the first place. 

```
gentoo wrc # USE="-ipv6" emerge -upvDN world

These are the packages that would be merged, in order:

Calculating world dependencies... done!

[ebuild   R   ] sys-apps/tcp-wrappers-7.6-r8  USE="-ipv6*" 0 kB

[ebuild   R   ] dev-libs/apr-0.9.12  USE="-ipv6* -urandom" 1,025 kB

[ebuild   R   ] net-misc/iputils-20070202  USE="-doc -ipv6* -static" 0 kB

[ebuild   R   ] net-misc/rsync-2.6.9-r4  USE="acl -ipv6* -static -xinetd" 0 kB

[ebuild   R   ] media-gfx/sane-backends-1.0.18-r5  USE="-gphoto2 -ipv6* -usb -v4l" 0 kB

[ebuild   R   ] app-admin/syslog-ng-2.0.5  USE="tcpd -hardened -ipv6* (-selinux) -spoof-source -static" 0 kB

[ebuild   R   ] net-misc/wget-1.10.2  USE="nls ssl -build -debug -ipv6* -socks5 -static" 0 kB

[ebuild   R   ] x11-libs/libX11-1.1.3  USE="-debug -ipv6* -xcb" 0 kB

[ebuild   R   ] x11-libs/libICE-1.0.4  USE="-debug -ipv6*" 0 kB

[ebuild   R   ] net-nds/openldap-2.3.39  USE="berkdb* crypt gdbm perl readline ssl tcpd -debug -ipv6* -kerberos -minimal -odbc -overlays -samba -sasl (-selinux) -slp -smbkrb5passwd" 0 kB

[ebuild   R   ] dev-libs/apr-1.2.11  USE="-debug -doc -ipv6* -urandom" 0 kB

[ebuild   R   ] sys-process/psmisc-22.5-r2  USE="X nls -ipv6* (-selinux)" 0 kB

[ebuild   R   ] x11-libs/libSM-1.0.3  USE="-debug -ipv6*" 0 kB

[ebuild   R   ] net-misc/curl-7.17.1_pre20071013  USE="ldap ssl -ares -gnutls -idn -ipv6* -kerberos -nss -test" 0 kB

[ebuild   R   ] x11-libs/libXfont-1.3.1  USE="-debug -ipv6*" 0 kB

[ebuild   R   ] x11-libs/libXmu-1.0.3  USE="-debug -ipv6*" 290 kB

[ebuild   R   ] x11-apps/xauth-1.0.2  USE="-debug -ipv6*" 108 kB

[ebuild   R   ] x11-apps/xhost-1.0.2  USE="-debug -ipv6*" 0 kB

[ebuild   R   ] dev-lang/python-2.5.1-r3  USE="berkdb gdbm ncurses readline ssl -bootstrap -build -doc -examples -ipv6* -nothreads -sqlite -tk -ucs2" 0 kB

[ebuild   R   ] dev-libs/libxml2-2.6.30  USE="python readline -debug -doc -ipv6* -test" 0 kB

[ebuild   R   ] dev-python/numeric-24.2-r6  USE="-doc -lapack (-debug%)" 0 kB

[ebuild   R   ] net-misc/ntp-4.2.4_p4  USE="caps ssl -debug -ipv6* -openntpd -parse-clocks (-selinux) -zeroconf" 0 kB

[ebuild   R   ] mail-mta/ssmtp-2.61-r2  USE="ssl -ipv6* -mailwrapper -md5sum" 53 kB

[ebuild   R   ] x11-base/xorg-server-1.4-r2  USE="dri hal nptl sdl xorg -3dfx -debug -dmx -ipv6* -kdrive -minimal -xprint" INPUT_DEVICES="evdev keyboard mouse -acecad -aiptek -calcomp -citron -digitaledge -dmc -dynapro -elo2300 -elographics -fpit -hyperpen -jamstudio -joystick -magellan -microtouch -mutouch -palmax -penmount -spaceorb -summa -synaptics -tek4957 -ur98 -vmmouse -void -wacom" VIDEO_CARDS="fbdev radeon vesa vga -amd -apm -ark -chips -cirrus -cyrix -dummy -epson -glint -i128 -i740 -i810 (-impact) -imstt -mach64 -mga -neomagic (-newport) -nsc -nv -nvidia -r128 -rendition -s3 -s3virge -savage -siliconmotion -sis -sisusb (-sunbw2) (-suncg14) (-suncg3) (-suncg6) (-sunffb) (-sunleo) (-suntcx) -tdfx -tga -trident -tseng -v4l -vermilion -via -vmware -voodoo -xgi" 0 kB

[ebuild   R   ] x11-libs/qt-3.3.8-r4  USE="cups gif opengl -debug -doc -examples -firebird -immqt -immqt-bc -ipv6* -mysql -nas -nis -odbc -postgres -sqlite -xinerama" 0 kB

[ebuild   R   ] x11-libs/gtk+-2.12.1  USE="X cups jpeg tiff -debug -doc -vim-syntax% -xinerama" 0 kB

[ebuild   R   ] app-text/ghostscript-esp-8.15.4  USE="X cups gtk xml -cjk -djvu -threads (-emacs%)" 0 kB

[ebuild   R   ] media-libs/xine-lib-1.1.8  USE="X alsa dvd gtk mad nls opengl sdl truetype vorbis win32codecs xv -a52 -aac -aalib (-altivec) -arts -debug -directfb -dts -dxr3 -esd -fbcon -flac -gnome -imagemagick -ipv6* -jack -libcaca -mmap -mng -modplug -musepack -oss -pulseaudio -real -samba -speex -theora -v4l -vcd -vidix -wavpack -xcb -xinerama -xvmc" 0 kB

[ebuild   R   ] media-video/mplayer-1.0_rc2  USE="3dnow 3dnowext X alsa dvd encode gif gtk iconv jpeg mad mmx mmxext mp3 opengl png quicktime sdl sse truetype unicode vorbis win32codecs xv -a52 -aac -aalib (-altivec) -amrnb -amrwb -arts -bidi -bindist -bl -cddb -cdio -cdparanoia -cpudetection -custom-cflags -debug -dga -directfb -doc -dts -dv -dvb -enca -esd -fbcon -ftp -ggi -ipv6* -ivtv -jack -joystick -lame -libcaca -lirc -live -livecd -lzo -md5sum -mp2 -musepack -nas -nemesi -openal -oss -pnm -pvr -radio -rar -real -rtc -samba -speex -srt -sse2 -ssse3 -svga -teletext -tga -theora -tivo -v4l -v4l2 -vidix -x264 -xanim -xinerama -xvid -xvmc -zoran" VIDEO_CARDS="vesa -mga -s3virge -tdfx" 0 kB

[ebuild   R   ] gnome-base/gnome-vfs-2.20.0  USE="hal ssl -avahi -debug -doc -gnutls -ipv6* -samba" 0 kB

Total: 30 packages (30 reinstalls), Size of downloads: 1,474 kB

gentoo wrc #                                                    
```

----------

## MalleRIM

compiling the kernel without ipv6 solved it for me! I'm so glad to have a fast responding FF now. I don't need ipv6 so I'm going to emerge world with USE="-ipv6". But what If I needed it? at least sometimes?

----------

## madchaz

What's in your /etc/resolve.conf?

Make sure only your router is listed or change to your ISP's dns server.

----------

## Bigun

I know this is an old thread but did anyone find a resolution, I'm having the same issue.

----------

## Bigun

I got my issue resolved by removing IPv6 support from the kernel.

----------

## selig

From the net protocols, I am disabling everything except Unix and IPv4.

----------

## hvengel

So am I and I have not been able to find anything that works.  Most stuff running form a command line is very fast but firefox is a dog.

----------

