In Chapter 7, weโll explore routing protocols and static routing concepts that are fundamental for directing traffic across networks. We’ll cover distance vector algorithms, link-state algorithms, and path vector algorithms, as well as examine various types of static routes and their applications. Additionally, weโll discuss load balancing and policy-based routing for more granular traffic control.
๐ Distance Vector Routing Protocols
Distance vector protocols determine the best path to a destination based on the distance (usually hop count) and direction (vector). They rely on periodic updates from neighboring routers and utilize algorithms like RIP (Routing Information Protocol).
Characteristics of Distance Vector Protocols:
- Periodically Broadcast Updates ๐ก: Routers send updates at regular intervals.
- Limited Visibility ๐: Routers only have information about the next hop and distance, not the entire network topology.
Enhanced Distance Vector Algorithms
An improvement over basic distance vector protocols, Enhanced Distance Vector Protocols like EIGRP (Enhanced Interior Gateway Routing Protocol) incorporate features such as:
- Fast Convergence ๐: Updates propagate quickly after a change.
- Loop Prevention ๐: Mechanisms such as split horizon and poison reverse prevent routing loops.
๐ Link-State Routing Protocols
Link-state protocols, such as OSPF (Open Shortest Path First), provide a more detailed network view by maintaining a complete map of the network topology. Each router shares link-state information with other routers to build a Link-State Database (LSDB), allowing them to independently calculate the shortest path.
Characteristics of Link-State Protocols:
- Entire Network View ๐บ๏ธ: Each router has full knowledge of the network topology.
- Triggered Updates ๐: Only send updates when thereโs a change, reducing overhead.
- Rapid Convergence โก: Path calculations are made quickly, allowing for fast network recovery.
๐ Path Vector Routing Protocols
Path vector protocols, like BGP (Border Gateway Protocol), are commonly used for routing between autonomous systems (AS). BGP maintains the path of each route, allowing routers to avoid loops by examining the full AS path.
Key Aspects of Path Vector Protocols:
- Autonomous System Awareness ๐: BGP knows the AS path for each route, essential for inter-domain routing.
- Policy-Based Path Selection ๐: Allows for complex routing decisions based on policies rather than shortest path or hop count alone.
๐ฃ๏ธ Path Selection Process
When routers select a path, they follow a specific process to choose the best route:
- Longest Match ๐: Routers prioritize routes with the most specific (longest) subnet mask that matches the destination.
- Routing Information Base (RIB) ๐๏ธ: The RIB stores all routes known to the router, from which it selects the best routes for the Forwarding Information Base (FIB).
- Order of Route Processing ๐งฉ: Routers typically follow a path preference order, such as connected routes, static routes, then dynamic routes.
๐ Load Balancing Techniques
Load balancing improves network performance by distributing traffic across multiple paths. Equal-cost multipath (ECMP) and unequal-cost load balancing are two primary methods:
Equal-Cost Multipath (ECMP)
With ECMP, routers can use multiple paths with the same cost for load balancing, improving throughput and fault tolerance.
Unequal-Cost Load Balancing
In some protocols like EIGRP, load balancing can occur over paths with different costs, allowing for more flexible traffic distribution.
To enable load balancing in EIGRP:
Router(config-router)# variance <multiplier>
๐ง Static Routing and Route Types
Static routes are manually configured routes that provide a direct path for traffic in a network. Theyโre often used for small networks or specific scenarios where control over routing is necessary. Here are the types of static routes:
Directly Attached Static Routes
A directly attached static route points to a specific next-hop IP address on a directly connected network.
Switch(config)# ip route <destination_network> <subnet_mask> <next_hop_ip>
Recursive Static Routes
In recursive static routes, the router performs two lookups: first to find the next hop, then to determine the exit interface.
Fully Specified Static Routes
A fully specified static route defines both the next-hop IP address and the exit interface, providing clear guidance for the routing process.
Switch(config)# ip route <destination_network> <subnet_mask> <next_hop_ip> <exit_interface>
Floating Static Routes
Floating static routes serve as backup routes, activated only when the primary route fails. These routes have a higher administrative distance than the main route, so theyโre only used when no other path is available.
Switch(config)# ip route <destination_network> <subnet_mask> <next_hop_ip> <exit_interface> <administrative_distance>
Static Null Routes
Null routes discard traffic destined for a specific network, commonly used for network security or to prevent routing loops.
Switch(config)# ip route <destination_network> <subnet_mask> Null0
IPv6 Static Routes
IPv6 static routes function similarly to IPv4, providing manually configured paths for IPv6 traffic.
Switch(config)# ipv6 route <ipv6_network> <next_hop_ipv6_address>
๐ ๏ธ Policy-Based Routing (PBR)
Policy-Based Routing (PBR) allows you to override the standard routing process and apply custom routing policies based on criteria like source IP, destination IP, or protocol type. PBR is used for traffic engineering, load balancing, and ensuring specific types of traffic follow designated paths.
To configure a PBR:
- Define the Route Map:
Switch(config)# route-map <map_name> permit <sequence>
- Specify Match Conditions:
Switch(config-route-map)# match ip address <access_list>
- Set Next-Hop:
Switch(config-route-map)# set ip next-hop <next_hop_ip>
Apply the route map to an interface:
Switch(config-if)# ip policy route-map <map_name>
๐ Summary
In Chapter 7, we explored various routing concepts and static routing configurations that form the basis of network routing:
- Distance Vector and Link-State Protocols: Distance vector protocols rely on hop count, while link-state protocols provide full network visibility.
- Path Vector Protocols: Path vector protocols like BGP are used for inter-AS routing and focus on path policies.
- Path Selection: Routers prioritize longest match and manage the Routing Information Base (RIB) for efficient path selection.
- Static Routes: Directly attached, recursive, fully specified, floating, and null routes provide flexibility for manual path control.
- Policy-Based Routing: Allows for custom traffic routing based on specific policies and requirements.
By understanding these routing concepts, you can efficiently manage traffic paths, optimize network performance, and provide backup routing options