Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Dec 2000 13:50:00 +0200
From:      Peter Pentchev <roam@orbitel.bg>
To:        Jamie Heckford <heckfordj@psi-domain.co.uk>
Cc:        David Malone <dwmalone@maths.tcd.ie>, freebsd-hackers@freebsd.org
Subject:   Re: Why does lpd cause a lot of DNS traffic?
Message-ID:  <20001215134959.D7799@ringworld.oblivion.bg>
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 %2B0000
References:  <Pine.BSF.4.21.0012151043130.10436-100000@gwdu60.gwdg.de> <20001215105104.A73285@walton.maths.tcd.ie> <0012151100330S.01649@freefire.psi-domain.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001215134959.D7799>