A method implemented by an apparatus for providing spare capacity allocation for dual link failures in a network, comprising: • computing the SCA for each of a plurality of flows in the network for a plurality of primary backup paths corresponding to a plurality of disjoint working paths for the flows using a first integer linear programming model, wherein the first ILP model to compute the SCA for the primary backup paths is based on the following mathematical matrix operations: min Q, s 1 S 1 = e T s 1 s. t. s 1 = max G 1 G 1 = Q T M U 1 P + Q ≤ 1 Q B T = D Q: binary where S 1 is a vector of spare capacity reserved for the primary backup paths, e is a unit row vector, G is a spare provisioning matrix for the first backup paths, Q is a primary backup path link incidence matrix, M is a diagonal matrix of bandwidth, U 1 is a flow failure incidence matrix for the primary backup paths, P is a working path link incidence matrix, B is a node link incidence matrix, D is a flow node incidence matrix; • computing the SCA for each of the flows for a plurality of secondary backup paths corresponding to the disjoint working paths and the primary backup paths using a second ILP model, wherein the second ILP model to compute the SCA for the secondary backup paths is based on the following mathematical matrix operations: min Q, Z, s S = e T s s. t. s = max G G = Q T M U 1 + Z T M U 2 P + Q + Z ≤ 1 Q B T = D Z B T = D Q, Z: binary where S is a vector of total spare capacity reserved for the secondary backup paths with the primary backup paths, e is a unit row vector, G is a spare provisioning matrix for the secondary backup paths with the first backup paths, U 2 is a flow failure incidence matrix for the secondary backup paths, and Z is a secondary backup path link incidence matrix, and Q, M, and U 1, P, B, and D are obtained from the first ILP model; and • aggregating the computed SCA for the primary backup paths and the secondary backup paths for all the flows. • computing the SCA for each of a plurality of flows in the network for a plurality of primary backup paths corresponding to a plurality of disjoint working paths for the flows using a first integer linear programming model, wherein the first ILP model to compute the SCA for the primary backup paths is based on the following mathematical matrix operations: min Q, s 1 S 1 = e T s 1 s. t. s 1 = max G 1 G 1 = Q T M U 1 P + Q ≤ 1 Q B T = D Q: binary where S 1 is a vector of spare capacity reserved for the primary backup paths, e is a unit row vector, G is a spare provisioning matrix for the first backup paths, Q is a primary backup path link incidence matrix, M is a diagonal matrix of bandwidth, U 1 is a flow failure incidence matrix for the primary backup paths, P is a working path link incidence matrix, B is a node link incidence matrix, D is a flow node incidence matrix; • computing the SCA for each of the flows for a plurality of secondary backup paths corresponding to the disjoint working paths and the primary backup paths using a second ILP model, wherein the second ILP model to compute the SCA for the secondary backup paths is based on the following mathematical matrix operations: min Q, Z, s S = e T s s. t. s = max G G = Q T M U 1 + Z T M U 2 P + Q + Z ≤ 1 Q B T = D Z B T = D Q, Z: binary where S is a vector of total spare capacity reserved for the secondary backup paths with the primary backup paths, e is a unit row vector, G is a spare provisioning matrix for the secondary backup paths with the first backup paths, U 2 is a flow failure incidence matrix for the secondary backup paths, and Z is a secondary backup path link incidence matrix, and Q, M, and U 1, P, B, and D are obtained from the first ILP model; and • aggregating the computed SCA for the primary backup paths and the secondary backup paths for all the flows.