[jcifs] Re: SMB URL
Steve Langasek
vorlon at netexpress.net
Fri Sep 14 09:50:09 GMT 2001
On Fri, 14 Sep 2001, Christopher R. Hertel wrote:
> I outlined my best effort in another message. Luke, you replied with:
> > > Note, by the way, that the decision to use port 139 or port 445 is made
> > > based on whether or not we detect NBT. Now that I think of it,
> > > there is no reason to try both ports *if* we go to the trouble of
> > > discovering NBT by sending queries.
> > yes there is.
> > samba may be running on both ports, is resolved via a WINS
> > server but not via DNS. going to 445 will save a round-trip.
> > a dual-mode NT4/NT5-domain server may not be accessible /
> > correctly configured to be reached via DNS but is accessible
> > via Broadcast-mode NetBIOS, but again, it's still running
> > both 139 and 445.
> If these servers are running both SMB/NBT and CIFS/TCP then it doesn't
> matter which transport we use, or to which port we connect.
What happens if a single server has processes listening on both port 139 and
port 445, but the services provided on each port are different? This is
entirely possible with a solution built on Samba. Do you include the port
number in the URL in order to disambiguate?
> The point I was trying to make, however, is that one possible mechanism
> for figuring out how to resolve "smb://name/" or "cifs://name/" is to
> determine whether the remote system is running NBT at all. If it is,
> then use SMB/NBT semantics and defaults. If not, then use CIFS/TCP
> semantics and defaults.
In the above case, will this work if the crazy admin is running SMB/NBT on
port 445?
Steve Langasek
postmodern programmer
More information about the samba-technical
mailing list