Lesson 2: SPX and NCP
Like TCP/IP, NetWare's IPX protocol suite includes multiple protocols at the transport layer, which provide varying levels of service. Interestingly, the transport layer protocol most frequently associated with IPX, called the Sequenced Packet Exchange (SPX) protocol, is actually far less frequently used than the NetWare Core Protocol (NCP).
- Describe the services provided by the SPX and NCP protocols
- Identify the functions of the SPX and NCP header fields
SPX is NetWare's connection-oriented protocol. It provides many of the same services as TCP, including packet acknowledgment and flow control. Compared to TCP, however, SPX is rarely used. NetWare servers use SPX for communication between print queues, print servers, and printers; and for specialized applications that require its services, such as Rconsole.
SPX messages are carried within IPX datagrams using the message format illustrated in Figure 7.8.
Figure 7.8 The SPX message format
The functions of the SPX message fields are as follows.
- Connection Control (1 byte) This field contains a code that identifies the message as performing a certain control function, such as End of Message or Acknowledgment Required.
- Datastream Type (1 byte) This field identifies the type of information found in the Data field or contains a code used during the connection termination sequence.
- Source Connection ID (2 bytes) This field contains the number used by the transmitting system to identify the current connection.
- Destination Connection ID (2 bytes) This field contains the number used by the receiving system to identify the current connection.
- Sequence Number (2 bytes) This field specifies the location of this message in the sequence.
- Acknowledgment Number (2 bytes) This field contains the Sequence Number value that the system expects to find in the next packet it receives, thus acknowledging the successful receipt of all of the previous packets.
- Allocation Number (2 bytes) This field specifies the number of packet receive buffers that are available on the transmitting system.
- Data (variable) This field contains the information generated by an application or upper layer protocol.
NCP is responsible for all of the file-sharing traffic generated by NetWare clients and servers, and also has a number of other functions. As a result, NCP is far more commonly used than is SPX. The large number of network functions that use NCP make it difficult to pinpoint the protocol's place in the OSI reference model. File transfers between clients and servers place the protocol firmly in the transport layer, but NetWare clients also use NCP messages to log in to the Novell Directory Services (NDS) tree, which is a session layer function. In addition, there are other presentation and application layer services that NCP provides. However, for all of these services, NCP messages are carried within IPX datagrams, which affirms its dominant presence at the transport layer.
Unlike SPX and the TCP/IP transport layer protocols, NCP uses different formats for client request and server reply messages. In addition, there is another form of NCP message called the NetWare Core Packet Burst (NCPB) protocol, which enables systems to transmit multiple messages with only a single acknowledgment. NCPB was developed relatively recently to address a shortcoming of NCP, which requires an individual acknowledgment message for each data packet.
The NCP request message format is illustrated in Figure 7.9.
Figure 7.9 The NCP Request message format
The NCP Request message fields perform the following functions:
- Request Type (2 bytes) This field specifies the basic type of request performed by the message, using codes that represent the following functions: Create a Service Connection, File Server Request, Connection Destroy, and Burst Mode Protocol Packet.
- Sequence Number (1 byte) This field contains a value that indicates this message's place in the current NCP sequence.
- Connection Number Low (1 byte) This field contains the number of the client's connection to the NetWare server.
- Task Number (1 byte) This field contains a unique value that the connected systems use to associate requests with replies.
- Connection Number High (1 byte) This field is unused.
- Function (1 byte) This field specifies the exact function of the message.
- Subfunction (1 byte) This field further describes the function of the message.
- Subfunction Length (2 bytes) This field specifies the length of the Data field.
- Data (variable) This field contains information that the server will need to process the request, such as a file location.
NOTE
The NCP request format has three fields that describe the function of the message, which may seem redundant, but there are over 200 combinations of function and subfunction codes, covering virtually all of the services provided by NetWare servers.
The NCP message reply format is illustrated in Figure 7.10.
Figure 7.10 The NCP Reply message format
The functions of the NCP Reply message fields are as follows:
- Reply/Response Type (2 bytes) This field specifies the type of reply in the message, using codes that represent the following functions: File Server Reply, Burst Mode Protocol, and Positive Acknowledgment.
- Sequence Number (1 byte) This field contains a value that indicates this message's place in the current NCP sequence.
- Connection Number Low (1 byte) This field contains the number of the client's connection to the NetWare server.
- Task Number (1 byte) This field contains a unique value that the connected systems use to associate requests with replies.
- Connection Number High (1 byte) This field is unused.
- Completion Code (1 byte) This field indicates whether or not the request associated with this reply has been successfully completed.
- Connection Status (1 byte) This field indicates whether the connection between the client and the server is still active.
- Data (variable) This field contains information sent by the server in response to the request.