cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2524
Views
0
Helpful
2
Replies

OSPF Redistribution Commands

matthubach
Level 1
Level 1

What, if any, difference is there between these commands?

 

This is how I see it configured:

router# show run | sec ospf

redistribute static metric 10 metric-type 1 subnets route-map static-to-ospf

or

Would this be the same and/or overlapping:

router# show run | sec ospf

redistribute static metric 10 metric-type 1

redistribute subnets route-map static-to-ospf

 

I can't figure out why the redistribute command on top included the subnets as well vs. just being seperated into two separate commands considering what's in the route-map.

 

route-map static-to-ospf permit 10
match ip address prefix-list static

 

ip prefix-list static seq 10 permit 0.0.0.0/0 le 32

 

1 Accepted Solution

Accepted Solutions

Hi

The "subnet" keyword is used to redistribute networks with variable subnet masks, Now I would like to recommend to use something like:

 

ip prefix-list static seq 10 permit 0.0.0.0/0 le 32

 

route-map static-to-ospf permit 10
match ip address prefix-list static

metric 10

metric-type type 1

 

route-map static-to-ospf permit 100

 

 

router ospf 100

redistribute static route-map static-to-ospf subnet

 

It is more flexible because you can manipulate other traffic.

 

Now about of your second configuration part: 

redistribute static metric 10 metric-type 1

redistribute subnets route-map static-to-ospf

is not an usual or valid configuration because the first line is applying metric 10 and type 1 to every static route (no filter) and the second line is redistributing the information into the route-map with type 2 (default) value and no metric. 

 

The first configuratio part is more explicit redistribute static metric 10 metric-type 1 subnets route-map static-to-ospf it is applying metric 10 and type 1 matched into the route-map but it can be optimized with the configuration above. 

 

 Hope it is useful

 

:-)

 




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

View solution in original post

2 Replies 2

Hi

The "subnet" keyword is used to redistribute networks with variable subnet masks, Now I would like to recommend to use something like:

 

ip prefix-list static seq 10 permit 0.0.0.0/0 le 32

 

route-map static-to-ospf permit 10
match ip address prefix-list static

metric 10

metric-type type 1

 

route-map static-to-ospf permit 100

 

 

router ospf 100

redistribute static route-map static-to-ospf subnet

 

It is more flexible because you can manipulate other traffic.

 

Now about of your second configuration part: 

redistribute static metric 10 metric-type 1

redistribute subnets route-map static-to-ospf

is not an usual or valid configuration because the first line is applying metric 10 and type 1 to every static route (no filter) and the second line is redistributing the information into the route-map with type 2 (default) value and no metric. 

 

The first configuratio part is more explicit redistribute static metric 10 metric-type 1 subnets route-map static-to-ospf it is applying metric 10 and type 1 matched into the route-map but it can be optimized with the configuration above. 

 

 Hope it is useful

 

:-)

 




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

I like the suggestion from Julio about the better way to configure the redistribution. I would suggest a somewhat different answer to the second part of the question. Bearing in mind that in the syntax of the redistribute command the first parameter specifies what is being redistributed, we can see that the first statement is correct syntax

redistribute static metric 10 metric-type 1

but the second statement is not correct syntax

redistribute subnets route-map static-to-ospf

You are not attempting to redistribute subnets and IOS would not accept this line.

 

HTH

 

Rick

HTH

Rick
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: