Next-Generation Networks (NGNs) employ the Internet Protocol (IP) over a wide variety of packet-switching technologies, which often lack in fault resilience enabling features. An overlay MPLS infrastructure with its fast-reroute mechanisms can be deployed to overcome such an issue. Addressing NGNs robust to single link and node failures, an offline method to effectively calculate working and recovery paths for highly demanding services, is proposed and analyzed. The strength of our work is the ability to address two recovery techniques in a very simple manner, by formulating an Integer Linear Programming (ILP) problem, optimizing either the overall switching delay experienced by the user in case of failure or the bandwidth allocation thanks to a shared protection, while limiting the recovery time to some tens of ms as in SONET/SDH networks.