Rollback-on-error support for forwarding components of a network device

A network device may receive an original configuration that includes configuration objects, and may generate, based on the original configuration, a dependency graph that includes nodes representing and entries representing the configuration objects. The network device may receive a configuration update that includes new configuration objects, and may update the dependency graph based on the configuration update and to generate an updated dependency graph that includes new nodes and/or new entries representing the new configuration objects. The network device may test the configuration update, based on the updated dependency graph, to determine whether the configuration update fails or succeeds. The network device may selectively implement the configuration update based on the configuration update succeeding or perform a rollback of the configuration update, based on the configuration update failing, to restore the original configuration.

BACKGROUND

A network device may include hardware, such as packet forwarding components (e.g., packet forwarding engines (PFEs)). Each packet forwarding component may utilize software (e.g., routing tables, routes, and/or the like) to control forwarding of packets by the packet forwarding component.

SUMMARY

Some implementations described herein relate to a method. The method may include receiving an original configuration that includes configuration objects, and generating, based on the original configuration, a dependency graph that includes nodes and entries representing the configuration objects. The method may include receiving a configuration update that includes one or more new configuration objects, and updating the dependency graph based on the configuration update and to generate an updated dependency graph that includes one or more new nodes or one or more new entries representing the configuration objects. The method may include testing the configuration update, based on the updated dependency graph, to determine whether the configuration update fails or succeeds. The method may include selectively implementing the configuration update based on the configuration update succeeding, or performing a rollback of the configuration update, based on the updated dependency graph and based on the configuration update failing, to restore the original configuration.

Some implementations described herein relate to a network device. The network device may include one or more memories and one or more processors coupled to the one or more memories. The one or more processors may be configured to receive an original configuration that includes configuration objects, and generate, based on the original configuration, a dependency graph that includes nodes and entries representing the configuration objects, wherein the dependency graph is a representation of a packet topology. The one or more processors may be configured to receive a configuration update that includes one or more new configuration objects, and update the dependency graph based on the configuration update and to generate an updated dependency graph that includes one or more new nodes and one or more new entries representing the configuration objects. The one or more processors may be configured to test the configuration update, based on the updated dependency graph, to determine whether the configuration update fails or succeeds. The one or more processors may be configured to selectively implement the configuration update based on the configuration update succeeding, or perform a rollback of the configuration update, based on the updated dependency graph and based on the configuration update failing, to restore the original configuration.

Some implementations described herein relate to a non-transitory computer-readable medium that stores a set of instructions. The set of instructions, when executed by one or more processors of a network device, may cause the network device to receive an original configuration that includes configuration objects, and generate, based on the original configuration, a dependency graph that includes nodes and entries representing the configuration objects. The set of instructions, when executed by one or more processors of the network device, may cause the network device to receive a configuration update that includes one or more new configuration objects, wherein the original configuration and the configuration update are associated with a packet forwarding component of the network device. The set of instructions, when executed by one or more processors of the network device, may cause the network device to update the dependency graph based on the configuration update and to generate an updated dependency graph that includes one or more new nodes or one or more new entries representing the configuration objects. The set of instructions, when executed by one or more processors of the network device, may cause the network device to test the configuration update, based on the updated dependency graph, to determine whether the configuration update fails or succeeds. The set of instructions, when executed by one or more processors of the network device, may cause the network device to selectively implement the configuration update based on the configuration update succeeding, or perform a rollback of the configuration update, based on the updated dependency graph and based on the configuration update failing, to restore the original configuration.

DETAILED DESCRIPTION

A network device may require a configuration update and various types of errors may occur due to the configuration update. For example, the configuration update may cause hardware resource exhaustion in the network device, the configuration update may not be supported by the network device, the configuration update may include bugs, the configuration update may cause system level errors (e.g., memory exhaustion, socket issues, etc.), and/or the like. A configuration update error may be handled by logging the configuration update error, incrementing an error counter for the configuration update error, displaying the configuration update error in a command line interface (CLI) of the network device, reporting the configuration update error via telemetry, and/or the like. There are various techniques for correcting a configuration update error that are context specific or application specific. If the configuration update error is not corrected, hardware and/or software of the network device may enter an inconsistent state that results in dropped traffic. For example, a software state of a packet forwarding engine (PFE) of the network device may need to be reverted to a working state when a configuration update error occurs.

Thus, current techniques for correcting a configuration update error in a network device consume computing resources (e.g., processing resources, memory resources, communication resources, and/or the like), networking resources, and/or the like, associated with creating an inconsistent state in the network device, handling lost traffic due the inconsistent state in the network device, exhausting resources of the network device for context specific or application specific techniques to correct the configuration update error, and/or the like.

Some implementations described herein relate to a network device that provides rollback-on-error support for forwarding components of the network device. For example, the network device may receive an original configuration that includes configuration objects, and may generate, based on the original configuration, a dependency graph that includes nodes representing and entries representing the configuration objects. The network device may receive a configuration update that includes new configuration objects, and may update the dependency graph based on the configuration update and to generate an updated dependency graph that includes new nodes representing and/or new entries representing the configuration objects. The network device may test the configuration update, based on the updated dependency graph, to determine whether the configuration update fails or succeeds. The network device may selectively implement the configuration update based on the configuration update succeeding or perform a rollback of the configuration update, based on the updated dependency graph and based on the configuration update failing, to restore the original configuration.

In this way, the network device provides rollback-on-error support for forwarding components of the network device. For example, the network device may provide a methodology to revert a configuration of the network device to an original state when a configuration update error occurs. The network device may test the configuration update and may determine whether a configuration update error occurs based on testing the configuration update. If a configuration update error occurs, the network device may rollback the configuration of the network device to an original state prior to the configuration update. Thus, the network device conserves computing resources, networking resources, and/or the like that would otherwise have been consumed based on creating an inconsistent state in the network device, handling lost traffic due the inconsistent state in the network device, exhausting resources of the network device for context specific or application specific techniques to correct the configuration update error, and/or the like.

FIGS.1A-1Iare diagrams of an example100associated with rollback-on-error support for forwarding components of a network device. As shown inFIGS.1A-1I, example100includes an endpoint device and a server device associated with a network of network devices. Further details of the endpoint device, the server device, the network, and the network devices are provided elsewhere herein.

As shown inFIG.1A, and by reference number105, the network device may receive an original configuration that includes configuration objects (e.g., routing tables and routes). For example, the network device may include hardware, such as packet forwarding components (e.g., PFEs). Each packet forwarding component may utilize a configuration (e.g., that includes routing tables, routes, next hops, firewalls, interfaces, and/or the like) to control forwarding of packets by the packet forwarding component. In some implementations, a user (e.g., a network administrator) may utilize the endpoint device to generate the original configuration that includes the routing tables and the routes (e.g., or other configuration objects, such as next hops, firewalls, interfaces, and/or the like), and may cause the endpoint device to provide the original configuration that includes the routing tables and the routes to the network device. The network device may receive the original configuration that includes the routing tables and the routes from the endpoint device. In some implementations, the network device may be preprogrammed with the original configuration that includes the routing tables and the routes, the user may utilize a command line interface of the network device to provide the original configuration that includes the routing tables and the routes to the network device, and/or the like. In some implementations, the original configuration may be associated with a packet forwarding component of the network device. The packet forwarding component may utilize the routing tables of the original configuration to define routes for packets processed by the packet forwarding component.

As shown inFIG.1B, and by reference number110, the network device may generate, based on the original configuration, a dependency graph that includes nodes and entries representing the configuration objects (e.g., nodes representing the routing tables and entries representing the routes). For example, the network device may create nodes for the routing tables (e.g., or other configuration objects, such as next hops, firewalls, interfaces, and/or the like) of the original configuration and may create entries for the routes (e.g., or other configuration objects, such as next hops, firewalls, interfaces, and/or the like) of the original configuration. The network device may determine dependencies between the routing tables and/or the routes (e.g., or other configuration objects, such as next hops, firewalls, interfaces, and/or the like), and may interconnect the nodes and/or the entries based on the determined dependencies between the routing tables and/or the routes (e.g., or other configuration objects, such as next hops, firewalls, interfaces, and/or the like) to generate the dependency graph. In some implementations, each node or entry (e.g., represented by a circle in the dependency graph) may be associated with a software state (e.g., represented by an unshaded square in the dependency graph) and/or a hardware state (e.g., represented by a shaded square in the dependency graph). In some implementations, the dependency graph may define a packet topology (e.g., destinations, routes, and/or the like) associated with packets processed by the packet forwarding component of the network device.

As shown inFIG.1C, and by reference number115, the network device may receive a configuration update that includes new configuration objects (e.g., new routing tables and new routes). For example, the network device may require a configuration update that updates the original configuration. In some implementations, a user (e.g., a network administrator) may utilize the endpoint device to generate the configuration update that includes the new routing tables and the new routes, and may cause the endpoint device to provide the configuration update that includes the new routing tables and the new routes to the network device. The network device may receive the configuration update that includes the new routing tables and the new routes from the endpoint device. In some implementations, the user may utilize the command line interface of the network device to provide the configuration update that includes the new routing tables and the new routes to the network device. In some implementations, the configuration update may cause one or more routing tables and/or one or more routes to be removed from the original configuration. In some implementations, the configuration update may be associated with the packet forwarding component of the network device. The packet forwarding component may utilize the new routing tables of the configuration update to define the new routes for packets processed by the packet forwarding component.

As further shown inFIG.1C, and by reference number120, the network device may update the dependency graph based on the configuration update and to generate an updated dependency graph that includes new nodes and new entries representing the new configuration objects (e.g., new nodes representing the new routing tables and new entries representing the new routes). For example, the network device may create new nodes for the new routing tables of the configuration update, may modify the nodes for the routing tables of the original configuration based on the configuration update, may create new entries for the new routes of the configuration update, may modify the entries for the routes of the original configuration based on the configuration update, and/or the like. The network device may determine dependencies between the routing tables, the routes, the new routing tables, and/or the new routes and may interconnect the nodes, the entries, the new nodes, and/or the new routes based on the determined dependencies between the routing tables, the routes, the new routing tables, and/or the new routes to generate the updated dependency graph. In some implementations, each node or entry (e.g., represented by a circle in the dependency graph) may be associated with a current software state (e.g., represented by an unshaded square in the dependency graph) and/or a current hardware state (e.g., represented by a shaded square in the dependency graph). In some implementations, each new or updated node or entry (e.g., represented by a cross-hatched circle in the dependency graph) may be associated with a new software state (e.g., represented by a cross-hatched and unshaded square in the dependency graph) and/or a new hardware state (e.g., represented by a cross-hatched and shaded square in the dependency graph).

In some implementations, the updated dependency graph may define an updated packet topology (e.g., destinations, routes, and/or the like) associated with packets processed by the packet forwarding component of the network device. In some implementations, the configuration update may include one or more in-place updates (e.g., updates to a node or an entry of the dependency graph), one or more make-before-break (MBB) updates (e.g., updates to multiple nodes or entries of the dependency graph). An example of an in-place update is described below in connection withFIG.1F. An example of an MBB update is described below in connection withFIG.1G.

In some implementations, when updating the dependency graph based on the configuration update, the network device may update a software dependency state of the dependency graph based on the configuration update, and may update a hardware state of the dependency graph based on the configuration update to generate the updated dependency graph. In some implementations, when updating the dependency graph based on the configuration update, the network device may update a software dependency state of the dependency graph based on the configuration update and to generate an updated software dependency state, and may update a hardware state of the dependency graph based on the configuration update and to generate an updated hardware dependency state. The network device may then backpropagate the updated software dependency state and the updated hardware dependency state in the dependency graph to generate the updated dependency graph.

As shown inFIG.1D, and by reference number125, the network device may test the configuration update, based on the updated dependency graph, to determine whether the configuration update fails or succeeds. For example, various types of errors may occur due to the configuration update. In some implementations, the configuration update may cause hardware resource exhaustion in the network device, the configuration update may not be supported by the network device, the configuration update may include bugs, the configuration update may cause system level errors (e.g., memory exhaustion, socket issues, etc.), and/or the like. Thus, the network device may test the configuration update prior to implementing the configuration update in order to ensure that the configuration update does not generate errors. In some implementations, the network device may test the configuration update (e.g., perform a dry run) based on the updated dependency graph to determine whether the configuration update generates errors. In some implementations, the network device may identify one or more configuration update errors based on testing the configuration update, and may determine that the configuration update fails based on identifying the one or more configuration update errors. Alternatively, the network device may identify no configuration update errors based on testing the configuration update, and may determine that the configuration update succeeds based on identifying no configuration update errors.

As further shown inFIG.1D, and by reference number130, the network device may implement the configuration update based on the configuration update succeeding. For example, when the network device determines that the configuration update succeeds based on identifying no configuration update errors, the network device may implement the configuration update in the network device. The network device may utilize the configuration update to process traffic (e.g., packets) handled by the network device. In some implementations, when implementing the configuration update based on the configuration update succeeding, the network device may implement the configuration update in the packet forwarding component of the network device. In such implementations, the packet forwarding component of the network device may utilize the configuration update to process traffic (e.g., packets) handled by the packet forwarding component.

As shown inFIG.1E, and by reference number135, the network device may perform a rollback of the configuration update, based on the updated dependency graph and based on the configuration update failing, to restore the original configuration. For example, when the network device determines that the configuration update fails based on identifying the one or more configuration update errors, the network device may perform the rollback of the configuration update, based on the updated dependency graph, to restore the original configuration. Performing the rollback may revert the configuration (e.g., a software state) of the network device to a working state (e.g., the original configuration) when the configuration update fails.

In some implementations, when performing the rollback of the configuration update, the network device may identify, in at least one or more new nodes or at least one or more new entries of the updated dependency graph, an error that generates an invalid software state, and may revert a software state of the updated dependency graph to an original state, which may restore the original configuration. In some implementations, when performing the rollback of the configuration update, the network device may identify, in at least one or more new nodes or at least one or more new entries of the updated dependency graph, an error that generates an invalid hardware state, and may revert a hardware state of the updated dependency graph to an original state, which may restore the original configuration.

In some implementations, when performing the rollback of the configuration update, the network device may identify, in the one or more new nodes or the one or more new entries of the updated dependency graph, multiple errors that generate an invalid hardware state, and revert the one or more new nodes or the one or more new entries of the updated dependency graph associated with the multiple errors. The network device may record, in a revert stack, the reverting of the one or more new nodes or the one or more new entries of the updated dependency graph associated with the multiple errors, and may revert, based on the revert stack, a hardware state of the updated dependency graph to an original state, which may restore the original configuration. In some implementations, when performing the rollback of the configuration update, the network device may identify an error in at least one or more new nodes of the updated dependency graph and may create a place holder node for the at least one or more new nodes. The network device may release resources allocated to the at least one or more new nodes, and may revert the updated dependency graph to restore the original configuration based on creating the place holder node and based on releasing the resources allocated to the at least one or more new nodes.

FIG.1Fdepicts an example of an in-place update for the network device (e.g., via the configuration update). As shown, before the configuration update, the dependency graph shown to the left may include multiple nodes or entries (e.g., the unshaded circles) associated with a current software state (e.g., the unshaded squares) and a current hardware state (e.g., the shaded squares). Before the configuration update, the current hardware state may also be represented by a dependency graph. As further shown inFIG.1F, after the configuration update, the updated dependency graph shown to the right may include a node or entry (e.g., the cross-hatched circle) associated with a new software state (e.g., the cross-hatched and unshaded square) and new hardware state (e.g., the cross-hatched and shaded square). The updated dependency graph may also include multiple nodes or entries (e.g., the unshaded circles) associated with the current software state (e.g., the unshaded squares) and the current hardware state (e.g., the shaded squares). After the configuration update, the new hardware state may also be represented by a dependency graph.

FIG.1Gdepicts an example of an MBB update for the network device (e.g., via the configuration update). As shown, before the configuration update, the dependency graph shown to the left may include multiple nodes or entries (e.g., the unshaded circles) associated with a current software state (e.g., the unshaded squares) and a current hardware state (e.g., the shaded squares). Before the configuration update, the current hardware state may also be represented by a dependency graph. As further shown inFIG.1G, after the configuration update, the updated dependency graph shown in the middle may include a node or entry (e.g., the cross-hatched circle) associated with a new software state (e.g., the cross-hatched and unshaded square) and a new MBB hardware state (e.g., the cross-hatched and shaded square). The updated dependency graph may also include multiple nodes or entries (e.g., the unshaded circles) associated with the current software state (e.g., the unshaded squares) and the current hardware state (e.g., the shaded squares). After the configuration update, the new hardware state may also be represented by a dependency graph depicting the new MBB hardware state.

As further shown inFIG.1G, after the configuration update and backpropagation, the updated dependency graph shown to the right may include multiple nodes or entries (e.g., the cross-hatched circles) associated with the new software state (e.g., the cross-hatched and unshaded square), the new MBB hardware state (e.g., the cross-hatched and shaded squares), and a new in-place hardware state (e.g., the black squares). The updated dependency graph may also include multiple nodes or entries (e.g., the cross-hatched circles) associated with the current software state (e.g., the unshaded squares) and the current hardware state (e.g., the shaded squares). After the configuration update, the new hardware state may also be represented by a dependency graph depicting the new MBB hardware state and the new in-place hardware state.

FIG.1Hdepicts an example of an MBB update and backpropagation for the network device (e.g., via the configuration update). As shown, before the configuration update, the dependency graph shown first from the left may include multiple nodes or entries (e.g., the unshaded circles) associated with a current software state (e.g., the unshaded squares) and a current hardware state (e.g., the shaded squares). Before the configuration update, the old hardware state may also be represented by a dependency graph. The network device may also track a new hardware state of the dependency graph and may maintain a revert stack to track changes in the dependency graph. In the example ofFIG.1H, the configuration change may include five changes (e.g., labeled C1through C5).

As further shown inFIG.1H, after the first change of the configuration update, the updated dependency graph shown second from the left may include a node or entry (e.g., the cross-hatched circle) associated with a new software state (e.g., the cross-hatched and unshaded square). The updated dependency graph may also include multiple nodes or entries (e.g., the unshaded circles) associated with the current software state (e.g., the unshaded squares) and the current hardware state (e.g., the shaded squares). After the first change of the configuration update and backpropagation, the updated dependency graph shown third from the left may include the node or entry (e.g., the cross-hatched circle) associated with the new software state (e.g., the cross-hatched and unshaded square) and a new MBB hardware state (e.g., the cross-hatched and shaded square). The updated dependency graph may also include multiple nodes or entries (e.g., the unshaded circles) associated with the current software state (e.g., the unshaded squares) and the current hardware state (e.g., the shaded squares). After the first change of the configuration update and backpropagation, the new hardware state may also be represented by a dependency graph depicting the new MBB hardware state.

As further shown inFIG.1H, after the first and second changes of the configuration update and backpropagation, the updated dependency graph shown fourth from the left may include nodes or entries (e.g., the cross-hatched circles) associated with the new software state (e.g., the cross-hatched and unshaded square) and the new MBB hardware state (e.g., the cross-hatched and shaded squares). The updated dependency graph may also include multiple nodes or entries (e.g., the unshaded circles) associated with the current software state (e.g., the unshaded squares) and the current hardware state (e.g., the shaded squares). After the first and second changes of the configuration update and backpropagation, the new hardware state may also be represented by a dependency graph depicting the new MBB hardware state (e.g., the cross-hatched and shaded squares).

As further shown inFIG.1H, after the five changes of the configuration update and backpropagation, the updated dependency graph shown fifth from the left may include nodes or entries (e.g., the cross-hatched circles) associated with the new software state (e.g., the cross-hatched and unshaded square), the new MBB hardware state (e.g., the cross-hatched and shaded squares), and the new in-place hardware state (e.g., the black squares). The updated dependency graph may also include a node or entry (e.g., the unshaded circle) associated with the current software state (e.g., the unshaded squares) and the current hardware state (e.g., the shaded squares). After the five changes of the configuration update and backpropagation, the new hardware state may also be represented by a dependency graph depicting the new MBB hardware state (e.g., the cross-hatched and shaded squares) and the new in-place hardware state (e.g., the black squares).

FIG.1Idepicts performing a rollback based on the revert stack generated during implementation of the five changes of the configuration update and backpropagation, as described above in connection withFIG.1H. The updated dependency graph shown first from the left ofFIG.1Imay be the same as the updated dependency graph shown the fifth from the left inFIG.1H. The network device may utilize the revert stack to trace through the changes of the configuration update and to revert the changes back to an original state, which may generate the original configuration. The network device may revert the first change of the configuration update to generate the dependency graph shown second from the left ofFIG.1I, and may mark completion of the first change in the revert stack. Reversion of the first change may cause the dependency graph to include a node or entry (e.g., the unshaded circle) associated with the new software state (e.g., the cross-hatched and unshaded square) and the current hardware state (e.g., the shaded square).

The network device may revert the second change of the configuration update to generate the dependency graph shown third from the left ofFIG.1I, and may mark completion of the second change in the revert stack. Reversion of the second change may cause the dependency graph to include another node or entry (e.g., the unshaded circle) associated with the current software state (e.g., the unshaded square) and the current hardware state (e.g., the shaded square). The network device may revert the third change of the configuration update to generate the dependency graph shown fourth from the left ofFIG.1I, and may mark completion of the third change in the revert stack. Reversion of the third change may cause the dependency graph to include another node or entry (e.g., the unshaded circle) associated with the current software state (e.g., the unshaded square) and the current hardware state (e.g., the shaded square).

The network device may revert the fourth and fifth changes of the configuration update to generate the dependency graph shown fifth from the left ofFIG.1I, and may mark completion of the fourth and fifth changes in the revert stack. Reversion of the fourth and fifth changes may cause the dependency graph to include additional nodes or entries (e.g., the unshaded circles) associated with the current software state (e.g., the unshaded squares) and the current hardware state (e.g., the shaded squares). After reversion of the changes of the configuration update, the original configuration may be reinstated in the network device.

In this way, the network device provides rollback-on-error support for forwarding components of the network device. For example, the network device may provide a methodology to revert a configuration of the network device to an original state when a configuration update error occurs. The network device may test the configuration update and may determine whether a configuration update error occurs based on testing the configuration update. If a configuration update error occurs, the network device may rollback the configuration of the network device to an original state prior to the configuration update. Thus, the network device conserves computing resources, networking resources, and/or the like that would otherwise have been consumed based on creating an inconsistent state in the network device, handling lost traffic due the inconsistent state in the network device, exhausting resources of the network device for context specific or application specific techniques to correct the configuration update error, and/or the like.

As indicated above,FIGS.1A-1Iare provided as an example. Other examples may differ from what is described with regard toFIGS.1A-1I. The number and arrangement of devices shown inFIGS.1A-1Iare provided as an example. In practice, there may be additional devices, fewer devices, different devices, or differently arranged devices than those shown inFIGS.1A-1I. Furthermore, two or more devices shown inFIGS.1A-1Imay be implemented within a single device, or a single device shown inFIGS.1A-1Imay be implemented as multiple, distributed devices. Additionally, or alternatively, a set of devices (e.g., one or more devices) shown inFIGS.1A-1Imay perform one or more functions described as being performed by another set of devices shown inFIGS.1A-1I.

FIG.2is a diagram of an example environment200in which systems and/or methods described herein may be implemented. As shown inFIG.2, the environment200may include an endpoint device210, a group of network devices220(shown as network device220-1through network device220-N), a server device230, and a network240. Devices of the environment200may interconnect via wired connections, wireless connections, or a combination of wired and wireless connections.

The endpoint device210includes one or more devices capable of receiving, generating, storing, processing, and/or providing information, such as information described herein. For example, the endpoint device210may include a mobile phone (e.g., a smart phone or a radiotelephone), a laptop computer, a tablet computer, a desktop computer, a handheld computer, a gaming device, a wearable communication device (e.g., a smart watch, a pair of smart glasses, a heart rate monitor, a fitness tracker, smart clothing, smart jewelry, or a head mounted display), a network device, or a similar type of device. In some implementations, the endpoint device210may receive network traffic from and/or may provide network traffic to other endpoint devices210and/or the server device230, via the network240(e.g., by routing packets using the network devices220as intermediaries).

The network device220includes one or more devices capable of receiving, processing, storing, routing, and/or providing traffic (e.g., a packet or other information or metadata) in a manner described herein. For example, the network device220may include a router, such as a label switching router (LSR), a label edge router (LER), an ingress router, an egress router, a provider router (e.g., a provider edge router or a provider core router), a virtual router, or another type of router. Additionally, or alternatively, the network device220may include a gateway, a switch, a firewall, a hub, a bridge, a reverse proxy, a server (e.g., a proxy server, a cloud server, or a data center server), a load balancer, and/or a similar device. In some implementations, the network device220may be a physical device implemented within a housing, such as a chassis. In some implementations, the network device220may be a virtual device implemented by one or more computer devices of a cloud computing environment or a data center. In some implementations, a group of network devices220may be a group of data center nodes that are used to route traffic flow through the network240.

The server device230includes one or more devices capable of receiving, generating, storing, processing, and/or providing information, such as information described herein. For example, the server device230may include a laptop computer, a tablet computer, a desktop computer, a group of server devices, or a similar type of device, associated with multicast traffic. In some implementations, the server device230may receive information from and/or transmit information (e.g., multicast traffic) to the endpoint device210, via the network240(e.g., by routing packets using the network devices220as intermediaries).

FIG.3is a diagram of example components of one or more devices ofFIG.2. The example components may be included in a device300, which may correspond to the endpoint device210, the network device220, and/or the server device230. In some implementations, the endpoint device210, the network device220, and/or the server device230may include one or more devices300and/or one or more components of the device300. As shown inFIG.3, the device300may include a bus310, a processor320, a memory330, an input component340, an output component350, and a communication interface360.

The bus310includes one or more components that enable wired and/or wireless communication among the components of the device300. The bus310may couple together two or more components ofFIG.3, such as via operative coupling, communicative coupling, electronic coupling, and/or electric coupling. The processor320includes a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor, a controller, a microcontroller, a digital signal processor (DSP), a field-programmable gate array (FPGA), an application-specific integrated circuit (ASIC), and/or another type of processing component. The processor320is implemented in hardware, firmware, or a combination of hardware and software. In some implementations, the processor320includes one or more processors capable of being programmed to perform one or more operations or processes described elsewhere herein.

The memory330includes volatile and/or nonvolatile memory. For example, the memory330may include random access memory (RAM), read only memory (ROM), a hard disk drive, and/or another type of memory (e.g., a flash memory, a magnetic memory, and/or an optical memory). The memory330may include internal memory (e.g., RAM, ROM, or a hard disk drive) and/or removable memory (e.g., removable via a universal serial bus connection). The memory330may be a non-transitory computer-readable medium. The memory330stores information, instructions, and/or software (e.g., one or more software applications) related to the operation of the device300. In some implementations, the memory330includes one or more memories that are coupled to one or more processors (e.g., the processor320), such as via the bus310.

The input component340enables the device300to receive input, such as user input and/or sensed input. For example, the input component340may include a touch screen, a keyboard, a keypad, a mouse, a button, a microphone, a switch, a sensor, a global positioning system sensor, an accelerometer, a gyroscope, and/or an actuator. The output component350enables the device300to provide output, such as via a display, a speaker, and/or a light-emitting diode. The communication interface360enables the device300to communicate with other devices via a wired connection and/or a wireless connection. For example, the communication interface360may include a receiver, a transmitter, a transceiver, a modem, a network interface card, and/or an antenna.

FIG.4is a diagram of example components of one or more devices ofFIG.2. The example components may be included in a device400. The device400may correspond to the network device220. In some implementations, the network device220may include one or more devices400and/or one or more components of the device400. As shown inFIG.4, the device400may include one or more input components410-1through410-B (B≥1) (hereinafter referred to collectively as input components410, and individually as input component410), a switching component420, one or more output components430-1through430-C (C≥1) (hereinafter referred to collectively as output components430, and individually as output component430), and a controller440.

The input component410may be one or more points of attachment for physical links and may be one or more points of entry for incoming traffic, such as packets. The input component410may process incoming traffic, such as by performing data link layer encapsulation or decapsulation. In some implementations, the input component410may transmit and/or receive packets. In some implementations, the input component410may include an input line card that includes one or more packet processing components (e.g., in the form of integrated circuits), such as one or more interface cards (IFCs), packet forwarding components, line card controller components, input ports, processors, memories, and/or input queues. In some implementations, the device400may include one or more input components410.

The switching component420may interconnect the input components410with the output components430. In some implementations, the switching component420may be implemented via one or more crossbars, via busses, and/or with shared memories. The shared memories may act as temporary buffers to store packets from the input components410before the packets are eventually scheduled for delivery to the output components430. In some implementations, the switching component420may enable the input components410, the output components430, and/or the controller440to communicate with one another.

The output component430may store packets and may schedule packets for transmission on output physical links. The output component430may support data link layer encapsulation or decapsulation, and/or a variety of higher-level protocols. In some implementations, the output component430may transmit packets and/or receive packets. In some implementations, the output component430may include an output line card that includes one or more packet processing components (e.g., in the form of integrated circuits), such as one or more IFCs, packet forwarding components, line card controller components, output ports, processors, memories, and/or output queues. In some implementations, the device400may include one or more output components430. In some implementations, the input component410and the output component430may be implemented by the same set of components (e.g., and input/output component may be a combination of the input component410and the output component430).

The controller440includes a processor in the form of, for example, a CPU, a GPU, an accelerated processing unit (APU), a microprocessor, a microcontroller, a DSP, an FPGA, an ASIC, and/or another type of processor. The processor is implemented in hardware, firmware, or a combination of hardware and software. In some implementations, the controller440may include one or more processors that can be programmed to perform a function.

In some implementations, the controller440may include a RAM, a ROM, and/or another type of dynamic or static storage device (e.g., a flash memory, a magnetic memory, an optical memory, etc.) that stores information and/or instructions for use by the controller440.

In some implementations, the controller440may communicate with other devices, networks, and/or systems connected to the device400to exchange information regarding network topology. The controller440may create routing tables based on the network topology information, may create forwarding tables based on the routing tables, and may forward the forwarding tables to the input components410and/or output components430. The input components410and/or the output components430may use the forwarding tables to perform route lookups for incoming and/or outgoing packets.

The number and arrangement of components shown inFIG.4are provided as an example. In practice, the device400may include additional components, fewer components, different components, or differently arranged components than those shown inFIG.4. Additionally, or alternatively, a set of components (e.g., one or more components) of the device400may perform one or more functions described as being performed by another set of components of the device400.

FIG.5is a flowchart of an example process500for providing rollback-on-error support for forwarding components of a network device. In some implementations, one or more process blocks ofFIG.5may be performed by a network device (e.g., the network device220). In some implementations, one or more process blocks ofFIG.5may be performed by another device or a group of devices separate from or including the network device, such as a server device (e.g., the server device230). Additionally, or alternatively, one or more process blocks ofFIG.5may be performed by one or more components of the device300, such as the processor320, the memory330, the input component340, the output component350, and/or the communication interface360. Additionally, or alternatively, one or more process blocks ofFIG.5may be performed by one or more components of the device400, such as the input component410, THE switching component420, the output component430, and/or the controller440.

As shown inFIG.5, process500may include receiving an original configuration that includes configuration objects (block510). For example, the network device may receive an original configuration that includes configuration objects, as described above.

As further shown inFIG.5, process500may include generating, based on the original configuration, a dependency graph that includes nodes and entries representing the configuration objects (block520). For example, the network device may generate, based on the original configuration, a dependency graph that includes nodes and entries representing the configuration objects, as described above. In some implementations, the dependency graph is a representation of a packet topology.

As further shown inFIG.5, process500may include receiving a configuration update that includes one or more new configuration objects (block530). For example, the network device may receive a configuration update that includes one or more new configuration objects, as described above. In some implementations, the original configuration and the configuration update are associated with a packet forwarding component of the network device. In some implementations, the configuration update is one of an in-place update or a make-before-break update.

As further shown inFIG.5, process500may include updating the dependency graph based on the configuration update and to generate an updated dependency graph that includes one or more new nodes or one or more new entries representing the one or more new configuration objects (block540). For example, the network device may update the dependency graph based on the configuration update and to generate an updated dependency graph that includes one or more new nodes or one or more new entries representing the one or more new configuration objects, as described above.

In some implementations, updating the dependency graph based on the configuration update includes updating a software dependency state of the dependency graph based on the configuration update, and updating a hardware state of the dependency graph based on the configuration update to generate the updated dependency graph. In some implementations, updating the dependency graph based on the configuration update includes updating a software dependency state of the dependency graph based on the configuration update and to generate an updated software dependency state, updating a hardware state of the dependency graph based on the configuration update and to generate an updated hardware dependency state, and backpropagating the updated software dependency state and the updated hardware dependency state in the dependency graph to generate the updated dependency graph.

As further shown inFIG.5, process500may include testing the configuration update, based on the updated dependency graph, to determine whether the configuration update fails or succeeds (block550). For example, the network device may test the configuration update, based on the updated dependency graph, to determine whether the configuration update fails or succeeds, as described above.

As further shown inFIG.5, process500may include selectively implementing the configuration update based on the configuration update succeeding, or performing a rollback of the configuration update, based on the updated dependency graph and based on the configuration update failing, to restore the original configuration (block560). For example, the network device may selectively implement the configuration update based on the configuration update succeeding, or perform a rollback of the configuration update, based on the updated dependency graph and based on the configuration update failing, to restore the original configuration, as described above. In some implementations, implementing the configuration update includes implementing the configuration update in a packet forwarding component of the network device. In some implementations, performing the rollback of the configuration update includes identifying, in one of the one or more new nodes or one of the one or more new entries of the updated dependency graph, an error that generates an invalid software state, and reverting a software state of the updated dependency graph to an original state and to restore the original configuration. In some implementations, performing the rollback of the configuration update includes identifying, in one of the one or more new nodes or one of the one or more new entries of the updated dependency graph, an error that generates an invalid hardware state, and reverting a hardware state of the updated dependency graph to an original state and to restore the original configuration.

In some implementations, performing the rollback of the configuration update includes identifying, in the one or more new nodes or the one or more new entries of the updated dependency graph, multiple errors that generate an invalid hardware state, reverting the one or more new nodes or the one or more new entries of the updated dependency graph associated with the multiple errors, recording, in a revert stack, the reverting of the one or more new nodes or the one or more new entries of the updated dependency graph associated with the multiple errors, and reverting, based on the revert stack, a hardware state of the updated dependency graph to an original state and to restore the original configuration. In some implementations, performing the rollback of the configuration update includes identifying an error in one of the one or more new nodes of the updated dependency graph, creating a place holder node for the one of the one or more new nodes, releasing resources allocated to the one of the one or more new nodes, and reverting the updated dependency graph to restore the original configuration based on creating the place holder node and based on releasing the resources allocated to the one of the one or more new nodes.

In some implementations, process500includes identifying a configuration update error based on testing the configuration update, and determining that the configuration update fails based on identifying the configuration update error. In some implementations, process500includes identifying no configuration update error based on testing the configuration update, and determining that the configuration update succeeds based on identifying no configuration update error.

The foregoing disclosure provides illustration and description but is not intended to be exhaustive or to limit the implementations to the precise form disclosed. Modifications may be made in light of the above disclosure or may be acquired from practice of the implementations.