Redistribution static into OSPF

Answered Question
Aug 9th, 2007

Hello,

I have a very basic question. Needs your input. If i want to send Static route into OSPF environment. Then which of the following options would work. Unfortunately i cannot test it..so wondering if someone has tested this environment can suggest.

ip route 156.172.64.24 255.255.255.248 156.164.22.94

route ospf xxx

1. redistribute static subnets

2. redistribute static metric-type 1 subnets

3. redistribute static metric-type 1 subnets route-map static-to-ospf.

If I want to redistribute static route to be send into OSPF environment. Then can i use Option # 1, 2 and 3. I know option # 3 needs to have a route-map created for static route. But Option 1 and 2 what's the difference. Why would i need metric-type 1 as mentioned in Option 2. But Option # 1 would work too. Kindly reply ..

Thanks,

Hassan

I have this problem too.
0 votes
Correct Answer by sundar.palaniappan about 7 years 9 months ago

It's probably typo - a small correction in your post.

"if i use static route command in ospf with metric-type 1 then the cost will remain the same" -- actual the cost would vary with type 1 as the route traverses more links. With type 2 the metric would remain the same.

To redistribute IBGP routes into another process you need to configure the command 'bgp redistribute-internal' under the BGP process. However, it's not really recommended to use this option due to some problems that might arise out of this.

BTW there's nothing stupid about your questions and I believe they are valid concerns.

HTH

Sundar

Correct Answer by Richard Burts about 7 years 9 months ago

Hassan

By default the IOS will not redistribute a route learned by IBGP, even if there is a route map which is permitting it. It is possible to change the default behavior if you really want to. The command to do this is:

bgp redistribute-internal

HTH

Rick

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (2 ratings)
Richard Burts Thu, 08/09/2007 - 09:12

Hassan

Each of the 3 options would work. Which one is better depends on being precise about what you want to accomplish. The first option is the most general, and will redistribute all static routes and will use the default metric type. The second option will redistribute all static routes and will set the metric type (E1). Sometimes you might care about which metric type (whether it maintains the same cost as was assigned at redistribution or whether the cost assigned at redistribution is incremented by local cost as the route gets advertised through the network. In many environments it does not matter much which metric type is used. But some environments do care. If you care, then you want to set the metric type.

The third option is a bit more restrictive. It sets the metric type and it uses a route map to control redistribution. The route map is generally used so that you can permit some of the static routes for redistribution but can deny some of the static routes to be redistributed.

So depending on what your requirements are one of these options will be the best for you.

HTH

Rick

sundar.palaniappan Thu, 08/09/2007 - 09:21

Have a look at this link to get a better understanding of E2 vs. E1 routes.

http://www.cisco.com/en/US/tech/tk365/technologies_white_paper09186a0080094e9e.shtml#t33

The default metric type is E2 but as Rick stated E1 will be a more appropriate choice in certain situations. Hopefully this link can help you make an educated decision.

HTH

Sundar

hassan_syed6@ya... Thu, 08/09/2007 - 10:38

Thanks alot Rick and Sundar...for your inputs.

I have read it through also the link. What i understand is that if i use static route command in ospf with metric-type 1 then the cost will remain the same. If i only use redistribute static subnet, then cost will be metric type 2 ( default).

Really, sorry...but quick question if i have redistribution from BGP to OSPF configured ( I have route-map configured under ospf to redistribute all learned routes in BGP to OSPF). And lets say i have learned a route from my neighbor which is IBGP ..then it should automatically redistribute that route into OSPF right.. or BGP will not send IBGP learned route in OSPF no matter there is a route-map which is allowing any subnets to get redistributed into OSPF.

Sorry, for asking too many stupid questions.

Thanks,

Hassan

Correct Answer
Richard Burts Thu, 08/09/2007 - 10:46

Hassan

By default the IOS will not redistribute a route learned by IBGP, even if there is a route map which is permitting it. It is possible to change the default behavior if you really want to. The command to do this is:

bgp redistribute-internal

HTH

Rick

Correct Answer
sundar.palaniappan Thu, 08/09/2007 - 10:51

It's probably typo - a small correction in your post.

"if i use static route command in ospf with metric-type 1 then the cost will remain the same" -- actual the cost would vary with type 1 as the route traverses more links. With type 2 the metric would remain the same.

To redistribute IBGP routes into another process you need to configure the command 'bgp redistribute-internal' under the BGP process. However, it's not really recommended to use this option due to some problems that might arise out of this.

BTW there's nothing stupid about your questions and I believe they are valid concerns.

HTH

Sundar

hassan_syed6@ya... Thu, 08/09/2007 - 11:32

Sundar and Rick....you both are Really great...man seriously. Thanks for clearing my confusion....

Regards,

Hassan

Actions

Login or Register to take actions

This Discussion

Posted August 9, 2007 at 8:56 AM
Stats:
Replies:6 Overall Rating:5
Views:7778 Votes:0
Shares:0
Tags: No tags.