# Creating a route policy

Use the following procedure to create a new route policy. Route policies are created and then applied to the switch as accept (in), announce (out), or redistribution policies.

## Procedure steps

1. From the navigation tree, double-click IP.

2. In the IP tree, click Policy.

3. In the work area, click the Route Policy tab.

4. In the toolbar, click Insert.

5. Using the fields provided, create a new prefix list.

6. Click Insert.

## Variable definitions

The following table describes the fields of the Route Policy tab.

Field | Definition
--- | ---
Id | Specifies an index value to uniquely identify a policy.
SequenceNumber | Specifies a secondary index value that identifies individual policies inside a larger policy group.
Name | Specifies the name associated with this policy.
Enable | Specifies whether this policy sequence number is enabled or disabled. If disabled, the policy sequence number is ignored.
Mode | Specifies the action to be taken when this policy is selected for a specific route. A value of permit indicates that the route is allowed while deny indicates that the route is ignored.
MatchProtocol | If configured, matches the protocol through which the route is learned. This field is used only for RIP announce policies. Options are RIP, Static, Direct, OSPF or Any.
MatchNetwork | If configured, matches the destination network against the contents of the specified prefix list.
MatchIpRouteSource | If configured, matches the source IP address for RIP routes and advertising router IDs for OSPF routes against the contents of the specified prefix list. This option is ignored for all other route types.
MatchNextHop | If configured, matches the next hop IP address of the route against the contents of the specified prefix list. This field applies only to non-local routes.
MatchInterface | If configured, matches the IP address of the interface by which the RIP route was learned against the contents of the specified prefix list. This field is used only for RIP routes and ignored for all other type of route.
MatchRouteType | Sets a specific route-type to be matched (applies only to OSPF routes). Available options are: any local internal external externaltype1 externaltype2 Externaltype1and Externaltype2 specify the OSPF routes of the specified type only.
MatchMetric | If configured, matches the metric of the incoming advertisement or existing route against the specified value (1 to 655535). If 0, then this field is ignored. The default is 0.
MatchAsPath | Configures if the system matches the BGP autonomous system path. Applicable to BGP only. This overrides the BGP neighbor filter list information.
MatchCommunityExact | Indicates if the match must be exact (that is, all of the communities specified in the path must match). Applicable to BGP only. The default is disabled.
MatchCommunity | Filters incoming and outgoing updates based on a community list. Applicable to BGP only.
MatchLocalPref | Configures if the system matches the local preference. Applicable to BGP only. Default is 0.
NssaPbit | Sets or resets the P bit in specified type 7 LSA. By default the P bit is always set in case the user sets it to a disabled state for a particular route policy than all type 7. LSAs associated with that route policy will have the P bit cleared with this intact NSSA ABR will not perform translation of these LSAs to type 5. Default is enabled.
SetRoutePreference | Specifies the route preference value to be assigned to the routes which matches this policy. This applies to Accept policies only. You can set a value from 0 to 255. The default value is 0. If the default is configured, the global preference value is used.
SetMetric | If configured, the switch sets the metric value for the route while announcing or redistributing. The default-import-metric is 0. If the default is configured, the original cost of the route is advertised into OSPF; for RIP, the original cost of the route or the default value is used.
SetMetricType | If configured, sets the metric type for the routes to be announced into the OSPF routing protocol that matches this policy. The default is type 2. This field is applicable only for OSPF announce policies.
SetNextHop | Configures the IP address of the next-hop router. Applicable to BGP only.
SetInjectNetList | If configured, the switch replaces the destination network of the route that matches this policy with the contents of the specified prefix list.
SetMask | Indicates the mask to used for routes that pass the policy matching criteria.
SetAsPath | Indicates the AS path value to use whether the SetAsPathMode field is Tag or Prepend. Applicable to BGP only.
SetASPathMode | Configures if the system converts the tag of a route into an AS path. Applicable to BGP protocol only. The mode is either Tag or Prepend tag. The value is applicable only while redistributing routes to BGP.
SetCommunityNumber | Configures the community number for BGP advertisements. This value can be a number (1 to 42949672000) or no-export or no-advertise.
SetCommunityMode | Configures the community mode for the BGP protocol. This value can be either append, none, or unchanged. The default is unchanged. unchanged — keeps the community attribute in the route path as it is none — removes the community in the route path additive append — adds the community number specified in SetCommunityNumber to the community list attribute
SetOrigin | Configures the origin for the BGP protocol to IGP, EGP, incomplete, or unchanged. If not configured, the system uses the route origin from the IP routing table (protocol). The default is unchanged.
SetLocalPref | Configures the local preference for the BGP protocol only. The system uses this value during the route decision process for the BGP protocol. The default is 0.
SetWeight | Applicable to BGP protocol only. This field must be used with the match as-path condition. It is the weight value for the routing table. For BGP, this value overrides the weight configured through the NetworkTableEntry, FilterListWeight, or NeighborWeight. The default is 0.