4 Protocol Examples
Consider two computers, PRINTSERVER (a print server) and WORKSTATION (a user's desktop). WORKSTATION has only one network interface card, which is on a physical network that is remote to PRINTSERVER, accessible by way of TCP/IP.
Figure 1: Name management protocol flow diagram
Example 1. The message server on WORKSTATION, during boot, registers the NetBIOS name "WORKSTATION " with its sole LANA. The component that caused the name to be registered did so by using the NetrMessageNameAdd method of the name management protocol. The flow of this protocol is illustrated in Figure 1.
Example 2. A user "ALICE" logs on to WORKSTATION. The message server on WORKSTATION registers the NetBIOS name "ALICE " with the LANA. The component that caused the name to be registered did so by using the NetrMessageNameAdd method of the name management protocol. The flow of this protocol is illustrated in Figure 1.
Figure 2: Message sending protocol diagram
Example 3. Subsequently, Alice uses some program to print a document. Through means unrelated to this example, the print job is delivered to the print server. On finishing its work, the print server needs to notify Alice. The print server must select among the three protocols available to it for message delivery. Because mailslots and SMB use broadcast mechanisms, and, therefore, are suitable only for machines in the same collision domain, the print server selects the NetrSendMessage method of the message-sending protocol.
The print server constructs the message, setting To to Alice's NetBIOS name, From to its own NetBIOS name, and Text to the text Print Job Completed. The print server invokes the NetrSendMessage method that delivers the message to the message service on Alice's machine. The message service causes the text of the message to display on the console. The flow of this protocol is illustrated in Figure 2.