Specifying actions

The following are valid actions for routes that meet the match conditions in a statement:

  • Accept the route.

  • Reject the route.

  • Modify the AS path of a BGP route by prepending additional AS numbers.

  • Modify the AS path of a BGP route by deleting the current AS path and replacing it with a new AS path (a sequence of zero or more AS numbers).

  • Add, delete, or replace standard and large communities attached to a BGP route.

  • Modify the LOCAL_PREF attribute of a BGP route by specifying a new value.

  • Modify the ORIGIN attribute of a BGP route by specifying a new value.

  • Replace the MED attribute of a BGP route with a new value, either the route-table metric of the route that resolves the BGP next-hop, or a specified MED value.

  • Set the next-hop-self option for a BGP route.

  • Set the next-hop-unchanged option for a BGP route.

  • Add, delete, or replace the route tag associated with an IS-IS route.

The following example specifies a policy with two statements. If a BGP route matches the first statement, the action is to specify a new value for the ORIGIN attribute of the BGP route. If the route matches the second statement, the action is to accept the route.

--{ candidate shared default }--[  ]--
# info routing-policy
    routing-policy {
        policy policy02 {
            statement myEntry100 {
                match {
                    protocol bgp
                }
                action {
                    bgp {
                        origin {
                            set egp
                        }
                    }
                }
            }
            statement 101 {
                match {
                    prefix-set western
                }
                action {
                    policy-result accept
                }
            }
        }
    }