Routing protocols are the set of rules used by routers to communicate and exchange information, enabling them to select the best path to any destination network.
IGP vs. EGP
- IGP (Interior): Used within an Autonomous System (e.g., OSPF, EIGRP).
- EGP (Exterior): Used between Autonomous Systems (e.g., BGP).
Protocol Classifications
1. Distance Vector
Routers tell their neighbors what they know (entire table) periodically. They know "distance" (metric) and "vector" (direction).
- RIP: Uses Hop Count. Maximum 15 hops.
- EIGRP: Advanced distance vector. Uses Bandwidth and Delay.
2. Link State
Routers build a complete map of the topology and run the SPF algorithm to find the shortest path.
- OSPF: Industry standard, uses Cost based on bandwidth.
- IS-IS: Scalable protocol used primarily by Service Providers.
Administrative Distance (AD)
AD represents the trustworthiness of a routing source. If a router learns about a network from two different protocols, it chooses the one with the lower AD.
| Source | Default AD |
|---|---|
| Connected | 0 |
| Static Route | 1 |
| EIGRP (Internal) | 90 |
| OSPF | 110 |
| RIP | 120 |
Metric is used to choose the best path within a protocol; Administrative Distance is used to choose between different protocols.