From owner-freebsd-hackers Fri Dec 15 3:51: 2 2000 From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 15 03:51:00 2000 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from ringworld.nanolink.com (ringworld.nanolink.com [195.24.48.189]) by hub.freebsd.org (Postfix) with SMTP id E86E737B400 for ; Fri, 15 Dec 2000 03:50:54 -0800 (PST) Received: (qmail 18365 invoked by uid 1000); 15 Dec 2000 11:50:00 -0000 Date: Fri, 15 Dec 2000 13:50:00 +0200 From: Peter Pentchev To: Jamie Heckford Cc: David Malone , freebsd-hackers@freebsd.org Subject: Re: Why does lpd cause a lot of DNS traffic? Message-ID: <20001215134959.D7799@ringworld.oblivion.bg> Mail-Followup-To: Jamie Heckford , David Malone , freebsd-hackers@freebsd.org References: <20001215105104.A73285@walton.maths.tcd.ie> <0012151100330S.01649@freefire.psi-domain.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <0012151100330S.01649@freefire.psi-domain.co.uk>; from heckfordj@psi-domain.co.uk on Fri, Dec 15, 2000 at 10:57:43AM +0000 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, Dec 15, 2000 at 10:57:43AM +0000, Jamie Heckford wrote: > On Fri, 15 Dec 2000, you wrote: > > On Fri, Dec 15, 2000 at 10:54:43AM +0100, Konrad Heuer wrote: > > > For a heavily loaded printer server (as mine is) this seems not be a good > > > idea ... but maybe there's a good reason to to this? > > > > I presume this is so that you can list machine aliases in the > > hosts.lpd file, and to avoid issues with machines that may have > > more than one interface. One solution would be to run a caching > > name server on the print server and point resolv.conf at 127.0.0.1. > > > > You could also manually add them to /etc/hosts - but this will be a bit tedious > when you have a lot of machines. Maybe list IP addresses in /etc/hosts.lpd > instead of hostnames? This could cause alot of reverse lookups though. Adding hosts.lpd hosts to /etc/hosts could easily be automated; something like: while read host; do echo `gh -a $host` $host; done < /etc/hosts.lpd using the gh resolver query tool from the net/ghtool port; add '>> /etc/hosts' to the end, then do a sort on /etc/hosts and scan for duplicates.. Something like: awk '{print $1}' /etc/hosts | sort | uniq -c | \ egrep -v '^[[:space:]]+1[[:space:]]' ..could do the trick :) G'luck, Peter -- This sentence contradicts itself - or rather - well, no, actually it doesn't! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message