25.02.2013 Views

TCP/IP Tutorial and Technical Overview - IBM Redbooks

TCP/IP Tutorial and Technical Overview - IBM Redbooks

TCP/IP Tutorial and Technical Overview - IBM Redbooks

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

If the client workstation initiating the registry<br />

receives no defense packets, it is assumed that<br />

its name has been successfully registered.<br />

p-node name registration This method occurs much in the same manner<br />

as b-node registration. However, instead of<br />

broadcasting the name registration packet on<br />

UDP port 137, the client workstation unicasts the<br />

packet directly to a NetBIOS Name Server<br />

(NBNS). If the requested name has already<br />

been registered with the NBNS, a negative reply<br />

is returned to the client. Otherwise, a positive<br />

reply indicates the acceptance of the name<br />

registration.<br />

One other service offered by the Name Service is the name query. Much like<br />

DNS, this allows clients to query NetBIOS for the <strong>IP</strong> address of another computer<br />

in the network. To use this service, a client workstation builds a name query<br />

request, which is sent on UDP port 137. Again, there are two methods for this.<br />

The b-node method broadcasts the packet <strong>and</strong> waits for a response from the<br />

workstation that owns the name. In the p-node method, the workstation sends<br />

the request directly to a NBNS server.<br />

Session Service<br />

RFC 1001 indicates that NetBIOS should provide reliable sessions. It also<br />

indicates that message exchanges should be fully-duplexed <strong>and</strong> sequenced.<br />

Therefore, the Session Service offered by NetBIOS mimics the <strong>TCP</strong> architecture<br />

(see 4.3, “Transmission Control Protocol (<strong>TCP</strong>)” on page 149). The Session<br />

Service uses <strong>TCP</strong> port 139 to achieve this <strong>and</strong> includes the following network<br />

primitives, all of which can be compared to socket API calls (see 11.2.1, “The<br />

socket API” on page 410):<br />

call Creates a NetBIOS session. This is similar to the connect()<br />

socket API call.<br />

listen Awaits a call comm<strong>and</strong> from another host. This is similar to the<br />

listen() socket API call.<br />

send Sends a message over a NetBIOS session. This is similar to the<br />

sendmsg() socket API call.<br />

receive Receives a message over a NetBIOS session. This is similar to<br />

the recvmsg() socket API call.<br />

hang up Terminates a session. This is similar to the close() socket API<br />

call.<br />

Chapter 14. File-related protocols 549

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!