A first network device and a second network device for forwarding data units are included in a network. The second network device is configured to receive data units from the first network device via an output interface from the first network device. Each of the network devices is further configured to form a first value derived from information pertaining to a received data unit, perform a function on the first value to provide a second value, wherein the function of the first network device is different from the function of the second network device when forwarding a same data unit, select an output interface based on the second value, and forward a received data unit via an interface.

Patent
   8189590
Priority
Jun 04 2004
Filed
Jun 04 2004
Issued
May 29 2012
Expiry
Dec 12 2028
Extension
1652 days
Assg.orig
Entity
Large
0
5
all paid
8. A network device for transferring data units in a network, the network device comprising:
a processor to:
receive a data unit;
concatenate a source address and a destination address from the data unit to form a first value, where the first value represents a first finite field mathematical expression;
use a Time-To-Live (TTL), derived from the data unit, to select a second value from a table that includes a plurality of second values, each of the second values representing a second finite field mathematical expression;
divide the first finite field mathematical expression, represented by the first value, by the second finite field mathematical expression, represented by the second value, to provide a numeric representation of a remainder value as a third value:
select an interface based on the third value; and
transfer the data unit via the selected interface.
1. A method for performing load balancing in a network device, the method comprising:
receiving a data unit to be forwarded by the network device;
concatenating a source address and a destination address, derived from the data unit, to form a first value, where the first value represents a first finite field mathematical expression;
using a Time-To-Live (TTL), derived from the data unit, to select a second value from a table that includes a plurality of second values, each of the second values representing a second finite field mathematical expression;
dividing the first finite field mathematical expression, represented by the first value, by the second finite field mathematical expression to provide a numeric representation of a remainder value as a third value;
selecting an interface based on the third value; and
forwarding the data unit via the selected interface.
5. A network device for transferring data units in a network, the network device comprising:
a packet forwarding engine, implemented at least partially in hardware, to receive a data unit;
a routing engine, implemented at least partially in hardware, to:
form a first value by concatenating a source address and a destination address included in a header of the data unit, where the first value represents a first finite field mathematical expression;
use a Time-To-Live (TTL) derived from the data unit, to select a second value from a table that includes a plurality of second values, each of the second values representing a second finite field mathematical expression;
divide the first finite field mathematical expression, represented by the first value, by the second finite field mathematical expression to provide a numeric representation of a remainder value as a third value;
identify an interface based on the third value; and
where the packet forwarding engine is further to transfer the data unit to a another network device via the interface.
10. A network comprising:
a first network device for forwarding data units; and
a second network device for forwarding data units, where:
the second network device is to receive data units from the first network device via an output interface from the first network device, and
each of the first and second network devices is further to:
form a first value by concatenating a source address and a destination address derived from a received data unit, where the first value represents a first finite field mathematical expression,
use a Time-To-Live (TTL), derived from the data unit, to select a second value from a table that includes a plurality of second values, each of the second values representing a second finite field mathematical expression;
divide the first finite field mathematical expression, represented by the first value, by the second finite field mathematical expression to provide a numeric representation of a remainder value as a third value;
select an output interface based on the third value, and
forward the received data unit via the selected output interface.
2. The method of claim 1, where each of the second values in the table is relatively prime to all others of the second values in the table.
3. The method of claim 1, where the selecting the interface based on the second value comprises:
using an index based on the second value to select an address from a second table of addresses.
4. The method of claim 3, where the index is formed by performing an operation on the second value to provide the index in a valid index range of entries in the second table of addresses.
6. The network device of claim 5, where the network device is further to:
perform a modulo operation on the numeric representation of the third value to provide an index to a second table of next hop addresses.
7. The network device of claim 5, where the second value is from the table of second values that include representations of finite field mathematical expressions that are relatively prime to one another.
9. The network device of claim 8, where, when selecting the interface based on the third value, the processor is further to:
perform a modulo operation on the third value to obtain an index for accessing a second table including values representing a plurality of interfaces; and
select one of the interfaces by using the index to obtain one of the values representing one of the interfaces.
11. The network of claim 10, where each of the finite field mathematical expressions of the table of finite field mathematical expressions are relatively prime to one another.
12. The network of claim 10, where the first and the second network devices are further to:
use an index based on the second value to select a next hop address from a second table of next hop addresses.

Systems and methods consistent with the principles of the invention relate generally to computer networks and, more particularly, to load balancing of network devices within computer networks.

Load balancing is a way of distributing processing and communications activity across a network such that no one device becomes overloaded. Network devices, such as routers may have one or more sets of load-balanced interfaces, such that when one of the sets of load-balanced interfaces may be used to forward data, one of the interfaces from the set of load-balanced interfaces may be selected. The probability of selecting one of N interfaces in the load-balanced set of interfaces should be 1/N. When a router is configured such that one or more of the N load-balanced interfaces to which it may forward data is connected to another router, the routers are considered to be cascaded. In some networks, cascading of routers may be multiple levels deep.

In some existing networks, the characteristics of the load balancing function is such, that when a router, for example, router A, forwards data to another router, for example, router B, via a load-balanced interface, the conditional probability of router B selecting an interface from among N load-balanced interfaces for forwarding the data may not be 1/N. In other words, in such situations, the load-balancing function of a cascaded router may not distribute the load uniformly.

For example, in one existing network, a router with one or more sets of load balanced interfaces may form a set of bits from data in the packet header, for example, source and destination addresses concatenated together. For the sake of simplicity, we refer to this data as H. In the existing network, each router has unrelated data, per router. We refer to the unrelated data as A. The router then performs a polynomial division by a polynomial p to form a result, R, according to

R=(A::H) mod p, where “::” is concatenation. R may then be used to derive an index to an interface table to select one of the load-balanced interfaces on which to forward the packet.

Concatenating A to the front of H is equivalent to adding A×xh to H, where h is the degree of polynomial H. Thus, mathematically, the router may determine R according to: R=(A×xh+H)mod p, which may be used to index an interface table to determine on which of the load-balanced interfaces the packet will be forwarded. Downstream, a second router may determine R2 according to:

R2=(A2×xh+H) mod p, where A2 is the unrelated data of the second router. Suppose A2=A+Z, where “+” is polynomial addition, base 2. Then:

R 2 = ( ( A + Z ) :: H ) mod p = ( ( A + Z ) x h + H ) mod p = ( A × x h + Z × x h + H ) mod p

If (z×xh) mod p happens to be 0, then R2=(A×xh+H)mod p=R for all H. In other words, when (z×xh) mod p happens to be 0, then the probability that R=R2 is 1 for all H. Assuming that the upstream router and the downstream router have N load-balanced interfaces, the routers map R and R2 to a number in the range of 1 to N. In the situation where R=R2, both routers will select an interface based on the same number, k, in the range 1 to N. Therefore, R and R2 are not mathematically independent and the cascaded load-balanced interface would not be uniformly selected.

If the upstream router produced a result, A, from R and the downstream router produced a result, B, from R2 and both A and B are in a range of 1 to N, then A and B are mathematically independent if the probability that A equals a value, j, given that B equals, a value i, is 1/N, for all values of i and j in the range of 1 to N. Stated in mathematical terms:
P[(B==i|(A==j)]=1/n, for all i and j in the range 1 to N.
The routers described above fail to satisfy this condition.

In a first aspect, a method is provided for performing load balancing in a network device. A data unit to be forwarded is received by the network device. First data derived from the data unit is used to form a first value. A first mathematical operation is performed a on the first value to provide a second value, wherein the first mathematical operation produces a result for the data unit that is mathematically independent from a result produced by a second mathematical operation for the data unit at an upstream network device. An interface is selected based on the second value and the data unit is forwarded via the selected interface.

In a second aspect, a network device is provided for transferring data units in a network. The network device includes a data unit engine. The network device is configured to receive a data unit, form a first value derived from first information included in the data unit header, obtain a second value, use the obtained second value to perform a first mathematical operation on the first value to provide a third value, wherein the first mathematical operation produces a result for the data unit that is mathematically independent from a result produced by a second mathematical operation for the data unit at an upstream network device, identify an interface based on the third value, and transfer the data unit to a device via the interface.

In a third aspect, a network is provided. The network includes a first network device for forwarding data units and a second network device for forwarding data units. The second network device is configured to receive data units from the first network device via an output interface from the first network device. Each of the network devices is further configured to form a first value derived from information pertaining to a received data unit, perform a function on the first value to provide a second value, the function of the first network device being different from the function of the second network device when forwarding a same data unit, select an output interface based on the second value, and forward a received packet via an interface.

The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate an embodiment of the invention and, together with the description, explain the invention. In the drawings,

FIG. 1 illustrates a system consistent with principles of the invention;

FIG. 2 illustrates a portion of a network shown in FIG. 1;

FIG. 3 is a functional block diagram of a network device shown in FIG. 2;

FIG. 4 is a flowchart that illustrates an exemplary process of a network device consistent with the principles of the invention; and

FIG. 5 illustrates an exemplary polynomial table that may be used in a network device consistent with the principles of the invention.

The following detailed description of the invention refers to the accompanying drawings. The same reference numbers in different drawings may identify the same or similar elements. Also, the following detailed description does not limit the invention. Instead, the scope of the invention is defined by the appended claims.

FIG. 1 illustrates an exemplary system 100, which includes an implementation consistent with the principles of the invention. System 100 may include a network 102, and devices 104-1, 104-2 and 104-3 (hereinafter collectively referred to as 104) connected to network 102. System 100 may include more or fewer components than shown in FIG. 1. For example, system 100 may have more or fewer devices 104 connected to network 102.

FIG. 2 illustrates a portion of network 102. Network 102 may include a number of network devices, in this case, a number of routers 202-1 through 202-11 (hereinafter collectively referred to as routers 202). Network 102 may include additional or fewer routers 202 than shown in FIG. 2. Each router 202 may have connections with one or more network devices, such as one or more other routers or network nodes (not shown). As an example of load balancing, packets arriving at router 202-1 may be distributed uniformly among routers 202-2, 202-3 and 202-4 and router 202-2 may distribute packets uniformly among routers 202-6 through 202-11. Some routers 202 may interface with intermediate or edge nodes (not shown). Intermediate nodes may have connections to other nodes via network 102. Edge nodes reside at the edge of a network, such as network 102, and may be connected to devices, such as devices 104.

FIG. 3 is a diagram of an exemplary network device consistent with the principles of the invention. In this particular implementation, the network device takes the form of router 302, which may be used to implement one or more routers 202. Router 302 may receive one or more packet streams from a physical link, process the stream(s) to determine destination information, and transmit the stream(s) on one or more links in accordance with the destination information.

Router 302 may include a routing engine (RE) 310 and multiple packet forwarding engines (PFEs) 320a, 320b, . . . 320n (collectively, “PFEs 320”) interconnected via a switch fabric 330. Switch fabric 330 may include one or more switching planes to facilitate communication between two or more of PFEs 320. In an implementation consistent with the principles of the invention, each of the switching planes includes a single or multi-stage switch of crossbar elements.

RE 310 may perform high level management functions for router 302. For example, RE 310 may communicate with other networks and systems connected to router 302 to exchange information regarding network topology. RE 310 may create routing tables based on network topology information, may create forwarding tables based on the routing tables, and may send the forwarding tables to PFEs 320. PFEs 320 use the forwarding tables to perform route lookups for incoming packets. RE 310 may also perform other general control and monitoring functions for router 302.

Each of PFEs 320 connects to RE 310 and switch fabric 330. PFEs 320 may receive and send packets on physical links connected to a network, such as network 102. Each of the physical links may include one or more sets of load-balanced interfaces. Each load-balanced interface may be defined by a logical link to a device at a next network hop. Each physical link could be one of many types of transport media, such as optical fiber or Ethernet cable. The packets on the physical link may be formatted according to one of several protocols, such as the synchronous optical network (SONET) standard or Ethernet.

FIG. 4 is a flowchart that illustrates an exemplary process that may be implemented in routers 202 consistent with the principles of the invention. In some implementations consistent with the principles of the invention, routers 202 may perform the exemplary process via an Application Specific Integrated Circuit (ASIC) or a Field Programmable Gate Array (FPGA).

Routers 202 may determine that a received packet is to be forwarded on one of a set of load-balanced interfaces. Routers 202 may begin by deriving a source address and a destination address from information in a packet header and extracting a time to live (TTL) from the packet header of a received packet (act 402).

The source address may be an address, such as, for example, a 32-bit Internet Protocol (IP) address of a source of a packet. The destination address may be an address, such as, for example, a 32-bit IP address of a destination of a packet. In some implementations, the source and destination addresses may not be included in the packet header. However, the packet header may include information that can be used to derive the source and destination addresses.

TTL may be a value, such as, for example, an 8-bit value that may be decremented at each hop within network 102. The purpose of the TTL is to prevent packets from circulating through the network indefinitely. Thus, when the TTL is decremented to zero, the corresponding packet is discarded.

Routers 202 may use TTL, or at least a portion of TTL, as an index into a polynomial table (act 404) and may extract an entry of the polynomial table using the index. Each entry of the polynomial table may include a value that represents a finite field mathematical expression or polynomial. For example, a binary value “0000000001000011” in an entry of the polynomial table may represent the polynomial, 0x15+0x14+0x13+0x12+0x11+0x10+0x9+0x8+1x7+0x6+0x5+0x4+1x3+0x2+0x1+1x0, which equals x7+x3+1. Each polynomial within the polynomial table may be an irreducible or prime polynomial and no two entries are equal. Thus, if this condition is satisfied, then the entries of the polynomial table are relatively prime to all other polynomial entries of the polynomial table. That is, no two polynomial table entries have a factor in common other than 1. FIG. 5 illustrates an exemplary polynomial table 500 that may be used in routers 202. No two entries of polynomial table 500 have a factor in common other than the factor 1. Further, the entries of polynomial table 500 are irreducible or prime polynomials.

Routers 202 may concatenate the source address and destination address from the packet header to provide a large number, such as, for example, a 64-bit number. The large number may be formed by concatenating the destination address to the source address or by concatenating the source address to the destination address. In other implementations, other combinations of numbers may be used to derive a large number. The derived large number may represent a finite field mathematical expression or polynomial in the same manner as an entry of the polynomial table. Routers 202 may then divide the derived large number by the entry of the polynomial table to provide a remainder of the division (act 406). Although the remainder may have one or more negative coefficients, the representation of the remainder only indicates that a non-zero coefficient exists. For example, if the remainder is x3+x2−1, this may be represented as 1x3+1x2+0x1−1x0, which may be represented as a binary value, 0000000000001101. Similarly, the remainder x3+x2+1, may be represented as 1x3+1x2+0x1+1x0 which may be represented as the same binary value, 0000000000001101. Because routers 202 may select one of N load-balanced interfaces to use to forward the packet, routers 202 may reduce the remainder to a range of an index to the polynomial table, for example, 0 to N−1 for an N entry table (act 408). For example, if the remainder is represented by a binary value, 0011111001010101, and the polynomial table has, for example, eight entries, then the binary value representing the remainder may be reduced to be within the range 0-7. This may be achieved by performing a modulo 8 operation on the binary value representing the remainder. In other words, routers 202 may perform a modulo N operation on the remainder, such that the remainder becomes a value in the range of 0 through N−1, inclusive, when the polynomial table has N entries. After deriving the reduced remainder, routers 202 may use the reduced remainder to index a table of hop addresses to obtain an address, such as an IP address, of a next hop within network 102 (act 410). Each of the hop addresses may represent a different interface. Routers 202 may then forward the packet to the next hop within network 102 (act 412).

The foregoing description describes embodiments of network devices that select one of a number of load-balanced interfaces for forwarding packets by applying a function to data, which may be derived from a packet header. Because the function applied may be selected based on a number, which changes from hop to hop, cascaded load-balanced network devices may distribute load more uniformly among a group of interfaces than conventional load balanced network devices. Further because the functions that may be applied include different irreducible polynomials, which are relatively prime to one another, there is no relationship between a result produced from an upstream router and a result produced from a downstream router for a given packet. Thus the results are mathematically independent.

The foregoing description of exemplary embodiments of the present invention provides illustration and description, but is not intended to be exhaustive or to limit the invention to the precise form disclosed. Modifications and variations are possible in light of the above teachings or may be acquired from practice of the invention. For example, configurations other than those described may be possible. Moreover, systems, methods and apparatus consistent with the principles of the invention may load balance any type of data transfer units, including packets. For example, frames, cells, or virtually any type of data transfer unit could be load balanced using the principles of the invention.

While series of acts have been described with regard to FIG. 4, the order of the acts is not critical. No element, act, or instruction used in the description of the present application should be construed as critical or essential to the invention unless explicitly described as such. Also, as used herein, the article “a” is intended to include one or more items. Where only one item is intended, the term “one” or similar language is used. The scope of the invention is defined by the following claims and their equivalents.

Washburn, James

Patent Priority Assignee Title
Patent Priority Assignee Title
4451919, Nov 28 1978 MATSUSHITA ELECTRIC INDUSTRIAL CO , LTD Digital signal processor for use in recording and/or reproducing equipment
5935268, Jun 03 1997 RPX CLEARINGHOUSE LLC Method and apparatus for generating an error detection code for a modified data packet derived from an original data packet
5978951, Sep 11 1997 PLECTRUM LLC High speed cache management unit for use in a bridge/router
6707817, Mar 17 1999 AVAGO TECHNOLOGIES INTERNATIONAL SALES PTE LIMITED Method for handling IP multicast packets in network switch
6731599, Jul 01 1999 AVAYA MANAGEMENT L P Automatic load sharing-trunking
//
Executed onAssignorAssigneeConveyanceFrameReelDoc
Jun 01 2004WASHBURN, JAMESJuniper Networks, IncASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS 0154340777 pdf
Jun 04 2004Juniper Networks, Inc.(assignment on the face of the patent)
Date Maintenance Fee Events
Jan 23 2012ASPN: Payor Number Assigned.
Nov 30 2015M1551: Payment of Maintenance Fee, 4th Year, Large Entity.
Nov 27 2019M1552: Payment of Maintenance Fee, 8th Year, Large Entity.
Oct 19 2023M1553: Payment of Maintenance Fee, 12th Year, Large Entity.


Date Maintenance Schedule
May 29 20154 years fee payment window open
Nov 29 20156 months grace period start (w surcharge)
May 29 2016patent expiry (for year 4)
May 29 20182 years to revive unintentionally abandoned end. (for year 4)
May 29 20198 years fee payment window open
Nov 29 20196 months grace period start (w surcharge)
May 29 2020patent expiry (for year 8)
May 29 20222 years to revive unintentionally abandoned end. (for year 8)
May 29 202312 years fee payment window open
Nov 29 20236 months grace period start (w surcharge)
May 29 2024patent expiry (for year 12)
May 29 20262 years to revive unintentionally abandoned end. (for year 12)