cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
549
Views
0
Helpful
2
Replies

IOS RPL Clarification

william jackson
Level 1
Level 1

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?

2 Replies 2

xthuijs
Cisco Employee
Cisco Employee

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

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?