Routing protocols are the set of rules used by routers to communicate with each other and exchange information that enables them to select the best path to a destination. They are broadly classified into IGP (Interior Gateway Protocol) and EGP (Exterior Gateway Protocol).
IGP vs. EGP
- IGP: Used for routing within a single Autonomous System (AS). Examples: OSPF, EIGRP, RIP, IS-IS.
- EGP: Used for routing between different Autonomous Systems. Example: BGP (Border Gateway Protocol).
Types of IGPs
IGPs are categorized based on how they calculate routes:
1. Distance Vector
Routers send their entire routing table to neighbors periodically. They know "distance" (metric) and "vector" (direction/next-hop).
- RIP (Routing Information Protocol): Uses hop count. Slow convergence.
- EIGRP (Enhanced Interior Gateway Routing Protocol): Advanced distance vector (hybrid). Uses bandwidth and delay. Fast convergence.
2. Link State
Routers build a complete map of the network (topology) and calculate the best path using the SPF algorithm.
- OSPF (Open Shortest Path First): Industry standard. Uses Cost (Bandwidth) as metric.
- IS-IS (Intermediate System to Intermediate System): Used mostly in ISP networks.
Protocol Versions
| Protocol | IPv4 Version | IPv6 Version |
|---|---|---|
| RIP | RIPv1, RIPv2 | RIPng |
| EIGRP | EIGRP | EIGRP for IPv6 |
| OSPF | OSPFv2 | OSPFv3 |
Administrative Distance (AD) Comparison
Administrative Distance represents the trustworthiness of a route source. Lower values are preferred.
| Route Source | Default AD Value |
|---|---|
| Connected Interface | 0 |
| Static Route | 1 |
| EIGRP Summary Route | 5 |
| eBGP | 20 |
| EIGRP (Internal) | 90 |
| OSPF | 110 |
| IS-IS | 115 |
| RIP | 120 |
| EIGRP (External) | 170 |
| iBGP | 200 |