Distance vector routing protocol determines the best route for forwarding information from one node to another node based on distance. For calculating the best route, Distance-vector routing protocols use the Bellman-ford algorithm and the Ford-Fulkerson algorithm. The Bellman-Ford distributed algorithm calculates the shortest path. On the other hand, Routing Information Protocol is commonly used for managing router information management protocol within a Local Area Network or an interconnected Local Area Network group. The main problem with Distance Vector Routing protocols is routing loops. Because the Bellman-Ford Algorithm cannot prevent loops. Moreover, the routing loop triggers a problem with Count to Infinity. This research paper gives an effective solution to the Count to Infinity problem for link down situation and also for the router down situation in both complex and linear sub-network. For the router down situation, when any router goes down, then other nodes will recalculate their routing table with the dependency column. Moreover, the costs are calculated by the shortest path algorithm. If any link is down and all routers are up, then all routers will recalculate their routing table using Dijkstra instead of the Bellman-Ford algorithm. To determine the loops and prevent the loops are the main objectives. This method is mainly based on a routing table algorithm where the Dijkstra algorithm will be used after each iteration and will modify the routing table for each node. Preventing the routing loops will not converge into Count to Infinity Problem.