I am working on network lab designing topology. I am able to configured two routing protocols which surprised me. I configured RIP and OSPF routing protocols in layer3 switch and advertised same destination address on both routing protocols. Here my doubt is from which routing protocol traffic is routed among two routing protocol RIP & OSPF
Routing protocols do not route traffic, they simply share route information between routers. If a router learns the same routing information from two different sources, it will use AD (Administrative Distance) to determine which source is most reliable. The information from the most reliable source is what gets installed in the routing table, but the same routing information from the other sources is kept in reserve in case the first source loses that routing information or has some other problem.
AD works like a cost or distance where a lower value is the most preferred. Cisco has defined default AD for its routers:
Route Source Default Distance Values ------------ ----------------------- Connected interface 0 Static route 1 Enhanced Interior Gateway Routing Protocol (EIGRP) summary route 5 External Border Gateway Protocol (BGP) 20 Internal EIGRP 90 IGRP 100 OSPF 110 Intermediate System-to-Intermediate System (IS-IS) 115 Routing Information Protocol (RIP) 120 Exterior Gateway Protocol (EGP) 140 On Demand Routing (ODR) 160 External EIGRP 170 Internal BGP 200 Unknown* 255
Other router vendors have their own terminology and values or other ways of choosing the preferred information source.