With the use of seamless high-speed worldwide network connectivity in future, it is anticipated that the integrated satellite-terrestrial network (ISTN) will be a possible option. Due to the inadequacy of topological data and the close coupling of data and control planes, deploying optimized rules on routers is difficult. The important factors in ISTN networks are routing rules and policies, link failure, and high-bandwidth communication. Software-defined networking (SDN) is an open innovation approach that enables programmability from a central location. The controller handles the complexity of the network, whereas the infrastructure layer devices relay the packets. Thus, we investigated the broadcast by dynamically adjusting routes for fault tolerance and energy efficiency of the ISTN using distance between nodes. In addition, using dynamic source routing, this study examines the competence functions of all managing nodes in a network. The routing design is distributed among all nodes to create numerous collective paths. For LEO satellite networks, the ant colony optimization-based routing algorithm is an improved version that considers the probability of faults and low-energy consumption. The proposed simulation ensures a seamless transition in the event of failures and avoids the requirement for an additional coordination service.