Discussion:
SMB directly hosted on TCP
Ville Herva
2003-12-01 17:17:47 UTC
Permalink
(My apologies if this has already been brought up -- I did try to search
the archive.)

http://support.microsoft.com/support/kb/articles/Q204/2/79.ASP

"Windows 2000 supports file and printer sharing traffic by using the
Server Message Block (SMB) protocol directly hosted on TCP. This differs
from earlier operating systems, in which SMB traffic requires the NetBIOS
over TCP (NBT) protocol to work on a TCP/IP transport. Removing the
NetBIOS transport has several advantages, including:

o Simplifying the transport of SMB traffic.

o Removing WINS and NetBIOS broadcast as a means of name
resolution.

o Standardizing name resolution on DNS for file and printer
sharing.

If both the direct hosted and NBT interfaces are enabled, both methods are
tried at the same time and the first to respond is used. This allows
Windows 2000 to function properly with operating systems that do not
support direct hosting of SMB traffic. "

(...)

"NetBIOS over TCP traditionally uses the following ports:

nbname 137/UDP
nbname 137/TCP
nbdatagram 138/UDP
nbsession 139/TCP

Direct hosted "NetBIOS-less" SMB traffic uses port 445 (TCP and UDP). In
this situation, a four-byte header precedes the SMB traffic. The first
byte of this header is always 0x00, and the next three bytes are the
length of the remaining data. You can use the following steps to disable
NetBIOS over TCP/IP, forcing all SMB traffic to be direct hosted. "

This actually sounds quite good. It could in fact reduce overhead and
improve performance. What do you think?

Would it make sense/be feasible to support this on Samba?

(I'm not subscribed, so I'd appreciate CC'ing me -- I will, however, read
the archive.)


-- v --

***@iki.fi
Gerald Carter
2003-12-01 17:17:47 UTC
Permalink
Post by Ville Herva
Direct hosted "NetBIOS-less" SMB traffic uses port 445
(TCP and UDP). In this situation, a four-byte header
precedes the SMB traffic. The first byte of this header
is always 0x00, and the next three bytes are the length
of the remaining data. You can use the following steps
to disable NetBIOS over TCP/IP, forcing all SMB traffic
to be direct hosted. "
This actually sounds quite good. It could in fact
reduce overhead and improve performance. What do you think?
Would it make sense/be feasible to support this on Samba?
The code to do this has been written in development
branches for a while. We will try to being it over
some time in the near future. Most certainly this
will happen after we get 2.2.0 out the door.

btw...you loose the virtual server functionality in
Samba with netbios-less CIFS as there is no called name
in the TCP session request. :-(






-- Cheers, jerry
----------------------------------------------------------------------
/\ Gerald (Jerry) Carter Professional Services
\/ http://www.valinux.com/ VA Linux Systems ***@valinux.com
http://www.samba.org/ SAMBA Team ***@samba.org
http://www.plainjoe.org/ ***@plainjoe.org

"...a hundred billion castaways looking for a home."
- Sting "Message in a Bottle" ( 1979 )
Ville Herva
2003-12-01 17:17:47 UTC
Permalink
Post by Gerald Carter
Post by Ville Herva
Direct hosted "NetBIOS-less" SMB traffic uses port 445
(TCP and UDP). In this situation, a four-byte header
precedes the SMB traffic. The first byte of this header
is always 0x00, and the next three bytes are the length
of the remaining data. You can use the following steps
to disable NetBIOS over TCP/IP, forcing all SMB traffic
to be direct hosted. "
This actually sounds quite good. It could in fact
reduce overhead and improve performance. What do you think?
Would it make sense/be feasible to support this on Samba?
The code to do this has been written in development
branches for a while. We will try to being it over
some time in the near future. Most certainly this
will happen after we get 2.2.0 out the door.
Nice!

Have you idea whether that really affects the performance? I've seen SMB
(NetBios on TCP) have problems on non-standard environments. For example,
when I run smb over ssh port forwarding, the perfomance drops to one
fourth of the bandwidth, while other protocols (ftp, http) have no
problem. Also SMB does not exactly seem to be the fastest protocol on
Earth on 100Mbit ethernet media either ... ;).

Perhaps dropping the NetBios on TCP legacy could remedy some of this?
Post by Gerald Carter
btw...you loose the virtual server functionality in
Samba with netbios-less CIFS as there is no called name
in the TCP session request. :-(
Perhaps that's worth it if we get somewhat better performance and can
forget about all this wins/broadcast/nameresolution stuff.


-- v --

***@iki.fi
Gerald Carter
2003-12-01 17:17:48 UTC
Permalink
Post by Ville Herva
Have you idea whether that really affects the performance?
I've seen SMB (NetBios on TCP) have problems on
non-standard environments. For example, when I run smb
over ssh port forwarding, the perfomance drops to one
fourth of the bandwidth, while other protocols (ftp,
http) have no problem. Also SMB does not exactly seem to
be the fastest protocol on Earth on 100Mbit ethernet
media either ... ;).
Perhaps dropping the NetBios on TCP legacy could
remedy some of this?
I have never seen any benchmarks on performance for this.
Post by Ville Herva
Post by Gerald Carter
btw...you loose the virtual server functionality in
Samba with netbios-less CIFS as there is no called name
in the TCP session request. :-(
Perhaps that's worth it if we get somewhat better
performance and can forget about all this
wins/broadcast/nameresolution stuff.
Few people I know of can ditch netbios anytime soon
as they all still have some non-win2k clients/servers
around.





Cheers, jerry
----------------------------------------------------------------------
/\ Gerald (Jerry) Carter Professional Services
\/ http://www.valinux.com/ VA Linux Systems ***@valinux.com
http://www.samba.org/ SAMBA Team ***@samba.org
http://www.plainjoe.org/ ***@plainjoe.org

"...a hundred billion castaways looking for a home."
- Sting "Message in a Bottle" ( 1979 )

Loading...