cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
588
Views
5
Helpful
7
Replies

ospf metric strange plz help

shaila_rox
Level 1
Level 1

hi guys plz look at the figure below

R1 14.0.0.1 14.0.0.2

O---------------------O R2

|11.0.0.1

|

|11.0.0.2

OR3

now see that i am running ospf on all 3 routers in area 0, i want to assign metric of 10 to network 11.0.0.0 when its advertised to R2 by R1, how can i do that ??? i tried redistribute connected but didnt work and i know why, so now how can i do it ????

plz tell me

thanks in advance

plz give me the complete configuration thank u

7 Replies 7

oj88
Level 1
Level 1

If you want to override the computed cost or metric in ospf, use the following command:

ip ospf cost 10

Put this on the interface config on R1 facing R3. Not sure if you need to configure this also on R3's interface facing R1. My ospf is getting kinda rusty.

Another way is to play with the bandwidth command. More info here: http://www.cisco.com/en/US/partner/products/ps6350/products_command_reference_chapter09186a0080446b1b.html#wp1000369

Friend,

R3 will calculate the metric to the network 11.0.0.0 as a sum of the metric advertised by R2 and the link cost between R2 & R3

Say for eg . Cost betwen R1 & R2 is 64 and cost between R2 and R3 is also 64

so R3 will have a metric of 128 to the network 11.0.0.0.

Now if you use ip ospf cost 10 on the R2 interface connecting to R1, then R1 will add this cost to the cost associated with the link between r1 i.e the metric will be shown as 74 (i.e 64 + 10)

If you want to have R3 calculate the metric as 10 then you will have to manipulate the cost between both the routers to add as 10.

HTH, rate if it does

Narayan

Edison Ortiz
Hall of Fame
Hall of Fame

ip ospf cost 5 on the 11.0.0.1 and 140.0.0.1 interfaces in R1 should do the job.

ok thank u guys actually i was expecting some command like route map or something, i knew abt the cost, ok let me elaborate my question then plz tell me, consider the same diagram now i have added 1 more router R4 again with R1 ( perhaps to its s1 interface ) now like u guys said if i change the cost of R1 11.0.0.0 interface then this cost will be advertised to both R2 and R4 right ?? wat if i want to change the metric of just R2 ?? i know again that i can do it but changing the cost of R2 right ?? is there ANY OTHER way ??? coz u see the cost is advertised in the LSA so is there any way i can change the advertised cost but not actually changing the interface cost,

plz tell me again

thanks a lot for ur feedback all of u but plz guide me in this

ok i got your point. Will try to simulate and let you know

Narayan

On this case, you would have to run 2 OSPF instances on R1 and do a redistribute connected under the OSPF process being shared with R2.

Example:

R1:

router ospf 1

network 11.0.0.1 0.0.0.0 area 0

router ospf 2

network 14.0.0.1 0.0.0.0 area 0

redistribute connected subnets route-map metric metric 10

route-map metric permit 10

match ip address R3

ip access-list standard R3

permit 11.0.0.0 0.0.0.255

R2:

router ospf 2

network 14.0.0.2 0.0.0.0 area 0

R3:

router ospf 1

network 11.0.0.2 0.0.0.0 area 0

thank u edison, i m still waiting for narayan to see if he comes with something other than this, probably working in the same ospf process, or if some 1 have anyother idea to do it plz tell me

thanks alot to all who replied

thank u very much

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco