Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
list Table of Contents

Configure Routing Policies on Switches via Mist

date_range 11-Mar-25

Routing policies allow you to control the routing information between the routing protocols and the routing tables and between the routing tables and the forwarding table. All routing protocols use the Junos OS routing tables to store the routes that they learn and to determine which routes they should advertise in their protocol packets. Routing policies also allow you to control which routes the routing protocols store in and retrieve from the routing table.

The routing policy is composed of terms. Each term can include a set of conditions and a then statement, which defines the actions to take if a route matches the conditions specified in the term.

You can configure routing policy at the organization level (Organization > Switch Templates), site level (Site> Switch Configuration) or at the switch level (Switches > Switch Name). Ideally you don't need to configure a routing policy per switch.

To configure a routing policy at the organization level:

  1. Click Organization > Switch Templates to go to the list of switch templates.
  2. Click the switch template associated to the site where you want to configure the routing policy. The switch template is displayed.
  3. In the Routing Policy section on the switch template, click Add Routing Policy.

    The Create Routing Policy window is displayed.

    Note: If you want to configure routing policy the switch level, go to the Routing Policy section on the switch details page (Switches > Switch Name). Similarly, if you want to configure routing policy the site level, go to the Routing Policy section on the site template (Site > Switch Configuration).
  4. Provide a name for the routing policy in the Name field.
  5. Click Add Terms.
    The Add Terms section is displayed.
  6. Configure the terms as described below:
    Field Description
    Name Specify a name for the term.
    Prefix Specify a prefix against which the incoming routes are matched. To allow a destination prefix with mask that is greater than or equal to the specified prefix length, use a range of masks. This field support IPv4 or IPv6 prefixes. Example: 10.10.10.0/24-32 would allow all prefixes between /24 and /32
    AS Path Specify the AS path. A BGP AS path is the sequence of autonomous systems that network packets traverse to get to a specified router. For more information, see Understanding AS Path Regular Expressions for Use as Routing Policy Match Conditions.
    Protocol Select a routing protocol.
    Community Specify a BGP community. A BGP community is a group of destinations that share a common property. Community information is included as a path attribute in BGP update messages.
    Then

    Define an action to be applied on the route, if it matches the conditions specified. Options are:

    • Accept

    • Reject

    Add Action

    You can further specify one or more additional actions that manipulate route characteristics. The following actions are available:

    • Set Community: (BGP only) This action replaces any communities that were in the route in with the specified communities.

    • Prepend AS Path: (BGP only) This action affixes one or more AS numbers at the beginning of the AS path.

    • Set Local Preference: (BGP only) This action sets the BGP local preference attribute. The preference value can be a number in the range from 0 through 4,294,967,295.

  7. After configuring the terms information, click the check mark on the upper right of the Add Terms section on the Create Routing Policy window.
  8. Click the Add button on the lower left of the Create Routing Policy window.
  9. To save the configuration, click Save on the upper right of the switch template.
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right
footer-navigation
keyboard_arrow_down
file_download
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
language