Today we are going to talk about AD and metrics. If you’ve ever seen a routing table you’ve probably seen something like this [110/65]. Here’s a picture of it below:

AD- The number to the left is AD which stands for administrative distance and the number to the right stands for metrics. Ever wondered when there are multiple routing protocols enabled and they have a route to the same destination network, which would the routing table install into the table? The answer is the lowest AD. When a routing table has conflicted routes from multiple protocols to the destination it chooses the one with the lowest AD. The lowest AD is chosen because from the perspective of the router it is seen as the most trustworthy route. AD is Cisco specific, so it is mostly seen on Cisco routers (although some vendors still may use this concept), and every Cisco router follows these specific values for every protocol with Directly connected being the most trusted (AD = 0) and internal BGP being less trusted (AD = 200). For static routes, you have the choice to manually configure the AD, but by default the AD is 1. Here’s a picture of all the AD values.

Metric- Now what if there are multiple routes from the same protocol to the same destination? The lowest metric will win. Metrics are on the right side after the AD and the slash. Metrics determine the overall desirability of that route from the perspective of a single routing protocol. It is a quantity based number just like AD, and metrics are the judgement of a routing protocol of how “good” a route is. Different routing protocols value different things when it comes to metrics. In OSPF, the metric is “cost.” The cost is calculated by taking the reference bandwidth and dividing it by the interface bandwidth. A cost of 10 will be preferred over a cost of 100 in OSPF. In RIP, the metric it uses is hop count, and for EIGRP uses a composite metric formula that is based on bandwidth and delay. As you can see, the metric is completely up to the protocol and the value is determined differently, but what they all have in common is that the lower metric always is the preferred route.
ECMP- What if in the same protocol, they have multiple routes to the same destination network? Then depending on the routing protocol chosen, both routes will be installed in the routing table and will be load balanced. The process of a router installing and load balancing multiple routes with the same metric is called ECMP (Equal Cost Multi-Path). Not only does this allow for load balancing, but can also provide decent redundancy. If there are 3 routes to the same destination network with the same metric, and one of them fails the router will continue to route traffic to the remaining routes. ECMP can be per-packet or per-flow. Per-packet meaning each packet is load balanced, per flow meaning, one session between the same source IP and destination IP goes through one route for the whole session. ECMP is supported by OSPF, EIGRP, IS-IS, and BGP.
Leave a Reply