cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
686
Views
0
Helpful
1
Replies

RPL Nesting

Paul Lachance
Level 1
Level 1

Question : Nested RPL – What is the Sequence for the DATA -

 

                So from the RPL at the final end policy TO_OUTSIDE we nest the two RPL that preform two separate functions

One looks for a prefix the other a AS path.

 

The Question when the first rpl is executed to check prefix filter it will find two and pass them to the advertise neighbour in this scenario

When it pass the second apply it will find two matching AS numbers and pass it to the neighbour.

 

Does the RPL on the second apply take data in from the first ?

                Or since the 10.10.30.0 is dropped in the first apply will it be tested on the second apply

 

And if there is a match in both but one rpl changes characteristics of the match what is the hierarchy , Does the last apply make the final change ?

 

 

DATA IN :

 

198.162.10.0      AS555

172.16.20.0        AS666

10.10.30.0          AS777

 

 

 

prefix-set PREFIXES_OUT

198.162.0.0/16 le 24,

172.16.0.0/16 le 24

end-set

!

 

as-path-set AS_FILTER

  ios-regex '_555$',

  ios-regex '_666$',

 end-set

!

 

route-policy PREFIXES_ALLOWED

  if destination in PREFIXES_OUT then

    pass

  else

    drop

  endif

end-policy

!

 

route-policy ASPATH_ALLOWED

  if as-path in AS_FILTER then

    pass

  else

    drop

  endif

end-policy

!

 

Policy to be applied to the BGP peering point

 

route-policy TO_OUTSIDE

  Apply PREFIXES_ALLOWED

  Apply ASPATH_ALLOWED

  end-policy

!

 

1 Reply 1

xthuijs
Cisco Employee
Cisco Employee

That is a great question Paul!

the answer is that RPL will always execute on "unmodified" or original data.

for instance:

route-policy first
  if origin is igp then
    set local-preference 123
  endif
end-policy


route-policy second
  if local-preference is 123 then
    set med 321
  endif
end-policy


route-policy umbrella
  apply first
  apply second
end-policy

now when a prefix comes in subject to this RPL umbrella:

  1. the MED will only be set if the local-pref IS already 123 when it came in.
  2. If it is received as LP 100 and origin igp, then we will SET LP 123, but we will NOT set MED.

this is done for sound reasons to make sure that RPL could not loop inside.

xander