Understanding Route Preference Values (Administrative Distance)
The Junos OS routing protocol process assigns a default preference value (also known as an administrative distance) to each route that the routing table receives. The default value depends on the source of the route. The preference value is a value from 0 through 4,294,967,295 (232 – 1), with a lower value indicating a more preferred route. Table 1 lists the default preference values.
How Route Is Learned |
Default Preference |
Statement to Modify Default Preference |
---|---|---|
Directly connected network |
0 |
– |
System routes |
4 |
– |
Static and Static LSPs |
5 |
|
ARI-TS |
5 |
ARI-TS preference. Starting in Junos OS Release 22.2R1, ARI routes are installed as ARI-TS protocol routes instead of static routes as installed in the earlier Junos OS releases. |
Static LSPs |
6 |
MPLS preference Note:
In Junos OS Releases prior to
10.4, if you configure a static MPLS LSP using the
|
RSVP-signaled LSPs |
7 |
RSVP |
SR-TE |
8 |
SR-TE preference |
LDP-signaled LSPs |
9 |
LDP |
OSPF internal route |
10 |
OSPF preference |
OSPF SR route |
10 |
Labelled OSPF preference |
access-internal route |
12 |
– |
access route |
13 |
– |
IS-IS SR route |
14 |
Labelled IS-IS preference |
IS-IS Level 1 internal route |
15 |
IS-IS preference |
IS-IS Level 2 internal route |
18 |
IS-IS preference |
Redirects |
30 |
– |
Kernel |
40 |
– |
SNMP |
50 |
– |
Router discovery |
55 |
– |
RIP |
100 |
RIP preference |
RIPng |
100 |
RIPng preference |
PIM |
105 |
|
DVMRP |
110 |
|
Aggregate |
130 |
|
OSPF AS external routes |
150 |
OSPF external-preference |
IS-IS Level 1 external route |
160 |
IS-IS external-preference |
IS-IS Level 2 external route |
165 |
IS-IS external-preference |
BGP |
170 |
BGP preference, export, import |
MSDP |
175 |
In general, the narrower the scope of the statement, the higher precedence its preference value is given, but the smaller the set of routes it affects. To modify the default preference value for routes learned by routing protocols, you generally apply routing policy when configuring the individual routing protocols. You also can modify some preferences with other configuration statements, which are indicated in the table.
Change History Table
Feature support is determined by the platform and release you are using. Use Feature Explorer to determine if a feature is supported on your platform.
static-label-switched-path
the default preference value is 6.