ostly as black boxes to the operators, making it impossible to instrument and reason. Fourth, the network state can be very huge, making the storage of checkpoints costly. Thus, in traditional network, the fault recovery process is still error-prone and notoriously hard. SDN may make checkpointing and rollback feasible, thanks to its three key properties: simple abstraction, network wide visibility, and direct control. The network can be viewed as a distributed collection of switches managed by a logically centralized control programs with a global network view. The controller reads and writes directly into flow tables on each switch in the form of rules through a standard API OpenFlow. Each rule contains a matching field and a set of actions. Exploiting these properties of SDN, in this work, we explore a scalable way to perform checkpointing and rollback framework in networks for fault recovery. To recover from fault in a network, three principal steps are involved: detecting a fault, containing it, and rolling the nodes of the 4 Software-Defined Networks Principles and Applications network back to a certain checkpoint. SDN can be used to allow the entire network state to roll back to a consistent global state, to mitigate the impact of faults. The network state includes both the controller states and the forwarding tables in all the switches in the network. To enable fast and independent recovery from switches, we support that each switch independently performs checkpoint. Figure 4.10 shows the solution overview of this approach. First, checkpointing the switch means taking snapshots of the flow tables in each switch. Since the rules are installed by the controller, the straightforward way is to let the controller keep track of the set of rules installed on each switch and then consider it as a part of the controller state. However, somewhat surprisingly, we found that most of the existing controllers maintain a copy of the flow tables for the switches, mainly because of the concerns of space and overhead. Inst