07-26-2020 11:32 PM
Hello,
I was experimenting with route-map with continue clause, however the use of continue clause does not set well with my understanding of its processing.
1. A route matches a match statement execute its configured set values and then jumps to other sequence number as per configured continue statement.
2. If next route-map sequence has no match statement, it should execute configured set action.
1. Access and Core are OSPF neighbors.
2. On Core:
Core#show ip ospf nei Neighbor ID Pri State Dead Time Address Interface 192.168.0.6 1 FULL/DR 00:00:39 10.0.128.2 GigabitEthernet0/2 Core#show ip route ospf Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP a - application route + - replicated route, % - next hop override, p - overrides from PfR Gateway of last resort is not set 192.168.0.0/32 is subnetted, 3 subnets O 192.168.0.6 [110/2] via 10.0.128.2, 00:39:07, GigabitEthernet0/2 O E2 192.168.1.0/24 [110/20] via 10.0.128.2, 00:39:07, GigabitEthernet0/2 192.168.2.0/32 is subnetted, 1 subnets O E2 192.168.2.1 [110/20] via 10.0.128.2, 00:39:07, GigabitEthernet0/2 Core# Core#
3. On Same Core, I have BGP configured to perform OSPF route redistribution:
OSPF route on Core with TAG 2001 Core#show ip route 192.168.2.1 Routing entry for 192.168.2.1/32 Known via "ospf 64501", distance 110, metric 20 Tag 2001, type extern 2, forward metric 1 Redistributing via bgp 64501 Advertised by bgp 64501 route-map OSPF2BGP Last update from 10.0.128.2 on GigabitEthernet0/2, 00:50:55 ago Routing Descriptor Blocks: * 10.0.128.2, from 192.168.0.6, 00:50:55 ago, via GigabitEthernet0/2 Route metric is 20, traffic share count is 1
Route tag 2001 Core#sh run | s r b router bgp 64501 bgp router-id 192.168.0.5 bgp log-neighbor-changes neighbor 10.0.0.2 remote-as 65001 neighbor 10.0.0.2 description Client neighbor 10.0.0.5 remote-as 64500 neighbor 10.0.0.5 description eBGP to Upstream ! address-family ipv4 network 10.0.0.0 mask 255.255.0.0 network 192.168.0.5 mask 255.255.255.255 redistribute ospf 64501 route-map OSPF2BGP neighbor 10.0.0.2 activate neighbor 10.0.0.2 send-community neighbor 10.0.0.2 next-hop-self neighbor 10.0.0.2 route-map FromClient in neighbor 10.0.0.5 activate neighbor 10.0.0.5 send-community neighbor 10.0.0.5 next-hop-self exit-address-family Core#
4. Route-map on Core
Core#show route-map OSPF2BGP route-map OSPF2BGP, permit, sequence 10 Match clauses: route-type external tag 2000 Continue: to next entry 11 Set clauses: community 64501:2 additive origin egp 64501 Policy routing matches: 0 packets, 0 bytes route-map OSPF2BGP, permit, sequence 11 Match clauses: route-type external Continue: to next entry 20 Set clauses: community 64501:2001 additive origin igp Policy routing matches: 0 packets, 0 bytes route-map OSPF2BGP, permit, sequence 20 Match clauses: Set clauses: weight 200 Policy routing matches: 0 packets, 0 bytes Core#
Result:
On core, I anticipated BGP attributes for route 192.168.2.1 to have:
1. community 64501:2001 and origin as IGP
2. As there is continue configured on in seq 11, control moves to seq 20 and assign weight 200.
However , seq 20 is never executed it seems. Any reason why ?
Core#show ip bgp 192.168.2.1 BGP routing table entry for 192.168.2.1/32, version 8 Paths: (1 available, best #1, table default) Advertised to update-groups: 4 Refresh Epoch 1 Local 10.0.128.2 from 0.0.0.0 (192.168.0.5) Origin IGP, metric 20, localpref 100, weight 32768, valid, sourced, best Community: 64501:2001 rx pathid: 0, tx pathid: 0x0
Solved! Go to Solution.
07-27-2020 11:25 PM
Hello @verma-rohit ,
all the configuration examples in the shared link show route-maps applied to BGP neighbor statements for this use case the route-map continue command has been introduced and supported.
The continue command is not supported in route-maps used for redistribution like in your tests and in the tests performed in the blog mentioned by Georg.
Hope to help
Giuseppe
07-26-2020 11:33 PM
07-27-2020 12:13 AM
Hello,
at first glance, I would say your match clauses in sequence 10 and 11 don't match, so 12 is never executed:
Core#show route-map OSPF2BGP
route-map OSPF2BGP, permit, sequence 10
Match clauses:
route-type external
tag 2000
Continue: to next entry 11
Set clauses:
community 64501:2 additive
origin egp 64501
Policy routing matches: 0 packets, 0 bytes
route-map OSPF2BGP, permit, sequence 11
Match clauses:
route-type external
Continue: to next entry 20
Set clauses:
community 64501:2001 additive
origin igp
Policy routing matches: 0 packets, 0 bytes
route-map OSPF2BGP, permit, sequence 20
Match clauses:
Set clauses:
weight 200
Policy routing matches: 0 packets, 0 bytes
Core#
Add the same tag to sequence 11:
Core#show route-map OSPF2BGP
route-map OSPF2BGP, permit, sequence 10
Match clauses:
route-type external
tag 2000
Continue: to next entry 11
Set clauses:
community 64501:2 additive
origin egp 64501
Policy routing matches: 0 packets, 0 bytes
route-map OSPF2BGP, permit, sequence 11
Match clauses:
route-type external
--> tag 2000
Continue: to next entry 20
Set clauses:
community 64501:2001 additive
origin igp
Policy routing matches: 0 packets, 0 bytes
route-map OSPF2BGP, permit, sequence 20
Match clauses:
Set clauses:
weight 200
Policy routing matches: 0 packets, 0 bytes
Core#
07-27-2020 12:30 AM
Hi,
Thanks for your feedback.
Well seq 11 did match because the said route is an external ( E2 ) route and as a result community 64501:2001 and origin was set as IGP.
07-27-2020 01:35 AM
Hello,
what if you match sequence 20 as well ? I think the logic is that the match statements have to be the same for each sequence if you use the 'continue' but everything else that does NOT match the previous will get the weight you configured.
Core#show route-map OSPF2BGP
route-map OSPF2BGP, permit, sequence 10
Match clauses:
route-type external
tag 2000
Continue: to next entry 11
Set clauses:
community 64501:2 additive
origin egp 64501
Policy routing matches: 0 packets, 0 bytes
route-map OSPF2BGP, permit, sequence 11
Match clauses:
route-type external
Continue: to next entry 20
Set clauses:
community 64501:2001 additive
origin igp
Policy routing matches: 0 packets, 0 bytes
route-map OSPF2BGP, permit, sequence 20Match clauses:
--> route-type external
Set clauses:
weight 200
Policy routing matches: 0 packets, 0 bytes
Core#
07-27-2020 03:00 AM
Hi,
I did add match clause in seq 20, however weight is still unchanged.
Core#show route-map OSPF2BGP route-map OSPF2BGP, permit, sequence 10 Match clauses: route-type external tag 2000 Continue: to next entry 11 Set clauses: community 64501:2 additive origin egp 64501 Policy routing matches: 0 packets, 0 bytes route-map OSPF2BGP, permit, sequence 11 Match clauses: route-type external Continue: to next entry 20 Set clauses: community 64501:2001 additive origin igp Policy routing matches: 0 packets, 0 bytes route-map OSPF2BGP, permit, sequence 20 Match clauses: route-type external Set clauses: weight 200 Policy routing matches: 0 packets, 0 bytes Core#
Core#show ip route 192.168.2.1 Routing entry for 192.168.2.1/32 Known via "ospf 64501", distance 110, metric 20 Tag 2001, type extern 2, forward metric 1 Redistributing via bgp 64501 Advertised by bgp 64501 route-map OSPF2BGP Last update from 10.0.128.2 on GigabitEthernet0/2, 00:35:47 ago Routing Descriptor Blocks: * 10.0.128.2, from 192.168.0.6, 00:35:47 ago, via GigabitEthernet0/2 Route metric is 20, traffic share count is 1 Route tag 2001
Core#show ip bgp 192.168.2.1 BGP routing table entry for 192.168.2.1/32, version 6 Paths: (1 available, best #1, table default) Advertised to update-groups: 2 Refresh Epoch 1 Local 10.0.128.2 from 0.0.0.0 (192.168.0.5) Origin IGP, metric 20, localpref 100, weight 32768, valid, sourced, best Community: 64501:2001 rx pathid: 0, tx pathid: 0x0
07-27-2020 03:58 AM
Hello,
I'll try to lab this...can you post the full running configs of both the access and the core router ?
07-27-2020 04:45 AM
07-27-2020 06:33 AM
I'll lab this up...thanks for the files.
07-27-2020 12:58 PM
Hello,
I ran into the same issue you had. For some reason, the 'continue' statement does not seem to work in route maps that are used in redistribution of routing protocols. The only way I got this to work is with the route map below (the 'additive' obviously is redundant). I did come across a document though that mirrors your setup. I am not sure if this is VIRL specific, and if the 'continue' clause works in e.g. XE.
Have a look at what this user noticed:
BGP Route Maps and Continue Feature Limitations
https://blog.ipspace.net/2016/05/bgp-route-maps-and-continue-feature.html
route-map OSPF2BGP permit 10
match tag 2000
match route-type external
set origin egp 64501
set community 64501:2 additive
!
route-map OSPF2BGP permit 11
match route-type external
set origin igp
set community 64501:2001 additive
!
route-map OSPF2BGP permit 11
match route-type external
set weight 200
07-27-2020 05:50 PM
Hello,
I have gone through the shared link. From the website:
The lack of support for continue clause was somewhat expected after reading the relevant IOS documentation, and without the continue clause it makes no sense using set community additive in a redistribution point (where source routes have no BGP communities).
Where exactly in shared link author talsk about " lack of support for continue clause" ?
07-27-2020 11:25 PM
Hello @verma-rohit ,
all the configuration examples in the shared link show route-maps applied to BGP neighbor statements for this use case the route-map continue command has been introduced and supported.
The continue command is not supported in route-maps used for redistribution like in your tests and in the tests performed in the blog mentioned by Georg.
Hope to help
Giuseppe
07-28-2020 02:14 AM - edited 07-28-2020 02:19 AM
Hello
@Giuseppe Larosa wrote:
The continue command is not supported in route-maps used for redistribution
I manage to test this last night and TBH it wasnt soemthing i was aware of, you would think it would be documented regards its restriction with redistribution or is this be something cisco will expect us to logically take into account
3700 Software (C3725-ADVENTERPRISEK9-M), Version 12.4(15)T14
7200 Software (C7200-ADVENTERPRISEK9-M), Version 15.2(4)M11, RELEASE SOFTWARE (fc2
IOSv Software (VIOS-ADVENTERPRISEK9-M), Version 15.8(3)M2, RELEASE SOFTWARE (fc2
Cisco IOS Software [Fuji], Virtual XE Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Version 16.9.1, RELEASE SOFTWARE (fc2)
% "TST" used as redistribute ospf into bgp route-map, continue match not supported
% not supported match will behave as route-map with no match
% "TST" used as redistribute ospf into bgp route-map, set community add not supported
07-28-2020 02:32 AM
Hello @paul driver ,
your test results are exactly the same as those shown in the link
https://blog.ipspace.net/2016/05/bgp-route-maps-and-continue-feature.html
by Ivan Pepelnjack
this link was found by @Georg Pauwen and reported in this thread. The source is rather reliable.
About the continue statement I remember it was introduced for BGP only.
There was another recent thread where the OP tried to use the continue in a route map used to redistribute into EIGRP wth no success.
In my humble opinion the OP of this thread is actually repeating the lab setup reported in that blog page with same results.
Hope to help
Giuseppe
07-28-2020 03:29 AM
I don’t doubt the source isn’t viable mate especially coming from the likes Ivan it’s just quite frustrating isn’t documented and I wasn’t aware this OP was plagiarized from IVAN post.
Anyway all good I have learnt something this morning I didn’t know last night!
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