cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2369
Views
10
Helpful
10
Replies

OSPF Link cost

gizmo-95
Level 1
Level 1

Hi,

 

I am creating a network within packet tracer, but am having trouble understanding how I can make my OSPF network take the most optimum route.

I have manually costed the Gigabit interfaces at 2, and serial interfaces at 100 using the ip ospf cost command.

 

Currently, a packet is sent from R4 --> R2 --> R1. 

But on reply, it is sent from R1 --> R3 --> R2 --> R4. I am aware that this is due to the two serial links on R1 being the same cost, and this can be seen in my routing table.

Increasing the serial link cost between R1 and R3 will alleviate the issues, but I believe it will then cost any packets coming inbound for R5 over R1 to do the following: R1 --> R2 --> R3 --> R5 which is just as bad.

 

Is there a way to correct this issue?

 

 

RRR.png

 

 

 

 

 

 

 

 

 

10 Replies 10

Joseph W. Doherty
Hall of Fame
Hall of Fame
First, remember link/interface costing is only in one direction. I.e. how you cost a link/interface only impact egress traffic, it will not impact ingress traffic. So, R4 to R1 costing and R1 to R4 need to be considered separately.

Second, remember costing is from the current hop (router) to the destination, it's the sum of all the links/interfaces that will be transit. I.e. you cannot generally just take one link/interface into consideration.

Third, with OSPF it's possible to max the sum (often 64K) and multiple paths will appear the same when they are not the same from anyone hop. (I doubt this is happening with your topology.)

Lastly, with Packet Tracer, don't count on it doing things correctly.

Thanks for the reply.

Since the cost is the total path, I am confused as to why the route from R1 to R3 is being taken, to reach R4. 

R1 (100cost) -->R3 (2cost) -->R2 is 102 in total (up to this hop)

R1 (100cost) -->R2 is 100 (up to this hop)

 

Perhaps it is packet tracer not working properly?

 

Thanks for informing me that costs differ to and from a destination. Currently, I have set them all to be on the following: 2 for gig, 100 for serial, 10 for fast ethernet, so I don't think that will be the issue.

 

Really appreciate the help,

 

G.

If R1's interface cost, on the links to both R2 and R3 is the same, then R1 should select R2 to R3, as the R2<>R3 link will add at least 1 to the R4 path cost.

 

It might be a bug in PT.

 

I could provide a series of OSPF commands, to troubleshoot, but often PT doesn't "know" them.

 

luis_cordova
VIP Alumni
VIP Alumni

Hi @gizmo-95 ,

 

At first glance, my suggestion would be to increase the cost of the interfaces between R2 and R3, this is to avoid that the packages take that path in any of the two cases you mention.

 

Try it and inform us how you are doing.

 

Remember to mark the correct answers as solved, since that helps other users with similar doubts

 

Regards

 

 

Hi,

 

The cost between R2 and R3 is set at 2.

My reasoning for doing this is because if I need to reach R5 from R2, it would be the shortest path. 

 

I didn't think the path would ever become R1-->R3-->R2 as that total cost would be 102 where as R1-->R2 is only 100. 

 

Appreciate the help, 

 

G.

Deepak Kumar
VIP Alumni
VIP Alumni
Hi,
Share the PT lab.

Regards,
Deepak Kumar
Regards,
Deepak Kumar,
Don't forget to vote and accept the solution if this comment will help you!

Deepak Kumar
VIP Alumni
VIP Alumni

Hi,

I have created the same type of lab in my packet tracer and I didn't find any such issue.  Better to share the PT. 

 

Regards,

Deepak Kumar

Regards,
Deepak Kumar,
Don't forget to vote and accept the solution if this comment will help you!

Might help if the version of PT is identified.

HI,
I am using 7.2.1.0128 PT.

Regards,
Deepak Kumar
Regards,
Deepak Kumar,
Don't forget to vote and accept the solution if this comment will help you!

Hello

1) what ospf network types are r2-3 using between each other and it neighbours 

 

2) is this all one backbone area orbare your using additional areas

 

3) are any these routes being redistributed into ospf?

 

 


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul