Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

Route-map continue clause

Hi,

I am having issue understanding after a read on the route-map continue clause works based on Cisco's explanation.

http://www.cisco.com/en/US/docs/ios/12_3t/12_3t2/feature/guide/gt_brmcs.html#wp1045836

There are two behaviors that can occur when the same set command is repeated in subsequent continue clause entries. For set commands  that configure an absolute value, the value from the last instance will  overwrite the previous value(s). The following example illustrates this  behavior. The set clause value in sequence 20 overwrites the set clause  value from sequence 10. The next hop for prefixes from the 172.16/16  network is set to 10.2.2.2 and not 10.1.1.1.

Router(config)# ip prefix-list 1 permit 172.16.0.0/16 

Router(config)# ip prefix-list 2 permit 192.168.1.0/24 

Router(config)# route-map RED permit 10 

Router(config-route-map)# match ip address prefix-list 1 

Router(config-route-map)# set ip next hop 10.1.1.1 

Router(config-route-map)# continue 20 

Router(config-route-map)# exit 

Router(config)# route-map RED permit 20 

Router(config-route-map)# match ip address prefix-list 2 

Router(config-route-map)# set ip next hop 10.2.2.2 

Router(config-route-map)# end


Non-empty prefix-lists have an implicit deny and with both
prefix-lists, I don't see how prefix-list 2 is able to match 172.16.0.0/16.
Would anyone be kind enough to shed some light please?
1 REPLY

Re: Route-map continue clause

Hi,

Thant's not correct.. I have tried and it behaves as you pointed out

see

ip prefix-list 1 seq 5 permit 10.1.0.0/30
ip prefix-list 2 seq 5 permit 100.100.100.1/32

route-map TEST permit 10
match ip address prefix-list 1
  set ip next-hop 10.0.0.82
continue 20
!
route-map TEST permit 20
match ip address prefix-list 2
set ip next-hop 10.0.0.83

and it works as below

blab506#sh ip bgp vpnv4 all
Route Distinguisher: 100:1
* i10.1.0.0/30             10.0.0.82                0    100      0 ?
* i100.100.100.1/32    10.0.0.83                0    100      0 ?

But when you see output of route-map it is changes to

blab506#sh route-map TEST
route-map TEST, permit, sequence 10
  Match clauses:
    ip address prefix-lists: 1
  Continue: sequence 20
  Set clauses:
    ip next-hop 10.0.0.82
  Policy routing matches: 0 packets, 0 bytes
route-map TEST, permit, sequence 20
  Match clauses:
    ip address prefix-lists: 2
  Set clauses:
    ip next-hop 10.0.0.83
  Policy routing matches: 0 packets, 0 bytes

Hope this is helpful to you

Regards

Mahesh

730
Views
5
Helpful
1
Replies