Routing protocol preference on S series switches

Preference of routing protocols
Different routing protocols, including the static routing protocol may discover different routes to the same destination, but not all these routes are optimal. At a certain moment, only one routing protocol determines the preferred route to a certain destination. To select the optimal route, routes of these routing protocols including the static route are configured with preferences. When multiple sources of routing information exist, the route learned by the routing protocol with the highest preference (a smaller value indicates a higher preference) becomes the optimal route. The optimal route is then saved to the local routing table.

Routers define the external preference and internal preference. External preferences are manually configured for routing protocols. The following lists the default external preferences of routing protocols:
- Direct: 0
- OSPF: 10
- IS-IS: 15
- Static: 60
- RIP: 100
- OSPF ASE: 150
- OSPF NSSA: 150
- IBGP: 255
- EBGP: 255
Note:
Value 0 indicates direct routes and value 255 indicates routes learned from unreliable sources. A smaller value indicates a higher preference.
Except for direct routes, the priorities of routing protocols can be manually configured. In addition, the preference of each static route varies.

Internal preferences of routing protocols cannot be manually configured. The following lists the internal preferences of routing protocols:
- Direct: 0
- OSPF: 10
- IS-IS Level-1: 15
- IS-IS Level-2: 18
- Static: 60
- RIP: 100
- OSPF ASE: 150
- OSPF NSSA: 150
- IBGP: 200
- EBGP: 20
During route selection, a router first compares the external preferences of routes. When the same external preference is set for different routing protocols, the router selects the optimal route based on the internal preference. For example, two routes (an OSPF route and a static route) are available. Both routes can reach the destination 10.1.1.0/24, and the preferences of the two routes are set to 5. In this case, the router determines the optimal route according to the internal preferences. The internal preference (the value is 10) of OSPF is higher than that (the value is 60) of the static route. Therefore, the router selects the route discovered by OSPF as the optimal route.

Scroll to top