cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1891
Views
0
Helpful
3
Replies

Continue Statement in export map

clark.adam.p
Level 1
Level 1

Hey all,

  I need a definative answer on why the following is not working:

ip prefix-list Management seq 5 192.168.0.0/16 le 32

route-map Exp-Map permit 5
description Management Nets to Management Provider 1
match ip address prefix-list Management
set extcommunity rt  1:1 additive
continue
!
route-map Exp-Map permit 10
description Management Nets to Management Provider 2
match ip address prefix-list Management
set extcommunity rt  2:2 additive
continue
!
ip vrf Customer
rd 3:3
export-map Exp-Map
route-target both 3:3

PE1#show ip bgp vpnv4 all  192.168.1.1/32
BGP routing table entry for 3:3:192.168.1.1/32, version 22
Paths: (1 available, best #1, no table)
Flag: 0xA20
  Advertised to update-groups:
     1        
  64774, (Received from a RR-client)
    10.98.98.98 (metric 30) from 10.98.98.98 (10.98.98.98)
      Origin IGP, metric 0, localpref 400, valid, internal, best
      Extended Community: RT:1:1 RT:3:3
      mpls labels in/out nolabel/33

As you can see, it is though the continue statement is not working.

I want to be able to use varying communities to allocate an RT.

If the continue statement does not work, then I would need to allocate a community based on every permutation possible, which is allot.

Cheers

Adam

3 Replies 3

jcozzupoli
Level 1
Level 1

Hi Adam,

The "continue" keyword in a route-map forces the router to look at the next route-map sequence instead of stopping in the event of a match, as per normal route-map operation.

In your example, you are making a match in sequence 10, the continue keyord will kick in and sequence 20 will be looked at, however, since you are matching on the same sequence of that prefix-list, the extra extcommunity will not be applied that you have requested in sequence 20.

To get around this and acheive what you are trying to do, you can add both RT's to your route-map in sequence 10:

Configured on PE1:

ip prefix-list TEST_LOOPS seq 5 permit 25.25.25.25/32

route-map EXP_MAP permit 10

match ip address prefix-list TEST_LOOPS

set extcommunity rt  25:25 35:35 additive

!

ip vrf CUST_A

rd 1010:1

export map EXP_MAP

route-target export 1010:79

route-target import 2020:79

!

Output from PE2:

AS2020_PE#sh ip bgp vpnv4 all 25.25.25.25

BGP routing table entry for 1010:1:25.25.25.25/32, version 30

Paths: (1 available, best #1, no table)

  Not advertised to any peer

  1010

    6.6.6.6 (metric 20) from 6.6.6.6 (6.6.6.6)

      Origin incomplete, metric 0, localpref 100, valid, internal, best

      Community: 250:1

      Extended Community: RT:25:25 RT:35:35 RT:1010:79

        OSPF DOMAIN ID:0x0005:0x000000640200 OSPF RT:0.0.0.0:5:1

        OSPF ROUTER ID:1.1.1.1:1281,

      mpls labels in/out nolabel/19

As you can see, the router assigns the two RTs to that 1 prefix you are matching on.

If you are going to be adding more sequences to that same prefix-list, then yes you the "continue" keywork would work fine as the next route-map sequence would be matching on the next prefix-list sequence where it hits a match:

Configured on PE1:

ip prefix-list TEST_LOOPS seq 5 permit 25.25.25.25/32
ip prefix-list TEST_LOOPS seq 10 permit 35.35.35.35/32     
!
route-map EXP_MAP permit 10
match ip address prefix-list TEST_LOOPS
set extcommunity rt  25:25 additive
continue
!
route-map EXP_MAP permit 20
match ip address prefix-list TEST_LOOPS
set extcommunity rt  35:35 additive

  continue
!

Output from PE2:

AS2020_PE#sh ip bgp vpnv4 all 25.25.25.25
BGP routing table entry for 1010:1:25.25.25.25/32, version 22
Paths: (1 available, best #1, no table)
  Not advertised to any peer
  1010
    6.6.6.6 (metric 20) from 6.6.6.6 (6.6.6.6)
      Origin incomplete, metric 0, localpref 100, valid, internal, best
      Community: 250:1
      Extended Community: RT:25:25 RT:1010:79
        OSPF DOMAIN ID:0x0005:0x000000640200 OSPF RT:0.0.0.0:5:1
        OSPF ROUTER ID:1.1.1.1:1281,
      mpls labels in/out nolabel/19


AS2020_PE#


AS2020_PE#sh ip bgp vpnv4 all 35.35.35.35
BGP routing table entry for 1010:1:35.35.35.35/32, version 24
Paths: (1 available, best #1, no table)
  Not advertised to any peer
  1010
    6.6.6.6 (metric 20) from 6.6.6.6 (6.6.6.6)
      Origin incomplete, metric 0, localpref 100, valid, internal, best
      Community: 250:1
      Extended Community: RT:35:35 RT:1010:79
        OSPF DOMAIN ID:0x0005:0x000000640200 OSPF RT:0.0.0.0:5:1
        OSPF ROUTER ID:1.1.1.1:1281,
      mpls labels in/out nolabel/18


AS2020_PE#

HTH

Joe.

Joe,

  In that case the continue statements are not even used as the the prefix lists only match one sequence of the route map.

Take this for example:

ip  prefix-list SUMMARY seq 5 permit 192.168.0.0/23 le 24
ip prefix-list
NETWORK seq 5 permit 192.168.1.0/24    
!
route-map EXP_MAP  permit 10
match ip address prefix-list
SUMMARY
set  extcommunity rt  25:25 additive
continue
!
route-map EXP_MAP  permit 20
match ip address prefix-list NETWORK
set  extcommunity rt  35:35 additive

  continue

In this case I would want to have both 192.168.0.0/24 and 192.168.1.0/24 to have RT  25:25

but only 192.168.1.0/24 should have both 25:25 and 35:35

Ideally, I won't be matching on prefixes, but communities.

I would like not to create a BGP policy of single communities that must cater for every permutation.of RT combination that I want to add.

Adam

Hello,

 

7 years later and I just found myself having the same problem (continue not honored in export maps) on a recent platform (ASR920) and recent OS version (IOS-XE 3.18.2SP / 15.6(2)SP2). Still looking for some explanation.