Study Guide948 words

Routing Fundamentals: Static, Dynamic, and BGP for AWS Hybrid Connectivity

Routing fundamentals (for example, dynamic compared with static, BGP)

Routing Fundamentals: Static, Dynamic, and BGP

This guide explores the foundational concepts of network routing as they apply to the AWS Advanced Networking Specialty (ANS-C01). It covers the mechanisms by which traffic is directed between on-premises environments and the AWS Cloud.

Learning Objectives

After studying this guide, you should be able to:

  • Differentiate between static and dynamic routing and identify use cases for each.
  • Explain the role of a routing table and the process of forwarding.
  • Describe the basic function of BGP in AWS hybrid networking.
  • Calculate routing priorities using Administrative Distance (AD).
  • Understand the purpose of encapsulation protocols like GENEVE in modern routing.

Key Terms & Glossary

  • Next Hop: The IP address of the next router in the path toward the destination.
  • Egress Interface: The specific physical or logical port on a router where a packet is sent out.
  • Forwarding: The process of receiving a packet on one interface and sending it out another based on a routing table lookup.
  • IGP (Interior Gateway Protocol): Routing protocols used within a single organization (e.g., OSPF).
  • EGP (Exterior Gateway Protocol): Routing protocols used to exchange routes between different organizations (e.g., BGP).
  • Administrative Distance (AD): A "trustworthiness" value assigned to a route source; lower values are preferred.

The "Big Idea"

Routing is the navigation system of the internet. While a switch handles traffic within a local room (Layer 2), a router acts as the highway system connecting cities (Layer 3). In the context of AWS, routing is the bridge that allows your private data center to "talk" to your VPCs. Choosing between static and dynamic routing is a trade-off between simplicity/control and scalability/resiliency.

Formula / Concept Box

Static Route Syntax

In most standard CLI environments, a static route is defined as follows:

ComponentDescription
ip routeCommand prefix
destination-networkThe target CIDR (e.g., 10.0.0.0)
maskThe subnet mask (e.g., 255.255.255.0)
`{next-hopinterface}`
[distance]The Administrative Distance (priority)

Example: ip route 192.168.50.0 255.255.255.0 172.16.1.1 250

Hierarchical Outline

  • I. Routing Fundamentals
    • A. Router Function: Receives packets, looks up destination in a Routing Table, and determines the Next Hop.
    • B. Forwarding Process: The actual movement of the packet from ingress to egress interface.
  • II. Static Routing
    • A. Definition: Manually configured routes that do not update automatically.
    • B. Advantages: No protocol overhead, more secure (no updates sent over wire), easy for small networks.
    • C. Risks: Stale routes, potential for blackholes or loops if topology changes.
  • III. Dynamic Routing
    • A. Definition: Protocols (OSPF, BGP) that automatically share and update network topology.
    • B. Classification:
      • IGP: Internal (OSPF).
      • EGP: External (BGP).
    • C. Advantage: High resiliency; updates automatically when a link fails.
  • IV. Border Gateway Protocol (BGP)
    • A. AWS Role: The standard for interconnecting on-premises networks with AWS via Direct Connect or VPN.
    • B. Complexity: Requires significant configuration but is necessary for enterprise-scale hybrid cloud.

Visual Anchors

Routing Decision Logic

Loading Diagram...

Hybrid Connectivity Architecture

Compiling TikZ diagram…
Running TeX engine…
This may take a few seconds

Definition-Example Pairs

  1. Administrative Distance (AD)
    • Definition: A measure of the reliability of a routing information source.
    • Example: If a router learns about 10.0.0.0/24 via BGP (AD 20) and a Static Route (AD 1), it will choose the Static Route because 1 is lower than 20.
  2. Blackhole
    • Definition: A situation where traffic is sent to a destination that is no longer reachable or into a loop, causing it to be lost.
    • Example: A static route points to a decommissioned VPN endpoint; the router continues sending data there, but it never arrives.
  3. Encapsulation (GENEVE)
    • Definition: Wrapping an original packet in a new header to transport it across a network while preserving original metadata.
    • Example: AWS Gateway Load Balancer uses GENEVE to send traffic to security appliances while keeping the customer's original IP headers intact.

Worked Examples

Problem: Selecting the Preferred Route

A router receives a packet for 172.16.0.5. The routing table has three entries:

  1. Static Route: 172.16.0.0/16 via 10.0.0.1 (AD 1)
  2. BGP Route: 172.16.0.0/16 via 10.0.0.2 (AD 20)
  3. OSPF Route: 172.16.0.0/24 via 10.0.0.3 (AD 110)

Solution:

  • Step 1: Look for the Longest Prefix Match. Entry #3 (/24) is more specific than Entry #1 and #2 (/16).
  • Step 2: Even though the Static route has a lower AD (1 vs 110), the router always prefers the longest prefix match first.
  • Result: The packet is sent via 10.0.0.3 (OSPF).

[!IMPORTANT] Longest Prefix Match always takes precedence over Administrative Distance.

Checkpoint Questions

  1. What is the main disadvantage of static routing in a large, frequently changing environment?
  2. If a route has an AD of 255, what does that typically mean for the router?
  3. Which protocol is primarily used by AWS to exchange routes with external customer networks?
  4. Does dynamic routing eliminate the need for administrative intervention entirely?

Muddy Points & Cross-Refs

  • Static vs. BGP on AWS VPN: You can use both. Static is simpler but BGP allows for Health Checks and automatic failover. If the VPN tunnel goes down, BGP will withdraw the route; a static route stays until you manually delete it.
  • AD Values: Different vendors use different default ADs. For the exam, focus on the logic: Lower = More Trusted.
  • Layer 3 vs. Layer 4: Remember that routing happens at Layer 3. Load balancers (discussed in Chapter 4) can operate at Layer 4 or Layer 7, often using GENEVE for transit.

Comparison Tables

Static vs. Dynamic Routing

FeatureStatic RoutingDynamic Routing (BGP/OSPF)
ConfigurationManual (Line by line)Automatic (Protocol-based)
ScalabilityPoor (Difficult for large nets)Excellent
Resource UsageVery Low (No CPU/Bandwidth)Higher (Requires protocol packets)
ConvergenceManual intervention requiredAutomatic failover
SecurityHigh (No visible route updates)Moderate (Requires authentication)
Best ForStub networks / VPN backupsHybrid Cloud / Large Enterprise

Ready to study AWS Certified Advanced Networking - Specialty (ANS-C01)?

Practice tests, flashcards, and all study notes — free, no sign-up needed.

Start Studying — Free