smbclient server name resolution

Roeland M.J. Meyer rmeyer at
Mon Nov 24 09:32:25 GMT 1997

At 15:56 24-11-97 +1100, you wrote:
>Hello.  I have been looking at smbclient source code and it seems to use
>gethostbyname first to try to resolve a server name and then tries WINS.
>In a dial-in-to-the-ISP situation where the ISP runs the DNS, this may be
>a "gotcha" - particularly as we want to use DHCP for PCs and want to print
>to a printer attached to one of those PCs with smbclient.
>Am I reading this correctly?  Has anyone made this combination work
>without dialing the ISP for every print job?
>-- David Bullock				
>   Loftus Computing Services
>   davidb at

You know, this keeps coming up. Why are folks so scared of running
secondary DNS servers? It is *exactly* for the reasons outlined herein that
you'd want to have a secondary DNS, at least one, within every sub-net
which is isolated by low-speed/high-cost connections. Even when the
subnet-subnet connection is via LAN, each subnet should have a server
running a secondary DNS, at the minimum.

It takes all of 10 minutes to setup a named.boot file, and run named, on
your samba server. If such a machine were to be a local forwarder then you
could build up a pretty large cache and prevent unnecessary modem connects,
from named queries. You'd also speed up local DNS lookups immensly.

I run DNS on each Linux server, as a performance booster, just to minimize
that machines LAN traffic. In my case, I am modem-connected, but I run my
own primary DNS and two local secondary DNS. Lookups, for machines within
my class C, are blazing fast. Lookups, for machines which are in my
forwarder's cache, are almost as fast. Lookup, for machines which I've
never queried before, are measured in seconds. My LAN is 10base2, thin-net.
For this reason, I also "prime the pump" the all the TLD zone information,
from the InterNIC. I refresh these files at the same time as my root.cache,
which is about once per quarter.

Even if your ISP is controlling your DNS, a practice that I do *not*
recommend, for business,  not technical, reasons, it would still behoove
you to run a local secondary DNS. There are no security issues.

Samba wouldn't be the only beneficiary of this performance improvement.
Just about every other machine, in the same sub-net, will improve due to
faster, local, lookups. 

Morgan Hill Software Company, Inc.
Colorado Springs, CO - Livermore, CA - Morgan Hill, CA
Domain Administrator (MHSC2-DOM)
Administrative and Technical contact
InterNIC Id:	MHSC hostmaster (HM239-ORG)
e-mail:		mailto:hostmaster at
web -pages:

More information about the samba mailing list