Protocols belonging to the Spanning Tree Protocol (STP) route traffic demands on tree topologies that are evaluated through shortest path procedures. In this paper we deal with the problem of assigning costs to the arcs of a network in order to guarantee that SPT protocols efficiently re-route traffic demands in failure situations: namely, without redirecting traffic demands that are not affected by the failure. We say that a communication network has the local tree-restoration property if there exists a set of costs for its arcs such that the above property holds. We show that an undirected network has the local tree-restoration property if and only if it is 2-connected. In particular, we provide a quite simple procedure for assigning costs to the arcs of a 2-connected network so that the property holds. For the directed case, we show that deciding whether a network has the local tree-restoration property is NP-hard, even in some “simple” cases.