Ever since the last beta of Karmic Koala I’ve had problems with the dreaded slow lookup or resolving of hostnames. From various sources I gathered that the problem was being caused by ipv6 being enabled by default in Ubuntu.
For FireFox I was able to “fix” this by just disabling ipv6 in the configuration. This however prevented me from accessing localhost through FireFox (something I need quite often) and it didn’t fix the same problems I was having with SSH connections (which is heavily used by our Git setup). I never got around to finding the root cause until I installed the latest beta of Ubuntu, Lucid Lynx and I fixed the problem once and for all!
Disabling IPV6
Enabling IPV6 by default is perhaps a good move by the guys at Canonical. We’re running out of IPV4 addresses and the migration to IPV6 seems to take ages. The problem is however that certain parts of my network setup, or perhaps even those of my ISP (still not sure where the problems with ipv6 originate) simply slow down to the point where it becomes unusable. So, to disable IPV6 for Ubuntu completely:
Edit /etc/default/grub and add ipv6.disable=1 to the GRUB_CMDLINE_LINUX variable:
GRUB_CMDLINE_LINUX="ipv6.disable=1"
Be sure to regenerate your grub configuration by running grub-update2:
sudo update-grub2
After restarting you should confirm using your browser that access to sites that previously caused problems should now be fast again. You might however still experience problems with outgoing SSH connections.
SSH Connections
After completing the steps above I was hoping for a fast Git experience again, but unfortunately Git (using SSH as the transport mechanism) was still taking up to 10 seconds just to open a connection to our git server.
Trying to open the connection using ssh only (in verbose mode) displayed warnings about an authentication method, GSSAPI, for which our network probably isn’t correctly configured.
Interestingly enough there’s a bugreport about this problem as well. It started way back in 2007, and the last reply was late last year! From the bugreport I gather the problem might be caused by a DNS/resolving issue, so disabling GSSAPI in SSH might not be the best approach, but it worked for me.
To disable it just comment out the line “GSSAPIAuthentication yes” in your /etc/ssh/ssh_config file (and make sure it doesn’t occur elsewhere in the file).
Use at your own risk
Disabling IPV6 and GSSAPI worked perfectly for me, but disabling it probably has consequences! Use and apply at your own risk. Hope it does prevent you from tracking down weird system settings and googling for hours in a row!













Trackbacks /
Pingbacks