cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1022
Views
0
Helpful
8
Replies

Redistribution static from BGP to OSPF

hassan_syed6
Level 1
Level 1

Hello,

I really need help here. Over the weekend i tried to Migrate but failed so had to backout. Any input will be greatly appreciated. Following are my changes which didn't work.

I have a router Montreal:

interface FastEthernet0/0

ip address 165.162.142.139 255.255.255.192 secondary

Router bgp 25461

redistribute static

ip route 165.162.140.24 255.255.255.248 165.162.142.139

Following is already there

-------------------------------

interface FastEthernet0/0

ip address 165.162.2.15 255.255.255.0 <---This connects with Calgary router running OSPF

router ospf 24

log-adjacency-changes

redistribute bgp 25461 subnets route-map BGP-TO-OSPF

network 165.162.2.15 0.0.0.0 area 0

Now through " Redistribute static" i am putting the static route into bgp. But i have a route-map from BGP to ospf under "router ospf" which allows everything exacept few subnets.

Any ideas why my Static route is not propogating into OSPF. ip route 165.162.140.24 255.255.255.248 165.162.142.139

Thanks,

Hassan.

8 Replies 8

Hassan,

The route to network 165.162.140.24/29 is a static route. Therefore, you need to redistribute static into OSPF and redistributing BGP into OSPF doesn't redistribute the static route. Not sure if you are trying to indirect redistribution, i.e redistribute static into BGP and BGP back into OSPF, that wouldn't work in this scenario.

HTH

Sundar

Hello Sundar,

If i put " redistribute static subnet" under ospf. You think it will get propogated under ospf.

You see on Montreal i have a IBGP connection to Alaska router. On Alaska router i am getting it fine through IBGP. but it has the same OSPF configuration as Montreal. Even though Static is on Montreal shouldn't Alaska router send it to OSPF network.

Will appreciate your input.

Thanks,

Hassan

Hassan,

See the responses below.

"If i put " redistribute static subnet" under ospf. You think it will get propogated under ospf."

Yes. Optionally, you can use a route-map with this configuration to ensure only the static routes that you desire get advertised via OSPF.

"You see on Montreal i have a IBGP connection to Alaska router. On Alaska router i am getting it fine through IBGP. but it has the same OSPF configuration as Montreal. Even though Static is on Montreal shouldn't Alaska router send it to OSPF network"

I don't understand your topology fully. But, if Alaska is learning the route via BGP and if you are redistributing BGP into OSPF on Alaska router then the routers that are talking OSPF with Alaska router should indeed learn the route via OSPF. We need to look at Alaska router configuration in full to give you definite answers.

HTH

Sundar

Hassan,

The reason Alaska doesn't redistribute the route to OSPF is that iBGP routes are not redistributed into the IGP by default. This default can be changed by using the "bgp redistribute-internal" command under router bgp. You need to be careful with that command though.

My preference would be to use "redistribute static" under router ospf on Montreal.

Hope this helps.

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

Harold Ritter
Cisco Employee
Cisco Employee

Hassan,

It is normal behavior for the static route 165.162.240.24/29 not to show up in OSPF as you are not redistributing static into OSPF.

Bear in mind that it is not enough for you to redistribute static to BGP and then BGP into ospf for the static routes to show up in OSPF. Only the routes that are installed in the RIB with a source of BGP will be redistributed into OSPF when you do a redistribute bgp 25461.

Hope this helps,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

Hello,

Guys, thanks for all your response..i will copy the config. to be more clear.

But what i have understood is on Montreal router under ospf i need to have " redistribute static metric-type 1 subnets". This will inject my static route to OSPF.

Another point Hritter brought up is IBGP learned route on Alaska for 165.162.240.24/29 which is statically configured on Montreal will not be send to OSPF from Alaska. Correct me if i am wrong. I wil paste the config. to be more clear.

My ass is on the Sling here. Because i am redistributing routes from BGP to OSPF and then OSPF is also redistributing routes into BGP. so it's one big happy redistribution going on. There are some core components which needs access to BGP environment and also some core components sitting in BGP which needs access to OSPF ( that's why this crazy redistribution both ways).

Hassan,

Your understanding, that 165.162.240.24/29 is not redistributed from BGP to OSPF on Alaska because it is received as an iBGP route, is correct.

Regards,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

Your understanding is correct for the most part. Just redistribute static into OSPF on Montreal router and that should solve your problem. I just would add that anytime you do mutual redistribution between routing protocols be careful with route feedback, i.e a route that's native to one protocol getting advertised back into it by the protocol into which it was redistributed originally. Use route maps to ensure to eliminate route feedback situation. As far as hritter's comment about the 'bgp redistribute-internal' command see the Cisco FAQ below.

Q. How can I redistribute internal BGP (iBGP) learned default-route (0.0.0.0/0) route into EIGRP/OSPF/IS-IS?

A. The redistribution of iBGP routes into Interior Gateway Protocol (IGP)?Enhanced Interior Gateway Routing Protocol/Open Shortest Path First/Intermediate System-to-Intermediate System (EIGRP/OSPF/IS-IS)?can cause routing loops within the Autonomous System, which is not recommended. By default, iBGP redistribution into IGP is disabled. Issue the bgp redistribute-internal command in order to enable redistribution of iBGP routes into IGP. Precautions must be taken to redistribute specific routes using route-maps into IGP. A sample configuration for redistributing a iBGP learned default route 0.0.0.0/0 into EIGRP is shown in this output. Configurations for OSPF/IS-IS are similar.

router bgp 65345

[...]

bgp redistribute-internal

!

router eigrp 10

[...]

redistribute bgp 65345 route-map check-def

!

ip prefix-list def-route seq 5 permit 0.0.0.0/0

!

route-map check-def permit 10

match ip address prefix-list def-route

HTH

Sundar

Review Cisco Networking products for a $25 gift card