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

Conditional Advertisement - Tracking routes

shivdurai
Level 1
Level 1

Hi,

I'm held up with a requirement and a lot of solutions that I have tried failed to meet the requirement. Hope I can get some solutions here

I have a Edge router with the following connections

Connection 1 to ISP

Connection 2 to remote site 1

Connection 3 to remote site 2

Connection 4 to remote site 3

=========================================

I have the following static routes locally configured on my edge router

ip route 179.199.0.0 255.255.248.0 null 0

ip route 179.199.0.0 255.255.254.0 null 0

=========================================

Remote site 1's local subnet is 179.199.2.0/23 (Adv in BGP)

Remote site 2's local subnet is 179.199.4.0/23 (Adv in BGP)

Remote site 3's local subnet is 179.199.6.0/23 (Adv in BGP)

=========================================

Edge router runs EBGP with ISP and IBGP will all the remote sites. Hence this router will 4x /23 routes (One Local Staic and 3 BGP Routes)

The requirement is, if any one of the /23 routes go down, I should stop advertising the /21 to ISP

1 Accepted Solution

Accepted Solutions

Edit

the object tracking has to use AND not OR

track 10 list boolean and
object 2
object 3
object 4

this mean the object will be up when all the objects in the lists are up and will be down when either/any of them is down

View solution in original post

8 Replies 8

Jon Marshall
Hall of Fame
Hall of Fame

How are you advertising the routes from the remote sites. If you are using static routes to Null0 on the remote sites as you are on the edge router then it will be very difficult.

Indeed why are you using static routes to Null0 on the edge router as well.

Are these static routes because you are using "network" statements under the bgp config ?

Or do you actually have interfaces at the remote site using a /23 network ?

Or are you using the aggregate address command at the remote sites ? 

So we need more info. Please answer all the following -

1) what are the static routes to Null0 for ie. are they so you can use a "network" statement under BGP ?

2) at the remote sites are the /23 advertisements for a single subnet or is it a summary of the subnets at the remote site.

3) if it is a summary at the remote site then are you using "network" statements there as well to advertise the /23

4) when you say if a /23 goes down what do you mean exactly. Do you mean if the IBGP peering fails ?

BGP configs + the answers to the above will be needed.

Jon

Just to give an overview of the setup

179.x.0.0/23 -From Location A and Service A  (DR for service B,C and D)

179.x.2.0/23- From Location B and Service B (DR for Service A,C and D)

179.x.4.0/23- From Location C and Service C (DR for Service A,B and D)

179.x.6.0/23- From Location D and Service D (DR for Service A,B and C)

Each  of the above subnets provides some appication services. We have  aggregated them to a /21 and advertised to Internet from each site.

All the above 4 sites will advertise 173.x.0.0/21 to  internet so that the internet users will land on any of the sites  depending on proximity and internally will be routed to the site that  hosts the service. Now suppose Site A is isolated from Site B (Inter DC  WAN failure) and a user trying for that service lands on Site A (If /21  is advertised out) the traffic will be blackholed (Hence in this  condition site A should stop advertising /21 so that the user will land  on any of the other three sites)

Answers are provided in the sequence your questions were posted

1. It is configured as Null0 static because it is an  anchor route. We intend it not go down at any circumstances except the  one situation that has been mentioned in my condition

2. The /23 is a summary of 2 x /24s which is only internal(Adv. only in OSPF and not in BGP)

3. These routes are advertised in BGP via network statements

4. By /23 goes down, I mean that the IBGP peering fails (Inter-site WAN failure)

Marwan ALshawi
VIP Alumni
VIP Alumni

Try this example

router bgp x

neighbor x.x.x.x advertise-map ADVERTISE exist-map EXIST

!--- Advertises the routes matched in the route-map ADVERTISE (173.x.xx.x/21

!--- only if the routes matched in route-map EXIST to the ebgp

!

access-list 60 permit 173.x.x.x 0.0.254.255

access-list 68 permit 173.x.x.x 0.0.252.255

!

route-map EXIST permit 10

match ip address 60

Match next-hop y.y.y.y. Where y.y is source of /23 ibgp next hop pls note if next hop command didn't work try match ip next-hop then

!

route-map ADVERTISE permit 10

match ip address 68

!

HTH

Sent from Cisco Technical Support iPhone App

Marwan ALshawi
VIP Alumni
VIP Alumni

But be aware that if the route /23 is shown in the routing table as through the null 0/static then you need to remove the static route and relay on the ibgp learnt route in order to get the above working so the router can see the route source and withdrawal as well for conditional advertisement

Sent from Cisco Technical Support iPhone App

Thanks for the response

I have tried with Advertise Map/Exist Map and won't work because the  Exist map has to check for all the /23 routes because even if one of the  /23 routes goes down, the /21 should stop being advertised..

The following commands were applied

access-list 60 permit 173.x.2.x 0.0.254.255

access-list 61 permit 173.x.4.x 0.0.254.255

access-list 62 permit 173.x.6.x 0.0.254.255

route-map EXIST permit 10

match ip address 60

match ip address 61

match ip address 62

But the route map EXIST does not perform AND operation to check  all the subnets, instead it performs OR operation and the condition  becomes true even if one of the /23 routes exists

Configuration looks like this:

==============================

edge1.pud#sh run

!!!! Output omitted !!!!

!

!

route-map EXIST permit 10

match ip address 60 61 62

==============================

try to use this solution

create a dummy loopback interface in each of the routers

lets say
R1 1.1.1.1/32
R2 2.2.2.2/32
R3 3.3.3.3/32
R4 4.4.4.4/32

in each of the routers advertise the loopback in BGP to other iBGP peers

now because you want to track the availability of /23 and it has to be stopped advertised if any of the iBGP links gose down
you can use this work around if you like

then stop advertise this route over iBGP and use local static routes with object tracking
this object tracking reference another trackings that uses AND logic which will bring this
object tracking down if any of the above links down or BGP session is down by tracking the newly created loopback addresses


i am assuming you do not have any other interface, routes of the 179 subnets other than the static routes to the null 0
in this case  YOU MUST remove the static routes to the null 0 so that when the bellow static routes to /23 brought down the network command of /21 will stop being advertised


config example

after you added and advertised the above loopbacks in each router

R1 config

track 2 ip route 2.2.2.2/32 reachability
track 3 ip route 3.3.3.3/32 reachability
track 4 ip route 4.4.4.4/32 reachability

track 10 list boolean and
object 2
object 3
object 4

ip route 179.x.2.0 255.255.254.0 R2next hop track 10

ip route 179.x.4.0 255.255.254.0 R3next hop track 10

ip route 179.x.6.0 255.255.254.0 R4next hop track 10


now you supposed to have the /21 advertised to the Ebgp peer through network command
and as advised above no routes fall within the /21 range above presented in the router other than
the static routes above ( null removed if its overlap )

once any of the loopback addrress disapear form theoruting table due to link issue or BGP session
the track 10 will go downa dn wil bring the static routes above down
then because BGP wil not see any more specific route for /21 range address it will stop advertise it

Good luck
HTH

Edit

the object tracking has to use AND not OR

track 10 list boolean and
object 2
object 3
object 4

this mean the object will be up when all the objects in the lists are up and will be down when either/any of them is down

I already had it sorted out with Object tracking. Sorry about my delayed update on this and I really appreciate your efforts for sharing your views

Thanks once again

Shiva