[jcifs] port usage explaination

Michael B Allen mba2000 at ioplex.com
Tue Sep 19 00:34:47 GMT 2006

On Mon, 18 Sep 2006 14:42:20 -0400
dhillenb at lexmark.com wrote:

> Could anyone explain the port usage for 
> jcifs.smb.client.lport (139)  and jcifs.netbios.lport(?)  ?   trying to 
> figure out which ones to override and what the effect is if the defaults 
> are not used.

SMB is a TCP filesystem protocol. NetBIOS in this case refers to the
UDP name service protocol. So because the two protocols are different we
create separate sockets to handle that communication. The lport properties
specify which local port the socket should be bound to. Normally the host
system chooses a random port as the local port is usually inconsequential
in socket communication. In general there is no need to use these
properties at all. They probably shouldn't even be listed in the

The laddr properties on the other hand are more useful. They control
the interface the transport will be bound to which may be required for
successful communication on a host with multiple network interfaces.


Michael B Allen
PHP Active Directory SSO

More information about the jcifs mailing list