When some intermediate nodes fail or are suddenly removed in a mobile IP network, a node failure can disconnect paths and decrease network efficiency due to loss of some packets. In this case, the movement of the remaining nodes must be controlled such that to prevent further network efficiency drop. In the present research, we will study the intermediate node failure and changing foreign networks in mobile IP networks when the Mobile Node (MN) moves. Then, a new optimal routing algorithm is proposed to make up the node failure and changing Foreign Agent (FA). For this purpose, an Optimal Parametric Topology Control Routing (OPTCR) algorithm is introduced based on parametric linear programming formulation (LPF). Since OPTCR can handle the handover latency, it is supposed that both destination and intermediate nodes can move but just intermediate nodes may fail. Simulation results show that OPTCR algorithm is superior to some algorithms appeared in the recent literature.