cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1110
Views
0
Helpful
9
Replies

Inbound route influencing conditions in a outbound route-map.

Jaime Cadete
Level 1
Level 1

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

9 Replies 9

John Blakley
VIP Alumni
VIP Alumni

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

HTH, John *** Please rate all useful posts ***

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

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

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

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

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

Can you post your config and highlight where is the thing that's not working

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 ?

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

Review Cisco Networking for a $25 gift card