FW: IP-resolve issues.
Christopher R. Hertel
crh at nts.umn.edu
Thu Jan 4 17:33:06 GMT 2001
> Giving both a name and an ip should work where the name can't be looked
> % mount -t smbfs -o username=bla,ip=22.214.171.124 //server/share_name
> (where server is the netbios name, not the dns name, of 126.96.36.199)
> This should be the same for smbclient.
Yes, this works for smbclient.
> It would be nice if this worked too, but I don't know if it does:
> % mount -t smbfs -o username=bla,ip=elviriabridge.mercuryin.es //server/share_name
Urban: Can Linux SMBFS do a NetBIOS name lookup? That is, can you perform
the mount operation without specifying the IP. I have not worked
with SMBFS (to my own shame and horror) so I don't honestly know.
> And it would of course be nice if the ip number could be used as server
> name alone and smbmount (and smbclient?) would try to find the netbios
> name (which it apparently could for you using nmblookup).
Yes. If the server does not respond to "*SMBSERVER" (the generic name
introduced with NT4, I believe) then you could, if you have only the IP,
send an Adapter Status request to retrieve the name list. Then search for
the #20 name and you've got your server name. I think I've seen some
flavor of Windows do this, but I'm not sure.
> And if the server name given wasn't a netbios name it could be looked up
> in the DNS and then looked up again for the netbios name (and now we
> connect this query to the thread on what exactly the rules are for a
> netbios name ... :)
If smbmount needs to be kept small and simple, I can help put together
simple code that does the lookup I'm talking about. Only one problem:
some versions of Windows/95 have a bug that causes them to send the status
query reply to port udp/137 rather than the original source port. That
means that some W/95 boxes will not be 'visible' using the method I
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