Slow FTP with BSD 5.0

Started by
13 comments, last by Monder 20 years, 8 months ago
I got it. Its not going to hosts by default, it's going to DNS then HOSTS. So its still trying the DNS lookups before hitting your custom host entries.


I believe that FreeBSD 5.0 added nsswitch, but to be honest, I work mainly in larger environments, so I haven't not had DNS in a long, long time. But, with nsswitch you can tell it to do files first, then DNS.

I did a locate and found on my FreeBSD 5.1 boxes the nsswitch.conf in /usr/compat/linux/etc/nsswitch.conf.

I also opened it and its already configured for files then dns.

You can see this with the line: "hosts: files nisplus nis dns" Since you're using hosts, this should immediately increase the logins to the usual instant speeds =). You should also maybe adjust this hosts line to put dns before nis and nisplus since you probably aren't using either in your network to make sure any other resolutions happen in due process.

"hosts: files dns nisplus nis"

I also did a short test for you (I'm a nice guy today) and it looks like all you need to do is copy it over to get your resolution. (I added host entry over my DNS entry and it gave me the new host entry, not my old DNS).

So, to fix your problem, make sure your /etc/hosts has mappings for your clients like we said before, then just do a simple copy:

cp /usr/compat/linux/etc/nsswitch.conf /etc/nsswitch.conf

It should work right away. Looks like they just default to DNS then FILES when the nsswitch.conf isn't placed in /etc.

The other option is to run a DNS resolver locally, but that's too much work in my mind for 2-3 computers.

Interim.

[edited by - Interim on July 29, 2003 2:39:59 PM]
Advertisement
Well I''ve done that and everything is now working nice and fast. Thanks for all your help . Though I''m not sure if it was the DNS stuff after all now because I rebooted my box and manually started up the ftp daemon and it took ages for it start up etc, so I reackon it was just the time it took for the ftp daemon to start up causing the delay in the first place. Thanks anyway though
No problem. I still think its the name resolution. The slow start up of FTP might have been from failing to resolve its own name in prompt time (DNS retries, then HOSTS). Never did much heavy FTP administration.

Plus, what you describe is classic Unix network service issues, particularly noticeable with FTP =).

G''luck!

Int.
i was under the impression it was 192.168.0.0/8
No. It''s 16 actually. Most subnet it to 24.

10.0.0.0/8
172.16.0.0/12
192.168.0.0/16

Interim

FYI RFC1918

http://www.cis.ohio-state.edu/cgi-bin/rfc/rfc1918.html

This topic is closed to new replies.

Advertisement