cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
22422
Views
5
Helpful
6
Replies

Redistribution static into OSPF

hassan_syed6
Level 1
Level 1

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

2 Accepted Solutions

Accepted Solutions

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

HTH

Rick

View solution in original post

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

View solution in original post

6 Replies 6

Richard Burts
Hall of Fame
Hall of Fame

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

HTH

Rick

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

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

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

HTH

Rick

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

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

Regards,

Hassan

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: