Method and system for efficient layer 3-layer 7 routing of internet protocol (“IP”) fragments

According to the present invention there is provided to a method and system for efficiently routing IP fragments (i.e., datagrams) at layer 3 through layer 7 of the OSI model without reassembling the fragments. Time-consuming reassembly of fragments of a datagram at higher layers that would be required via conventional methods is avoided, thereby improving processing speed of fragments and utilizing fewer resources for processing fragments of a datagram than would be required during reassembly of the fragments via conventional methods. The method and system route a datagram that has been fragmented into a plurality of fragments utilizing content-based routing information included in one or more fragments of the plurality of fragments, comprising: generating a context for the datagram associated with routing the plurality of fragments of the datagram and setting the context for the datagram to passive until content-based routing information included in the one or more fragments is received; caching received fragments while the context is set to passive; determining a destination for routing the plurality of fragments when content-based routing information included in the one or more fragments is received and setting the context for the datagram to active; and routing any cached fragments and subsequently received fragments of the datagram to the determined destination while the context is active without reassembling the plurality of fragments into the datagram. Additionally, a router and server load balancer incorporating the present invention are provided.

BACKGROUND OF THE INVENTION

1. Technical Field of the Invention

The present invention generally relates to datagram routing. More particularly, the present invention relates to a method and system for efficiently routing Internet Protocol (“IP”) fragments at layer3through layer7of the Open System Interconnection (i.e., “OSI”) hierarchical model without reassembling the fragments.

2. Description of the Prior Art

Computers and communication networks, such as the Internet, provide important advantages to enterprises and individuals in today's society. Moreover, with the advent and ensuing popularity of the World Wide Web (“Web”), there has resulted a tremendous increase in volume and usage of networked computer systems. Networked computer systems, i.e., computer systems connected via communication networks including the Internet, communicate by using protocols, such as for example, TCP/IP (“Transfer Control Protocol/Internet Protocol”), which comprises a collection of protocols used in large-scale mixed-platform packet-switched networks (i.e., Internet). As will be described hereinafter with reference toFIGS. 1 through 3, this collection of protocols transfers and verifies receipt of datagrams (i.e., packets), which include header information for routing the datagrams between a source and a destination, in addition to including a payload, i.e., data, to be transmitted to the destination.

As will be appreciated in one skilled in the art, new network applications, such as server load-balancing applications, fire walls and more generally any content-based or class-of-service based routing applications typically execute datagram routing services according to a layered networking framework known as the OSI and more particularly perform routing from layer3(i.e., network layer106) through layer7(i.e., application layer114) of the OSI model, as particularly depicted inFIG. 1. The higher the layer in the OSI model at which content-based routing is performed, the more difficult it is to perform routing because the content-based routing information is located deeper in the datagram (i.e., deep-packet processing).

FIG. 1is a prior art depiction of the Open System Interconnection (i.e., “OSI”) model100that defines a networking framework for implementing protocols in a seven-layer architecture. Each of the seven layers represents a function that is to be performed to effect communications between different computers systems over the communication network, such as the Internet. Furthermore, each layer performs services at the request of the adjacent higher layer and, in turn, requests more basic services from the adjacent lower layer. It should however be noted that most of the functionality in the OSI model exists in all communication systems, although two or three of the OSI layers may be incorporated into one layer depending upon implementation of the communication systems.

Now particularly referring toFIG. 1, the lowest of the seven hierarchical layers in the OSI model is the physical layer102(i.e., layer1). The physical layer102performs services requested by a data link layer104(i.e., layer2), the next layer on the hierarchical OSI model. The major functions and services performed by the physical layer102are: 1) establishment and termination of a connection to a communication medium (e.g., Internet); participation in effectively sharing communication resources among multiple users (e.g., contention resolution and flow control); and 3) conversion between representation of data in user equipment and corresponding data transmitted over communications media. The most notable physical layer interfaces include EIA RS-232 and RS-449. The data link layer104(i.e., layer2) responds to service requests from the network layer106(i.e., layer3) and issues service requests to the physical layer102. Furthermore, the data link layer104provides functional and procedural mechanisms for transferring data between network entities and for detecting and possibly correcting errors that may occur in the physical layer102. The most notable examples of data link protocols are: high-level data link control (“HDLC”) and advanced data communications control procedure (“ADCCP”) for point-to-point or packet-switched networks and logical link control (“LLC”) for local area networks.

Further with reference toFIG. 1, the next layer of the hierarchical OSI model is the network layer106, (i.e., layer3). The network layer106responds to service requests from the transport layer108and issues service requests to the data link layer104. Furthermore, the network layer106provides functional and procedural mechanisms for transferring data from a source to a destination via one or more networks while maintaining the quality of service (“QoS”) requested by the transport layer108. Additionally, the network layer106performs network routing, flow control, segmentation and de-segmentation, and error control functions. The next layer of the OSI model is the transport layer108(i.e., layer4). The transport layer108responds to service requests from the session layer110and issues service requests to the network layer106. The transport layer108provides transparent transfer of the data between the source and the destination (i.e., end-user computer systems), thereby relieving upper layers of the OSI model from any concern regarding reliable and cost-effective data transfer. The transport layer108functions include monitoring of data flow for ensuring proper delivery of data between the source and the destination. Furthermore the transport layer108provides for data correction, data fragmentation and reassembly. The most notable protocol of the transport layer is TCP, which is a main protocol in TCP/IP networks. Whereas the IP protocol deals only with packets, TCP enables two hosts to establish a connection and to exchange streams of data. TCP guarantees delivery of data and also guarantees that packets will be delivered in the same order in which they were sent.

Still further with reference toFIG. 1, the next layer of the hierarchical OSI model is the session layer110, (i.e., layer5). The session layer110responds to service requests from the presentation layer112(i.e., layer6) and issues service requests to the transport layer108. The session layer110provides a mechanism for managing the dialogue between end-user application processes. It provides for either duplex or half-duplex operation and establishes check-pointing, adjournment, termination, and restart procedures. The next layer of the OSI model is the presentation layer112, which responds to service requests from the application layer114and issues service requests to the session layer110. The presentation layer112relieves the application layer of concern regarding syntactical differences in data representation or display within the end-user systems. The most notable example of a presentation layer service would be the conversion of an EBCDIC-coded text file to an ASCII-coded file. The topmost layer of the OSI model is the application layer114(i.e., layer7), which interfaces directly to and performs common application services for the end-user application processes. Furthermore, the application layer114issues requests to the presentation layer112. The common application services provide semantic conversion between associated application processes. The most notable examples of common application services include: virtual file, virtual terminal, and job transfer and manipulation protocols.

FIG. 2is a prior art depiction of an Internet protocol (“IP”) datagram200that illustrates an IP header201and a TCP header203. IP utilizes datagrams (i.e., packets) to communicate over packet-switched networks (e.g., the Internet). The datagram200represents a piece of a message transmitted over the packet-switched networks. The datagram200comprises an IP header201, which includes fields202. . .224and data207. Data207comprises a TCP header203, which includes fields226–248, as well data205. Among other things, the IP header201includes a source address222and destination address224for routing the datagram. Packet switching refers to the foregoing protocols that, among other things, divide a message to be sent into packets for transmission. Each packet is individually transmitted and may follow different routes to the destination address. Once all the packets forming the message arrive at the destination, they are assembled into the original message. It should be noted that IP datagrams are sent without establishment of communication paths or clearing procedures. Thus, there may be no protection against loss, duplication, misdelivery, and the like. Further with reference toFIG. 2, the IP header201includes five 32-bit words, each of which is subdivided into fields, description of which will be made in more detail hereafter. The version field202, which is four bits, indicates a format of the IP header201. The IHL field204(i.e., internal header length), which is four bits, represents the length of the IP header201in 32-bit words. It should be noted that the minimum value for a correct IP header201is five (i.e., five 32-bit words). The type of service field206, which is eight bits, represents an indication of abstract parameters for a quality of service (i.e., “QoS”) to guide selection of actual service parameters when transmitting the datagram200through a particular network over the Internet. The total length field208, which is 16 bits, represents a total length of the datagram200in octets (i.e., an octet is 8 bits in length), including both the IP header201and data length207. It should be noted that data207of the IP datagram200comprises the TCP header203and data205. The identifier field210, which is 16 bits, represents an identifying value assigned by a sender to aid in assembly of fragments of a datagram, which will be described in greater detail hereinafter. The flags field212, which is three bits, represents various control flags directed to fragmentation that is described likewise described in greater detail hereinafter. The fragment offset field214, which is13bits, indicates a position of the datagram200to which a particular fragment belongs. It should be noted that the fragment offset in field214is measured in octets, wherein the fragment offset for a first fragment is zero.

Yet further with regard toFIG. 2, the time to live field216(i.e., “TTL”), which is 8 bits, indicates a maximum time that the datagram200is allowed to remain on the Internet. It should be noted that is the value of field216is measured in seconds and if it reaches zero, the datagram200is destroyed. The protocol field218, which is eight bits, indicates a next level protocol used in the data portion of the datagram, such as TCP protocol described herein below. The header checksum field220, which is 16 bits, represents a checksum only for the IP header201of the datagram200. The checksum220is a simple error-detection scheme in which the datagram200is accompanied by a numerical value based on the number of set bits in the IP header201. It should be noted that since values in various header fields change, the value of field220is recomputed and verified at each point where the IP header201of datagram200is processed. The source address field222and destination address field224, which are 32 bits in length, respectively provide the source and destination addresses for the datagram200.

Still further with reference toFIG. 2, the TCP header201includes six 32-bit words, each of which is subdivided into fields, description of which will be made in more detail hereafter. The source port field226, which is16bits, indicates a source port number. The destination port228, which is likewise16bits, indicates a destination port. In TCP/IP packet-switched networks, the source and destination ports represent endpoint of a logical connection. A port number of80is generally used for HTTP (i.e., HyperText Transfer Protocol) traffic. The sequence number field230indicates a first data octet in a fragment, except that if SYN is present, the sequence number320is ISN+1 (i.e., initial sequence number). The acknowledgement number filed232, which is 16 bits, is used for error correction and generally contains a value of a next sequence number to be received. The data offset filed234, which is 4 bits, represents a number of 32-bit words in the TCP header203. Thus, this number generally indicates where data205of datagram200begins. The reserved field236, which is 6 bits in length, represents bits reserved for future use and is presently set to zero. The flags field238, comprises six control bits, including: 1) urgent pointer field significant (i.e., URG); 2) acknowledgement field significant (i.e., ACK); 3) push function (i.e., PSH); 4) reset the connection (i.e., RST); 5) synchronize sequence numbers (i.e., SYN) and 6) no more data from the sender (i.e., FIN). Window field, which is 16 bits, indicates a number of data octets that the sender of this fragment is willing to accept, beginning with the first octet indicated in the acknowledgement number field230. The TCP checksum field242, which is 16 bits, is used for error detection. The urgent pointer field244which is 16 bits, represents a current value of the urgent pointer as a positive offset from the sequence number field230in this fragment. That is, the urgent pointer points to a sequence number of an octet following urgent data and urgent pointer field244is interpreted only if the URG control bit is set in field238. The options field246is a variable length field that represents options that are available. The options field may or may not appear in the datagram. The padding field248represents padding that ensures that the TCP header203ends on a 32-bit boundary.

FIG. 3is a prior art high-level illustration300of datagram200fragmentation. One of the mechanisms of the Internet Protocol (“IP”) routing is fragmentation and reassembly of datagrams. While being transmitted over the Internet via myriad intermediary packet-switched networks, the contents of datagram200do not change on the way to its destination unless fragmentation occurs. Every physical network of the Internet has its own limitation on the size of data that it may carry, which is indicated by an associated MTU (i.e., maximum transmission unit). Under some circumstances, particularly when a large datagram must travel through a network with a smaller MTU, the datagram must be divided into a plurality of smaller fragments at appropriate places302(i.e., which are also datagrams) within the smaller MTU, such as fragment I301and fragment II303, so that the fragments may travel through the network onto their journey to the destination. This process of division is called fragmentation. Every fragment301and303includes an IP header HD-I304and HD-II310, and each of which respectively carries data308and312that is part of data207of the original datagram200. It should be noted that during fragmentation, only a sequentially first fragment301includes a TCP header field306that receives the TCP header203from datagram200. Conventionally, the IP of the TCP/IP protocol suite, which is generally located at the network layer106of the OSI model ofFIG. 1(i.e., layer3), must accumulate received fragments until enough have arrived to completely reassemble the original datagram200via a process called reassembly. The reassembly processes utilizes the identification field210, flags field212, the source address222and the destination address224, and the protocol field218to identify received fragments for their reassembly into the original datagram200.

More particularly with regard toFIGS. 3, it should be noted that datagram200may be fragmented into a plurality of fragments, which for simplicity are illustrated as two fragments301and303. Content-based routing that today is necessitated by server load-balancing applications, firewalls, and the like, is cumbersome, inefficient and resource intensive with the conventional IP fragmentation and reassembly processes. First, the IP is unable to correctly route fragments of a datagram utilizing content-based routing because all the fragments do not contain the necessary content-based routing information, such as for example the TCP information that is included only in fragment301(i.e., sequentially first fragment). Second, fragments may be disordered when they are received, so that the sequentially first fragment301(or fragment303ofFIG. 4) that contains content-based routing information may be received after the other fragment that do not content-based routing information. Lastly, the last fragment303may disordered when received, so that it may not be received last, thereby affecting reassembly at the IP layer. That is, the last fragment is utilized to ascertain whether all fragments of datagram200have been received based on their respective lengths of data308,312.

FIG. 4is a prior art depiction400of a datagram200fragmented into three fragments. The datagram200comprises an IP header201and data207, which includes a TCP header203, and data205. Data205includes cookie404for content-based routing. In a conventional fragmentation process, the datagram200is fragmented into: fragment I301, which comprises IP header HD-I304, TCP header306, and data308; fragment II303, which comprises IP header HD-II310, data312that includes cookie406(i.e., cookie404of datagram200); and fragment III305, which comprises IP header HD-III408and data410. It is to be noted that the content-based information necessary for content-based routing, in this case cookie404, is located in a sequentially second fragment303.

Today, a solution to the above-identified problems associated with content-based routing in a fragmentation situation is reassembly as described hereinabove. That is, the fragments are first reassembled into the original datagram at a considered layer of the OSI model (i.e., layer3–layer7) ofFIG. 1, so as to enable content-based routing to be performed based on the now available content-based routing information. The layer at which reassembly occurs depends on system implementation. For example, a simple IP router may reassemble at layer3of the OSI model (IP), while a simple server load balancer may reassemble at layer4of the OSI model (TCP). Furthermore, a firewall or any other application implementing a TCP End Point or TCP termination necessarily reassembles at layer4of the OSI model (TCP). However, conventional reassembly at the foregoing layers has many drawbacks. During conventional reassembly, all fragments necessarily must be stored before the original datagram is reassembled, thereby requiring large amount of memory and slowing content-based routing time, which proportionally increases with reassembly time of the original datagram. Additionally, hardware required for reassembly may not have the capacity to perform such storage.

It is therefore highly desirable to enable content-based routing of fragments at layer3through layer7of the OSI model, while avoiding time-consuming and resource-consuming reassembly of the fragments at these layers.

SUMMARY OF THE INVENTION

It is therefore an object of the present invention to provide to a method and system for efficiently routing IP fragments (i.e., datagrams) at layer3through layer7of the OSI model.

It is another an object of the present invention to avoid time-consuming reassembly of fragments of a datagram at higher layers (i.e., layers3–7) that would be required via conventional methods, thereby improving processing speed of fragments.

It is a further object of the present invention to utilize fewer resources for processing fragments of a datagram than would be required during reassembly of the fragments via conventional methods, by reducing the necessity of storing fragments.

Thus according to an embodiment of the present invention, there is provided A method for routing a datagram that has been fragmented into a plurality of fragments utilizing content-based routing information included in one or more fragments of the plurality of fragments, the method comprising: generating a context for the datagram associated with routing the plurality of fragments of the datagram and setting the context for the datagram to passive until content-based routing information included in the one or more fragments is received; caching received fragments while the context is set to passive; determining a destination for routing the plurality of fragments when content-based routing information included in the one or more fragments is received and setting the context for the datagram to active; and routing any cached fragments and subsequently received fragments of the datagram to the determined destination while the content is active without reassembling the plurality of fragments into the datagram.

According to another embodiment of the present invention there is provided a system for routing a datagram that has been fragmented into a plurality of fragments utilizing content-based routing information included in one or more fragments of the plurality of fragments, the system comprising: a receiving mechanism for receiving the plurality of fragments of the datagram; a control mechanism for generating a context for the datagram associated with routing the plurality of fragments of the datagram and setting the context for the datagram to passive until content-based routing information included in the one or more fragments is received; a cache for caching received fragments while the context is set to passive; a routing mechanism for determining a destination for routing the plurality of fragments when content-based routing information included in the one or more fragments is received and setting the context for the datagram to active; and a forwarding mechanism for transmitting any cached fragments and subsequently received fragments of the datagram to the determined driver while the context is active without reassembly of the plurality of fragments into the datagram.

According to yet another embodiment, there is provided a program storage device readable by a machine, tangibly embodying a program of instructions executable by the machine to perform the method steps for routing a datagram that has been fragmented into a plurality of fragments utilizing content-based routing information included in one or more fragments of the plurality of fragments, the method comprising: generating a context for the datagram associated with routing the plurality of fragments of the datagram and setting the context for the datagram to passive until content-based routing information included in the one or more fragments is received; caching received fragments while the context is set to passive; determining a destination for routing the plurality of fragments when content-based routing information included in the one or more fragments is received and setting the context for the datagram to active; and routing any cached fragments and subsequently received fragments of the datagram to the determined destination while the content is active without reassembling the plurality of fragments into the datagram.

According to the present invention, there is provided a router routing a datagram that has been fragmented into a plurality of fragments utilizing content-based routing information included in one or more fragments of the plurality of fragments, the router comprising: a receiving mechanism receiving the plurality of fragments of the datagram; a routing mechanism generating a context for the datagram associated with routing the plurality of fragments of the datagram and setting the context for the datagram to passive until content-based routing information included in the one or more fragments is received, the routing mechanism caching fragments until the context is set to active for routing the cached fragments, the routing mechanism determining a destination port for routing the plurality of fragments from received content-based routing information included in the one or more fragments and setting the context for the datagram to active; and a forwarding mechanism transmitting any cached fragments and subsequently received fragments of the datagram to the determined destination port without reassembly of the plurality of fragments into the datagram.

According to the present invention, there is provided a router for routing a datagram that has been fragmented into a plurality of fragments utilizing content-based routing information included in one or more fragments of the plurality of fragments, the router comprising: a receiving mechanism for receiving the plurality of fragments of the datagram; a control mechanism for generating a context for the datagram associated with routing the plurality of fragments of the datagram and setting the context for the datagram to passive until content-based routing information included in the one or more fragments is received; a cache for caching received fragments while the context is set to passive; a routing mechanism for determining a destination port for routing the plurality of fragments when content-based routing information included in the one or more fragments is received and setting the context for the datagram to active; and a forwarding mechanism for transmitting any cached fragments and subsequently received fragments of the datagram to the determined destination port while the context is active without reassembly of the plurality of fragments into the datagram.

According to the present invention, there is also provided a server load balancer for routing a datagram that has been fragmented into a plurality of fragments utilizing content-based routing information included in one or more fragments of the plurality of fragments, the server load balancer comprising: a receiving mechanism for receiving the plurality of fragments of the datagram; a control mechanism for generating a context for the datagram associated with routing the plurality of fragments of the datagram and setting the context for the datagram to passive until content-based routing information included in the one or more fragments is received; a cache for caching received fragments while the context is set to passive; a routing mechansim for determining a destination device driver for routing the plurality of fragments when content-based routing information included in the one or more fragments is received and setting the context for the datagram to active; and a forwarding mechanism for transmitting any cached fragments and subsequently received fragments of the datagram to the determined destination device driver while the context is active without reassembly of the plurality of fragments into the datagram.

Advantageously, the present invention may be implemented via hardware or software means.

The present invention is directed to a system and method for efficiently routing fragments of a datagram at layer3through layer7of the OSI model (i.e., content-based routing) without reassembling the fragments at these layers.

A main element of the inventive method and system for content-based routing is the maintenance of a context for a fragmented IP datagram. This is preferably accomplished by creating a Packet Cache Control Block (i.e., “PCCB”) for every fragmented IP datagram to be routed at layer3through layer7of the OSI model utilizing content-based information. The PCCB is a software or hardware construct, or a combination thereof, maintained at network nodes that process IP datagrams for performing content-based routing. The network nodes include, but are not limited to, routers at the core or at the edge of a network, server load balancers, and firewalls.FIGS. 5–8provide a description regarding content-based routing of fragments of a fragmented IP datagram by utilizing the PCCB and content-based routing information of a sequentially first fragment according to the present invention. It should be noted that fragments of the fragmented IP datagram are also datagrams, although generally only a sequentially first fragment (i.e., also datagram) includes content-based routing information. As will be described herein below, the method illustrated inFIGS. 5–8of the present invention may be extended to perform content-based routing utilizing content-based information spanning any one or more fragments of the fragmented IP datagram.

FIG. 5is an exemplary flowchart representation500of processing performed upon receipt of a sequentially first IP fragment of a fragmented IP datagram according to the present invention. The processing begins at step502. At step504, an IP datagram is received. At step506, it is determined whether a value for fragment offset (i.e., “FO”) of the received IP datagram, which is illustrated as fragment offset field214ofFIG. 2, represents a beginning of the received IP datagram. If the fragment offset equals zero (i.e., IP.FO=0), the received IP datagram represents a beginning of the datagram, but not necessarily that there has been fragmentation. Otherwise, a non-zero fragment offset represents that there has been fragmentation for the received IP datagram. In either case content-based routing may be performed respectively at step510ofFIG. 5and at step602ofFIG. 6for the foregoing fragment. As aforementioned, the beginning of the datagram generally includes information that is necessary for content-based routing. Generally, content-based routing information may include any field in the IP header201, TCP header203ofFIG. 2. Most commonly, however, content-based routing information of particular interest includes protocol218, source address222, destination address224, source port226and destination port228ofFIG. 2, associated quality of service parameters (i.e., “QoS” parameters) found in the IP header201type of service field206ofFIG. 2. Other content-based routing information of interest in the IP datagram may include Universal Resource Locator (i.e., URL), cookies and the like, which generally are located within data205. The content-based routing information that is obtained from the IP datagram is preferably temporarily read into volatile memory (i.e., random access memory) at the receiving network node, or alternatively, stored in non-volatile memory (i.e., hard disk, and the like). Returning toFIG. 5, at step512, it is determined whether a value of a more fragment (i.e., “MF”) of the received IP datagram, which is a flag included in the flags field212ofFIG. 2, represents that there has been fragmentation of the received IP datagram. If the more fragment flag equals zero (i.e., IP.MF=0), there has been no fragmentation and the IP datagram is forwarded to its destination using content-based routing at step514, i.e., based on contents of the TCP header203of IP datagram200.

However, if at step512, it is determined that the more fragment flag is not equal to zero (i.e., IP.MF!=0), this indicates that there has been fragmentation and the received IP datagram represents a sequentially first fragment. Thus, at step516, the first fragment, which contains relevant content-based information, is forwarded to its destination via ForwardFGT( ) forwarding procedure described with respect toFIG. 7. It should be noted that all fragments of a fragmented IP datagram have the same identification210(i.e., IP.FRID), protocol type218(i.e., IP.PT), source address222(i.e., IP.SA) and destination address224(i.e., IP.DA). Utilizing values of the foregoing fields of the received IP datagram fragment, a search is performed at step520to determine whether a PCCB has been created for the fragmented IP datagram. Conventional or proprietary searching techniques may be utilized to perform this search. It should be noted that a PCCB is preferably created for every fragmented IP datagram.

If at step522, a PCCB with matching values for the foregoing fields is not found, a new PCCB for the fragmented IP datagram is created at step524. At step528, the content-based routing information from the sequentially first fragment (e.g., source address, destination address, source port and destination port, and the like) is utilized as input to a routing function (i.e., described hereinafter with regard toFIG. 10), which determines and sets a destination identifier in the PCCB (i.e., described hereinafter with regard toFIG. 9) for routing of subsequent fragments of the fragmented IP datagram. The destination identifier uniquely identifies a destination to which all fragments of the fragmented IP datagram must be forwarded by a forwarding mechanism (i.e., described hereinafter with regard toFIG. 10). As will be described with reference toFIG. 11 and 12, the destination identifier is dependent on system implementation. The state of the PCCB is set to active (i.e., PCCB.state=Active), which indicates that the packet cache control block is active for content-based routing of subsequent fragments received for the fragmented IP datagram, since content-based routing information has already been obtained from the sequentially first fragment. A place of the PCCB is set to zero (i.e., PCCB.PLC=0) to indicate that a sequentially last fragment has not yet been received. Furthermore, a length of the received IP fragment is ascertained and is copied into the fragment byte counter portion of the FCCB (i.e., FCCB.FBC=IP.len). Yet further, a timer is created and initiated for the PCCB (i.e., PCCB.timer) for identifying how long the fragmented IP datagram is allowed to be on the Internet. Once the foregoing PCCB parameters are set, processing continues at step518by looping back step504to receive the next IP datagram at step504.

However, if at step522a PCCB is found for the received fragment (i.e., sequentially first IP fragment) of the fragmented IP datagram utilizing the foregoing fields, then some fields of the PCCB have to be updated at step526to take account of the content-based routing information included in the received sequentially first IP fragment. More particularly, the content-based routing information from the sequentially first fragment is utilized as input to the routing function (i.e., described hereinafter with reference toFIG. 10), the output of which is a destination identification that is set in the PCCB for content-based routing of subsequent fragments of the fragmented IP datagram. Further, the state of the PCCB is set to active (i.e., PCCB.state=Active). Yet further, the fragment byte counter of the PCCB is updated by aggregating length of the received IP fragment with lengths of fragments received prior to the currently received IP fragment (i.e., PCCB.FBC+=IP.len). That is, the fragment byte counter is incremented by a length of each received fragment (i.e., represented by IP.len). Steps530and516represent a looping structure where all fragments received prior to receiving a sequentially first fragment of the fragmented IP datagram are forwarded to the destination ascertained as a result of content-based routing information of the sequentially first fragment via ForwardFGT( ) procedure that will be described in greater detail with regardFIG. 7hereinafter. It should be noted that all fragments received prior to receiving the sequentially first fragment are stored in a fragment queue of the PCCB (i.e., PCCB.FQ), which is described in greater detail with regard toFIGS. 6 and 9. Once all received fragments are forwarded to their destination (i.e., content-based routing is performed), at step518processing loops back to step504to receive another IP datagram.

Table 1 particularly illustrates a pseudo code representation of the inventive method depicted in the flowchart ofFIG. 5, which illustrates processing performed upon receipt of a sequentially first IP fragment of a fragmented IP datagram according to the present invention.

TABLE 1//assume that a fragment of a fragmented IP datagram has been receivedIf (IP.FO==0) { // beginning of received datagramPerform layer 3-layer 7 content-based routing // obtain DestIDIf (IP.MF==0) { // there is no fragmentationForward the received datagram to its destination}Else {ForwardFGT( ) // forward fragment to destination procedureSearch for PCCB (IP.SA, IP.DA, IP.PT, IP.FRID)If (PCCB not found) {Create PCCB // create a packet cache control blockPCCB.DestID=DestID // set destination identificationPCCB.state=Active // PCCB is active for routingPCCB.PLC=0// last fragment not yet receivedPCCB.FBC=IP.len // set fragment byte counterCreate and start PCCB.timer //timer needed}Else { //PCCB already existsPCCB.DestID=DestID // set destination identificationPCCB.state=ActivePCCB.FBC+=IP.len // get and aggregate bytes in all fragmentsFor all fragments in PCCB.FQ {ForwardFGT() // forward fragment to destination}}}}

FIG. 6is an exemplary flowchart representation600of processing performed upon receipt of a sequentially non-first IP fragment of a fragmented datagram according to the present invention. Initially, with reference to step506ofFIG. 5, if the fragment offset of the received datagram is not zero (i.e., IP.FO!=0), then at step508ofFIG. 5processing continues toFIG. 6at step508. As aforementioned, all fragments of a fragmented IP datagram have the some of the same fields, such as, identification210(i.e., IP.FRID), protocol type218(i.e., IP.PT), source address222(i.e., IP.SA) and destination address224(i.e., IP.DA). Thus, at step602ofFIG. 6a search is conducted utilizing values of the foregoing fields of the received non-first IP fragment for a PCCB for the fragmented IP datagram that includes the received non-first IP fragment. If at step604, the search reveals that a PCCB does has not been created for the fragmented IP datagram, at step606a PCCB is created for the fragmented IP datagram. The state of the PCCB is set to passive (i.e., PCCB.state=Passive) since a sequentially first fragment had not yet been received and hence there is no available content-based routing information. The fragment byte counter is set to zero (i.e., PCCB.FBC=0) since the fragment byte count is computed when the fragments are forwarded to their destination. A timer is then created and initiated (i.e., PCCB.timer) to identify how long the fragmented IP datagram is allowed to be on the Internet. At step614, it is ascertained whether the more fragment flag of the received datagram is equal to zero (i.e., IP.MF=0), which represents that the received fragment is a sequentially last fragment of the fragment IP datagram. If the received datagram is the sequentially last fragment, a total size of the fragmented IP datagram is computed and stored in the place of the PCCB at step620by adding a length of the current fragment to its fragment offset (i.e., PCCB.PLC=IP.FO+IP.len). However, if the more fragment flag is not equal zero, which represents that the received fragment is an intermediate fragment and not the sequentially first or last fragment, the place of the PCCB is set to zero (i.e., PCCB.PLC=0) at step618, and at step622, the received fragment is added to the fragment queue of the PCCB (i.e., PCCB.FQ). It should be noted that all received fragments are queued in the fragment queue of the PCCB until a sequentially first fragment of the fragmented IP datagram is received, since it contains the necessary content-based routing information. At step518, the method loops back to step504ofFIG. 5to receive another IP datagram.

However, if at step604, the search reveals that a PCCB has not been created for the fragmented IP datagram, then at step608the more fragment flag of the received datagram is tested. That is, if the more fragment flag is equal to zero (i.e., IP.MF=0), it represents that the received fragment is a sequentially last fragment of the fragment IP datagram. Thus, since the received fragment is the sequentially last fragment, a total size of the fragmented IP datagram is computed and stored in the place of the PCCB at step612by adding a length of the current fragment to its fragment offset (i.e., PCCB.PLC=IP.FO+IP.len). However, if the more fragment flag at step608is not equal to zero, the flow proceeds to step616, where it is determined whether the state of the PCCB is active (i.e., PCCB.state=Active), which means that a sequentially first fragment of the fragmented IP datagram has been previously received and content-based information required for routing has been stored in the PCCB. Thus, if the state of the PCCB is active, the last fragment is forwarded to its destination. However, if the state of the PCCB is not active (i.e., PCCB.state=Passive), the sequentially first fragment has not been received and the PCCB does not yet have the information necessary for content-based routing. Therefore, the received fragment is stored in fragment queue of the PCCB at step622and processing returns via step518to step504ofFIG. 5.

Table 2 particularly illustrates a pseudo code representation of the inventive method depicted in the flowchart ofFIG. 6, which illustrates processing performed upon receipt of a sequentially non-first IP fragment of a fragmented datagram inFIG. 5according to the present invention.

TABLE 2Else { // not the beginning of received datagramSearch for PCCB (IP.SA, IP.DA, IP.PT, IP.FRID)If (PCCB not found) { // assume a first fragment receivedCreate PCCB // create a packet cache control blockPCCB.state=Passive// PCCB is passive since no destinationparametersPCCB.FBC=0 // fragment byte counter set to zeroCreate and start PCCB.timer // timer neededIf (IP.MF==0) { // it is the last fragment of the fragmented datagramPCCB.PLC=IP.FO+IP.len // total size of fragmented datagram}Else { // this is an intermediary fragmentPCCB.PLC=0 // not the last fragment of the fragmented datagram}Put fragment into PCCB.FQ // store fragment in fragment queue ofPCCB}Else {If (IP.MF==0) { // it is the last fragment of the fragmented datagramPCCB.PLC=IP.FO+IP.len // total size of fragmented datagarm}If (PCCB.state==Active) // sequentially first fragment has beenreceivedForwardFGT() // forward the fragment to destination}Else { // state is not activePut fragment into PCCB.FQ // store fragment in fragment queue}}}

Although content-based routing information is primarily found in the sequentially first fragment of the fragmented IP datagram, the inventive method ofFIGS. 5–8may further be extended for those other cases where content-based information spans any one or more fragments. Such cases may include IP datagrams that are fragmented with their URLs, cookies, and the like spanning one or more fragments of the fragmented IP datagram, as particularly illustrated inFIG. 4. In such cases, block506ofFIG. 5may be replaced with a content-based information received flag (e.g., CBIR flag) that is initially set to false and then set to true upon receiving one or more fragments that completely identify necessary content-based information for the fragmented IP datagram. This flag is preferably a field added to the PCCB900, which is particularly illustrated inFIG. 9. Additionally, a static or a dynamic pointer array may be provided in PCCB900ofFIG. 9, which will store pointers to the one or more fragments stored in the fragments queue908which completely identify the content-based routing information (i.e., keeping track of the fragments which identify the content-based routing information).FIG. 7is an exemplary flowchart representation700of fragment forwarding procedure ForwardFGT( ) according to the present invention. The procedure is invoked at step702from various points depicted inFIGS. 5 and 6for forwarding a received IP fragment to a destination. At step704, the fragment byte counter of the PCCB is updated, i.e., aggregated with the received IP fragment's length (i.e., PCCB.FBC+=IP.len). At step706, it is determined whether all fragments in a fragmented IP datagram have been processed. This is ascertained by testing whether the place of PCCB that is calculated inFIGS. 5 and 6is greater than zero and fragment byte counter of the PCCB is equal to the place of the PCCB (i.e., PCCB.PLC>0 && PCCB.FBC==PCCB.PLC). If all fragments of the fragmented IP datagram have been processed, at step708the timer of the PCCB is stopped and deleted. If however, all fragments have not been processed at step706, then the received fragment is forwarded to its destination at step710. The procedure exits at step712to the point from which it was invoked inFIGS. 5 and 6.

Table 3 particularly illustrates a pseudo code representation of the ForwardFGT( ) procedure depicted in the flowchart ofFIG. 7.

TABLE 3Procedure ForwardFGT() {PCCB.FBC+=IP.len //count bytes in fragment and aggregate into PCCBIf(PCCB.PLC>0 && PCCB.FBC==PCCB.PLC) { // all fragmentsprocessedStop and Delete PCCB.timer // free timer resourcesDelete PCCB // delete packet cache control block resources}Forward fragment to destination // all fragments have not beenprocessed}

FIG. 8is an exemplary flowchart representation800of expired timer procedure TimerExpired( ) according to the present invention. This procedure represents a clean-up process for freeing utilized resources. It is assumed that a system, such as a router, a server load balancer or the like, in which the content-base routing device1000of FIG.10is incorporated, provides timer management functionality, such as timer control block914, which can be invoked by the timer906of PCCB900ofFIG. 9. Upon timer expiration, the timer management functionality invokes TimerExpired( ) procedure ofFIG. 8. Thus, the procedure is invoked by timer management functionality, when the timer expires and it is necessary to destroy the fragments stored in the fragment queue because a sequentially first fragment has not been received before expiration of the timer. The procedure is entered at step802. At steps804and806, a looping sequence is performed in which all fragments that are stored in the fragment queue of the PCCB are discarded to free resources. At step808, the timer of the PCCB is deleted and the PCCB is then deleted, which further frees resources. The procedure exists at step810and returns to step504ofFIG. 5to receive another IP datagram.

Table 4 particularly illustrates a pseudo code representation of the TimerExpired( ) procedure depicted in the flowchartFIG. 8.

FIG. 9represents an exemplary block diagram of a Packet Cache Control Block (i.e., “PCCB”)900according to the present invention. As aforementioned, PCCB900may be a hardware or a software construct, or a combination thereof. The PCCB includes a state flag (i.e., state)902, which is set to “active” when enough fragments of a fragmented IP dtagaram have been received to perform content-based routing, or which is set to “passive” when fragments including necessary content-based routing information have not all been received. The destination identification (i.e., “DestID”)904represents a routing decision (described herein above with respect toFIGS. 11 and 12) to be made at a network node, which processes IP datagrams for performing content-based routing. As aforementioned, the DestID904uniquely identifies a destination to which all fragments of the fragmented IP datagram will be forwarded by a forwarding mechanism914ofFIG. 10. The nature of the destination identifier904is dependent on system implementation of, for example, a router or a server load balancer. Additionally, based on the system implementation, the destination identifier904may be a byte, a word, a complex data structure, a string of characters, a proprietary identifier, or the like. The timer906is responsible for creating and staring a timer control block914upon receipt of a fragment for a fragmented IP datagram. The fragment queue (i.e., “FQ”)908creates a queue control block916for managing fragments of a fragmented IP datagram, if such storage is required according to the present invention. The queue control block916includes first920and last918pointers, pointing respectively to a first fragment922and last fragment930in the FQ908. Each of the fragments922,926, and930includes a next pointer924,928and932for pointing to a subsequent fragment in the fragment queue908. It should be noted that the last fragment in the fragment queue908points to NULL934, which represents that there are no further fragments to be processed.FIG. 9represents the fragment queue908as a standard singly-linked list. However, as one skilled in the art will appreciate, the fragment queue908may be implemented as a doubly-linked list, a simple static or dynamic array, and the like. It is preferable that the received fragments that need to be stored in the fragment queue908are stored in their natural order, i.e., the order in which they are received. This means that any subsequent fragment received is appended to the end of the fragment queue908, and last pointer918of fragment control block916points to such subsequent fragment. Alternatively, a skilled artisan will readily appreciate that, it is possible to extend the processing performed by the fragment queue908by reordering the fragments in the fragment queue908according to their sequential order in the fragmented IP datagram. Although the reordering of fragments within the fragment queue908may utilize more resources (i.e., computational resources) than performing no reordering, reordering may positively affect overall network performance.

Additionally with regard toFIG. 9, processing of received fragments may further easily be improved by adding a mechanism for ensuring that the last fragment is always forwarded last, i.e., in sequential order to the other fragments of the fragment IP datagram. According to the present invention depicted inFIGS. 5–8, the sequentially first fragment is always forwarded first. Forwarding the sequentially last fragment last may be accomplished by providing a separate queue936within the PCCB for the last fragment, or providing a pointer within the PCCB to identify the sequentially last fragment in the fragment queue (i.e., FQ) of the PCCB, so that the last fragment is not forwarded until all other fragments have been received and processed, thereby enabling a full processing of the fragmented IP datagram. This routing order (i.e., sequentially first fragment routed first and sequentially last fragment routed last) is most important because these IP fragments trigger routing or reassembly mechanisms at different nodes on a network, such as routers and server load balancers. Therefore, it is preferable for overall network performance, that the sequentially fist fragment is routed first and the sequentially last fragment is routed last to a destination.

The foregoing inventive system and method of the present invention represent a distinct advantage over the conventional reassembly process. That is, in conventional reassembly, it is necessary to maintain a reassembly queue to a depth of N−1 for storing fragments of any fragmented IP datagram, wherein N represents a number of fragments into which the fragmented IP datagram is divided (i.e., fragmented). That is, the conventional reassembly queue is entirely filled up to N−1 fragments for each fragmented IP datagram, regardless of the order of the fragments, before reassembly is performed. According to the present invention, the fragment queue (i.e., FQ)908of the PCCB900ofFIG. 9is only utilized when necessary. That is, when all fragments are sequentially ordered when received, the fragment queue remains empty, i.e., no storage of fragments is performed, thereby minimizing use of resources and improving efficiency. When on the other hand, a sequentially first fragment is received last, i.e., after all other fragments, the fragment queue filled up to a depth of N−1 fragments. However, even in this case no reassembly is performed, thereby still minimizing resources (i.e., computing resources necessary for reassembly) necessary for content-based routing.

FIG. 10is an exemplary routing device1000for content-based routing of fragments of a datagram according to the present invention. As aforementioned, the routing device1000embodying the present invention may be located at a router at the core or at the edge of a network, a server load balancer, a server, a firewall, and the like. A frame1002that includes an IP datagram is received at layer2of the OSI model1004. Layer21004extracts the IP datagram and forwards it to the layer3through layer7routing mechanism1006, which utilizes a routing function1008according to the inventive method described above with regard toFIG. 5–8to provide content-based routing. In the inventive system as described hereinabove with reference toFIG. 5–8, fragments are not reassembled by the routing function1008, but instead a Packet Cache Control Block is generated and only enough fragments are stored in its fragment queue until content-based routing information is available, from the received one or more fragments of the fragmented IP datagram. Upon receiving a sufficient number of fragments to identify content-based routing information and determining the destination identification904ofFIG. 9, the layer3–layer7routing mechanism1006forwards all stored fragments to the XMT forwarding mechanism1010, which in turn utilizing the destination identification of the PCCB for the fragment IP datagram forwards the fragments to their destination1012.

FIG. 11is an exemplary representation of a router1100including the content-based routing device ofFIG. 10according to the present invention. The router1100has a port Pi1102that physically receives frames1002, which include IP datagrams, from a network (e.g., Internet) and forwards them to the content-based routing device1000. The routing device1000performs content-based routing according to the present invention, as described with reference toFIGS. 5–8and10. The XMT forwarding mechanism1010of the routing device1000forwards received fragments for a particular fragmented IP datagram to the their destination1012, as identified by destination identifier (i.e., “DestID”)904of the PCCB900ofFIG. 9. Consequently, the destination identifier may represent different ports of the router1100, such as port P11104(a) through port P411104(d). For example, port P11104(a) of the router1100may route the fragments to computer1106on this port, while port P31104(c) may route the fragments to a router1008for further routing. Respective ports P21104(b) and P41104(d) may further be implemented in accordance with particular system requirement for the router1100.

FIG. 12is an exemplary representation of a server load balancer1200including the content-based routing device ofFIG. 10according to the present invention. As in the case of the router ofFIG. 11, the server load balance1200has port Pi1102that physically receives frames1002, which include IP datagrams, from a network (e.g., Internet) and forwards them to the content-based routing device1000. The routing device1000performs content-based routing as described with respect toFIG. 10. The XMT forwarding mechanism1010of the routing device1000ofFIG. 10forwards received fragments for a particular fragmented IP datagram to the their destination1012, as identified by destination identifier (i.e., “DestID”)904of the PCCB900ofFIG. 9. In the case of the server load balancer1200, the fragments for the fragmented IP datagram are forwarded, as identified by the destination identifier904, to storage device drivers DD11202(a), DD21202(b), DD31202(c) or DD41202(d), which forward the fragments to their respective destinations1204, i.e., storage devices D11204(a), D21204(b), D31204(c) or D41202(d).

While the invention has been particularly shown and described to a preferred embodiment thereof, it will be understood by those skilled in the art that the foregoing and other changes in forma and details may be made therein without departing from the spirit and scope of the invention.