I have a Caldera V3.1.1 workstation that prints via Samba to a Windows 98
workstation (it has a Windows shared printer on it). It takes a long time to
print if I disconnect my router from the internet. But if my router is
connected to the internet everything is instantaneous! Is this a name
resolution problem causing a timeout, that then gets resolved by an internet
name server??
My Linux workstation is running software that is never intended to use the
internet, so I don't want any names resolved (by the way, I'm just guessing
that it's a name resolution problem). I did have a problem where every login
on the Linux box took a long time, so I put the Linux box's computer name
and static IP address into the /etc/hosts file, and voila - the problem
disappeared. But now I have this printing delay problem. Could it also be
trying to resolve some sort of DNS name? If so, how could I find out what
that name is? How can I tell this Linux box that it is not supposed to
resolve any names - instead, it should just happily work as a standalone
machine that occasionally talks to Windows printers.
Thanks in advance,
Tom Edelbrok
Tom Edelbrok wrote:
In a way, yes...
You should always do this, yes - numerous services on a *nix box need at
least the ability to know their own name on the "network", even if the
machine has no NIC and the "network" consists of that one machine.
Can you say "X Windows"?
Maybe...
Hmmmokay, I always hope to avoid this, but here we go:
The protocol Samba uses to communicate with Windoze is called SMB, and
uses the Netbios name resolution scheme, which consists mostly of dumb
broadcasts but with the optional ability for a WINS server.
Windoze 9x et al never act as WINS servers, so they will always
broadcast for a Netbios name of the Linux client if it wants to print.
It will broadcast for a lot of stuff, so this will take time.
Now - here is where it gets tricky - dependent on various settings
throughout your magickal Windoze box, it will also try to resolve the
name of the Linux box through DNS, or try to contact a Windows WINS server.
This sucks (this is the short version).
To avoid all this, you can either:
- Run a WINS server on the Linux box, but this means that it will have
to be running for the Windoze box to permanently use it as its WINS
server, or you can
- dictate the order in which these options are exhausted, and only use
LMHOSTS on both sides;
You can set this in Windoze in the "file & printer sharing" crapplet,
and then just add the IP and name of the Linux box in the LMHOSTS file.
That should solve most of it.
The netbios name Samba uses to advertise itself to a Windoze network is
by default the same as the hostname (you can change it if you want).
I would always try to arrange things the other way around, really.
Less pain in the head overall.
For a real answer (be warned that you might not *like* the real answer!)
go to www.samba.org and read the documents about how these protocols and
name resolution issues work:
- SMB / NetBIOS / WINS protocols
- interaction between LMHOSTS, WINS and DNS on both the Windows and
Linux side
They have tons of info.
--
Jeroen Geilman
Analog bits courtesy of adaptr.