BGP route-map continue

Unanswered Question
Jan 23rd, 2008
User Badges:


On the following web page 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



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


  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
eduardonpinto Wed, 01/23/2008 - 03:44
User Badges:

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.

nordick26 Wed, 01/23/2008 - 05:48
User Badges:

Hi all,

I've just made a test on my lab and things are going strange.

Just a simple test:


I'm running BGP between them.

Route-map on R1 is configured in this way:

route-map TEST permit 10


set as-path prepend 10


route-map TEST permit 20

match ip address 20

set metric 20


access-list 20 permit

Routers are connected throught serial interface. 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?



eduardonpinto Wed, 01/23/2008 - 05:54
User Badges:


have you tried using the continue command after the set action on statement 10?

nordick26 Wed, 01/23/2008 - 06:15
User Badges:


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


This Discussion