does smb respond differently to incoming requests on port 445 and port 139?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

does smb respond differently to incoming requests on port 445 and port 139?

John L.Utz III-2
Hello;

Heretofore, i had assumed that samba didnt care if a client connected via 139 or 445.

However, i've just read some documentation that indicates that a windows client would prefer to connect via 445.

So, that calls my assumption into question, so it seemed appropriate to ask you guys.


Does smb behave differently for callers at the two different ports?

If so, what pathologies might i experience on a samba server that has incoming connections blocked on port 445?

tnx!

johnu
Reply | Threaded
Open this post in threaded view
|

Re: does smb respond differently to incoming requests on port 445 and port 139?

Gerald Carter-4
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

John L.Utz III wrote:
| Hello;
|
| Heretofore, i had assumed that samba didnt care
| if a client connected via 139 or 445.
|
| However, i've just read some documentation
| that indicates that a windows client would
| prefer to connect via 445.

port 445 connections avoid the overhead of the
netbios layer.  That's pretty much it.





cheers, jerry
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD4DBQFDfTDoIR7qMdg1EfYRAsawAJiN8LD6a5F49+uJyiDYoIz83Ep3AJ0WW2pK
9X7W0OXMgGJniwx12Ruxtw==
=wrup
-----END PGP SIGNATURE-----
Reply | Threaded
Open this post in threaded view
|

Re: does smb respond differently to incoming requests on port 445 and port 139?

John L.Utz III-2
TNx Gerry!



At Thu, 17 Nov 2005 19:39:52 -0600,
Gerald (Jerry) Carter wrote:

>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> John L.Utz III wrote:
> | Hello;
> |
> | Heretofore, i had assumed that samba didnt care
> | if a client connected via 139 or 445.
> |
> | However, i've just read some documentation
> | that indicates that a windows client would
> | prefer to connect via 445.
>
> port 445 connections avoid the overhead of the
> netbios layer.  That's pretty much it.
>
>
>
>
>
> cheers, jerry
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.0 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
>
> iD4DBQFDfTDoIR7qMdg1EfYRAsawAJiN8LD6a5F49+uJyiDYoIz83Ep3AJ0WW2pK
> 9X7W0OXMgGJniwx12Ruxtw==
> =wrup
> -----END PGP SIGNATURE-----
Reply | Threaded
Open this post in threaded view
|

Re: does smb respond differently to incoming requests on port 445 and port 139?

Gerald Carter-4
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

John L.Utz III wrote:
| TNx Gerry!

You might also want to read section 2.1.2 at
http://ubiqx.org/cifs/SMB.html







cheers, jerry
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDfUZIIR7qMdg1EfYRAuR8AJ9mU/CvoseuM2ACmqXNdnsEkBsoEgCdEZYd
lGPsVokXoY8mikazGxmq0ow=
=YOFx
-----END PGP SIGNATURE-----
Reply | Threaded
Open this post in threaded view
|

Re: does smb respond differently to incoming requests on port 445 and port 139?

Christopher R. Hertel
In reply to this post by John L.Utz III-2
On Thu, Nov 17, 2005 at 05:49:58PM -0800, John L.Utz III wrote:

> TNx Gerry!
>
>
>
> At Thu, 17 Nov 2005 19:39:52 -0600,
> Gerald (Jerry) Carter wrote:
> >
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > John L.Utz III wrote:
> > | Hello;
> > |
> > | Heretofore, i had assumed that samba didnt care
> > | if a client connected via 139 or 445.
> > |
> > | However, i've just read some documentation
> > | that indicates that a windows client would
> > | prefer to connect via 445.
> >
> > port 445 connections avoid the overhead of the
> > netbios layer.  That's pretty much it.

That overhead consists of only two packets:  The NBT Session Request &
Response.

Samba is flexible in this regard.  It will accept this exchange on either
port.  It's also perfectly happy to ignore this exchange on either port.

Windows systems I've tested generally require the NBT Session Request on
port 139 and fail to respond at all to an NBT Session Request on port 445
(causing the client to timeout).

The only other overhead would be in service location and name resolution,
but there is equivalent overhead when using naked transport (port 445) so
I think it's a wash.

Other than the timeout problem, the overhead of those two packets is
trivial.

:)

Chridz -)-----

--
"Implementing CIFS - the Common Internet FileSystem" ISBN: 013047116X
Samba Team -- http://www.samba.org/     -)-----   Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/   -)-----   ubiqx development, uninq.
ubiqx Team -- http://www.ubiqx.org/     -)-----   [hidden email]
OnLineBook -- http://ubiqx.org/cifs/    -)-----   [hidden email]