06-15-2021 05:42 AM
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!
06-15-2021 06:36 AM - edited 06-15-2021 06:37 AM
Hello
add a static route for that specific host on the receiving rtr and then redistribute it.
06-15-2021 06:37 AM
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
06-15-2021 06:52 AM
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
06-15-2021 08:13 AM
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
06-16-2021 01:40 AM
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
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