Question on OSPF(Basic)

charleskoh04

Member
Apr 19, 2005
26
0
0
Hi guys,

I have a question :

redistribute static metric 20 metric-type 1 subnets route-map xxx

network 10.2.4.253 0.0.0.3 area 0
network 10.223.253.2 0.0.0.3 area 3

What does metric 20 and network 10.2.4.253 0.0.0.3 area 0 means ?

Any help or comment will be greatly appreciated.
 

Slvrtg277

Golden Member
Sep 9, 2004
1,004
0
0
Metric 20 makes the route metric 20 when the route is redistributed. The network statement along with the 0.0.0.3 mask area 0 means that the network 10.2.4.253 with a subnet mask of 255.255.255.252 will be advertised within area 0 of OSPF.
 

spidey07

No Lifer
Aug 4, 2000
65,469
5
76
network commands are used to run the routing protocol on specified IP networks and interfaces. Area 0 is your backbone area, so this network/interface connects to the OSPF backbone area. The other network statement puts that network/interfaces into area 3.

The metric sets the, well, the metric of the route...the cost. Higher metric means less preferred path or a more "costly" path. The command also says "reditribute these routes as specified by the route map, make their seed metric 20 and make them OSPF External Type-1 routes.

More on differences between external type-1 and 2...
E1 routes have the path cost calculated and added to the metric.
E2 routes do NOT add path cost
Default metric for redistributed routes into OSPF is 20, except BGP routes which get default metric of 1.
E1 routes are preferred over E2 routes to the same destination (this makes sense, because they have more accurate patch cost)

If you want to learn more pick up IP routing by Doyle or read the OSPF design guide on cisco.com.

Also from the statements you provided you can conclude the following.
This is an ASBR or autonomous system boundary router - meaning the router takes routes from outside of OSPF and injects them.
This is also a ABR or area border router because it connects to two or more areas.
 

Slvrtg277

Golden Member
Sep 9, 2004
1,004
0
0
Originally posted by: spidey07
network commands are used to run the routing protocol on specified IP networks and interfaces. Area 0 is your backbone area, so this network/interface connects to the OSPF backbone area. The other network statement puts that network/interfaces into area 3.

The metric sets the, well, the metric of the route...the cost. Higher metric means less preferred path or a more "costly" path. The command also says "reditribute these routes as specified by the route map, make their seed metric 20 and make them OSPF External Type-1 routes.

More on differences between external type-1 and 2...
E1 routes have the path cost calculated and added to the metric.
E2 routes do NOT add path cost
Default metric for redistributed routes into OSPF is 20, except BGP routes which get default metric of 1.
E1 routes are preferred over E2 routes to the same destination (this makes sense, because they have more accurate patch cost)

If you want to learn more pick up IP routing by Doyle or read the OSPF design guide on cisco.com.

Also from the statements you provided you can conclude the following.
This is an ASBR or autonomous system boundary router - meaning the router takes routes from outside of OSPF and injects them.
This is also a ABR or area border router because it connects to two or more areas.

You can't determine that it's an ASBR based strictly on the redistribution of static routes, right?
 

spidey07

No Lifer
Aug 4, 2000
65,469
5
76
Actually you can. I see it all the time.

Once you introduce routing information from anything other than what's in the OSPF database that router is a ASBR. You can confirm this by "show ip ospf data" and filter on ASBR to see your ASBRs.

The entire OSPF routing domain is considered an AS. Once something outside of that AS is injected into it (mainly any other route - doesn't matter where it comes from) that router is an ASBR.

Hopefully we can keep this thread going as OSPF is my specialty and I haven't really had to think about it in a long time.
 

charleskoh04

Member
Apr 19, 2005
26
0
0
Thanks guys for your contribution to this thread, appreciate it.

Questions:

how did you get the "metric 20"? Is it auto-generated or you input it?
Will this value change by itself?



 

spidey07

No Lifer
Aug 4, 2000
65,469
5
76
its an option of the redistribute command. Not required, but always a good idea to set the metric when you redistribute.

Acutally now that I think about it you need to put it in for some routing protocols otherwise they will not redistribute the route (eigrp comes to mind)
 

randal

Golden Member
Jun 3, 2001
1,890
0
71
I really wish I knew more about OSPF - I only know how to get into trouble with it ;-) Spidey, thanks for the reference to "IP Routing," I just ordered it :)
 

spidey07

No Lifer
Aug 4, 2000
65,469
5
76
Originally posted by: randal
I really wish I knew more about OSPF - I only know how to get into trouble with it ;-) Spidey, thanks for the reference to "IP Routing," I just ordered it :)

volume 1 is great.
volume 2 is pretty darn good as well.

they are great reference books. while studying for CCIE I read both cover to cover and still reference them now and again.
 

randal

Golden Member
Jun 3, 2001
1,890
0
71
Yea, BGP and I are good pals in that sort of long-drawn-out-fighting-relationship way; I'll take a look and heck, maybe have two IP Routing books en route at once. :-D