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
IS-IS User Guide
Table of Contents Expand all
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

Example: Configuring a Routing Policy to Prioritize IS-IS Routes

date_range 24-Nov-23

In a network with a large number of IS-IS routes, it can be useful to control the order in which routes are updated in response to a network topology change. This example shows how to define a routing policy to prioritize some IS-IS routes over others. In the event of an IS-IS topology change, high priority prefixes are updated in the routing table first, followed by medium and then low priority prefixes. Internet Service Providers (ISP) can use this feature to ensure faster convergence for important customers.

Requirements

No special configuration beyond device initialization is required before configuring this example.

This example uses the following hardware and software components:

  • Three routers that can be a combination of M Series, MX Series, or T Series routers

  • Junos OS Release 17.1 or later on the device

Overview

Beginning with Junos OS Release 17.1, you can prioritize or reject IS-IS routes that are installed in the routing table. Use the reject policy option to reject routes from a specific prefix or routes marked with a particular tag.

You can prioritize IS-IS routes for better convergence and to provide differentiated services. In a network with a large number of IGP prefixes with BGP Layer 3 VPN or label-based psuedowire service established on top of some IGP prefixes, it is important to control the order in which routes get updated in the forwarding table. You can configure an import policy and use a route tag or filter the routes based on their prefix before setting a priority of high, medium, or low as per your network requirements. The IS-IS protocol downloads routes to the rpd routing table based on the configured priority. If you do not configure an import policy, all routes are set to a medium priority by default.

An IS-IS import policy can be used to set priority or to filter IS-IS external routes based on the following criteria:

Prefix

Use route-filter policy option to filter known prefixes.

Route Tag

Use tag policy option to assign a specific priority for prefixes that contain a particular tag.

Note:

If an IS-IS import policy is applied that results in a reject terminating action for a non-external route, then the reject action is ignored and the route is accepted anyway. By default, such a route is now installed in the routing table with a priority of low. This behavior prevents traffic black holes, that is, silently discarded traffic, by ensuring consistent routing. However, you can use the the reject policy option to reject routes based on the prefix or the configured tag.

CAUTION:

You might see an increase in micro loop traffic as order of route download changes.

Topology

In Figure 1, Router R1 is connected to Router R3 via Router R2. We need to set a high priority to a route to Router R3 to ensure quicker convergence. An import routing policy is configured on Router R1, which sets a high priority to routes connecting to Router R3. Routes matching 203.0.113.3/32 are installed first because they have a priority of high. LDP imports routes and their configure priority from IS-IS. This route is restored first in the event of a network topology change.

Figure 1: Example: Configuring a Routing Policy to prioritize IS-IS RoutesExample: Configuring a Routing Policy to prioritize IS-IS Routes

Configuration

CLI Quick Configuration

To quickly configure this example, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configuration, copy and paste the commands into the CLI at the [edit] hierarchy level, and then enter commit from configuration mode.

Router R1

content_copy zoom_out_map
set interfaces ge-1/0/1 unit 0 description R1->R2 
set interfaces ge-1/0/1 unit 0 family inet address 192.0.2.1/24
set interfaces ge-1/0/1 unit 0 family iso
set interfaces ge-1/0/1 unit 0 family inet6 address 2001:db8:1:2::1/64
set interfaces ge-1/0/1 unit 0 family mpls
set interfaces ge-5/0/9 unit 0 description R1->R2 
set interfaces ge-5/0/9 unit 0 family inet address 192.0.10.1/24
set interfaces ge-5/0/9 unit 0 family iso
set interfaces ge-5/0/9 unit 0 family inet6 address 2001:db8:1:1::1/64
set interfaces ge-5/0/9 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 203.0.113.1/32
set interfaces lo0 unit 0 family iso address 49.0002.0103.0000.0010.00
set interfaces lo0 unit 0 family inet6 address 2001:db8:1:1::1/128
set interfaces lo0 unit 0 family mpls
set protocols mpls ipv6-tunneling
set protocols mpls interface ge-5/0/9.0
set protocols mpls interface ge-1/0/1.0
set protocols isis level 1 disable
set protocols isis interface ge-1/0/1.0
set protocols isis interface ge-5/0/9.0
set protocols isis interface lo0.0 passive
set protocols ldp interface ge-1/0/1.0
set protocols ldp interface ge-5/0/9.0
set protocols ldp interface lo0.0
set policy-options policy-statement test_rf term t1 from route-filter 203.0.113.3/32 exact
set policy-options policy-statement test_rf term t1 then priority high
set protocols isis import test_rf
set routing-options router-id 203.0.113.1
set routing-options autonomous-system 64496

Router R2

content_copy zoom_out_map
set interfaces ge-0/0/1 unit 0 description R2->R1 
set interfaces ge-0/0/1 unit 0 family inet address 192.0.2.2/24
set interfaces ge-0/0/1 unit 0 family iso
set interfaces ge-0/0/1 unit 0 family inet6 address 2001:db8:1:2::2/64
set interfaces ge-0/0/1 unit 0 family mpls
set interfaces ge-0/0/7 unit 0 description R2->R3 
set interfaces ge-0/0/7 unit 0 family inet address 198.0.2.1/24
set interfaces ge-0/0/7 unit 0 family iso
set interfaces ge-0/0/7 unit 0 family inet6 address 2001:db8:1:2::1/64
set interfaces ge-0/0/7 unit 0 family mpls
set interfaces ge-1/0/5 unit 0 description R2->R1 
set interfaces ge-1/0/5 unit 0 family inet address 192.0.10.2/24
set interfaces ge-1/0/5 unit 0 family iso
set interfaces ge-1/0/5 unit 0 family inet6 address 2001:db8:1:1::2/64
set interfaces ge-1/0/5 unit 0 family mpls
set interfaces ge-1/1/0 unit 0 family inet address 198.0.10.1/24
set interfaces ge-1/1/0 unit 0 family iso
set interfaces ge-1/1/0 unit 0 family inet6 address 2001:db8:::1::1/64
set interfaces ge-1/1/0 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 203.0.113.2/32
set interfaces lo0 unit 0 family iso address 49.0002.0103.0000.0030.00
set interfaces lo0 unit 0 family inet6 address 2001:db8:2:2::1/128
set interfaces lo0 unit 0 family mpls
set protocols mpls interface ge-1/0/5.0
set protocols mpls interface ge-0/0/1.0
set protocols mpls interface ge-1/1/0.0
set protocols mpls interface ge-0/0/7.0
set protocols isis level 1 disable
set protocols isis interface ge-0/0/1.0
set protocols isis interface ge-0/0/7.0
set protocols isis interface ge-1/0/5.0
set protocols isis interface ge-1/1/0.0
set protocols isis interface lo0.0 passive
set protocols ldp interface ge-0/0/1.0
set protocols ldp interface ge-0/0/7.0
set protocols ldp interface ge-1/0/5.0
set protocols ldp interface ge-1/1/0.0
set protocols ldp interface lo0.0
set routing-options router-id 203.0.113.2
set routing-options autonomous-system 64496

Router R3

content_copy zoom_out_map
set interfaces ge-2/0/3 unit 0 description R3->R2 
set interfaces ge-2/0/3 unit 0 family inet address 198.1.2.2/24
set interfaces ge-2/0/3 unit 0 family iso
set interfaces ge-2/0/3 unit 0 family inet6 address 2001:db8:1:2::2/64
set interfaces ge-2/0/3 unit 0 family mpls
set interfaces ge-3/0/10unit 0 description R3->R4 
set interfaces ge-3/0/0 unit 0 family inet address 198.0.1.2/24
set interfaces ge-3/0/0 unit 0 family iso
set interfaces ge-3/0/0 unit 0 family inet6 address 2001:db8::1:1::2/64
set interfaces ge-3/0/0 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 203.0.113.3/32
set interfaces lo0 unit 0 family iso address 49.0002.0103.0000.0020.00
set interfaces lo0 unit 0 family inet6 address 2001:db8:3:3::3/128
set interfaces lo0 unit 0 family mpls
set protocols mpls ipv6-tunneling
set protocols mpls interface ge-3/0/0.0
set protocols mpls interface ge-2/0/3.0
set protocols isis level 1 disable
set protocols isis interface ge-2/0/3.0
set protocols isis interface ge-3/0/0.0
set protocols isis interface lo0.0 passive
set protocols ldp interface ge-2/0/3.0
set protocols ldp interface ge-3/0/0.0
set protocols ldp interface lo0.0
set policy-options policy-statement add_tag term t1 from route-filter 203.0.113.3/32 exact
set policy-options policy-statement add_tag term t1 then tag 18
set protocols isis export add_tag
set routing-options router-id 203.0.113.3
set routing-options autonomous-system 64496

Configuring Router R1

Step-by-Step Procedure

The following example requires that you navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the CLI User Guide.

To configure Router R1:

Note:

Repeat this procedure for other routers after modifying the appropriate interface names, addresses, and other parameters.

  1. Configure the interfaces with IPv4 and IPv6 addresses.

    content_copy zoom_out_map
    [edit interfaces]
    user@R1# set ge-1/0/1 unit 0 description R1->R2 
    user@R1# set ge-1/0/1 unit 0 family inet address 192.0.2.1/24
    user@R1# set ge-1/0/1 unit 0 family iso
    user@R1# set ge-1/0/1 unit 0 family inet6 address 2001:db8:1:2::1/64
    user@R1# set ge-1/0/1 unit 0 family mpls
    user@R1# set ge-1/0/1 unit 0 description R1->R2 
    user@R1# set ge-5/0/9 unit 0 family inet address 192.0.10.1/24
    user@R1# set ge-5/0/9 unit 0 family iso
    user@R1# set ge-5/0/9 unit 0 family inet6 address 2001:db8:1:1::1/64
    user@R1# set ge-5/0/9 unit 0 family mpls
    
  2. Configure the loopback address.

    content_copy zoom_out_map
    [edit interfaces]
    user@R1# set lo0 unit 0 family inet address 203.0.113.1/32
    user@R1# set lo0 unit 0 family iso address 49.0002.0103.0000.0010.00
    user@R1# set lo0 unit 0 family inet6 address 2001:db8:1:1::1/128
    user@R1# set lo0 unit 0 family mpls
    
  3. Configure MPLS.

    content_copy zoom_out_map
    [edit protocols]
    user@R1# set mpls ipv6-tunneling
    user@R1# set mpls interface ge-5/0/9.0
    user@R1# set mpls interface ge-1/0/1.0
    
  4. Enable IS-IS protocol on the interfaces.

    content_copy zoom_out_map
    [edit protocols]
    user@R1# set isis level 1 disable
    user@R1# set isis interface ge-1/0/1.0
    user@R1# set isis interface ge-5/0/9.0
    user@R1# set isis interface lo0.0 passive
    user@R1# set isis import test_rf
    
  5. Configure LDP protocol on the interfaces.

    content_copy zoom_out_map
    [edit protocols]
    user@R1# set ldp interface ge-1/0/1.0
    user@R1# set ldp interface ge-5/0/9.0
    user@R1# set ldp interface lo0.0
    
  6. Define a policy to prioritize IS-IS routes to Router R3. .

    content_copy zoom_out_map
    [edit policy-options]
    user@R1# set policy-statement test_rf term t1 from route-filter 203.0.113.3/32 exact
    user@R1# set policy-statement test_rf term t1 then priority high
    
  7. Configure the router ID and autonomous system (AS) number.

    content_copy zoom_out_map
    [edit routing--options]
    user@R1# set routing-options router-id 203.0.113.1
    user@R1# set routing-options autonomous-system 64496
    

Results

From configuration mode, confirm your configuration by entering the show interfaces, show protocols, show policy-options and show routing-options commands. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.

content_copy zoom_out_map
[edit]
user@R1> show interfaces
ge-1/0/1 {
    unit 0 {
        family inet {
            address 192.0.2.1/24;
        }
        family iso;
        family inet6 {
            address 2001:db8:1:2::1/64;
        }
        family mpls;
    }
}
ge-5/0/9 {
    unit 0 {
        family inet {
            address 192.0.2.1/24;
        }
        family iso;
        family inet6 {
            address 2001:db8:1:1::1/64;
        }
        family mpls;
    }
}
lo0 {
    unit 0 {
        family inet {
            address 203.0.113.1/32;
        }
        family iso {
            address 49.0002.0103.0000.0010.00;
        }
        family inet6 {
            address 2001:db8:1:1::1/128;
        }
        family mpls;
    }
}
content_copy zoom_out_map
[edit]
user@R1> show protocols
mpls {
    ipv6-tunneling;
    interface ge-5/0/9.0;
    interface ge-1/0/1.0;
}
isis {
    import test_rf;
    level 1 disable;
    interface ge-1/0/1.0;
    interface ge-5/0/9.0;
    interface lo0.0 {
        passive;
    }
}
ldp {
    interface ge-1/0/1.0;
    interface ge-5/0/9.0;
    interface lo0.0;
}
content_copy zoom_out_map
[edit]
user@R1> show routing-options
router-id 203.0.113.1; 
autonomous-system 64496;
content_copy zoom_out_map
user@R1> sshow configuration policy-options
policy-statement test_rf {
    term t1 {
        from {
            route-filter 203.0.113.3/32 exact;
        }
        then priority high;
    }
}

Verification

Verifying the Priority for LDP Routes

Purpose

Verify that LDP has inherits route 203.0.113.3 from IS-IS protocol.

Action

From operational mode, run the show route extensive command on Router R1.

content_copy zoom_out_map
user@R1> show route 203.0.113.3 extensive
inet.0: 26 destinations, 26 routes (26 active, 0 holddown, 0 hidden)

203.0.113.3/32 (1 entry, 1 announced)
        State: <FlashAll>
TSI: 
KRT in-kernel 203.0.113.3/32 -> {16.1.2.2}
         *IS-IS  Preference: 18
                 Level: 2
                 Next hop type: Router, Next hop index: 0
                 Address: 0x4a1f43c
                 Next-hop reference count: 4
                 Next hop: 16.1.2.2 via ge-1/0/1.0, selected
                 Session Id: 0x0
                 Next hop: 16.1.1.2 via ge-5/0/9.0
                 Session Id: 0x0
                 State:  <Active Int HighPriority>
                 Local AS: 64496
                 Age: 59 	Metric: 20
                 Validation State: unverified
                 ORR Generation-ID: 0
                 	Tag: 18
                 Task: IS-IS
                 Announcement bits (2): 0-KRT 4-LDP
                 AS path: I

  inet.3: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)

  203.0.113.3/32 (1 entry, 1 announced)
         State: <FlashAll>
         *LDP    Preference: 9
                 Next hop type: Router, Next hop index: 0
                 Address: 0x4a1e55c
                 Next-hop reference count: 2
                 Next hop: 16.1.2.2 via ge-1/0/1.0, selected
                 Label operation: Push 299776
                 Label TTL action: prop-ttl
                 Load balance label: Label 299776: None;
                 Label element ptr: 0x4b99100
                 Label parent element ptr: 0x0
                 Label element references: 2
                 Label element child references: 0
                 Label element lsp id: 0
                 Session Id: 0x0
                 Next hop: 16.1.1.2 via ge-5/0/9.0
                 Label operation: Push 299776
                 Label TTL action: prop-ttl
                 Load balance label: Label 299776: None;
                 Label element ptr: 0x4b99100
                 Label parent element ptr: 0x0
                 Label element references: 2
                 Label element child references: 0
                 Label element lsp id: 0
                 Session Id: 0x0
                 State:<Active Int HighPriority>
                 Local AS: 64496
                 Age: 59 	Metric: 1
                 Validation State: unverified
                 Task: LDP
                 Announcement bits (1): 2-Resolve tree 1
                 AS path: I
                 Secondary Tables: inet6.3

Meaning

The output shows that LDP inherits the route 203.0.113.3, with priority high from IS-IS.

Verifying the Priority of IS-IS Routes

Purpose

Verify that the priority is set for route 203.0.113.3 in IS-IS.

Action

content_copy zoom_out_map
user@R1> show isis route download-priority
IS-IS routing table             Current version: L1: 0 L2: 122
IPv4/IPv6 Routes
----------------
Prefix             L Version   Metric Type Interface       NH   Via                 Backup Score
203.0.113.3/32         2     122       20 int  ge-1/0/1.0      IPV4 R2
                                           ge-5/0/9.0      IPV4 R2
203.0.113.2/32         2     122       10 int  ge-1/0/1.0      IPV4 R2
                                           ge-5/0/9.0      IPV4 R2
198.1.1.0/24        2     122       20 int  ge-1/0/1.0      IPV4 R2
                                           ge-5/0/9.0      IPV4 R2
198.1.2.0/24        2     122       20 int  ge-1/0/1.0      IPV4 R2
                                           ge-5/0/9.0      IPV4 R2
2001:db8:2:2::1/128  2     122       10 int  ge-1/0/1.0      IPV6 R2
                                           ge-5/0/9.0      IPV6 R2
2001:db8:3:3::3/128  2     122       20 int  ge-1/0/1.0      IPV6 R2
                                           ge-5/0/9.0      IPV6 R2
2001:db8:1:1::/64   2     122       20 int  ge-1/0/1.0      IPV6 R2
                                           ge-5/0/9.0      IPV6 R2
2001:db8:1:2::/64   2     122       20 int  ge-1/0/1.0      IPV6 R2
                                           ge-5/0/9.0      IPV6 R2

Meaning

The routes are displayed in the order of the set priorities. Route 203.0.113.3, which is set with high priority is displayed at the very top followed by routes with medium or low priority.

footer-navigation