09-06-2017 09:55 AM - edited 03-05-2019 09:05 AM
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
Solved! Go to Solution.
09-19-2017 03:55 PM - edited 09-20-2017 12:18 PM
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
:-)
09-19-2017 03:55 PM - edited 09-20-2017 12:18 PM
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
:-)
09-20-2017 10:52 AM
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide