cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
669
Views
0
Helpful
5
Replies

BGP into OSPF

netsplitter
Level 1
Level 1

I have a scenario where I am learning a lot of different networks via BGP. Without going to far into the design/requirement, I am needing to only advertise a specific IP from these networks learned via BGP, and not the whole network.

For example, I am learning: 18.236.0.0/15, but want to only advertise 18.236.31.89

When I attempt this with a route-map, it does not work, as I assume the process is looking for an exact match, and since 18.236.31.89/32 isn't in the BGP table directly, it fails to redistribute. 

Any thoughts or ideas on how / if what I am trying to do is possible?

Thank you!

5 Replies 5

Hello
add a static route for that specific host on the receiving rtr and then redistribute it.


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello @netsplitter ,

the only possible workaround I see is the following:

create a host static route with next-hop = BGP next-hop for the prefix

 

redistribute the static into OSPF remenber to add the subnets keyword.

 

Redsitribution allows to filter or change some parameters but it does not allow to extract an host route from a prefix.

 

Hope to help

Giuseppe

 

netsplitter
Level 1
Level 1

Thank you for the responses. 

I think where I'm struggling with the static route is that I actually have two ISR's learning these BGP routes, and both are doing OSPF with a firewall (which is acting as a default gateway for the clients). 

I guess I could use an track on the static route for the BGP peer IP - my biggest concern is that if the BGP neighbor is no longer available and/or if the BGP routes get removed from the BGP table, that the routes will take the other path via OSPF from the firewall. Even with

Hello @netsplitter ,

consider redistribution of the whole prefix 18.236.0.0/15 into OSPF on both OSPF routers this should solve all the issues and it does not require to introduce IP SLA.

 

Hint: I don't know why redistribution of the whole prefix could be a problem for you, however if possible I would go this way.

 

Hope to help

Giuseppe

 

Hello


@netsplitter wrote:

I guess I could use an track on the static route for the BGP peer IP - my biggest concern is that if the BGP neighbor is no longer available and/or if the BGP routes get removed from the BGP table, that the routes will take the other path via OSPF from the firewall. Even with


Yes this would be applicable.

Example:
ip sla 1
icmp-echo <bgp nexhop isp1> source-interface xxx
ip sla schedule 1 life forever start-time now
track 10 rtr 1 reachability
ip route 18.236.31.89 255.255.255.255 <bgp nexhop isp1> track 10
ip route 18.236.31.89 255.255.255.255 <bgp nexhop isp2> 200

ip prefix-list host permit 18.236.31.89/32
route-map host_rm
match ip address prefix-list host

router ospf xx
redistribute static route-map host_rm subnets


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul