[Day 6] 6. Routing
Routing Overview:
Routing is the process of selecting the best path for data packets to travel from one network to another to reach their destination.
- Directly Connected Networks: Denoted with a Capital C.
- Static Routes: Denoted with a Capital S.
Three Ways to Configure Routes:
- Static Routing
- Default Routing
- Dynamic Routing
- Distance Vector (e.g., RIP, IGRP)
- Link-State (e.g., OSPF, IS-IS)
- Hybrid (e.g., EIGRP, Cisco proprietary)
Distance Vector vs. Link-State Protocols
Both Distance Vector and Link-State are types of routing protocols used by routers to determine the best path for data transmission across a network. However, they operate very differently in terms of how they exchange and calculate routing information.
Distance Vector Protocols:
Definition:
Distance vector protocols work by sharing the "distance" (or cost) to reach a destination network with neighboring routers. Each router maintains a table that lists the best-known cost (distance) to all reachable networks and the next hop to reach them. Routers periodically send updates to their neighbors about their routing table, which includes their distance to destinations.
How it works:
- Each router sends its entire routing table to its immediate neighbors at regular intervals.
- Routers use the information from neighbors to update their own routing table, calculating the best path based on the distance and hop count.
- These protocols rely on the Bellman-Ford algorithm to calculate the best path.
Examples:
- RIP (Routing Information Protocol): Uses hop count as the metric for the shortest path. The maximum hop count allowed is 15.
- IGRP (Interior Gateway Routing Protocol): Cisco proprietary protocol that uses a composite metric based on bandwidth, delay, and other factors.
Key Features of Distance Vector:
- Periodic updates: Routers send their entire routing table to neighbors at regular intervals.
- Slow convergence: Routing updates take time to propagate, which can lead to slower convergence (the process of all routers becoming aware of changes in the network).
- Simple implementation: Easier to configure but can be less efficient in large networks.
- Prone to routing loops: Without proper mechanisms like split horizon, routing loops can occur.
Link-State Protocols:
Definition:
Link-state protocols use a more advanced approach where each router maintains a complete map of the network's topology (i.e., the state of all links). Routers share information about the state of their directly connected links with all other routers in the network, allowing each router to independently calculate the shortest path to any destination.
How it works:
- Routers send link-state advertisements (LSAs) to all other routers in the network to inform them about their directly connected links.
- Each router uses this information to construct a Link-State Database (LSDB), which represents the entire network's topology.
- From the LSDB, each router independently runs an algorithm (usually Dijkstra’s algorithm) to compute the best path to each destination.
Examples:
- OSPF (Open Shortest Path First): A widely used link-state protocol that works within an Autonomous System (AS). It uses the Dijkstra algorithm to find the shortest path.
- IS-IS (Intermediate System to Intermediate System): Similar to OSPF but commonly used in larger networks and service providers.
Key Features of Link-State:
- Complete network knowledge: Routers maintain a complete map of the network and only send updates about changes (i.e., when a link status changes).
- Faster convergence: Faster to adapt to network changes because routers share information immediately when there's a change.
- More resource-intensive: Requires more memory and CPU power as routers store the entire network topology.
- Less prone to routing loops: Link-state protocols typically have mechanisms that prevent loops.
Main Differences:
|Aspect|Distance Vector|Link-State| |---|---|---| |Routing Information|Routers share their entire routing table.|Routers share information about the state of their directly connected links.| |Convergence Speed|Slower due to periodic updates and potential for routing loops.|Faster, as routers immediately update their database and recompute paths.| |Update Frequency|Periodic updates sent at fixed intervals (e.g., every 30 seconds).|Updates only when there is a change in the network topology.| |Algorithm Used|Bellman-Ford algorithm (based on distance).|Dijkstra’s algorithm (based on network topology).| |Scalability|Less scalable for large networks.|More scalable and efficient for larger networks.| |Example Protocols|RIP, IGRP.|OSPF, IS-IS.|
Read Next
[Day 6] 7. Static and Default Routing
### **Static Routing** Static routing involves manually specifying routes in the routing table. - **Command**: ``` A(config)# ip...
[Day 6] 8. Register Values and Password Recovery
### **Configuration Register Values**: 1. **0x2142**: - Bypasses the **NVRAM startup configuration** during the boot process. - Thi...