10-10-2011 08:18 AM - edited 03-04-2019 01:52 PM
Hi,
I want to announce some routes to a eBGP neighbour when that router is receiving a specific route (and only in that scenario),
using route-maps.
So far I have an object tracking the inbound route (Tracking IP-Route Reachability),
when the object is up it inserts a dummy static route in the routing table, signaling that it's receiving the specific route.
I've been playing with the route-map continue, but that doesn't seem to work and I have the same complaints that everybody reports.
I'm now considering implementing a eem applet triggered by the object state,
changing the route-map every time the object changes state (up and down).
But I have one doubt will the applet run after an reload?
What other options do I have?
Best regards,
JCadete
10-10-2011 09:15 AM
You should look into conditional advertising. It's much easier to use in your scenario and you won't have to use ip sla to do it.
Something like this:
router bgp 3
network 192.168.2.0 mask 255.255.255.0
neigh 192.168.1.2 advertise-map IFEXIST exist-map Exist
ip prefix-list 1 permit 192.168.2.0/24
ip prefix-list 2 permit 192.168.15.0/24
route-map IFEXIST permit 10
match ip address prefix-list 2
route-map Exist permit 20
match ip address prefix-list 1
What the above does is advertise the 192.168.2.0 subnet only if it sees the 192.168.15.0/24 in its routing table.
*Disclaimer: This was done from memory, and some of the syntax could be wrong, missing, or incomplete*
John
10-10-2011 09:24 AM
Already looked into advertise-map, but I need to use a route-map in order to influence the advertised routes and it seems to me that the advertise-map lacks the set commands.
Plus if I understand correct the filter advertise-map only applies for either EXIST ou NON_EXIST, you can't have an advertise-map for EXIST an another advertise-map for the NON_EXIST.
Thanks,
JCadete
10-10-2011 08:35 PM
You can do it as following
Add a tag to the static route that you want tp inject it conditionally plus track number of the one you created
Like ip route x.x.x.x y.y.y.y null0 track x tag 200
Create s route map that match route taged with 200 and use this to redistribute this static route into bgp si that when the track state is up the dummy static route will comes up with tag 200 and get redistributed into bgp
Route-map static1
Match tag 200
Router bgp xx
Redistribute static route-map static1
Hope this help
If helpful rate
Sent from Cisco Technical Support iPhone App
10-11-2011 01:37 AM
The routes I want to anounce are local (directed/connected), therefore I can't override them with a static route,
not even with a supernet, cause it will break the alternative paths scenarios.
JCadete
10-11-2011 04:25 AM
Then create to eem applets
One to add the redistribute connected with a route map under bgp when the track is up
And another one to remove this redistribution when the track state is down, simple
Hope this help
If helpful rate
10-12-2011 07:14 AM
I'm now concentrating on the eem applets,
specially in keeping the route-map all ways synchronized with the object state.
I'm stun than I can't make route-map continue work in any way,
none of the examples work in several releases and that isn't acknowledge anywhere,
to me route-map continue despite all the documentation isn't working,
maybe I'm making a serious misinterpretation of the docs.
That isn't the Cisco way, very strange.
JCadete
10-12-2011 01:43 PM
Can you post your config and highlight where is the thing that's not working
10-13-2011 02:46 AM
Here is a short sample of a lab test.
Using the same match twice for easier understanding
R1#sh route-map
route-map localvoiceroutes_rm, permit, sequence 10
Match clauses:
ip address (access-lists): localvoiceroutes_acl
Continue: sequence 110
Set clauses:
as-path prepend 12345
Policy routing matches: 0 packets, 0 bytes
route-map localvoiceroutes_rm, deny, sequence 100
Match clauses:
Set clauses:
Policy routing matches: 0 packets, 0 bytes
route-map localvoiceroutes_rm, permit, sequence 110
Match clauses:
ip address (access-lists): localvoiceroutes_acl
Set clauses:
as-path prepend 54321
Policy routing matches: 0 packets, 0 bytes
R2#sh ip bgp
BGP table version is 9, local router ID is 10.52.80.12
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
* 10.12.160.0/24 10.52.90.50 0 0 64649 12345 ?
10-13-2011 04:22 PM
Hi Jaime
if you post the conifg will be more helpful to see how we can work it out
and tel me where is the issue you have with the config
then we can find another way to do it
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