Policies

All routing protocols use the Junos OS routing table to store the routes that they learn and to determine which routes they should advertise in their protocol packets. Routing policy allows you to control which routes the routing protocols store to and retrieve from the routing table.

To configure policies:

  1. In the J-Web user interface, select Configure > Routing > Policies.

    After you make changes to the configuration in this window, you must commit the changes immediately for them to take effect. To commit all changes to the active configuration, select Commit Options > Commit. See Using the Commit Options to Commit Configuration Changes (J-Web Procedure) for details about all commit options.

  2. To manage policies, click one:
    • Global Options—Configures global options for policies. Enter information into the configuration page as described in Table 28.
    • Add—Configures a new policy. Select Clone to create a copy of an existing policy.

      Click Add and specify a policy name. To add terms, enter information into the configuration page as described in Table 29.

    • Edit—Edits an existing policy. To modify an existing term, enter information into the configuration page as described in Table 29.
    • Term Up—Moves a term up in the list.
    • Term Down—Moves a term down in the list.
    • Delete—Deletes an existing policy. To delete an existing term, enter information into the configuration page as described in Table 29.
    • Test Policy—Tests the policy. Use this option to check whether the policy produces the results that you expect.

Table 28: Policies Global Configuration Parameters

Field

Function

Your Action

Prefix List

Specifies a list of IPv4 address prefixes for use in a routing policy statement.

To add a prefix list:

  1. Click Add.
  2. Enter a name for the prefix list.
  3. To add an IP address, click Add.
  4. Enter the IP address and the subnet mask and click OK.
  5. Click OK.

To edit a prefix list:

  1. Select a name from the prefix list and click Edit
  2. To edit an selected IP address, click Edit.
  3. Click OK.

To remove a prefix list:

  1. Select a name from the prefix list and click Remove
  2. To remove the selected IP address, click Remove.
  3. Click OK.

BGP Community

Specifies a BGP Community.

To add a BGP community:

  1. Click Add.
  2. Enter a name for the community.
  3. To add a Member, click Add.
  4. Enter the community ID and click OK.
  5. Click OK.

To edit a BGP community:

  1. Select a name from the community and click Edit
  2. To edit the selected community ID, click Edit.
  3. Click OK.

To remove a BGP community:

  1. Select a name from the community and click Remove
  2. To edit the selected community ID, click Remove.
  3. Click OK.

AS Path

Specifies an AS path. This is applicable to BGP only.

To add an AS path:

  1. Click Add.
  2. Enter the AS path name.
  3. Enter the regular expression.
  4. Click OK.

To edit an AS path:

  1. Select the AS path name and click Edit
  2. Click OK.

To remove an AS path:

  1. Select the AS path name and click Remove
  2. Click OK.

Table 29: Terms Configuration Parameters

Field

Function

Your Action

Term Name

Specifies a term name.

Type a name.

Source tab

Family

Specifies an address family protocol.

Select a value from the list.

Routing Instance

Specifies a routing instance.

Select a value from the list.

RIB

Specifies the name of a routing table.

Select a value from the list

Preference

Specifies the individual preference value for the route.

Type a value.

Metric

Specifies a metric value. You can specify only one metric value.

Type a value.

Interface

Specifies a name or IP address of one or more router interfaces. Do not use this qualifier with protocols that are not interface-specific, such as internal BGP (IBGP).

To add an interface, click Add > Interface. Select the interface from the list.

To add an address, click Add > Address. Select the address from the list.

To remove an interface, select the interface from the list and click Remove.

To remove an address, select the address from the list and click Remove.

Prefix List

Specifies a named list of IP addresses. You can specify an exact match with incoming routes.

Click Add. Enter a name for the list and enter the IP addresses.

Select a prefix from the list and click Remove.

Protocol

Specifies the name of the protocol from which the route was learned or to which the route is being advertised.

Click Add and select the protocol from the list.

Select the protocol from the list and click Remove.

Policy

Specifies the name of a policy to evaluate as a subroutine.

Click Add and select the policy from the list.

Select a policy from the list and click Remove .

More

Specifies advanced configuration options for policies.

Click More for advanced configuration.

OSPF Area ID

Specifies the area identifier.

Type the IP address.

BGP Origin

Specifies the origin of the AS path information.

Select a value from the list.

Local Preference

Specifies the BGP local preference.

Type a value.

Route

Specifies the type of route.

  1. Click External.
  2. Select the OSPF Type.

AS Path

Specifies the name of an AS path regular expression.

Click Add and select the required value.

Select an AS Path from the list and click Remove.

Community

Specifies the name of one or more communities.

Click Add and select the community from the list.

Destination tab

Family

Specifies an address family protocol.

Select a value from the list.

Routing Instance

Specifies a routing instance.

Select a value from the list.

RIB

Specifies the name of a routing table.

Select a value from the list.

Preference

Specifies the individual preference value for the route.

Type a value.

Metric

Specifies a metric value. You can specify only one metric value.

Type a value.

Interface

Specifies a name or IP address of one or more router interfaces. Do not use this qualifier with protocols that are not interface-specific, such as internal BGP (IBGP).

To add an interface, click Add > Interface. Select the interface from the list.

To add an address, click Add > Address. Select the address from the list.

To remove an interface, select the interface from the list and click Remove.

To remove an address, select the address from the list and click Remove.

Protocol

Specifies the name of the protocol from which the route was learned or to which the route is being advertised.

Click Add and select the protocol from the list.

Select a protocol from the list and click Remove.

Policy

Specifies the name of a policy to evaluate as a subroutine.

Click Add and select the policy from the list.

Select a policy from the list and c.lick Remove.

Action tab

Action

Specifies the action to take if the conditions match.

Select a value from the list.

Default Action

Specifies that any action that is intrinsic to the protocol is overridden. This action is also non terminating, so that various policy terms can be evaluated before the policy is terminated.

Select a value from the list.

Next

Specifies the default control action if a match occurs, and there are no further terms in the current routing policy.

Select a value from the list.

Priority

Specifies a priority for prefixes included in an OSPF import policy. Prefixes learned through OSPF are installed in the routing table based on the priority assigned to the prefixes.

Select a value from the list.

BGP Origin

Specifies the BGP origin attribute.

Select a value from the list.

AS Path Prepend

Affixes an AS number at the beginning of the AS path. The AS numbers are added after the local AS number has been added to the path. This action adds an AS number to AS sequences only, not to AS sets. If the existing AS path begins with a confederation sequence or set, the affixed AS number is placed within a confederation sequence. Otherwise, the affixed AS number is placed with a nonconfederation sequence.

Enter a value.

AS Path Expand

Extracts the last AS number in the existing AS path and affixes that AS number to the beginning of the AS path n times, where n is a number from 1 through 32. The AS number is added before the local AS number has been added to the path. This action adds AS numbers to AS sequences only, not to AS sets. If the existing AS path begins with a confederation sequence or set, the affixed AS numbers are placed within a confederation sequence. Otherwise, the affixed AS numbers are placed within a nonconfederation sequence. This option is typically used in non-IBGP export policies.

Select the Type and enter a value.

Load Balance Per packet

Specifies that all next-hop addresses in the forwarding table must be installed and have the forwarding table perform per-packet load balancing. This policy action allows you to optimize VPLS traffic flows across multiple paths.

Select to enable the option.

Tag

Specifies the tag value. The tag action sets the 32-bit tag field in OSPF external link-state advertisement (LSA) packets.

Select the Action and enter the value.

Metric

Changes the metric (MED) value by the specified negative or positive offset. This action is useful only in an external BGP (EBGP) export policy.

Select the Action and enter the value.

Route

Specifies whether the route is external.

Select to enable the option and select the OSPF Type.

Preference

Specifies the preference value.

Select the Preference Action and enter a value.

Local Preference

Specifies the BGP local preference attribute.

Select the Action and enter a value.

Class of Service

Specifies and applies the class-of-service parameters to routes installed into the routing table.

Enter the source class. The value entered here maintains the packet counts for a route passing through your network, based on the source address.

Enter the destination class. The value entered here maintains packet counts for a route passing through your network, based on the destination address in the packet.

Enter the forwarding class.