How does OSPF choose the best route when there are multiple paths?
NivSa · posted · 67 views
I have a topology with two routers that can reach the same destination via different paths. OSPF picks one but I don't understand why. Is it based on hop count like RIP? How does the cost metric work and how can I influence which path gets chosen?
- The cost formula is reference bandwidth / interface bandwidth. Default reference is 100Mbps, so a GigE link gets cost 1 and a FastEthernet link gets cost 1 too (both hit the floor). You can change it with auto-cost reference-bandwidth 10000 to make GigE and FastE have different costs. — Yaron,
- One thing that tripped me up — OSPF doesn't look at hop count at all. A 3-hop path through GigE links beats a 1-hop path through a FastEthernet link because the total cost is lower. You can also manually set the cost per interface with ip ospf cost. — itayitayy,
- Wait so OSPF is purely cost-based, not hop count at all? That's a big difference from RIP. I tested ip ospf cost on an interface in the lab and it immediately changed the path. This is way more flexible than I thought. — NivSa,
0 Answers
Your answer
Answering is a Pro feature. Free accounts can read everything and still like, comment, and connect. Upgrade to Pro →