10-17-2010 07:12 PM - edited 03-04-2019 10:09 AM
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?
10-17-2010 09:24 PM
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
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