FW: IP-resolve issues.

Christopher R. Hertel crh at nts.umn.edu
Thu Jan 4 05:20:23 GMT 2001

> > In any case... If you are trying to connect to the server using only an 
> > IP address, then the client will not know the server's NetBIOS name.  In 
> > that case, it will try connecting to the "*SMBSERVER" name, but W/9x does 
> > not support this special name (95 doesn't, not sure about 98).
> So its a flaw in the server.
> The solution can only be a smarter client.

Not exactly.  The protocol was not designed to use raw IPs.

> > As a result, you will get a "Called Name Not Present" error, 
> > or similar.
> > Instead, do this:
> > 
> > nmblookup -U <ip address> -S \* | fgrep "<20>" | awk '{ print $1 }'
> > 
> > That will return the name you want.
> > 
> > Chris -)-----
> It returns the expected name in my test setup.
> But its not exactly what i wanted. The problem
> still persists. smbmount will not be able to 
> resolve the server, neither by name nor by IP.
> the IP is never accepted and the server will
> not get resolved any later point in time.
> still the *only* way for me is to enter that ip
> and name pair into /etc/hosts in order to give a hint.

Ah.  I missed that in the first message.

Yes, smbmount does *not* handle NetBIOS name resolution so the only way 
to "fix" the problem is to use a DNS name.  Adding the name to your 
/etc/hosts file or to the reverse map in your DNS is the only solution 
for smbmount.

> i expected mount/mount.smbfs to perform a similar
> lookup itself when it detects described scenario.
> since the serving machine can be uniquely identified, 
> the requested action should be doable as far as i can see.

In fact, I worked with someone on the AmigaSamba list recently.  There is
a SMB filesystem for Amiga (based on different code, not Linux SMBFS), 
and we added NetBIOS name resolution.  By handing the NetBIOS name to the 
mount command (which is extensible on the Amiga) you can get both the IP 
address and the NetBIOS name of the server.  You need both in order to 
connect to a server that does not support the "*SMBSERVER" name.  I think 
that Windows/NT4, Samba, and W2K are the only systems that support this, 
though 98 and Me might -- haven't checked.

> (If i use Win2k i can do it exactly this way,
> i.e. with explorer address line:
>   enter \\ip\share_name -> 
>   instant access to specified resource
> I do not need an extra lookup for NMB name
> and no local patch for the DNS resolve system.)

It's either connecting to the *SMBSERVER name or doing a reverse NetBIOS 
lookup.  I'd have to see traces to know which.

Chris -)-----

Christopher R. Hertel -)-----                   University of Minnesota
crh at nts.umn.edu              Networking and Telecommunications Services

    Ideals are like stars; you will not succeed in touching them
    with your hands...you choose them as your guides, and following
    them you will reach your destiny.  --Carl Schultz

More information about the samba-technical mailing list