Computer Networks

[Day 7] 8. Routing Table

D
DITISS Admin
••1 min read

How Routing is Done?

  1. Longest Prefix Match:

    • The router checks its routing table for the route with the longest prefix that matches the destination IP address. This ensures the most specific and accurate route is selected.
  2. Administrative Distance (AD):

    • If multiple routes to the same destination exist, the router prefers the one with the lowest Administrative Distance (AD). This value indicates the trustworthiness of the routing source, with lower values being more reliable.
  3. Best Metric:

    • When multiple routes share the same AD, the router chooses the route with the best metric. For instance, in RIP, the route with the fewest hops is preferred. A lower metric is always favored.

Administrative Distances (AD) for Some Protocols:

|Protocol|AD| |---|---| |Connected|0| |Static|1| |eBGP|20| |EIGRP|90| |IGRP|100| |OSPF|110| |IS-IS|115| |RIP|120| |Ex-EIGRP|170| |iBGP|200| |Unknown|255|


Read Next

8/26/2026

[Day 8] 1. Link State (Dynamic Routing)

| | Distance Vector | Link State...

8/26/2026

[Day 8] 2. OSPF and its Architecture

>**OSPF (Open Shortest Path First)** is a link-state routing protocol used within an **Autonomous System (AS)** to find the best path for data transmi...