How to configure OSPF for CCNA students

Hello Izuone

When OSPF determines the cost to a particular destination, it calculates a cumulative cost to that destination. This cumulative cost is the sum of all outgoing interface costs along that route. In your particular topology, traffic from to will actually be load balanced across both links because the cost is the same for Path1 and Path2. This is because only outgoing interface costs are taken into account, and the Gig0/0 interface on R2 is an incoming interface for this traffic, so it wouldn’t be included in the cost calculation.

On the return trip, however, only Path2 would be chosen, because the cost of 10 is included in the sum of all outgoing interface costs, as Gig0/0 would be an outgoing interface in that direction of traffic flow.

For more information about equal-cost load balancing for OSPF, take a look at the last section of this lesson:

The best way to determine the path that was taken is to use traceroute. However, for traffic from R2 to R4, if you don’t have access to R2, then the only way to determine what path was taken is to use packet capture to see on which interface the return traffic comes in. There are several options for packet capturing including connecting a switch between R3 and R4 and using SPAN, or by using Cisco Embedded Packet Capture (EPC).

I hope this has been helpful!