The IPX Protocol

Novell adapted IPX from the Xerox* Network System (XNS*) Internet Datagram Protocol (IDP). IPX is a connectionless datagram protocol. Connectionless means that when a process running on a particular node uses IPX to communicate with a process on another node, no connection between the two nodes is established. Thus, IPX packets are addressed and sent to their destinations, but there is no guarantee or verification of successful delivery. Any packet acknowledgment or connection control is provided by protocols above IPX, such as SPX. Datagram means that each packet is treated as an individual entity, having no logical or sequential relation to any other packet.

As shown in Figure 1-1, IPX operates at the OSI Network layer. As a Network-layer protocol, IPX addresses and routes packets from one location to another on an IPX internetwork. IPX bases its routing decisions on the address fields in its header and on the information it receives from RIP or NLSP. IPX uses this information to forward packets to their destination node or to the next router providing a path to the destination node.


IPX Packet Structure

The IPX packet is similar to an XNS IDP packet and comprises two parts:

The minimum IPX packet size---excluding the MAC header---is 30 bytes (IPX header only). Historically, the maximum size of routed IPX packets has been 576 bytes (IPX header and data). Until recently, all routed IPX packets were between 30 and 576 bytes. However, the IPX protocol has always allowed packet sizes up to 65,535 bytes.

NOTE: Media constraints typically limit the actual maximum packet size allowed to something less than 65,535 bytes. Ethernet II packets, for example, are limited to a data size of 1,500 bytes, not including the MAC header.

The IPX header is placed after the MAC header and before the data. Figure 1-2 shows the structure of an IPX packet.

Figure 1-2.
IPX Packet Structure

The following describes the IPX packet fields:


IPX Addressing

IPX defines its own internetwork and intranode addressing. For intranetwork (node) addressing, IPX uses the physical address assigned to the network interface board.

The IPX network address uniquely identifies an IPX server on an IPX network and individual processes within the server. A complete IPX network address is a 12-byte hexadecimal number comprising the following components:

The following is an example of a complete IPX network address:

FEDCBA98 1A2B3C5D7E9F 0453

Each number in an IPX address is contained in a field in the IPX header and represents a source or destination network, node, or socket. The network number is used only for Network-layer operations, namely routing. The node number is used for local, or same-segment, packet transmission. The socket number directs a packet to a process operating within a node.

Each address component is described in the following sections.


Network Number

The IPX network number is the 4-byte hexadecimal address that serves as the basis for IPX packet routing. Each network segment on an internetwork is assigned a unique network number. NetWare routers use this number to forward packets to their final destination network.

An IPX network number can contain up to eight digits, including zeros. (Leading zeros are usually not displayed.) For example, 0xFEDCBA98, 0x1234567D, and 0xC7 are all valid network numbers.

With the fast setup feature available from NIASCFG, Novell Internet Access Server 4.1 can automatically detect the network number and data-link frame type used on an IPX network. After you configure a board and select a driver during the initial router configuration, the router sends a RIP all routes request packet to the network. From the responses it receives, the router determines the network number and frame type it needs to use.


Reserved Network Numbers

The destination network of an IPX packet is typically an IPX network to which a unique network number has been assigned. However, three network numbers---0x0, 0xFFFFFFFF, and 0xFFFFFFFE---are reserved and cannot be used to identify a specific network. These numbers have the following meanings:

With Novell Internet Access Server 4.1, a router that receives an IPX packet with an unknown destination network can do one of two things: If another router on the network is advertising 0xFFFFFFFE, the router forwards the packet to that router. If 0xFFFFFFFE is not advertised on the network, the packet's destination remains unknown and the router discards the packet.

Both RIP and NLSP have been modified to recognize 0xFFFFFFFE as the default route. On a RIP network, the default route is typically advertised by a RIP router that connects the LAN to a larger network infrastructure, such as a corporate backbone or transit LAN.

Novell Internet Access Server 4.1 cannot advertise the default route dynamically, but you can configure the router to advertise it as a static route. To read about static routes, refer to "Static Routes and Services.”


Internal Network Number

NetWare 3TM servers and NetWare 4 servers have an additional identifier called an internal network number. This is a unique hexadecimal number between one and eight digits that is assigned to the server at installation. The internal network is a logical network that NetWare uses to advertise services and route IPX packets to the physical networks attached to the server.

The internal network number overcomes some routing and connectivity limitations inherent in NetWare 2. These are summarized in the following paragraphs.

A NetWare 2 server selects a primary interface and advertises its services as reachable through that interface. On a network with more than one server, packets might travel an extra hop to reach their destination.

A NetWare 2 server loses network connectivity if its primary network interface board fails, even if the server has Network-layer connectivity through another interface. Consider a NetWare 2 server with connections to two networks. The server advertises its services through the primary interface attached to one of the networks. If that interface fails, workstations attached to the server through the second network might not be able to log in to the server.


Node Number

The node number is the 6-byte hexadecimal address that identifies a device on an IPX network. This device can be a file server, router, workstation, or printer. The node number is identical to the physical address assigned to the interface board that connects the device to the network.

The IPX header contains a Destination Node field and a Source Node field. These fields contain the same destination and source node addresses found in the MAC header. A NetWare workstation, for example, uses the destination node address to locate and forward packets to another workstation on the same network segment.

IPX requires the node number to be unique only within the same IPX network. For example, a node on network FEDCBA98 can use the number 1A2B3C5D7E9F, and a node on network 1234567D can also use the number 1A2B3C5D7E9F. Because each node has a different network number, IPX recognizes each node as having a legitimate, unique address.


Socket Number

The socket number is the 2-byte hexadecimal number that identifies the ultimate destination of an IPX packet within the node. This destination is actually a process---such as routing (RIP) or advertising (SAP)---that operates within the node. Because several processes are typically operating at any given time, socket numbers provide a type of "mail slot" by which each process can identify itself to IPX.

A process that must communicate on the network requests that a socket number be assigned to it. Any packets that IPX receives that are addressed to that socket are passed to the process. Socket numbers provide a quick method of routing packets within a node.

Table 1-2 lists some socket numbers and processes used in the NetWare environment.


Table 1-2. NetWare Socket Numbers and Processes

Socket Number

Process

0x451

NCP

0x452

SAP

0x453

RIP

0x455

Novell NetBIOS

0x456

Diagnostics

0x9001

NLSP

0x9004

IPXWANTM protocol

(For information about IPXWAN, refer to "IPX Operation over WAN Links.”)

Socket numbers between 0x4000 and 0x7FFF are dynamic sockets; these are used by workstations to communicate with file servers and other network devices. Socket numbers between 0x8000 and 0xFFFF are well-known sockets; these are assigned by Novell to specific processes. For example, 0x9001 is the socket number that identifies NLSP. Software developers writing NetWare applications can contact Novell to reserve well-known sockets.


How IPX Routing Works

NetWare routers interconnect different IPX network segments and receive instructions for addressing and routing packets between these segments from the IPX protocol. IPX accomplishes these and other Network-layer tasks with the help of RIP, SAP, and NLSP.


When a Workstation Sends an IPX Packet

Consider a NetWare workstation that wants to send data to another workstation. If both workstations share the same network number (both are on the same segment), the sending workstation addresses and sends packets directly to the destination workstation's physical address. If the two workstations have different network numbers (each is on a different segment), the sending workstation must first find a router on its own segment that can forward packets to the segment on which the destination workstation resides.

To find this router, the sending workstation broadcasts a RIP packet requesting the fastest route to the destination segment. The router on the sending segment with the shortest path to the destination segment responds to the request. In its response, the router includes its own network and node address in the IPX header.

NOTE: If the sending node is a router instead of a workstation, the router does not need to broadcast a RIP request to obtain this information; the router obtains the information from its internal routing table.

When the sending workstation knows the router node address, it addresses and sends packets to the destination workstation as follows:

  1. The sending workstation places the destination node IPX network address---network, node, and socket numbers---in the corresponding destination fields of the IPX header.
  2. The sending workstation places its own IPX network address---network, node, and socket numbers---in the corresponding source fields of the IPX header. The sending workstation also fills out all other fields in the header.
  3. The sending workstation places the node address of the router that responded to the RIP request in the Destination Address field of the MAC header.
  4. The sending workstation places its own node address in the Source Address field of the MAC header.
  5. The sending workstation sends the packet.


When a Router Receives an IPX Packet

When a router receives an IPX packet, it performs the following tasks:

  1. The router checks the Transport Control field of the IPX packet header.

    A RIP router discards the packet if the value in this field is greater than 16.

    An NLSP router discards the packet if the value in this field is greater than the value of the Hop Count Limit parameter.

  2. The router checks the IPX header Packet Type field.

    Note that if the packet type is 20 (0x14, NetBIOS), the packet is handled as follows:

    1. The router examines the Transport Control field of the IPX header. If this value is 8 or greater, the router discards the packet. (Propagation of a NetBIOS packet is limited to eight networks.)
    2. The router compares each network number entry in the packet to the network number of the segment on which the router received the packet.

      If the router finds a match, it discards the packet to prevent multiple traversals of the same network segment. If the router finds no match, it performs the next step.

    3. The router places the address of the network segment from which the packet arrived in the next available Network Number field.
    4. The router increments the Transport Control field of the IPX header and broadcasts the packet to all directly connected network segments that are not represented in the Network Number fields.
  3. The router checks the IPX header Destination Address fields---network, node, and socket numbers---to determine how to route the packet.

    If the packet is addressed to the router, the appropriate socket process handles it internally; otherwise, the router forwards the packet.

    NOTE: Packets that must be handled internally are those addressed directly to the router and those broadcast (destination node = 0xFFFFFFFFFFFF) to any network segment to which the router is directly connected. Usually, only RIP, SAP, and diagnostic packets fall into this category.


When a Router Forwards an IPX Packet

When forwarding packets, the router can take one of two possible actions. If the packet is destined for a network number to which the router is directly connected, the router performs the following tasks:

  1. The router places the destination node address from the IPX header in the Destination Address field of the MAC header.
  2. The router places its own node address in the Source Address field of the MAC header.
  3. The router increments the Transport Control field of the IPX header and forwards the packet to the destination node segment.

    IMPORTANT: If the Transport Control field equals the maximum allowed hop count before the field is incremented, the router discards the packet. For RIP routers, the hop count limit is 16; for NLSP routers, this limit can be set to any number between 8 and 127.

    Note also that broadcast packets are never rebroadcast onto the network segment from which they are received.

If the router is not directly connected to the segment on which the final destination node resides, it sends the packet to the next router in the path to the destination node, as follows:

  1. The router places the node address of the next router in the Destination Address field of the MAC header.

    The router gets this information from its Routing Information Table.

  2. The router places its own node address in the Source Address field of the MAC header.
  3. The router increments the Transport Control field in the IPX header and forwards the packet to the next router.