Print Download PDF Send Feedback

Previous

Next

Protocol Rank

Rank is used by the routing system when there are routes from different protocols to the same destination. For each route, the route from the protocol with lowest rank number is used.

The protocol rank is the value that the routing daemon uses to order routes from different protocols to the same destination. It is an arbitrarily assigned value used to determine the order of routes to the same destination. Each route has only one rank associated with it, even though rank can be set at many places in the configuration. The route derives its rank from the most specific route match among all configurations.

The active route is the route installed into the kernel forwarding table by the routing daemon. In the case where the same route is contributed by more than one protocol, the one with the lowest rank becomes the active route.

Rank cannot be used to control the selection of routes within a dynamic interior gateway protocol (IGP); this is accomplished automatically by the protocol and is based on the protocol metric. Instead, rank is used to select routes from the same external gateway protocol (EGP) learned from different peers or autonomous systems.

Some protocols - BGP and aggregates - allow for routes with the same rank. To choose the active route in these cases, a separate tie breaker is used. This tie breaker is called LocalPref for BGP and weight for aggregates.

Default Ranks

A default rank is assigned to each protocol. Rank values range from 0 to 255. The lower the number, the more preferred the route.

The default rank values are:

Routes

Default Rank

Interface routes

0

IPv4 OSPFv2 routes

10

IPv6 OSPFv3 Routes

10

Static routes

60

IPv4 RIP routes

100

IPv6 RIPng routes

100

Aggregate routes

130

IPv4 BGP routes

170

IPv6 BGP routes

170

IPv4 OSPF AS external routes

150

IPv6 OSPFv3 AS external routes

150

Kernel

200

These numbers do not generally need to be changed from their defaults. Use caution when modifying the default route ranks. Rank affects the route selection process, so unexpected consequences may occur throughout the network. Such a change should be planned carefully and take into account both the protocols being used and the location of the router in the network.

Configuring Protocol Rank - Gaia Portal

To set route rank in the Gaia Portal:

  1. In the Gaia Portal, go to the Advanced Routing > Routing Options.
  2. In the Protocol Rank section, enter the route rank for each protocol.

    Note - Leave the fields empty to use the default ranks.

  3. Click Apply at the top of the page.

Configuring Protocol Rank - Gaia Clish (protocol-rank)

Syntax

set protocol-rank protocol

bgp ipv4-routes rank {<0-255> | default}

bgp ipv6-routes rank {<0-255> | default}

kernel rank {<0-255> | default}

ospf instance {<1-65535> | default} rank {<0-255> | default}

ospf rank {<0-255> | default}

ospf3 instance {<1-65535> | default} rank {<0-255> | default}

ospf3 rank {<1-255> | default}

ospf3ase instance {<1-65535> | default} rank {<0-255> | default}

ospf3ase rank {<0-255> | default}

ospfase instance {<1-65535> | default} rank {<0-255> | default}

ospfase rank {<0-255> | default}

rip rank {<0-255> | default}

ripng rank {<0-255> | default}

Parameter

Description

rank <0-255>

Configures the rank of the given protocol relative to other protocols.

The lower the number, the more preferred the route.

rank default

The default rank value. See Default Ranks.