Hi!
I believe you can match on the modified attributes. To test this, I simply connected 2 routers with EBGP connection between them. R1 exports a route 172.16.20.0/24 to R2. Then I applied an import policy on R2 as mentioned below.
set policy-options policy-statement CHANGE_COMM term 1 from protocol bgp
set policy-options policy-statement CHANGE_COMM term 1 from route-filter 172.16.20.0/24 exact
set policy-options policy-statement CHANGE_COMM term 1 then community add COMM1
set policy-options policy-statement CHANGE_COMM term 1 then next term
set policy-options policy-statement CHANGE_COMM term 2 from protocol bgp
set policy-options policy-statement CHANGE_COMM term 2 from community COMM1
set policy-options policy-statement CHANGE_COMM term 2 then local-preference 200
set policy-options policy-statement CHANGE_COMM term 2 then accept
The route on R2 has the local preference as 200.
Disclaimer: I don't consider myself an expert and it's quite possible that I could be wrong. I would appreciate it if more experienced members of the community can verify this.
------------------------------
SHAHBAZ KHAN
------------------------------
Original Message:
Sent: 08-01-2022 20:13
From: Unknown User
Subject: Are attributes modified in one term of a route policy available to match in subsequent terms?
In a route policy, if a term modifies an attribute of the route (e.g adds community X), and with no policy terminating action, are subsequent terms able to match on the changed attributes of the route (e.g match on the newly added community X)? Or does each term only see the route attributes in its original pre-policy form (i.e IOS-XR behavior)?
Thanks!