[c-nsp] Conditional BGP w/ multiple non-exist prefixes - bug?
Randy
randy_94108 at yahoo.com
Mon Jun 29 23:35:22 EDT 2009
--- On Mon, 6/29/09, Randy <randy_94108 at yahoo.com> wrote:
From: Randy <randy_94108 at yahoo.com>
Subject: Re: [c-nsp] Conditional BGP w/ multiple non-exist prefixes - bug?
To: "Cisco Mailing list" <cisco-nsp at puck.nether.net>, "Matt Carter" <matt at iseek.com.au>
Date: Monday, June 29, 2009, 7:56 PM
--- On Mon, 6/29/09, Matt Carter <matt at iseek.com.au> wrote:
From: Matt Carter <matt at iseek.com.au>
Subject: [c-nsp] Conditional BGP w/ multiple non-exist prefixes - bug?
To: "Cisco Mailing list" <cisco-nsp at puck.nether.net>
Date: Monday, June 29, 2009, 5:18 PM
Hi All,
Trying to work out whether I am hitting bugs here or can't see the forest for the trees or what. My situation is I need to advertise prefix X when either prefix A or prefix B disappears from the BGP table. My original design was to have two Conditional BGP statements under my peer group each with a unique non-exist & advertise-map such that each condition can be watched independently of the other. The problem I am experiencing is that it seems that whichever statement is entered first appears to work and whichever statement
which was entered last does not work. Removing and reversing the input of the statements results in a reversal of which Condition appears to work. I am using 12.2(33)SRC3. (The fact that Cisco coders can't even spell "BGP" properly in the debugs doesn't give me a great deal of confidence in this feature..)
Eg; Withdrawing 192.168.2.0/24 should result in 10.1.86.0/24 being advertised
We can see in the BGP debug log the prefix matches the advertise map and the condition has changed from withdraw to 'advertise' ( which is also reflected in the show ip bgp neighbor under Condition status) ... but i never get a BGP 'send update' ..
Jun 29 14:52:23.766 AEST: BGP(0): no valid path for 192.168.2.0/24
Jun 29 14:52:57.533 AEST: BPG(0): Condition conditional-nonexist-syd changes to Advertise
Jun 29 14:53:02.085 AEST: BGP(0): net 10.1.86.0/24 matches ADV MAP conditional-advertise-syd: bump version to 4442619
If I remove and re-enter the conditional bgp statements such that this one is entered first and then repeat the test - we get a send update
Jun 29 12:42:45.122 AEST: BGP(0): no valid path for 192.168.2.0/24
Jun 29 12:43:31.950 AEST: BPG(0): Condition conditional-nonexist-syd changes to Advertise
Jun 29 12:43:38.913 AEST: BGP(0): 192.168.99.99 10.1.86.0/24 matches advertise map conditional-advertise-syd, state: Advertise
Jun 29 12:43:38.913 AEST: BGP(0): 192.168.99.99 send UPDATE (prepend, chgflags: 0x0) 10.1.86.0/24, next 192.168.99.98, metric 0, path 65530, extended community
Now this seemed a bit wierd to me so I had another thought, in my case the advertise map is really the same for conditions, I just need to have either non exist prefix A or non exist prefix B, I thought of using a common advertise-map and put both prefix A and B in the same non-exist-map with an "OR" condition in the route-map, however this doesn't seem to work either. I have read there is special behaviour regarding AND / OR operations with non-exist and conditional BGP? does anyone know whether this is or isn't the case ?? I don't seem to be getting either !!
Eg; two prefixes each in it's own prefix list
ip prefix-list prefix_A seq 5 permit 192.168.0.0/24
ip prefix-list prefix_B seq 5 permit 192.168.2.0/24
placed in the same route-map sub block so they are treated with "OR" semantics
route-map telstra-bne-domestic-prefsec-conditional-nonexist permit 10
match ip address prefix-list prefix_B prefix_A
removal of prefix_A condition is true
Jun 29 16:38:02.578 AEST: BGP(0): nettable_walker 192.168.0.0/24 no best path
Jun 29 16:38:19.354 AEST: BPG(0): Condition conditional-nonexist changes to Advertise
removal of prefix_B doesnt do anything
Jun 29 16:44:44.705 AEST: BGP(0): nettable_walker 192.168.2.0/24 no best path
Seems I don't appear to have "OR" operation nor do I have "AND" operation. Somewhat confused right now. Maybe have been looking at this for too long. :)
Anyone played with conditional BGP and has multiple prefixes OR'ed as the trigger ?
a version of IOS that supports route-maps with the *continue* clause will more that likely work for you.
see BGP Route-map Continue
Regards,
./Randy
...I haven't tried this but a regular fall-through route-map should be able to accomplish this as well.
Your non-exist routemap( for the corresponding advertise-map) will have two sequences.
eg:
route-map non-exist 5
match ip-addr prefix-list a
match as-path 1
route-map non-exist 10
match ip addr prefix-list b
match as-path 2
ip prefix-list a permit 172.27.100.0/22
ip prefix-list b permit 172.28.0.0/23
ip as-path access-list 1 permit ^65420
ip as-path access-list 2 permit _65534$
(addresses and ASN's used in example are *private*)
Regards,
./Randy
More information about the cisco-nsp
mailing list