Routing and Switching Priorities

30 Mar 2011 - Lab-Rat

When it comes to priority, there’s not a whole lot of consistency across the routing and switching domains. As a good general rule, you can remember “Layer two, lower priority, layer 3, higher priority.” Of course BGP messes with that with the attributes, but in a pinch it helps.

First Hop Redundancy

Highest Priority wins with HSTP (0-255) default 100
Highest Priority wins with VRRP (1-254) default 100
Highest Priority wins with GLBP(1-255) default 100

STP

Lowest switch priority wins the root bridge with STP default 32768
Lowest upstream port priority wins, (0-240) default 128
Lowest path cost wins, default path values:

Additional Reading:
3560 Spanning Tree

Routing Protocols

OSPF

Highest Priority wins DR with OSPF (0-255) default 1
Router ID = set by router-id command, highest loopback, and then highest IP.
Route Preference in OSPF (after general route selection)
1. intra-area
2. inter-area
3. external E1
4. external E2
5. NSSA N1
6. NSSA N2
7. cost

Additional Reading:
OSPF Design Guide

BGP

Route Preference (after general route selection)

1. Weight - Highest weight wins (0 - 65,535) Paths that the router originates have a weight of 32,768 by default, and other paths have a weight of 0.

2. Local preference - Highest local preference wins (discretionary, scope is only in AS), default local preference is 100 when route enters AS.

3. Locally originated paths over externally originated paths

4. AS path (mandatory) - shortest AS path wins

5. Origin (IGP/EBGP/Incomplete) **Interior Gateway Protocol** (BGP network statement) over EBGP over Incomplete (redistributed from another routing protocol)

6. Med - Lowest MED value wins in BGP (0 to 4,294,967,295, with the lowest value being the preferred value, and is configured on a per-neighbor basis. The default MED value is 0.

7. EBGP path over IBGP path

8. Path with lowest IGP metric wins

9. Lowest RID wins

10. Minimum cluster list length wins

11. Lowest neighbor address wins

Additional Reading
BGP Attributes

Multicast

Lowest IP address elected IGMP querier