A more complete understanding of the present invention, and the attendant advantages and features thereof, will be more readily understood by reference to the following detailed description when considered in conjunction with the accompanying drawings wherein:
Referring now to the drawing figures in which like reference designators refer to like elements, there is shown in
The hardware of router 28 can be any hardware suitable for implementing the present invention, and may include volatile and non-volatile storage devices, a central processing unit, input/output devices for management and configuration, network interface units for coupling router 28 to network communication lines and one or more NPUs. Two stage FIB 30 is typically part of an NPU although the present invention is not limited to such. Advantageously, two stage FIB 30 can be implemented programmatically within existing NPUs, thereby avoiding the need to replace hardware elements. These NPUs include volatile and/or non-volatile storage as well as processing units. These NPUs also include a hardware based “fast path” that can be used in accordance with the present invention to use a tree look-up structure to make packet forwarding decisions using the two stage FIB 30. In operation, a packet originating from IPv6 originating network 24 is received by router 28. Two stage FIB 30 contains forwarding information that includes instructions for how to forward inbound data packets to reach the destination address in a destination network 26.
A two stage FIB constructed in accordance with the principles of the present invention is described with reference to
In operation, first stage 32 is used for lookup of the destination address. If the information in key 40 is sufficient to make a complete forwarding decision, e.g. forward the packet, discard the packet or locally terminate the packet, first stage action 44 is the forwarding action, resulting in the forwarding of outbound IPv6 packet 38. However, if lookup in first stage 32 fails to resolve the forwarding decision, lookup using second stage 42 is performed. This is the case for full global unicast lookup arrangements. In addition, other optional structures can be employed in the two-stage FIB 30 of the present invention, such as supporting link local unicast and link local multicast forwarding.
Because a predetermined number of most significant bits of the destination address are used in first stage key 40, this number can be selected so that most network address prefixes are covered under this predetermined quantity. For example, as shown in
Two stage FIB 30 is arranged so that forwarding decisions within each structure, for example, full global unicast structure 46, link-local unicast structure 48 and link-local multicast lookup structure 50 can be accomplished very quickly. Management processes, executed by a CPU in router 28 and described below in detail, can add, delete and update routes from two stage FIB 30 within those structures. In addition, as is discussed below, undesired iterations and copying of structures can be avoided by creating new structures to allow every search to be an exact match lookup, whether within the first stage 32 or second stage 34.
Of note, it is assumed that a hardware independent routing table is present within router 28. This routing database includes one entry per route using hardware independent data. For example, the hardware independent routing database includes the destination address, prefixed link, routing domain, and forwarding decision such as local versus remote versus discard.
Two stage FIB 30 includes first stage routes, second stage routes, lookup structures such as structures 46, 48 and 50, and management routes. First-stage routes include all routes present in first-stage FIB 42 and second-stage routes include all routes present in the global unicast second-stage FIB 44. Lookup structures 46, 48 and 50 provide a subset of routes from the first stage that need to be further described to affect an accurate routing decision. As noted above and as shown in
Management routes are not actual routes, for example link-local routes, but are implemented for the sake of completeness to provide a method for implementing a complete two stage FIB solution. Management routes are not provided by the IPv6 application. Fast lookup structures are subsets of the routes used for different searches.
As used herein the term “route pointer” refers to a pointer to the above-described hardware independent routing database. A route “key” includes the route pointer and routing domain, and represents one and only one route. The “fast lookup key” such as is used as key 40 in first stage 32 includes the routing domain and the first predetermined quantity of “x” of most significant bits of the destination address. The fast lookup key is also used for special cases such as when making a determination that there is a route that must be placed in second stage 34. This might happen, for example, when a determination is being made as to whether to move routes from first stage 42 to the second stage when routes are being added and/or deleted.
In accordance with the present invention, forwarding decisions can result in a value for normal forwarding such as a value for discard, forward, local, etc., or could have a value corresponding to a special management action such as a second stage global unicast lookup, second stage link-local unicast lookup or second-stage link-multicast lookup. Also, as is discussed below in more detail, the present invention employs shadow routes, and specifies shadow routes in second stage 34 and first stage 32. Shadow routes are routes that are needed in second stage 34 because of the presence of other related routes. For example, if there is a route having a “/48” prefix and the same routes are specified with a /128 prefix, a decision cannot be made from the destination address exactly which route is to be used. As such, a route must be placed in second stage 34 in order to make an accurate routing decision. Shadow routes can only have a prefix length less than the first stage key length with respect to the number of MSB of the destination address, e.g., 64 MSB of the destination address as shown in
With this framework in mind, the management structures described above are explained in detail. The entries in first stage 32 are used to represent the routes in first stage 32. As noted above, the key 40 is a route key. The result of a lookup in first stage 32, namely action 44, includes a forwarding decision as to what type of forwarding is to be undertaken, the determination of forwarding parameters such as what the NPU needs to know to forward the packet, such as what interface to use, and a shadow route status.
The second stage route structure is used to represent routes in second stage 34. The key used in second stage lookup is the route key which includes the routing domain and route pointer. The result of the second stage 34 lookup is a forwarding decision with corresponding forwarding parameters. Unlike first stage 32 lookups, second stage lookups do not result in the determination that the route is a shadow route.
Fast lookup structures are structures that are used to increase the speed of forwarding determinations. Three types of fast lookup structures are contemplated, namely, structures to facilitate the lookup of global unicast second stage routes, structures to facilitate the determination of global unicast second stage candidate routes and shadow candidate routes. With respect to global unicast second stage lookup routes, these are structures in which an entry contains the set of route keys representing all routes matching the predetermined number of most significant bits of a destination address in which there is a route representing the predetermined quantity of most significant bits, e.g. 64, with a resultant decision indicating that a global unicast second stage lookup is required for all packets matching the predetermined quantity of most significant bits. Of note, for ease of explanation, the present invention is described using 64 MSB as the predetermined quantity of most significant bits, it being understood that this value can be adjusted. Global unicast second stage lookup routes therefore list all keys for all routes that match the first 64 bits. Of note, a second stage lookup route can be moved to the first stage.
Global unicast second stage lookup candidate routes represent the 64 MSB of a destination address where there is at least one route that can be used or is being used to have resultant decision to do a global unicast second stage lookup. In such a case, the entry includes a route key representing either the second stage lookup or a key noting that the route key will be used for second stage lookup if needed in the future. Shadow candidate routes represent the 64 MSB of a destination address which has routes with a prefix length of less than 64 but matches the 64 MSB. Entries for shadow candidate routes include a set of route keys representing all shadow candidate routes.
Fast lookup structures use a key which includes the routing domain plus the 64 most significant bits of the destination address. The result of a lookup using this structure is a route key for a second stage lookup candidate or a set of route keys representing a list of routes associated with the first 64 bits of the destination address.
FIB management structures include management routes which can have structures used to represent management and/or default routes in FIB 30. The present invention contemplates five different types of management routes, namely, a no route default, link-local unicast management route, link-local multicast management route, an invalid route, and a non-link local multicast route. The no route default is represented as “::/0” which is used if no other matching route is found. This route is added to both first stage 32 and second stage 44 global FIBs. Route lookup which results in a no route default is redirected to software within router 28 for discard or an ICMP reply.
A link-local unicast management route can be specified with a particular prefix, for example, FE80::/10, which is hit for all link-local unicast destination addresses. Present in first stage FIB 42, a hit causes a redirect to the link-local second stage FIB for resolution. An example is shown as structure 52 in
A link-local multicast management route is also specified by a particular prefix, such as FF02::/16 which is hit during lookup for all link-local multicast destination addresses. Link-local multicast management route lookups are redirected to the link-local multicast second stage FIB for resolution. An exemplary structure is shown on
The invalid routes is specified as “::/128” which is established as the unspecified address for IPv6. Since it is illegal to have the unspecified address as the destination address, an entry is made in second stage FIB 34 only. Management routes are arranged so that if there is an entry in two stage FIB 30, a route is present.
As shown in
Accordingly, there is very little management needed for link-local routes. These routes are present according to the attributes of the interface and the state of the interface. Link-local routes are defined according to the IPv6 protocol or derived from the IPv6 addresses configured according to the IPv6 protocol. As noted above, forwarding decisions are limited. If a route is not present, the forwarding decision is to discard the packet. If the route is present, it is accepted as a local packet. For the sake of completeness and ease of aiding the following explanation, the portion of second stage FIB 34 that supports the full global unicast lookup structure 46 is referred to as global unicast FIB 56.
An exemplary use of the two stage FIB of the present invention is explained with reference to
First stage FIB 32 includes routes listed in IPv6 shorthand as well as the resultant activity if a route is matched. For example, the first entry in FIB 32 shows a route of “3000::/48”. This shorthand refers to routes beginning with the number 3000, the colons represent shorthand for zeroes, and the “/48” component refers to the prefix length. Accordingly, an inbound packet having a destination address of “3000::1” would best match the first entry in first stage FIB 32. Because a match is found, the resultant activity is to instruct the NPU to forward the packet. As such, packet forwarding can be determined quickly using first stage FIB 32. Similarly, a packet having a destination address of “3001::1” would match the third entry in FIB 32 with the resultant action being to forward the packet.
As another example, an inbound IPv6 packet 36 having a destination address of “3002::5” would result in a second stage lookup based on its best match of the fifth line of first stage FIB 32. As such, referring to second stage global unicast FIB 56, the first line of that table shows a best match with entry “3002::/48” with a resultant action of forwarding the data packet. As noted above, although the term “forward” is used herein, it is used in the general sense. It is understood that other actions, such as local termination or discard, can be taken with respect to a packet and a decision as to an action to be taken from query of first stage FIB 32 or second stage
As still another example, a packet arriving with a destination address of “4000::1” would best match the “::/0” no route entry. With respect to link-local operation, a packet arriving with a destination address of “FE80::1” would best match the entry in the tenth line of first stage FIB 32. The packet would be considered a link-local unicast packet for local delivery and a lookup in second stage link-local unicast FIB 54 would result. Similarly, a packet having a destination address of “FF02::1” would best match the twelfth entry in first stage FIB 32 and would be considered a link-local multicast packet for local delivery, with lookup in link-local multicast FIB 52 being the second stage operation. However, a packet having a destination address of “FF01::1” would best match the eleventh line of first stage FIB 32 and would be discarded.
Operation of two stage FIB 30 involves the addition, deletion and updating of routes from the FIB. The processes for route addition, deletion and update are typically executed by a CPU within router 28. Once the appropriate changes have been calculated, FIB 30 is updated by CPU 28. The addition and deletion of management and link-local routes are the same as would be handled in IPv4 and are also operations that are specific to particular NPUs. It is presumed that one familiar with router programming and IPv4 operation can implement programmatic code to support management and link-local route addition and deletion and is therefore not discussed herein. However, the addition, deletion and updating of global unicast routes in connection with IPv6 two stage FIB operation is described herein with reference to
The processes of adding and updating routes within two stage FIB 30 are described with reference to
The update and route addition processing methods are described in detail. With respect to route update processing step S106, the route is evaluated so that it is only present in one of the two FIBs 32 and 56 unless this route is used as the full lookup route pointing to second stage FIB 56. If the route is in second stage 56, then it cannot be in first stage FIB 32 and appropriate action is taken. If it is a full lookup route, both first stage FIB 32 and second stage FIB 56 are updated.
With respect to the short prefix length route processing of step S110, the route is evaluated and only routes with a prefix of less than 64 are placed in the second stage if the route is a shadow route. Otherwise, the route is added to first stage FIB 32. If the route is a full lookup match, i.e. routes in the second stage that have the same 64 most significant bits of the destination address, then the route is added to second stage FIB 56.
Where the route prefix is greater than or equal to 64 and full lookup route processing of step S114 is required, the route is added to second stage FIB 56. There is a full candidate lookup match. Of note, a full candidate lookup represents a lookup in the global unicast second stage FIB 56 route structure, while a full lookup represents a lookup in the global unicast second stage FIB 56 lookup route structure. If there is no full lookup match, the full lookup route is added to first stage FIB 32. If there are existing shadow candidate routes, they are added to second stage FIB 56. If there is already a full lookup match, the corresponding route key is added to the full lookup entry set of route keys.
Where there is not already a full lookup candidate for this route and the prefix length is 64, 64 bit prefix length route processing of step S118 results in the addition of the route to first stage FIB 32 only. This is the case because there are no other routes with prefix lengths greater than or equal to 64 that match the first 64 MSB for this route. Where there is no full candidate lookup match (step S112) and the prefix length is greater than or equal to 64, because there is no other route where the prefix of greater than or equal to 64, the same 64 MSB of this route is added to second stage FIB 56 and a full lookup entry is added to first stage FIB 32. In addition, any shadow candidates are added to second stage FIB 56.
Route deletion is explained with reference to
If the route is in the first stage (step S126), the prefix length is checked to determine whether it is less than 64 (step S132). If it is, delete first stage only processing is performed (step S134). In this case, the route is removed from the first stage FIB 32, and if a shadow route exists, the shadow route is removed from second stage FIB 56.
If the route is in the first stage (step S126) and the prefix length is not less than 64, a determination is made as to whether there is a full lookup match in the first stage FIB 32. If there is not, then there is no route and 64 bit prefix length route deletion processing is performed (step S138). In this case, the route is removed from first stage FIB 32.
If there is a full lookup match in step S136, the prefix length is checked to determine whether it is greater than 64 bits (step S140). If such is the case, and there is no other route with the same 64 MSB of the destination address, there is no route, and greater than 64 bit prefix length route deletion processing is performed (step S1142). In this case since there is no other route with a prefix greater than or equal to 64 and the same 64 MSB of this route, the route is deleted from second stage FIB 56 so that the full lookup route is removed. Any shadow routes are deleted and all structures are cleared of entries for this route.
If the prefix length is not greater than 64 in step S140, and there is a full lookup match with other routes (step S136), then the route is deleted and replaced via delete route and replace processing (step S144). In this case, if there is only one other route left and its prefix length is 64, it is moved to first stage FIB 32 and replaces the full lookup route. Otherwise, the full lookup route is replaced with a different route from one of the other routes left from the full look-up match.
With respect to alternative implementation options, it is contemplated that link-local second stage structures 48 and 50 can be combined into a single structure. In this regard, the first 64 MSB of the link-local destination address need not be constant. However, this arrangement requires the IFID and 128 bit destination address lookup in second stage FIB 34.
The two stage FIB arrangement of the present invention allows customized forwarding according to real world situations. This is the case because the present invention takes advantage of prefix distributions for real IPv6 networks and allows adjustment for them between first stage FIB 32 and second stage FIB 34. In that regard, forwarding speed is increased for targeted lookups, in particular those that can be resolved by lookup in first stage FIB 32 and the packets forwarded there from. This arrangement increases the hardware forwarding rate, thereby allowing existing NPUs to be used, with the only modification being to the programmatic software code running the NPUs as well as the CPUs used to perform route add, delete and update processing. The present invention also prevents thrashing of FIB 30 because lookup performance is not degraded over time. This is the case because the method of the present invention allows routes to be updated and moved form first stage FIB to second stage FIB and vice versa, as necessary. The result is that the real time needed to manage the FIB is minimized as is the memory overhead required for FIB management and implementation.
The present invention can be realized in hardware, software, or a combination of hardware and software. An implementation of the method and system of the present invention can be realized in a centralized fashion in one computing system, or in a distributed fashion where different elements are spread across several interconnected computing systems. Any kind of computing system, or other apparatus adapted for carrying out the methods described herein, is suited to perform the functions described herein.
A typical combination of hardware and software could be a specialized or general purpose computer system having one or more processing elements and a computer program stored on a storage medium that, when loaded and executed, controls the computer system and/or components within the computer system such that it carries out the methods described herein. The present invention can also be embedded in a computer program product, which comprises all the features enabling the implementation of the methods described herein, and which, when loaded in a computing system is able to carry out these methods. Storage medium refers to any volatile or non-volatile storage device.
Computer program or application in the present context means any expression, in any language, code or notation, of a set of instructions intended to cause a system having an information processing capability to perform a particular function either directly or after either or both of the following a) conversion to another language, code or notation; b) reproduction in a different material form. In addition, unless mention was made above to the contrary, it should be noted that all of the accompanying drawings are not to scale. Significantly, this invention can be embodied in other specific forms without departing from the spirit or essential attributes thereof, and accordingly, reference should be had to the following claims, rather than to the foregoing specification, as indicating the scope of the invention.