[CentOS] No Network = slow ??

Thu Apr 17 18:08:09 UTC 2008
Florin Andrei <florin at andrei.myip.org>

Michael A. Peters wrote:
> I lost my internet connection earlier today.
> My home network was still up - it's just the router couldn't get an IP 
> from the cable modem.
> 
> During that period, my CentOS 5.1 install was extremely slow (2.6 GHz 
> Athlon w/ 2GB ram) at starting non network applications - such as 
> solitare and gnome terminal. It would pause for several seconds before 
> finally starting them.

I've seen this issue showing up every once in a while for many years. It 
is _always_ due to DNS.

Just make sure that, even when offline, the system can still resolve 
things such as localhost, its own IP address, stuff like that. You can 
definitely find, always, what the problem is, by running a sniffer, a 
tracer/debugger, etc. It's just that it's time-consuming to troubleshoot 
due to the very nature of the problem - it takes a long time to elicit 
any kind of response from the system.

Make sure DNS is properly configured, test beforehand by pulling the 
network cable (so that network failure will not catch you unawares) and 
everything should then be fine.

I've been hit by this issue so many times that now I'm really obsessed 
with correct network and DNS settings. In the long run it's the good 
kind of obsession.

Tip: if the system is multihomed, and the DNS resolution for the 
external interface depends on a remote DNS server, do not configure the 
external interface as primary (do not assign the system hostname the 
same as the hostname for that interface).
Instead, assign it the hostname corresponding to the internal interface, 
which is always under your control, and for whom the DNS never goes 
offline (since it's local). Then just juggle with Apache, Postfix, etc. 
settings if these services need to run primarily on the external interface.
I can't explain this better in a short paragraph, but I'm sure there's 
plenty of people who've been there and arrived to the same conclusion: 
Anything remote is unreliable, so don't depend on it for local settings.

-- 
Florin Andrei

http://florin.myip.org/