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

IOS RPL Clarification

hi

I wanted to get an answer to a question related to using the apply command inside route-policies

I have an rpl that calls two sub policies sequentially.

if inside the first sub policy I set the prefix to have a drop terminating statement, does this jump completely out of the RPL processing or simply out of the sub policy.

I am having a situation where if I remove the second policy I get the correct prefix set output to the neighbor.

If I then include the second sub policy which performs as-path padding and commit

I get the complete set of routes sent to the neighbor , which were before blocked?

  • XR OS and Platforms
2 REPLIES
Cisco Employee

IOS RPL Clarification

good question. it stops the policy execution all together.

here an example:

BEFORE:

   Network            Next Hop            Metric LocPrf Weight Path

*> 2.2.2.2/32         123.1.1.2                0             0 300 ?

*> 3.0.0.0/8          123.1.1.2                0             0 300 ?

*> 33.33.1.0/24       123.1.1.2                0             0 300 ?

RP/0/RSP0/CPU0:A9K-BNG#sh run route-policy hierarchical-1

Tue Nov 26 08:50:27.427 EDT

route-policy hierarchical-1

  apply hierarchical-2

  set local-preference 1234

end-policy

!

RP/0/RSP0/CPU0:A9K-BNG#sh run route-policy hierarchical-2

Tue Nov 26 08:50:28.509 EDT

route-policy hierarchical-2

  if destination in (2.2.2.2/32) then

    set weight 5555

    drop

  endif

end-policy

   Network            Next Hop            Metric LocPrf Weight Path

*> 3.0.0.0/8          123.1.1.2                0   1234      0 300 ?

*> 33.33.1.0/24       123.1.1.2                0   1234      0 300 ?

the route for 2.2.2.2 is gone.

xander

Xander Thuijs CCIE #6775 Principal Engineer ASR9000, CRS, NCS6000 & IOS-XR
New Member

IOS RPL Clarification

This is what I thought but something is up example:

I have the following:

policy Top-Policy($param1,$param2)

apply sub-policy1(param1,param2)

#apply sub-policy2

end-policy

policy sub-policy 2

   prepend as-path xxxx 5

end-policy

When I have sub-policy 2 removed from the Top-Policy I get 22 prefixes as output from running the command:

sh bgp route-policy Top-Policy

if I then have the sub-policy2 applied in the Top-Policy I get the original 22 prefixes + all my internal BGP prefixes that would match against an as-local check?

117
Views
0
Helpful
2
Replies