Routing Protocols: Static vs. Dynamic in AWS Hybrid Networks
Routing protocols (for example, static, dynamic)
Routing Protocols: Static vs. Dynamic in AWS Hybrid Networks
This guide explores the fundamental differences between static and dynamic routing, their implementation within the AWS ecosystem, and how to choose the right strategy for hybrid cloud connectivity.
Learning Objectives
- Differentiate between static and dynamic routing protocols and their use cases.
- Identify the syntax and components of a static route configuration.
- Understand the role of the Border Gateway Protocol (BGP) in AWS hybrid networking.
- Analyze administrative distance and its impact on path selection.
- Evaluate when to use static vs. dynamic routing for Site-to-Site VPNs and Direct Connect.
Key Terms & Glossary
- Autonomous System (AS): A collection of IP networks under the control of a single entity (like a company or ISP) that presents a common routing policy to the internet.
- Administrative Distance (AD): A feature used by routers to select the best path when there are two or more different routes to the same destination from different routing protocols.
- BGP (Border Gateway Protocol): The standard Exterior Gateway Protocol (EGP) used to exchange routing and reachability information between different autonomous systems.
- IGP (Interior Gateway Protocol): Routing protocols used within a single autonomous system (e.g., OSPF, EIGRP).
- Next Hop: The IP address of the next sacrificial router on the path to the destination.
- Route Propagation: The process where a virtual private gateway (VGW) or Transit Gateway (TGW) automatically distributes learned BGP routes to VPC route tables.
The "Big Idea"
In hybrid networking, routing is the "GPS" for your data packets. You have two choices: manually tell the router every single path it should take (Static Routing) or give the router a map and let it talk to other routers to figure out the best path automatically (Dynamic Routing). While static routing offers total control and zero overhead, dynamic routing (specifically BGP) is the engine that allows AWS to scale and automatically failover during network outages.
Formula / Concept Box
| Concept | Details |
|---|---|
| Static Route Syntax | `ip route |
| Lower AD = Higher Priority | Static routes typically have an AD of 1 (highest priority). BGP (External) has an AD of 20. |
| AWS BGP Requirement | AWS requires BGP for dynamic routing over Direct Connect and Site-to-Site VPN. |
Hierarchical Outline
- Static Routing Fundamentals
- Manual Configuration: Administrator hard-codes destination, mask, and next hop.
- Advantages: Low CPU overhead, highly secure (no updates sent), predictable.
- Disadvantages: Does not scale, prone to human error, cannot automatically bypass link failures.
- Dynamic Routing Fundamentals
- Automated Discovery: Routers exchange information to build a complete topology.
- IGP vs. EGP: OSPF/EIGRP used internally; BGP used between organizations.
- Advantages: Self-healing (automatic convergence), scalable, low maintenance.
- Routing in AWS Hybrid Cloud
- Site-to-Site VPN: Supports both static and BGP-based routing.
- Direct Connect: Exclusively uses BGP for dynamic route exchange.
- Route Priority: How AWS evaluates conflicting routes in a VPC route table.
Visual Anchors
Routing Decision Flow
Hybrid Connectivity Architecture
Definition-Example Pairs
- Static Route: A manually configured path.
- Example: Telling a branch office router that all traffic for
10.0.0.0/16must go through the specific IP192.168.1.1.
- Example: Telling a branch office router that all traffic for
- Convergence: The state where all routers in a dynamic network have the same topology information.
- Example: After a fiber cut, BGP routers exchange "Withdrawal" messages and update their tables to use a backup VPN path within seconds.
- Administrative Distance: The "trustworthiness" of a route source.
- Example: If a router learns about
172.16.0.0/24from both a Static Route (AD 1) and OSPF (AD 110), it will always choose the Static Route because 1 is less than 110.
- Example: If a router learns about
Worked Examples
Example 1: Configuring a Static Route
Scenario: You need to route traffic from your on-premises Cisco router to an AWS VPC subnet (10.50.0.0/24) via a VPN tunnel endpoint at 169.254.10.1.
Solution:
# Syntax: ip route [network] [mask] [next-hop]
ip route 10.50.0.0 255.255.255.0 169.254.10.1[!NOTE] If you wanted this route to be a "backup" only, you could add an administrative distance at the end (e.g.,
250) to make it less preferred than a dynamic route.
Example 2: Choosing the Protocol
Scenario: A multi-national corporation is connecting 50 global offices to a central AWS Transit Gateway. The connections must support automatic failover between Direct Connect and VPN.
Solution: Use Dynamic Routing (BGP). Managing static routes for 50 locations would be highly prone to error. BGP allows the Transit Gateway to learn routes from all 50 offices dynamically and automatically reroute traffic if a primary Direct Connect link fails.
Checkpoint Questions
- What is the primary disadvantage of static routing in a large, frequently changing network?
- Which protocol is considered the industry standard for hybrid networking with AWS?
- True or False: A higher administrative distance value indicates a more preferred route.
- If a route is manually entered into a VPC route table, is that considered static or dynamic routing?
Muddy Points & Cross-Refs
- Static vs. Dynamic in VPNs: Students often get confused because AWS VPN supports both. Remember: Static VPNs require you to specify CIDRs at creation. BGP VPNs do not; they learn them.
- Metric vs. AD: Administrative Distance (AD) determines which protocol to trust. Metric (like BGP Multi-Exit Discriminator) determines which path within the same protocol is better. AD is checked first.
- Deep Dive: For more on how BGP specifically influences AWS traffic, see the study guide section on BGP Attributes (AS-Path Prepending and MED).
Comparison Tables
| Feature | Static Routing | Dynamic Routing (BGP) |
|---|---|---|
| Configuration | Manual | Automated |
| Scalability | Poor (Hard to manage) | Excellent (Automated) |
| Resource Usage | Low (No CPU/Bandwidth) | Higher (Protocol overhead) |
| Security | High (No visible updates) | Requires MD5 authentication |
| Failover | Manual intervention | Automatic (Convergence) |
| Best For | Small hubs, fixed links | Enterprise, Hybrid, Multi-region |