01-23-2008 01:35 AM - edited 03-03-2019 08:23 PM
Hi,
On the following web page http://www.cisco.com/en/US/products/ps6566/products_feature_guide09186a00801a7f7a.html#wp1027188 there is something I can't understand concerning the BGP route-map continue command.
With this configuration:
route-map ROUTE-MAP-NAME permit 10
match ip address 1
match metric 10
set as-path prepend 10
continue 30
!
route-map ROUTE-MAP-NAME permit 20
match ip address 2
match metric 20
set as-path prepend 10 10
!
route-map ROUTE-MAP-NAME permit 30
set as-path prepend 10 10 10
continue
!
route-map ROUTE-MAP-NAME permit 40
match community 10:1
set local-preference 104
it is written the following:
"If a successful match does not occur in route-map entry 20, the route map will "fall through" to route-map entry 30. This sequence does not contain a match clause, so the set clause will be automatically executed and the continue clause will go to the next route-map entry because a sequence number is not specified.
If there are no successful matches, the route-map will "fall through" to route-map entry 30 and execute the set clause, and route-map entry 40 will not be evaluated."
What I don't understand is the last sentence. Howcome entry 40 will not be evaluated?
Can you please explain to me if this is correct?
Thank you in advance
Eduardo
01-23-2008 03:36 AM
Hi Eduardo,
yes, it really looks strange.
According to link hereunder there is a mistake in the output (and link) you have posted.
Reffer to chapter "Information About BGP Route-Map Continue Clauses"
http://www.cisco.com/en/US/products/ps6566/products_feature_guide09186a00801a7f7a.html
HTH
Ivan
01-23-2008 03:44 AM
Hi Ivan,
thank you for your reply. I also think there is a mistake on that page. Things just don't add up:
"Match Operations with Continue Clauses
If a match clause does not exist in the route-map entry but a continue clause does, the continue clause will be automatically executed and go to the specified route-map entry."
, therefore after statement 30, it should 'continue' to statement 40.
01-23-2008 05:48 AM
Hi all,
I've just made a test on my lab and things are going strange.
Just a simple test:
R1--R2
I'm running BGP between them.
Route-map on R1 is configured in this way:
route-map TEST permit 10
continue
set as-path prepend 10
!
route-map TEST permit 20
match ip address 20
set metric 20
!
access-list 20 permit 10.3.3.0 0.0.0.255
Routers are connected throught serial interface.
10.3.3.0 is a LAN subnet on R1.
In R2 bgp table, i can see that AS number 10 was prepended correctly, but I'd like to see the metric 20 as well. But actually it seems route-map has stoped at sequence 10.
Do you have any ideas why?
Cheers
Ivan
01-23-2008 05:54 AM
Ivan,
have you tried using the continue command after the set action on statement 10?
01-23-2008 06:15 AM
Yes,
It just appears like this in the config.
CONTINUE was configured after SET.
R1#sh route-map TEST
route-map TEST, permit, sequence 10
Match clauses:
Continue: to next entry 20
Set clauses:
as-path prepend 10
Policy routing matches: 0 packets, 0 bytes
route-map TEST, permit, sequence 20
Match clauses:
ip address (access-lists): 20
Set clauses:
metric 20
Policy routing matches: 0 packets, 0 bytes
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