Policy Action Statements

Policy Actions lists policy action statements. These are the actions taken when the policy match conditions are met in a policy entry.

Table 1. Policy Actions
Action Description
as-path "<as_num> {<as_num1> <as_num2> <as_num3> …. <as_numN>}"; Prepends the entire list of as-numbers to the as-path of the route.
community set [no-advertise | no-export | noexport- subconfed | <community_num> | <as_num> : <community_num>]; Replaces the existing community attribute of a route by the community specified by the action statement. Community must be enclosed in double quotes ("").
community [add | delete] [no-advertise | no-export | no-export-subconfed | <community_num> {<community_num1> <community_num2> …. <community_numN>} | <as_num> : <community_num> {<as_num1> <community_num1> <as_num2> <community_num2> ….}]; Adds/deletes communities to/from a route's community attribute. Communities must be enclosed in double quotes ("").
community remove; Strips off the entire community attribute from a route. Communities must be enclosed in double quotes ("").
cost <cost(0-4261412864)>; Sets the cost/metric for a route.
cost-type {ase-type-1 | ase-type-2 | external | internal}; Sets the cost type for a route.
dampening half-life <minutes (1-45)> reuse-limit <number (1-20000)> suppress-limit <number (1-20000)> max-suppress <minutes (1-255)>; Sets the BGP route flap dampening parameters.
deny; Denies the route.
local-preference <number>; Sets the BGP local preference for a route.
med {add | delete} <number>; Performs MED arithmetic. Add means the value of the MED in the route will be incremented by <number>, and delete means the value of the MED in the route will be decremented by <number>.
med {internal | remove}; Internal means that the Interior Gateway Protocol (IGP) distance to the next hop will be taken as the MED for a route. Remove means take out the MED attribute from the route.
med set <number>; Sets the MED attribute for a route.
next-hop <ipv4 address | ipv6 address>; Sets the next hop attribute for a route.
nlri [<ipaddress> | any]/<mask-length> {exact};nlri [<ipaddress> | any] mask <mask> {exact}; These set statements are used for building a list of IP addresses. This is used by PIM to set up the RP list.
origin {igp | egp | incomplete}; Sets the BGP route origin values.
permit; Permits the route.
tag <number>; Sets the tag number for a route.
weight <number> Sets the weight for a BGP route.


Multiple communities couldn‘t be used in “community set” attribute in the BGP policy file. The way to set multiple communities in BGP policy file could be accomplished by two set of attributes as given in below example:
entry permit-anything-else {
   if {
   } then {
     community set "2342:6788";     
     community add "2342:6789 2342:6790";