Juniper Creating Policy with Term

Here I create three terms on a single policy-statement. Policy Statement Name is “Upstream”. First term name ISP-1, Second term ISP-2, Third term name is ISP-3 and Finally I make term that is Reject. That mean only those prefixes will advertise and all other are reject.

# set policy-options policy-statement Upstream term ISP-1 from route-filter 172.16.0.0/24 exact
# set policy-options policy-statement Upstream term ISP-1 then accept
# set policy-options policy-statement Upstream term ISP-2 from route-filter 192.168.0.0/21 upto /24
# set policy-options policy-statement Upstream term ISP-2 then accept
# set policy-options policy-statement Upstream term ISP-3 from route-filter 10.10.0.0/22 upto /24
# set policy-options policy-statement Upstream term ISP-3 then accept

# set policy-options policy-statement Upstream term Reject then reject

Here the policy look like:

# show policy-options policy-statement Upstream
term ISP-1 {
    from {
        route-filter 172.16.0.0/24 exact;
    }
    then accept;
term ISP-2 {
    from {
        route-filter 192.168.0.0/21 upto /24;
    }
    then accept;
term ISP-3 {
    from {
        route-filter 10.10.0.0/22 upto /24;
    }
    then {
        accept;
    }
}
term Reject {

    then reject;

Leave a Reply