Push-based hierarchical state propagation within a multi-chassis network device

A multi-chassis network device sends state information to internal consumers within the multi-chassis device via a hierarchical distribution. As one example, a primary master routing engine within a control node of a multi-chassis router forwards state information to local routing engines within other chassis, which in turn distribute the state information to consumers on each chassis. Each local routing engine defers sending acknowledgement to the master routing engine until acknowledgements have been received from all consumers serviced by the local routing engine. Embodiments of the invention may reduce control plane data traffic and convergence times associated with distribution of state updates in the multi-chassis network device.

TECHNICAL FIELD

The invention relates to computer networks and, more particularly, to systems for routing packets within computer networks.

BACKGROUND

A computer network is a collection of interconnected computing devices that can exchange data and share resources. In a packet-based network, the computing devices communicate data by dividing the data into small blocks called packets, which are individually routed across the network from a source device to a destination device. The destination device extracts the data from the packets and assembles the data into its original form. Dividing the data into packets enables the source device to resend only those individual packets that may be lost during transmission.

Certain devices within the network, such as routers, maintain tables of information that describe routes through the network. A “route” can generally be defined as a path between two locations on the network. Upon receiving an incoming data packet, the router examines destination information within the packet to identify the destination for the packet. Based on the destination, the router forwards the packet in accordance with the routing table.

The physical connection between devices within the network is generally referred to as a link. A router uses interface cards (IFCs) for receiving and sending data packets via network links. These IFCs are installed in ports known as interfaces and are configured using interface configurations.

Generally, a router maintains state information. For example, a router may maintain state information representing the current state of the interfaces between the router and the network. Such state information may include information representing the state of one or more IFCs, such as the current configuration of the IFCs. As additional examples, a router may maintain state information representing the state of one or more packet forwarding engines (PFEs), one or more routing engines, or other resources within the router.

In particular, a process, e.g., a control node known as a “routing engine,” operating within a router may maintain the state information and communicate changes to the state information to various other processes or components within the router. These other processes or components are sometimes referred to as “consumers,” because they receive and utilize the state information maintained by the operating system. These consumers make use of the state information when performing their various functions.

As the complexity of conventional networks has increased in recent years, management of the state information within a router or other network device has likewise become a significant challenge. Some existing methods for managing state information involve caching the information within the operating system, and issuing state update notification messages to software modules executing within the router. In response, the software modules retrieve the state information from the operating system.

To increase reliability, some routers may include a primary routing engine and one or more standby routing engines. Both primary and standby routing engines may require state information. In the event that the primary routing engine fails, one of the standby routing engines assumes control of the routing resources to continue operation of the router. The process of switching control of routing functions between the primary and standby routing engines is often referred to as failover. In some instances, to assume proper control and ensure operation, the standby routing engine is forced to “relearn” the lost state information from each resource, e.g., by power cycling the router resources to a known state. This causes an interruption in packet forwarding while the router resources restart operations.

Routers have not only developed to be more reliable, but also to meet increasing bandwidth demands. One way to meet increasing bandwidth needs is to use multi-chassis routers, i.e., routers in which multiple routing devices are physically coupled and configured to operate as a single router. For example, a multi-chassis router may contain multiple line card chassis (LCCs), which include one or more IFCs, and a central switch card chassis (SCC), which forward packets between the LCCs and provides top-down management of the multi-chassis router. Because multi-chassis routers combine resources of multiple routing devices, multi-chassis routers typically have much higher bandwidth capabilities than standalone routers. The use of multi-chassis routers can simplify and improve routing on a service provider network by consolidating routing functions onto fewer routers. However, forwarding state information to each consumer in a multi-chassis router can be significantly more difficult than in a standalone router.

SUMMARY

Techniques are described for providing push-based hierarchical state propagation within a multi-chassis network device. For example, a multi-chassis router may include a master routing engine within a control chassis of the multi-chassis router and local routing engines within other chassis of the multi-chassis router. The multi-chassis router may include a central switch card chassis (SCC) having master routing engine and one or more line card chassis (LCCs) each having one or more local routing engines. The local routing engines forward state information received from router resources within their chassis to the master routing engines without substantially processing or recognizing the state information. The master routing engine within the control node (e.g., the SCC) manages state information for the entire multi-chassis router and propagates the state information to each local routing engine for distribution to consumers within the respective chassis. The master routing engine also provides state information for consumers within the SCC.

The local routing engines provide updates to the consumers by notifying the consumers of the availability of the update. A consumer responds to this notice by retrieving the update from the local routing engine. After receiving the update from the local routing engine, a consumer sends an acknowledgement for the update to the local routing engine. Once each consumer which requires a state update from the local routing engine has sent an acknowledgement to the local routing engine, the routing engine sends an acknowledgement of the state update to the master routing engine, thereby indicating the state update has been properly processed for the respective chassis. In this manner, state updates are pushed through a routing engine hierarchy to each consumer within the multi-chassis router.

In one embodiment, a multi-chassis network device comprises a routing engine for a first chassis, a routing engine for a second chassis and a consumer. The routing engine of the second chassis operates as an intermediate consumer to the routing engine of the first chassis. The routing engine of the second chassis receives a state update from the routing engine of the first chassis and provides the state update to the consumer.

In another embodiment, a method for distributing a state update in a multi-chassis network device comprises receiving with an intermediate consumer within a first chassis a state update from a control unit from a second chassis of the multi-chassis network device and providing the state update from the intermediate consumer within the first chassis to a consumer within the first chassis.

In an embodiment, a computer-readable medium containing instructions that cause a programmable processor in a multi-chassis network device to receive with an intermediate consumer within a first chassis a state update from a control unit from a second chassis of the multi-chassis network device and provide the state update from the intermediate consumer within the first chassis to a consumer within the first chassis.

Embodiments of the invention may provide one or more of the following advantages. As compared to a multi-chassis router including a master control node that communicates directly with all consumers in the multi-chassis router, embodiments of the invention reduce the amount of control plane data traffic between chassis of the multi-chassis router. Instead of requiring state updates to be separately sent to each consumer on a chassis, the state updates can be distributed to each chassis only once. This not only reduces control plane data traffic, but also reduces convergence time, i.e., the time it takes for all consumers to consume a state update. As compared to a pull-based hierarchical system, embodiments of the invention allow consumers to receive state updates without having to poll for them, which reduces the amount of communication between a control node and consumers required to distribute state information updates. Thus, embodiments of the invention allow system resources to be preserved for other operations.

DETAILED DESCRIPTION

FIG. 1is a block diagram illustrating an example computing environment2in which service provider network6includes a multi-chassis router4. In this example, multi-chassis router4communicates with edge routers5A and5B (“edge routers5”) to provide customer networks8A-8C (“customer networks8”) with access to network6. In one embodiment, multi-chassis router4includes an SCC that operates as a control node and one or more line card chassis LCCs that operate as packet routing devices. The LCCs may contain all the physical interfaces for coupling to other devices within network6, while the SCC controls and routes traffic between the LCCs.

Although not illustrated, service provider network6may be coupled to one or more networks administered by other providers, and may thus form part of a large-scale public network infrastructure, e.g., the Internet. Consequently customer networks8may be viewed as edge networks of the Internet. Service provider network6may provide computing devices within customer networks8with access to the Internet, and may allow the computing devices within customer networks8to communicate with each other. Service provider network6may include a variety of network devices other than multi-chassis router4and edge routers5, such as additional routers, switches, servers, or other devices.

In the illustrated embodiment, edge router5A is coupled to customer network8A via access link9A and edge router5B is coupled to customer networks8B and8C via access links9B and9C, respectively. Customer networks8may be networks for geographically separated sites of an enterprise. Customer networks8may include one or more computing devices (not shown), such as personal computers, laptop computers, handheld computers, workstations, servers, switches, printers, or other devices. The configuration of network2illustrated inFIG. 1is merely exemplary. For example, service provider network6may be coupled to any number of customer networks8. Nonetheless, for ease of description, only customer networks8A-8C are illustrated inFIG. 1.

Consistent with the principles of the invention, multi-chassis router4provides for failover by including a primary routing engine as well as one or more standby routing engines. For example, an SCC may contain primary and standby master routing engines, and one or more LCCs may contain primary and standby local routing engines. State information is pushed downward from the primary master routing engine to the standby master engine prior to forwarding the state information to the primary local routing engines in the LCCs. Similarly, the primary local routing engines forward the state information to one or more standby local routing engines prior to forwarding the state information to “consumers” within their chassis. In this manner, multi-chassis router4enforces a synchronization gradient when communicating state information throughout the multi-chassis environment. In the event a primary routing engine fails, a standby routing engine in the same chassis assumes control over routing resources and routing functionality for that chassis. Moreover, because state information is delivered to a standby routing engine prior to forwarding the state information to a consumers, a standby routing engine can take up forwarding state information to consumers at the same place where the primary routing engine left off. U.S. patent application Ser. No. 10/678,280 titled “Syncronizing State Information Between Control Units”, filed Oct. 3, 2003, describes techniques for a synchronization gradient within a standalone router and is hereby incorperated by reference.

In this manner, the primary and standby routing engines synchronize their respective state information to allow the standby routing engine to assume control of the router resources without having to relearn state information. For exemplary purposes, the principles of the invention will be described in reference to multi-chassis router4. However, the principles of the invention are applicable to any multi-chassis network device. For example, the principles of the invention could be applied to edge routers5, enterprise appliances, session border controllers, intelligent switches or hubs, firewalls or any other network device having a multi-chassis operating environment.

As described in further detail below, operating system executing within the primary and standby routing engines of multi-chassis router4manage data structures and inform consumers of any change to the state information. Consumers may comprise software processes executing within components of multi-chassis router4, such as chassis management processes, configuration management processes, or other processes in multi-chassis router4. Additionally, consumers of the state information may comprise hardware components, or combinations of software, hardware or firmware, such as one or more forwarding engines, IFCs or other hardware. It should be noted that, as to the master routing engine, the local routing engines are viewed as consumers with respect to state information. Similarly, as to local components within the LCCs, the local routing engines are providers of state information. Because of their dual role, the local routing engines may be viewed as intermediate consumers. Likewise, the standby routing engines in the SCC and the LCCs also operate as consumers as to the primary routing engines until taking over state information forwarding, e.g., in event of a failover.

Multi-chassis router4may manage state information within a hierarchically-ordered and temporally-linked data structures. One example of the use of hierarchically-ordered and temporally-linked data structures is described in U.S. patent application Ser. No. 10/457,814 titled “Managing State Information in a Computing Environment” by David M. Katz and Dennis C. Ferguson, filed Jun. 9, 2003, hereby incorporated by reference in its entirety.

During normal operation, in the event state information changes, the primary master routing engine of a control node of multi-chassis router4(i.e., the SCC in this example) synchronizes state information with operating systems executing on the one or more standby master routing engines. Specifically, the primary master routing engine replicates the state updates and transmits the state update in message form to the standby master routing engines. The standby master routing engines receive the message and update their corresponding data structures to record the state updates.

Upon recording the state updates, the standby master routing engines may transmit an acknowledgement to the primary master routing engine to indicate successful state information synchronization. Once the primary master routing engine has received an acknowledgement from the standby master routing engines, it forwards the state information changes to the consumers of the SCC. For example, this includes any consumers located within the SCC. In addition, the primary master routing engine forwards the state information to the primary local routing engines on the LCCs, which are viewed as consumers to the primary master routing engine. The primary local routing engines then forward the state update information to one or more standby local routing engines on the LCCs. However, each LCC is not required to have a standby local routing engine, and some or all of the LCCs may only have a primary local routing engine. After receiving an acknowledgement from each standby local routing engine on that LCC, a primary local routing engine may then transmit the state update messages to consumers on the LCC.

In this manner, multi-chassis router4enforces the requirement that the standby master routing engines are updated with state information changes before consumers, and that the standby routing engines of the individual chassis are updated with the state information before any local consumers within the individual chassis. Therefore, if any of the primary routing engines fail, a corresponding standby routing engine can readily assume routing and state management functionality if needed. Once one of the standby routing engines assumes control that standby routing engine is no longer a standby routing engine, but becomes a primary routing engine; however, that routing engine will maintain its functional status as either a local or a master routing engine. In this regard, multi-chassis router4can be viewed as maintaining a “synchronization gradient” such that the primary master routing engine of the control node (i.e., the SCC) receives state updates first, followed by the standby master routing engines, and followed by consumers of the SCC including the primary local routing engines of the other chassis, followed by standby local routing engines, followed by the consumers within the other chassis. This synchronization gradient ensures that upon failover, a standby routing engine within any of the chassis contains enough state information to assume control of the router resources without having to relearn a substantial portion of the state information.

In some embodiments, the primary master and primary local routing engines may use commit markers and commit proposals within their data structures to track the state updates given to consumers. As further described below, a commit marker may be inserted into the state update data structure after the most recent object within the temporally-ordered data structure which a consumer has acknowledged receiving. A commit proposal may be inserted into at a point in the state update date chain to indicate an acknowledgement request has been sent for all state update information up to that point in the chain. The primary master and primary local engines also replicate the position of commit markers and commit proposals within their data structure to the standby master and standby local routing engines. In this manner the standby routing engines also know which state updates have been received by which consumers.

In response to the state update messages from a local routing engine, consumers issue requests to retrieve the updated state information. When the primary local routing engine receives such a request, the primary local routing engine traverses the hierarchically-ordered and temporally-linked data structure and issues state update messages to the requesting consumers. The primary local routing engine then updates respective commit markers and commit proposals associated with the requesting shared consumers to reflect transmission of the state updates. The primary local routing engine again synchronizes state information with the one or more standby local routing engines so that the commit markers and commit proposals within the state information maintained by the local routing engines on a chassis are uniform.

In this manner, one of the standby local routing engines may assume control of a chassis, and can deterministically identify the state information of which each consumer on that chassis has already been informed, i.e., consumed. As a result, the standby local routing engines may need only update the consumers with limited amount of state information, and need not rely on relearning state information from the master routing engine of multi-chassis router4. Once one of the standby local routing engines assumes control of a chassis that standby local routing engine is no longer a standby local routing engine, but becomes a primary local routing engine.

The combination of failover techniques for the local routing engines and the master routing engine extends a synchronization gradient for a standalone router for use in multi-chassis router4. The failure of a single routing engine in multi-chassis router4will not interrupt packet-forwarding and state information updates can be resumed with limited interruption and redundancy. In this manner, multi-chassis router4has a non-stop forwarding capability equivalent to non-stop forwarding in a standalone router.

FIG. 2is a block diagram illustrating an exemplary multi-chassis router120that operates consistent with the principles of the invention. Multi-chassis router120routes data packets between network devices across a network. In this example, multi-chassis router120comprises four substantially identical LCCs128A-128D (“LCCs128”) and SCC122that operates as a central control node. In other embodiments, a multi-chassis router may include more or less LCCs. SCC122provides centralized switching and control for multi-chassis router120. LCCs128provide interfaces to a network using IFC sets134A-134D (“IFCs134”).

SCC122includes switch fabric124and two routing engines: primary master routing engine126and standby master routing engine127. Switch fabric124provides a back-side connection, i.e. a connection separate from the network, between switch fabric125of LCCs128. Functions of primary master routing engine126include maintaining routing information to describe a topology of a network, and using that information to derive forwarding information bases (FIBs). Routing engine126controls packet forwarding throughout multi-chassis router120by installing an FIB in LCCs128via communication with local routing engines130and/or131over cables137. An FIB for one of LCCs128may be the same or different than an FIB for other LCCs128and SCC122. Because cables137provide a dedicated connection, i.e., separate from a data packet forwarding connection provide by cables136, between SCC122and LCCs128, FIBs in LCC routing engines130can be updated without interrupting packet forwarding performance of multi-chassis router120. LCCs128each contain one of primary local routing engines130A-130D (“routing engines130”), one of standby local routing engines131A-131D (“routing engines131”), one of switch fabrics125A-D (“switch fabric125”), at least one packet forwarding engine (PFE), shown as PFEs132A-132D (“PFEs132”), and one or more IFCs134.

Multi-chassis router120performs routing functions in the following manner. An incoming data packet is first received from a network by one of IFCs134, e.g.,134B, which directs it to one of PFEs132, e.g., PFE132B. The PFE then determines a proper route for the data packet using the FIB provided by the primary local routing engine, e.g., routing engine130B. If the data packet is destined for an outbound link associated with the one of IFCs134that initially receive the packet, the PFE forwards the packet to the outbound link. In this manner, packets sent out by the same PFE on which they were received from the network bypass switch fabric124and switch fabric125.

Otherwise, the PFE sends the data packet to switch fabric125, where it is directed to switch fabric124, where it follows a route to one of the other PFEs132, e.g., PFE132D. This PFE, e.g., PFE132D, sends the data packet across the network via one of IFCs134, e.g., IFC134D. Thus an incoming data packet received by one of LCCs128may be sent by another one of LCCs128to its destination. Other multi-chassis routers that operate in a manner consistent with the principles of the invention may use different switching and routing mechanisms.

As described with respect to multi-chassis router4inFIG. 1, in some embodiments, primary master routing engine126forwards state information updates to consumers using a hierarchically-ordered and temporally-linked data structure according to a synchronization gradient. With respect to primary master routing engine126, standby master routing engine127and primary local routing engines130are consumers.

Standby master routing engine127is substantially similar to primary master routing engine126. For example, standby master routing engine127may include the same hardware and operating system and other software applications as primary master routing engine126. If primary master rouging engine126fails or is taken off-line, standby master routing engine127carries on the functions of primary master routing engine126. In this example, if primary master routing engine126comes back on-line, it could either serve as a standby master routing engine subservient to routing engine127now acting as a primary, or resume operation as the primary master routing engine of SCC122. In either situation, at any one time, only one of primary master routing engine126and standby master routing engine127provides control of multi-chassis router120.

Primary local routing engines130control and manage LCCs128, but are subservient to primary master routing engine126of SCC122. For example, after receiving state information updates from primary master routing engine126, primary local routing engines130forward the state information update to consumers on LCCs128using the hierarchically-ordered and temporally-linked data structure. For example, consumers that receive state information updates from primary local routing engines130include standby local routing engines131, PFEs132and IFCs134. Primary local routing engines130also distribute the FIB derived by primary master routing engine126to PFEs132.

Standby local routing engines131may be substantially similar to primary local routing engines130. For example, standby local routing engines131may include the same hardware and operating system and other software applications as primary master routing engine126. If one of primary local routing engines130fails or is taken off-line, the corresponding standby local routing engines131would carry on the function of the failed one of routing engines130. For example, assume primary local routing engine130B of LCC128B fails. In this case, standby local routing engine131B takes over control of LCC128B. As a result, standby local routing engine131B begins forwarding state information updates to consumers on LCC128B. In this example, if routing engine130B were to come back on-line, the routing engine could either serve as a standby local routing engine to standby local routing engine131B or resume control of LCC128B. In either case, at any one time, only one of primary local routing engine130B and standby local routing engine131B provide control of LCC128B. While LCCs128are shown with exactly one of standby local routing engines131, in other embodiments, some of LCCs128may operate without a standby local routing engine128or include more than one of standby local routing engines128.

In some embodiments, operating systems executing on the primary and standby routing engines of each chassis encode commit markers and commit proposals within the hierarchically-ordered and temporally-linked data structures, which are used to track the distribution of the state information to the various consumers within multi-chassis router120. In particular, in some embodiments, the operating systems executing on the primary and standby routing engines of each chassis maintain a commit marker and a commit proposal to track the consumption of state information for each consumer associated with a shared router resource. A shared router resource, as referred to herein, is any router resource, such as a PFE or other consumer, that is shared by both the primary routing engine and the one or more of the standby routing engines on a chassis. For example, primary master routing engine126encodes commit markers and commit proposals for standby master routing engine127as well as each of primary local routing engines130. Primary local routing engines130contain commit markers only for consumers on the same chassis. For example, primary local routing engine128A contains a separate commit marker for each of standby local routing engine131A, PFE132A and IFCs134A, each of which reside on LCC128A. In contrast, primary and standby routing engines may each contain their own software processes or daemons, which also operate as consumers of state information. In some embodiments, routing engines do not include commit markers or commit proposals for non-shared router resources.

A commit marker may be used to mark the last state update received and acknowledged by the shared consumer, while a commit proposal for a consumer indicates a position in a state update corresponding to a request for acknowledgement sent to the consumer. Consequently, the commit marker and commit proposal may be a pointer, status bit, or other data structure capable of marking a location within the hierarchically-ordered and temporally-linked data structure.

In order to be capable of assuming control of state information updates, the standby routing engines also encode the commit markers and commit proposals into their data structure. The standby local routing engines encode a copy of the commit markers encoded in the corresponding primary local routing engine, except for its own commit marker, into its own data structure. By encoding the commit markers and commit proposals within the data structure, standby routing engines127and130can precisely determine the extent to which consumers have been updated with state information in the event of a failover. As a result, standby routing engines127and130need only update each consumer with a limited amount of the state information that is bounded by its respective commit markers and commit protocols encoded within the state information data structure.

Primary routing engines126and130may also encode a separate status bit marker on each object in their state information update chains. The status bit markers may be used to indicate that the corresponding standby routing engine has indeed received that object. These status bit markers may be used in addition to the commit marker and commit proposal for the standby routing engine. As described, a primary routing engine first provides an object in the state information chain to a corresponding standby routing engine. Once the standby routing engine acknowledges receipt of an object in the data chain, that object is marked with the status bit marker and released to other consumers, such as lower level routing engines of other chassis or local consumers. The status bit marker may be necessary, for example, when a routing engine is first operating without a standby routing engine and then a standby routing engine comes online. The status bit marker forces the primary operating system to allow the standby routing engine to catch-up on state information updates within memory of the primary routing engine immediately, so that the standby routing engine becomes ready to take over state information updates as soon as possible once activated. In this manner, maintaining a status bit marker ensures that a standby routing engine receives state updates before any other consumer. This is required so to allow a standby routing engine to resume state update from wherever the primary routing engine left off in a failover.

When there is not an active corresponding standby routing engine, a primary routing engine does not use the status bit marker or wait for a standby routing engine to acknowledge receipt of an object before providing it to other consumers. While the status bit marker is described as such, it may also be a pointer or other data structure capable of marking state information objects. A status bit marker is merely an example embodiment.

Although described in reference to a two-level multi-chassis router120, the principles of the invention may readily be applied to a multi-chassis router having three or more levels (tiers) of routing control. For example, each of local routing engines131of LCCs128of multi-chassis router120may operate as master routing engines over one or more additional chassis having primary local and standby routing engines. The techniques for ensuring the synchronization gradient for distributing state information may be applied to ensure that standby routing engines at any level are able to take over control for respective primary routing engines in the event of a failure.

FIG. 3is a block diagram illustrating an exemplary control plane of multi-chassis router120in accordance with principles of the invention. As shown, SCC122includes primary master routing engine126and standby master routing engine127. Each of LCCs128include one of primary local routing engines130and one of standby local routing engines131, but for illustrative purposes, this detail is only shown on LCC128A as primary local routing engine130A and standby local routing engine131A. LCCs128B-D may be substantially similar to LCC128A.

As described with respect toFIG. 2, routing engines126,127,130and131may maintain state information according to a hierarchically-ordered and temporally-linked data structure in a state chain. A portion of a state chain may represent, for example, the interface between multi-chassis router120and the network, which may include the current configuration of IFCs134and PFEs132. State chains150,152,154A and156A may be stored in memory, such as RAM, located on respective routing engines126,127,130A,131A or external to respective routing engines126,127,130A,131A.

The state information on routing engines126,127,130and131is referred to as a “state chain” because the information is propagated to routing engines126,127,130and131according to the temporal links in the data, i.e., state objects are distributed to routing engines127and130in the order they are received by primary master routing engine126. Likewise, primary local routing engines126forward the state information objects to standby local routing engines127using the same first-in-first-out methodology. In contrast, the hierarchical order of the state information is used when a consumer requires state information update to be provided in a certain order. For example, chassis daemon (“chassisd”)129may require any available state information updates regarding PFE132A prior to receiving a state information update regarding IFCs134A. However, generally, consumers receive state updates in a temporary order unless a state has a dependency on another state. Each consumer may have unique dependencies for receiving state information. For example dependencies could be the result of required state information for a consumer.

Consumers also maintain state information. For example,FIG. 3shows chassisd129, chassisd173, PFE132A, chassisd135A and chassisd175A maintaining state information161,165,162A,164A and184A respectively. State information161,165,162A,164A and184A may, for example, represent the current state of field replaceable units, such as interface cards, encryption cards, accounting service cards, and the like. Again, state information161,165,162A,164A and184A may be stored in memory, such as RAM, located within or external to the shared consumers. As examples,FIG. 3shows shared consumers PFE132A and shared intermediary consumers LCCs128.FIG. 3also shown non-shared consumers chassisd129, chassisd173, chassisd135A and chassisd175A. Multi-chassis router120also includes additional shared and non-shared consumers not shown inFIG. 3that require state information, e.g., IFCs134.

Because routing engines126,127,130and131push state data to consumers as the state information changes, rather than requiring consumers to poll for the updated state information, control plane data traffic and convergence time.

In order to prevent overloading of a consumer in the event of a large number of state updates, consumers are informed of a state update and then allowed to retrieve it once the consumer's resources allow it. In some embodiments, some consumers may be serviced indirectly by a proxy in the routing engine. For example, primary master routing engine126may include a proxy for each of LCCs128. Other consumers may directly retrieve state information from state chain150. For example, non-shared consumers, e.g., Chassisd129, may directly retrieve state information from state chain150.

To illustrate the process of state information updates in multi-chassis router as shown inFIG. 3, assume primary master and primary local routing engines126and130are in control and standby master and standby local routing engines127and131are serving as back-ups. Primary master routing engine126receives event messages indicative of a change in the state of the shared resource, e.g., PFE132A. When primary master routing engine126receives an event message, primary master kernel140in primary master routing engine126updates state chain150by reconfiguring the data structure and updating the data stored within the data structure. In addition to updating the data based on the change of state, primary master kernel140may add, delete or move commit markers and/or commit proposals to the various positions within the data structure in the event that the event message relates to the state of a shared routing resources, e.g., PFE132A.

Primary master kernel140then replicates the state update by transmitting the state information in message form to ksync daemon144, a state synchronization process executing on standby master routing engne127. Primary master kernel140may also send an acknowledgement request to standby master routing engine127and may also move the commit proposal representing standby master routing engine127on state chain150. Ksync daemon144extracts the state information and transmits the state information to standby master kernel141. Standby master kernel141receives this state update and updates state chain152in accordance with the state update.

Simile to primary master kernel140, standby master kernel141may reconfigure and update the data structures of state chain152based on the state information. Standby master kernel141may also add, delete or move commit markers and/or commit proposals to various positions within these data structures. After being updated, state chain152is substantially similarly to state chain150. In other words, state chain152and state chain150are synchronized. If an acknowledgement request was sent by primary master kernel140, standby master kernel141transmits an acknowledgement to primary master kernel140via ksync daemon144to indicate this synchronized state. In this manner, ksync daemon144provides an interface between primary master kernel140and standby master kernel141that allows for the synchronization of state information. Upon receiving the acknowledgement, if any, indicating the synchronized state in standby master routing engine127, primary master kernel140moves its commit marker representing standby master routing engine127to the current location of the commit proposal in master routing engine127. Primary master kernel140then marks each of the objects represented by the acknowledgement from standby master routing engine127with a status bit marker to allow distribution of the state information to LCCs128and consumers on SCC122. The status bit marker ensures that state information distributed from state chain150to other consumers has first been received by standby master routing engine127.

Standby master routing engine127then updates state information in its internal daemons. For example, standby master routing engine127updates state information165in chassisd173in substantially the same manner as primary routing engine126updates state information161in chassisd129.

Once standby master routing engine127is synchronized with primary master routing engine126, primary master routing engine126provides state information updates as necessary to various consumers within SCC122. For example, primary master kernel140may issue alerts to chassisd129to indicate a change in state information160. In response, primary master kernel140receives requests from the consumers for state information. Primary master kernel140services each request by traversing the hierarchically-ordered and temporally-linked data structure of state chain150and issuing update messages to the requesting consumer. Primary master kernel140generates the update messages to contain state information that the consumer has not already received based on the respective commit proposal and commit marker for the consumer. The consumers respond to acknowledge receipt of the state data up to an acknowledgement request from primary master kernel140. Upon updating the consumers and receiving their acknowledgements, primary master kernel140moves commit markers within the data structure of state chain150to reflect the updates.

After standby master routing engine127is synchronized with primary master routing engine126, primary master kernel140again replicates the state update by transmitting the state information in message form to ksync daemons145, one in each of primary local routing engines130, as represented by ksync daemon145A. As state updates occur, primary master kernel140may also send an acknowledgement request once it reaches a commit proposal in the state chain. The position of commit proposal in the state chain may not be consistently spaced. For example, the position of commit proposals for a consumer may depend on time lapsed since a previous commit proposal or other variable.

Ksync daemons145extract the state information and transmit the state information to primary kernels142, as represented by primary local kernel142A. Primary kernels142receive this state update and update state chains154, as represented by state chain154A, in accordance with the state update. In addition to updating state chain154A with the state update information, primary local kernel142A adds an additional object referred to as a “ksync object” corresponding to an acknowledgement request received from primary kernel140to state chain154A. The ksync object on state chain154A is required to remind primary kernel142A to respond to the acknowledgement request made by master routing engine126once the state update has replicated to all consumers that require it on LCC128A. This is because primary kernel142A must wait until primary kernel142A receives acknowledgements from all consumers on LCC128A that require the state update before providing an acknowledgement for the state update to master routing engine126.

After being synchronized with state chain150, state chains154differ from state chain150in that primary local kernels142encode different sets of commit markers and commit proposals within each of state chains154. Each of state chains154contains its own set of commit markers and commit proposals, which represent consumers on their particular chassis. For example, primary local kernel142A will encode a separate commit marker for each of standby local routing engine128A, PFE132A and IFCs134A.

Once primary local routing engines130are synchronized with primary master routing engine126, they replicate the state update to standby local routing engines131by transmitting the state information in message form to ksync daemons146, represented by ksync daemon146A. Ksync daemon146A extracts the state information and transmits the state information to standby local kernel143A. Standby local kernel143A receives this state update and updates state chain156A in accordance with the state update. Once standby local kernel143A has updated state chain156A, if requested, it acknowledges receipt of the state update to primary local kernel142A.

Upon receipt of the acknowledgement, primary local kernel142A moves the commit marker representing standby local routing engine131A to the commit proposal and marks all state objects in state chain154A between the commit marker and commit proposal with a status bit marker signifying that the objects are available to be replicated to consumers on LCC128A.

Primary local kernel142A issues alerts to consumers on LCC128A that require the state updates represented by one or more objects in state chain154A. In response, the consumers request state information and primary kernel142services those requests by traversing the hierarchically-ordered and temporally-linked data structure of state chain154A and issuing update messages to the requesting consumer.

Once each commit marker on LCC128A passes a ksync object in state chain154A, primary local kernel142A responds to the acknowledgement request form primary master kernel140. Primary master kernel140then moves the commit marker for LCC128A within state chain150to the commit proposal for LCC128A.

The described processes for distribution of state update information on multi-chassis router120may be performed when new state information is created or at defined time intervals. State updates occur often in multi-chassis router120, and synchronization may occur continuously or nearly continuously. Because synchronization does not occur instantaneously, multi-chassis router120may perform multiple iterations of state updates simultaneously. For example, primary master kernel140may simultaneously update primary kernels142in primary local routing engines130with a first state update while updating standby master kernel141in standby master routing engine127with a second state update because standby master kernel141has already acknowledged the first state update.

Synchronization of state information in state chains150,152,154and156continues in this manner until a failover occurs. Failover may occur for primary master routing engine126and/or for any of primary local routing engines130. Once a failover occurs, the standby routing engine corresponding to the failed primary routing engine assumes the responsibilities of the primary routing engine. For example, if failover occurs while a primary master routing engine126is updating primary local routing engines130, standby master routing engine127resumes the updates. In particular, standby master kernel141uses the commit markers and commit proposals stored and synchronized within state chain152to continue the updates from the same point that primary master kernel140left off.

In the event of a failover in one of LCCs128, e.g. LCC128A, standby local routing engine131A results updating consumers on LCC128A. Standby local routing engine131A operates without a back-up routing engine until primary local routing engine130A comes on-line. Because there is no back-up, upon receiving a state update, standby local routing engine131A does not maintain a status bit marker to signify an object has been acknowledged by a standby routing engine. Instead, standby local routing engine131A immediately updates consumers.

Standby local routing engine131A begins sending state updates from the hierarchically-ordered and temporally-linked data structure of state chain156A from the commit markers corresponding to each consumer. For example, standby local routing engine131A reaches a commit marker corresponding to PFE132A. Then, standby local routing engines131A issues state update messages to PFE132A. PFE132A begins receiving state objects in state chain162A that follow its commit marker. PFE132A may receive redundant state update messages if primary local routing engine130A sent the same state update message but failed prior to receiving an acknowledgement from PFE132A. In this case, PFE132A ignores the redundant state update message other than to respond to an acknowledgement request regarding the redundant state update.

Standby master routing engine127maintains state chain152to be synchronous with state chain150of primary master routing engine126. Standby local routing engines131maintain state chains156to be synchronous with state chains154of primary local routing engines130. Therefore, standby routing engines127and131may facilitate failover by assuming control without having to learn state information updates, e.g., by restarting the chassis, or even multi-chassis router120from a known state. Moreover, standby routing engines127and131can update the consumers with regard to the limited amount of the state information bounded by their respective commit markers and commit proposals encoded within the state information data structure.

As described, in the event of a failover, one or more standby routing engines127and131assumes the role of a primary routing engine. Later, the primary routing engine may return to an operational status, e.g., after being reset, and assume the role of a standby routing engine. In this case, the primary routing engine initiates a state synchronization process to synchronize its state information with state information of the standby routing engine, now operating as the primary routing engine.

Routing engines126,127,130and131may operate according to executable instructions fetched from one or more computer-readable media. Examples of such media include random access memory (RAM), read-only memory (ROM), non-volatile random access memory (NVRAM), electrically erasable programmable read-only memory (EEPROM), flash memory, and the like. The functions of multi-chassis router120may be implemented by executing the instructions of the computer-readable medium with one or more processors, discrete hardware circuitry, firmware, software executing on a programmable processor, or combinations thereof.

FIGS. 4A and 4B(“FIGS.4”) are block diagrams illustrating exemplary propagation of state updates to state chains150,152,154A,156A,162A and164A in primary master routing engine126, standby master routing engine127, primary local routing engine130A, standby local routing engine131A, PFE132A and chassisd135A respectively. As illustrated, state information may be stored within multiple objects250. As state updates occur, new objects are created and distributed to the routing engines and shared consumers on multi-chassis router120. Moreover, objects250may be propagated to routing engines126,127,130and131according to the temporal-links in the data structure. Objects250may store information corresponding to routes, firewalls, interface cards, and other components.

As shown inFIG. 4A, primary master kernel140in primary master routing engine126maintains state information in the form of state chain150including objects250A-250H, as illustrated inFIG. 4A. Primary master kernel140associates commit marker201and commit proposal211with standby master routing engine127. Commit proposal212and commit marker202correspond to primary local routing engine130A. State chain150may contain additional commit markers and commit proposals (not shown) for primary local routing engines on each of LCCs128B-128D. State chain150may additionally include commit markers and commit proposals (not shown) for shared consumers on SCC122.

Standby master kernel141also maintains state chains152including objects250A-250H. State chain152is synchronized with state chain150. Objects on state chain150include a status bit marker to indicate whether that object has been received by standby master routing engine127. As shown inFIG. 4A, objects250A-250G in state chain150are marked as having been added to state chain152. While state chain152currently includes object250F, standby master routing engine127has not yet acknowledged receipt of object250F and will do so in response to commit proposal211. Until then, object250F in state chain150is not marked as having been received by standby master routing engine127.

With reference toFIG. 4A, state chain152is substantially similar to state chain150, and is in the process of being synchronized with state chain150and includes all objects in state chain150. State chain152includes commit marker202and commit proposal212corresponding to primary local routing engine130A. State chain152includes additional commit markers and commit proposals (not shown) that are part of on state chain150, except for commit marker201and commit proposal211, which correspond to standby local routing engine127. In contrast to state chain150, objects on state chain152do not include a status bit marker to show if a standby master routing engine has received each object. In the event that standby master routing engine127becomes the primary master routing engine and is backed-up by another routing engine serving as a standby master routing engine, status bit markers would then be added to each object in state chain152.

State chain154A is maintained by primary local routing engine130A in LCC128A, and is representative of state chains in primary local routing engines130in each of LCCs128. In this example, state chain154A includes commit markers203and204for standby local routing engine131A and PFE132A, respectively. State chain154A also includes commit proposal214for PFE132A. As shown, state chain154A does not include a commit proposal for standby local routing engine131A. At other times during state update operation state chain154A may also include a commit proposal for standby local routing engine131A. Similar to state chain150on primary master routing engine126, state chain154A includes a status bit marker on each object to indicate when the object has been acknowledged by standby local routing engine131A. In addition to objects250, primary local kernel142A inserts a ksync object, e.g., ksync object260A, into state chain154A upon receipt of an acknowledgement request from primary master routing engine126. Ksync objects in state chain154A remind primary local routing engine to respond to the acknowledgement request once all commit markers in state chain154A have passed the ksync object.

In the example ofFIG. 4A, a commit marker202marks object250A as holding the last state update acknowledged by primary local routing engine130A. Commit proposal212marks object250C as holding the most recent acknowledgement request sent to primary local routing engine130A. Accordingly, primary local kernel142A has already acknowledged receipt of object250C, after which primary master kernel140moved commit proposal212just after object250C in state chain150. Primary master kernel140forwarded the acknowledgement to standby master routing engine127, where standby master kernel141also moved commit proposal212beyond object250C in state chain152. The additional commit markers (not shown) for primary local routing engines on each of LCCs128B-128D are manipulated in the same manner. Commit marker201and commit proposal211operate in a similar manner with respect to standby master routing engine127, but only exist on state chain150.

Again with reference toFIG. 4A, state chain154A of primary local routing engine128A includes objects250A-250G and ksync objects260A and260B. Commit marker203indicates object250G as holding the most recent, in temporal relation, state information acknowledged by standby local routing engine131A. Similarly, commit marker204indicates object250E as holding the most recent state information acknowledged by PFE132A. Commit proposal214indicates object250G as the most recent object in an acknowledgement request sent to PFE132A.

Primary local kernel142A inserted ksync object260A into state chain154A after object250C to mark the receipt of an acknowledgement request for objects up to and including object250C from primary master routing engine126. Ksync object260A functioned to remind primary local routing engine130A to respond to the acknowledgement request once all consumers on LCC128A acknowledged receipt of all objects they require up to and including object250C in the temporally-linked state chain154A. Primary local kernel142A inserts a ksync object into state chain154A every time primary master routing engine126sends an acknowledgement request to LCC128A. Each ksync object corresponds to a new location for commit proposal212. For example ksync object260B corresponds to commit proposal212as placed following object250E in state chain150.

In multi-chassis router120, before acknowledging a state update from primary master routing engine126, primary local routing engine130A forwards the update to standby local routing engine131A and every consumer on LCC128A that requires the update. Furthermore, primary local routing engine130A must wait to receive acknowledgements from standby local routing engine131A and each shared consumer on LCC128A before sending the acknowledgement to the master routing engine. For example, in some embodiments, acknowledgements may not be required for non-shared consumers. For example, commit marker202in state chains150and152will remain between objects250C and250D until every commit marker in state chain154A reaches or passes ksync object260A. In the event of a failover, there may be a significant amount of state update information received, but not acknowledged, by primary local routing engine130A.

Primary master kernel140encodes a random number “N” (not shown), referred to as a sequence number, into commit proposal212in state chain150. For example, N may be a random three-digit number. The acknowledgement request to primary local routing engine corresponding to object250C also includes the random number N. Primary local kernel142A encodes the number N into ksync object260A. Once synchronized, ksync object160A in state chain156A of standby local routing engine131A also includes the sequence number N.

After primary local kernel142A responds to the acknowledgement request corresponding to ksync object260A, primary master kernel140will later send a new acknowledgement request to corresponding to an object further along state chain150and move commit proposal212to that object. At this location, primary master kernel140encodes a number N+1 into commit proposal212. In this manner, primary master kernel140counts the number of times that an acknowledgement request is sent to LCC128A. Primary master kernel140includes an updated sequence number in every subsequent acknowledgement request.

In the event of a failover, either master or local, upon reconnect with SCC122, the active local routing engine in LCC128A sends its more recent sequence number to the active master routing engine in SCC122. This has the effect of informing the master routing engine that LCC128A received the state corresponding to that sequence number. Assuming the sequence number sent by LCC128A matches the sequence number of either the corresponding commit marker or commit proposal in the state chain of the active master kernel, the active master routing engine can resume state updates from that point. If the sequence numbers do not match, then the active master routing engine sends an error signal. In the event of an error, state chain154is re-synchronized with the active master routing engine, for example, by way of clearing all state information from LCC128A and relearning it from SCC122.

A sequence number mismatch, while rare, may occur, for example, when a standby routing engine, either master or local, assumes the duties of the respective primary routing engine after the primary routing engine produces a new sequence number, but before the primary routing engine was able to update the sequence number encoded in the state chain of the standby routing engine. For example, primary master routing engine126updates the sequence number in standby master routing engine127after the position of commit marker212moves in state chain150when it updates the position of the commit marker in state chain152. Primary local routing engine130A sends an updated sequence number to standby local routing engine131A with each new acknowledgement request, which is then included within the corresponding ksync object in state chain156A. By comparing sequence numbers before resuming state information updates after a failover, multi-chassis router120ensures that state chains154and156in local routing engines130and131contain the same set of objects250as state chains150and152in master routing engines126and127.

Even if sequence numbers match, the local routing engine may receive objects already available in its state chain. For example, state chain154A includes two objects after ksync object260B. In the event of a master routing engine failover, standby master routing engine127receives the sequence umber N+1 from primary local routing engine130A. This sequence number corresponds to the sequence number on commit proposal212on state chain152. Therefore, standby master routing engine127knows that primary local routing engine130A received all objects up to and including object250E. However, standby master routing engine127does not know that primary local routing engine130A has also received objects250F and250G. Therefore, standby master routing engine127resumes state updates for LCC128A with object250F. Primary local kernel142A simply ignores objects250F and250G before adding a new object to state chain154A, e.g., object250H. Depending on the circumstances, the first new object to state chain154A may be either a ksync object260or a state update object250.

During the course of forwarding state updates to standby master routing engine127and primary local routing engines130, primary master kernel140also receives new state update objects. State update objects may be created by processes in any chassis of multi-chassis router120. However, every state update is forwarded to SCC122and distributed according to the techniques described prior to being acted upon in any chassis of multi-chassis router120. For example, a state update produced on LCC128A is forwarded to SCC122, where it is inserted in state chain150and compiled to state chain152before being forwarded back to primary local routing engine130A in LCC128A. In this manner, primary master routing engine126maintains centralized control of multi-chassis router120.

FIG. 4Billustrates the propagation of state updates from state chain154A of primary local routing engine130A to state chain156A in standby local routing engine131A, and state information162A and164A for PFE132A and chassisd135A, respectively. The state information updates shown inFIG. 4Bcorrespond with the state information updates shown inFIG. 4A.

As shown inFIG. 4B, PFE132A and chassisd135A may receive objects according to the hierarchical-order of the data structure. Furthermore, PFE132A and chassisd135A do not each need to receive very object, but only those updates relevant to their operation. InFIG. 4B, state information162A and164A for PFE132A and chassisd135A is exemplary of state information updates provided to consumers in any of LCCs128. For example, LCC128A includes additional consumers that require state information updates. Updates to other consumers in LCCs128and SCC122occur in a substantially similar manner to exemplary consumers PFE132A and chassisd135A.

State chain156A is synchronized with state chain154A. Once synchronized, state chain156A includes all the objects in state chain154A. However, because state update information is regularly created in multi-chassis router120, state chain156A may often require synchronization with state chain154A. State chain156A includes commit marker204and commit proposals214corresponding to PFE132A. State chain156A also includes additional commit markers and commit proposals (not shown) that are part of state chain150, except for commit marker203and commit proposal213, which correspond to standby local routing engine131A. In contrast to state chain154A, objects on state chain156A do not include a status bit marker to show if a standby local routing engine has received each object. In the event that standby local routing engine131A becomes the primary local routing engine on LCC128A and is backed-up by another routing engine serving as a standby local routing engine, status bit markers would then be added to each object in state chain156A.

State chain156A includes objects250A-250G, ksync objects260A and260B, commit marker204and commit proposal214. Each of objects250A-250G are marked as having been acknowledges by standby local routing engine131A. For example, standby local routing engine131A acknowledged receipt of ksync object260A in response to an acknowledgement request. After receiving acknowledgement of ksync object260A from standby local routing engine131A, primary local routing engine130A marked objects250B,250C and ksync object260A as having been acknowledged by standby local routing engine131A. Primary local routing engine130A then forwarded objects250B and250C, as necessary, to PFE132A and chassisd135A. As shown inFIG. 4B, PFE132A does not require object250B.

LCC128A will not respond to the acknowledgment request corresponding to commit proposal212on state chain150until each of the commit markers on state chain154A pass or reach ksync object260A. At that point, primary local routing engine130A will send an acknowledgment to primary master routing engine126and primary master kernel140will move commit marker202to replace commit proposal212. Primary master kernel140may then reinsert commit proposal212at a later position along state chain150.

The order which consumers receive state information updates may be dependent on the hierarchical-order of the state update data structure. As shown inFIG. 4B, PFE132A and chassisd135A received state updates according to the hierarchical-order of the state update data structure. For example, chassisd135A received state information updates in the following order: object250A, object250C, object250B, object250F and object250D. Consumers may require state update objects in a particular order as defined by the hierarchical-order of the state update date structure. For example, a consumer may require state update information regarding PFEs132prior to state update information regarding IFCs134.

The propagation of state updates continues indefinitely in multi-chassis router120. For example, state chain154A in primary local routing engine130A includes object250G, which has not yet been forwarded to consumers on LCC128A. Also, primary master routing engine126includes object250H, which has not yet been forwarded to LCC128A. Primary master routing engine126must wait for an acknowledgement from standby master routing engine127in order to forward objects250H to LCC128A.

As described, processes in every chassis of multi-chassis router120may produce state update information, and state update information is produced regularly during operation of multi-chassis router120. However, in the event of a failure of a consumer, e.g., chassisd135A in LCC128A, in order to restart, the consumer may require receiving substantially all state update information required to operate. Chassisd135A in LCC128A, for example, may require information on routing engines130A and131A, PFE132A and IFCs134A. Chassisd135A requires state information to be resent from primary local kernel142A. Upon restarting after a failure, chassisd135A informs primary local kernel142A that it requires state information updates. Primary local kernel142A then resends chassisd135A all the state information it requires that is available in state chain154A. As before, this state information is sent according to the particular hierarchical data structure necessary for chassisd134A.

FIG. 5is a flowchart illustrating exemplary operation of multi-chassis router120(FIGS. 2 and 3) when synchronizing and processing state updates in accordance with the principles of the invention. Initially, multi-chassis outer120and, more particularly, primary master kernel140receive information regarding changes to the state of the network or resources with multi-chassis router120(354). As one example, primary master kernel140receives state information from chassisd129. In another example, state information may define changes to the network topology, such as the addition of network routes.

In response, primary master kernel140updates state chain150to reflect the changes in state of multi-chassis router120(356). Primary master kernel140updates state chain150by adding and/or removing objects and adding, deleting or moving commit markers and commit proposals.

Next, primary master kernel140synchronizes state chain152with state chain150. In particular, primary master kernel140replicates the state information of state chain150and transmits the state information to standby master kernel141via ksync daemon144(358). Upon receiving the updates, standby master kernel141processes the state information and executes the necessary changes to synchronize state chain152(360). Standby master kernel141waits for an acknowledgement request from primary master kernel140and then transmits an acknowledgement to primary master kernel140via ksync daemon144(362).

Once primary master kernel140receives the acknowledgement, the primary kernel marks the acknowledged objects with a status bit marker and replicates the state update information to primary local kernels142and any local consumer within SCC122. State update information is replicated via ksync daemons145to primary local kernels142on and directly to any local consumers within SCC122(364). Upon receiving the updates, primary local kernels142process the state information and execute the necessary changes to synchronize state chains154(366).

State chains156are separately synchronized with state chains154in each of LCCs128. Primary local kernels142replicate the state information of state chains154and transmit the state information to standby kernels143via ksync daemons146(368). Upon receiving the updates, standby master kernel141processes the state information and executes the necessary changes to synchronize state chain152(370). Standby kernels143then transmit acknowledgements to primary kernels142and any local consumers within the LCCs via ksync daemons146(372).

Primary local kernels142each receive a separate acknowledgement and proceed to transmit the updated state information to consumers, such as PFE132A (374). In particular, primary local routing engines130issue alerts to indicate to the consumers that state updates exist. Upon receiving requests from the consumers, primary kernels142transmit the updated state information based upon the locations of the respective commit proposals and commit markers associated with the consumers. The consumers receive the updated state information and make the necessary changes to their respective state information. For example, PFE132A may receive updated state information from primary local kernel142A and update state information162A.

Once a primary local kernel142receives acknowledgements from each shared consumer that requires the state update, it sends an acknowledgement to master routing engine126(376). Once master routing engine126receives an acknowledgement for a state update, it may dequeue the update. For example, in some embodiments, master routing engine126may delete the least recent objects in state chain150after those objects have been acknowledged by all consumers of primary master routing engine126, e.g., LCCs128. The deletions may also be propagated to standby master routing engine127and local routing engines LCCs128. In other embodiments, routing engines may maintain a state information object until it becomes obsolete due to a state update.

As illustrated, multi-chassis router120synchronizes and updates state information in accordance with a defined “synchronization gradient,” whereby primary master kernel140receives state updates, followed by standby master kernel141, followed by primary local kernels142A, followed by standby local kernels143A, followed by consumers in each chassis of multi-chassis router120. This synchronization gradient may ensure that upon failover, standby routing engines127and131contain state information that is at least as current as the state information provided to all consumers of state information. Consequently, standby routing engines127and131are able to readily assume responsibility in the event of a failover, and can continue updating the consumers with the state information as necessary.

FIG. 6is a flowchart illustrating exemplary failover of a master routing engine in a multi-chassis router that allows for non-stop forwarding. The failover process is described with reference to multi-chassis router120ofFIGS. 2 and 3. For exemplary purposes, first assume that primary master routing engine126fails (602). For example, failure of primary master routing engine126may result from a software failure, hardware failure or an administrator taking primary master routing engine126offline. Because of the failure, the connection between primary master routing engine126and primary local routing engines130also fails (604). Primary local routing engines130server connections with PFEs132(606). This prevents primary local routing engines130from having to store state updates produced in PFEs132until re-connecting with a master routing engine.

Next, primary local routing engines130open connections with standby master routing engine127(608). Once the connections have been established, primary local routing engines130each send their unique sequence number to standby master routing engine127(610). Standby master routing engine127compares each sequence number received from primary local routing engines130with the sequence numbers in commit proposals and commit markers for LCCs128in state chain152(612). For example, as shown inFIG. 4, commit proposal212corresponds to LCC128A. If the sequence number from one of LCCs128matches either the corresponding commit proposal or commit marker each case, standby master kernel141begins forwarding state updates to the one of LCCs128from that point (616).

In the rare occurrence that sequence numbers do not match, master routing engine127sends an error signal to the LCC. In the event of an error, state chain154in one or more of LCCs128must be re-synchronized with state chain152, for example, by clearing all state information from the LCC and resending the state information in state chain152(614). Clearing all state information from one or more of LCCs128may interrupt packet forwarding in multi-chassis router120. After resetting one or more of LCCs128to a known state, master routing engine127resumes state updates (616).

In this manner, multi-chassis router120maintains packet forwarding during a failover of master routing engine126. State updates are temporarily interrupted during the failover process while local routing engines130establish connections with master routing engine127, but multi-chassis router120continues to send and receive packets during this time according to already known state information. Only in the rare event of a sequence number mismatch might packet forwarding be interrupted in multi-chassis router120.

While the described failover process describes master routing engine126as the primary master routing engine and master routing engine127as the standby master routing engine, master routing engines126and127are substantially similar. That is, both master routing engines126and127may act as either the primary master routing engine or the standby master routing engine. Therefore, failover may also occur by transferring central control of multi-chassis router120from master routing engine127to master routing engine126.

FIG. 7is a flowchart illustrating exemplary failover of a local routing engine in a multi-chassis router that allows for non-stop forwarding. The failover process is described with reference to multi-chassis router120ofFIGS. 2 and 3and, in particular, with reference to LCC128A. For exemplary purposes, first assume that primary local routing engine130A fails (702). For example, failure of primary local routing engine130A may result from a software failure, hardware failure or an administrator taking primary local routing engine130A offline. Because of the failure, the connection between primary local routing engine130A and primary master routing engine126fails (704). The connection between primary local routing engine130A and PFEs132A also fails (706).

Next, standby local routing engine131A opens a connection with primary master routing engine126(708). Once the connection has been established, standby local routing engine131A sends the sequence number contained in the most recent ksync object in state chain156A to primary master routing engine126(710). Primary master routing engine126compares this sequence number with the sequence numbers in commit marker202and commit proposal212. If the sequence number matches either the commit proposal or commit marker, primary master kernel140begins forwarding state updates to LCC128A, beginning with the first object in state chain150following the commit proposal or commit marker (716).

In the rare occurrence that sequence numbers do not match, master routing engine127sends an error signal to standby local routing engine131A. In the event of an error, state chain156A must be re-synchronized with state chain150, for example, by clearing all state information from LCC128A (714). Optionally, only LCC128A may need to be reset to a known state. LCCs128B-D may continue to receive state updates according to their commit markers and commit proposals in state chain150. Resetting LCC128A to a known state may interrupt packet forwarding in multi-chassis router120. After resetting LCC128A to a known state, master routing engine126resumes state updates (616). This may require requesting state information from processes throughout multi-chassis router120.

In this manner, multi-chassis router120maintains packet forwarding during a failover of local routing engine130A. State updates for LCC128A are temporarily interrupted during the failover process while standby local routing engine130established a connection with master routing engine126, but LCC128A continues to send and receive packets during this time according to already known state information held by consumers of LCC128A. Only in the rare event of a sequence number mismatch might packet forwarding be interrupted in multi-chassis router120.

While the described failover process describes local routing engine130A as the primary local routing engine and local routing engine131A as the standby local routing engine, local routing engines130A and131A are substantially similar. That is, both local routing engines130A and131A may act as either the primary local routing engine or the standby local routing engine. Furthermore, the described local routing engine failover techniques are further applicable to primary and standby local routing engines contained within each of LCCs128.

One or more of the techniques described herein may be partially or wholly executed in software. For example, a computer-readable medium may store or otherwise comprise computer-readable instructions, i.e., program code that can be executed by a processor to carry out one or more of the techniques described above. For example, the computer-readable medium may comprise random access memory (RAM), read-only memory (ROM), non-volatile random access memory (NVRAM), electrically erasable programmable read-only memory (EEPROM), flash memory, magnetic or optical media, or the like.

Various embodiments of the invention have been described. Although described in reference to a multi-chassis router, which each chassis including a plurality of routing engines, the techniques may be applied to any multi-chassis device having a plurality of control nodes in at least one chassis. Examples of other devices include switches, gateways, intelligent hubs, firewalls, workstations, file servers, database servers, and computing devices generally. Furthermore, the described embodiments refer to hierarchically-ordered and temporally-linked data structures, but other embodiments may use different data structures. These and other embodiments are within the scope of the following claims.