LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Slowdown when net connection is not available (https://www.linuxquestions.org/questions/linux-networking-3/slowdown-when-net-connection-is-not-available-137785/)

RTT 01-23-2004 08:56 AM

Slowdown when net connection is not available
 
Hi people :)

My network consists of an 8 port combined router & switch, which has 5 windows machines, 2 slackware linux boxes and one WAP (for 2 laptops) connected to it.

My problem is this - when there is no internet connection to the routed WAN port, logging into my linux boxes is dramatically slows down. For example, SSHing or FTPing will take 30 seconds to authenticate me, where as if there is a connection to the internet present it is instantaneous.

Is this perhaps something to do with DNS? :confused: The slackware boxes get all the DNS, gateway and IPs given to them from the DHCP server on the router.

Any help much appreciated, even if there is no fix and just an explanation :D

-Rich

palmercabel 01-23-2004 10:06 AM

Rich, I'm curious to see if logging in to both boxes slows down consistently when the internet connections is down. It would also be interesting to see if the slowdown is consistent across all of the machines trying to log in. Is it slow to login from the console of each machine or does it only affect logins over-the-wire ?

Do you have a local DNS server ? If so, does it forward ? It may help to see your resolv.conf, named.conf, and the zone file which contains the A record for the machine(s) you are trying to login to.

RTT 01-23-2004 01:19 PM

Hi :)

It only happens over-the-wire, and is consistent over all the machines, be it from a laptop or workstation.

I don't have a local DNS server. I edit the hosts file in all the machines, both winblows and linux.

resolv.conf is as follows:
Code:

nameserver xxx.xxx.xxx.xxx
nameserver xxx.xxx.xxx.xxx
search

I thought i'd best explain 'what happens' a bit better too. Say for example i'm logging in via SSH using putty to 'bash (192.168.0.9)' using PuTTY from a windows box.
The window opens instantaneously for the 'login as:' prompt, as does the password prompt, but from then on it takes about maybe 30s to get to a usable prompt. Eg:
Code:

Login as: []
Sent username xxx
xxx@bash's password:
#
# long wait...
#
xxx@bash:~$

FTP is much the same, the machine is found instantly, but the point from authenticated to loading a directory listing takes ~30s. Eg:
Code:

Resolving host name bash...
Connecting to (bash) ->  IP: 192.168.0.9 PORT: 21
Connected to (bash) -> Time = 0ms
Socket connected waiting for login sequence....

Then comes the wait!

RTT 01-24-2004 02:26 PM

I fixed the 'problem'. Turns out it was DNS as I thought it was. I was looking through my sshd_config file and saw an option to disable DNS lookups. I deemed this safe to disable since neither of the boxes are accessible from the internet, only from LAN. So now connecting via SSH is nice and quick even when there's no net connection available!

Secondly, FTP. There is no option to disable the same thing in my proftpd.conf file, so instead I added my machine into the /etc/hosts file, which sorted that out :) Why I hadn't done this before I don't really know!

I guess I could re-enable DNS lookups on SSHD though, cos the entry is now in the hosts file!

I'm probably talking to myself here, but I thought i'd post how I fixed it anyway incase someone has the same problem and tries to search for an answer :)

-rich


All times are GMT -5. The time now is 02:05 AM.