# IP Routing

IP routing is the process of selecting paths and forwarding Internet Protocol packets between networks using destination addresses and routing information.

Cloud concept. Updated 2026-10-29. Page: https://blowstack.com/tools/cloud-concepts-hub/ip-routing

> IP routing determines how traffic moves between subnets, private networks, and the internet. In cloud environments, understanding routes, subnet associations, and gateways is essential for designing connectivity and diagnosing why a workload can or cannot reach a destination.

Practice exams covering IP Routing: [ANS-C01 AWS Certified Advanced Networking - Specialty](https://blowstack.com/practice-exams/aws-certified-advanced-networking-specialty), [CLF-C02 AWS Certified Cloud Practitioner](https://blowstack.com/practice-exams/aws-certified-cloud-practitioner), [SOA-C03 AWS Certified CloudOps Engineer - Associate](https://blowstack.com/practice-exams/aws-certified-cloudops-engineer-associate), [DVA-C02 AWS Certified Developer - Associate](https://blowstack.com/practice-exams/aws-certified-developer-associate), [DOP-C02 AWS Certified DevOps Engineer - Professional](https://blowstack.com/practice-exams/aws-certified-devops-engineer-professional), [AIP-C01 AWS Certified Generative AI Developer - Professional](https://blowstack.com/practice-exams/aws-certified-generative-ai-developer-professional), [SAA-C03 AWS Certified Solutions Architect - Associate](https://blowstack.com/practice-exams/aws-certified-solutions-architect-associate).

## 6 key aspects of IP Routing

Reliable IP routing combines precise destination routes, correct subnet associations, suitable gateways, independent security controls, and valid paths in both directions.

1. **Destination-based path selection**: Routes map destination CIDR ranges to forwarding targets. The most specific matching prefix generally takes precedence, so a dedicated private-network route can override a broader internet default route.
2. **Subnet route-table associations**: A subnet's associated route table determines its configured forwarding paths. In AWS, each subnet uses one subnet route table at a time, either through an explicit association or through the VPC's main route table.
3. **Gateway roles and subnet classification**: Internet gateways, NAT gateways, and private connectivity gateways serve different purposes. A public subnet has a direct route to an internet gateway; a private subnet can use NAT for outbound IPv4 internet access without becoming public.
4. **Routing and security are separate**: A route establishes a forwarding path, not permission to communicate. Security groups, network ACLs, host firewalls, and application controls must independently allow the required traffic.
5. **End-to-end and return-path reachability**: Successful communication requires usable paths in both directions. Missing return routes or paths that bypass stateful inspection devices can break connections even when the source route appears correct.
6. **Address-family and topology planning**: IPv4 and IPv6 require separate routing configuration. Nonoverlapping address ranges and deliberate gateway placement help avoid connectivity conflicts, unnecessary costs, and availability dependencies.

## Cloud services for IP Routing

Amazon VPC supplies the subnet-level routing foundation, including routes to local networks, internet gateways, and NAT gateways. AWS Transit Gateway connects multiple networks through a central routing hub when connectivity requirements extend beyond an individual VPC. AWS Site-to-Site VPN and AWS Direct Connect extend routing to on-premises environments through encrypted tunnels or dedicated connectivity, respectively. These services must have compatible address plans and correctly configured routes across every participating network. Security controls remain separate, and both forward and return paths must support the intended communication.

- **[Amazon VPC](https://blowstack.com/tools/cloud-services-hub/amazon-vpc)**: Amazon VPC provides isolated virtual networks with subnets and route tables. Its internet gateways, NAT gateways, and other routing targets support public, private, and outbound-only connectivity patterns.
- **[AWS Transit Gateway](https://blowstack.com/tools/cloud-services-hub/aws-transit-gateway)**: AWS Transit Gateway acts as a routing hub connecting VPCs and on-premises networks. Its route tables control forwarding between attachments and can separate groups of networks with different connectivity requirements.
- **[AWS Site-to-Site VPN](https://blowstack.com/tools/cloud-services-hub/aws-site-to-site-vpn)**: AWS Site-to-Site VPN provides encrypted connectivity between an on-premises network and AWS. Static routing or dynamic routing with BGP establishes which destination networks are reachable through the VPN.
- **[AWS Direct Connect](https://blowstack.com/tools/cloud-services-hub/aws-direct-connect)**: AWS Direct Connect provides dedicated network connectivity to AWS and uses BGP to exchange routing information. Appropriate virtual interfaces and gateway connections enable access to supported private or public AWS destinations.

## IP Routing exam questions

Real practice exam questions on IP Routing, with the correct answer and its explanation.

### Question 1 (CLF-C02)

**Question:**

A company launches a public-facing web server on an Amazon EC2 instance in a new subnet. The instance has a public IPv4 address, and an internet gateway is attached to the VPC. Security groups and network ACLs allow the required HTTPS traffic, but internet users cannot reach the server. The subnet's route table contains only the local route for the VPC. Which change will enable direct IPv4 connectivity between the server and internet users?

**Correct answer:** Add a route for 0.0.0.0/0 to the subnet's route table with the internet gateway as the target.

**Explanation:** The subnet needs a route to the internet gateway for destinations outside the VPC. With a public IPv4 address and appropriate security rules already in place, this route enables direct IPv4 internet connectivity.

### Question 2 (SOA-C03)

**Question:**

A company has an IPv4-only VPC with three route tables:

• Main: contains only the VPC local route. Database subnets have no explicit route table associations and must remain without any route to the internet.
• Application: contains the VPC local route and 0.0.0.0/0 → a public NAT gateway. Existing application subnets are explicitly associated with this table and have working internet access.
• Public: contains the VPC local route and 0.0.0.0/0 → an internet gateway. The NAT gateway is in a subnet explicitly associated with this table.

A CloudOps engineer creates a new application subnet but does not explicitly associate a route table with it. EC2 instances in the new subnet cannot download updates from the internet. The instances have only private IPv4 addresses and must retain that configuration. Security groups and network ACLs allow the required traffic.

Which change will restore internet access for the new instances while preserving the database subnets' isolation and existing application connectivity?

**Correct answer:** Explicitly associate the new application subnet with the Application route table.

**Explanation:** The new subnet currently inherits the Main route table, which has no internet route. Explicitly associating it with the Application route table directs outbound IPv4 traffic through the working public NAT gateway without changing routing for the database subnets or existing application subnets.

### Question 3 (AIP-C01)

**Question:**

A pharmaceutical company runs a generative AI preprocessing application on EC2 instances on an AWS Outposts rack at a regulated facility. The application retrieves unredacted laboratory records from an on-premises API at 172.26.40.20. Those records must not leave the facility. Only locally de-identified prompts may be sent to an approved foundation model in the parent AWS Region. That inference connection already works and must remain unchanged.

The Outpost subnet is 10.84.12.0/24 within VPC 10.84.0.0/16. Its explicitly associated route table currently sends traffic for destinations outside the VPC through a virtual private gateway to a network hub in the parent Region. The facility is also connected to that hub, but this path leaves the facility.

The Outposts local gateway uses direct VPC routing. Its route table is associated with the VPC and already contains a BGP-learned route for 172.26.40.0/24 through the facility network. The local gateway's physical connectivity and BGP session are healthy. The facility router currently reaches 10.84.12.0/24 only through the regional hub. All required security groups, network ACLs, and firewalls permit the API traffic, and there are no overlapping CIDRs or additional routing policies.

Which routing change enables compliant, bidirectional access to the laboratory API?

**Correct answer:** Add 172.26.40.0/24 → local gateway to the Outpost subnet's associated route table. Advertise 10.84.12.0/24 through the local gateway's BGP connection and configure the facility router to prefer that path for the Outpost subnet.

**Explanation:** The subnet route directs API requests to the local gateway instead of the regional hub. The local gateway already knows how to reach the API network. Direct VPC routing preserves the instances' private VPC addresses, so the facility also needs a preferred return route for 10.84.12.0/24 through the local gateway. Both directions remain within the facility, while the existing regional inference path is unchanged.

### Question 4 (DVA-C02)

**Question:**

An AWS Lambda function must call a private HTTPS service in a peered VPC. The Lambda VPC has CIDR block 10.10.0.0/16, and the service VPC has CIDR block 10.20.0.0/16. The VPC peering connection is active, and the service subnet has a return route for 10.10.0.0/16 through the peering connection. Security groups and network ACLs allow the required traffic, and DNS resolves the service hostname to its private IP address.

The developer tests the function with each of two Lambda subnets separately:
• Subnet A uses a custom route table containing the VPC local route and a route for 10.20.0.0/16 through the peering connection. Calls succeed.
• Subnet B has no explicit route table association and uses the main route table, which contains only the VPC local route. Calls time out.

The function must use both subnets. The developer must restore connectivity without changing routing for other subnets that use the main route table. Which change meets these requirements?

**Correct answer:** Explicitly associate Subnet B with the custom route table that Subnet A uses.

**Explanation:** A subnet without an explicit association uses the VPC's main route table. Associating Subnet B with the existing custom route table gives it the required route through the peering connection without changing routing for other subnets using the main route table.

### Question 5 (DOP-C02)

**Question:**

A company uses an infrastructure-as-code pipeline to attach production, development, and shared-services VPCs to one AWS Transit Gateway. Each VPC has a nonoverlapping IPv4 CIDR range. The VPC subnet route tables already direct traffic for the other VPC CIDRs to the transit gateway. There are no other connections between the VPCs.

Production and development workloads must each communicate bidirectionally with shared services. However, production and development must have no routing path to each other, even if workload security groups are accidentally configured to allow the traffic. The shared-services VPC does not contain a firewall or routing appliance.

The DevOps engineer must automate this boundary for existing attachments and future attachments classified as production, development, or shared services. Default transit gateway route table association and propagation are disabled.

Which transit gateway configuration should the pipeline implement?

**Correct answer:** Create a workload route table and a shared-services route table. Associate production and development attachments with the workload table, and propagate only shared-services routes into it. Associate shared-services attachments with the shared-services table, and propagate production and development routes into that table. Apply these rules automatically according to each new attachment's classification.

**Explanation:** Traffic entering from either workload environment can reach shared services but has no route to the other environment. Traffic entering from shared services has routes back to both environments. Classifying new attachments and applying the same association and propagation rules preserves the boundary automatically.

### Question 6 (SAA-C03)

**Question:**

A company runs batch workers on Amazon EC2 instances in an IPv6-only subnet. The workers use Amazon-provided DNS and must initiate HTTPS connections to a vendor's public API. The API's hostname has only an A record, and the vendor supports only IPv4. The workers must remain IPv6-only, and internet hosts must not be able to initiate connections to them.

Which solution meets these requirements with the LEAST operational overhead?

**Correct answer:** Enable DNS64 for the workers' subnet. Create a public NAT gateway with an Elastic IP address in a public subnet that routes IPv4 internet traffic to an internet gateway. Add a route for 64:ff9b::/96 from the workers' subnet to the NAT gateway.

**Explanation:** DNS64 synthesizes IPv6 addresses using the 64:ff9b::/96 prefix for the vendor's IPv4 addresses. The NAT gateway performs NAT64 translation, and its public subnet's internet gateway provides access to the IPv4 internet. The workers remain IPv6-only, and the NAT gateway does not permit unsolicited inbound connections.

### Question 7 (ANS-C01)

**Question:**

A company must establish private, bidirectional IPv4 connectivity between application instances in two VPCs in the same AWS Region. VPC A has a primary CIDR block of 10.10.0.0/16 and a secondary CIDR block of 10.100.0.0/16. VPC B has a primary CIDR block of 10.20.0.0/16 and a secondary CIDR block of 10.100.0.0/16.

All application instances use addresses from their VPC's primary CIDR block. Neither secondary CIDR block contains subnets or has any dependent resources. The applications must initiate connections in either direction and must see the original source IPv4 addresses of their peers. Existing instance addresses cannot change. Security groups and network ACLs already permit the required traffic.

Which solution meets these requirements?

**Correct answer:** Disassociate 10.100.0.0/16 from VPC B. Create a VPC peering connection between the VPCs, accept it, and add routes in the application subnet route tables for the remote primary CIDR block through the peering connection.

**Explanation:** Removing VPC B's unused secondary CIDR eliminates the overlap without changing any instance addresses. The VPCs can then establish peering. Routes in both directions provide private connectivity, and peering preserves the original source IPv4 addresses.

## Practice IP Routing in a full exam

Questions on IP Routing in each practice exam, with every answer option and an explanation for each:

- [ANS-C01](https://blowstack.com/practice-exams/aws-certified-advanced-networking-specialty): 20 questions
- [SOA-C03](https://blowstack.com/practice-exams/aws-certified-cloudops-engineer-associate): 16 questions
- [SAA-C03](https://blowstack.com/practice-exams/aws-certified-solutions-architect-associate): 13 questions
- [DOP-C02](https://blowstack.com/practice-exams/aws-certified-devops-engineer-professional): 3 questions
- [CLF-C02](https://blowstack.com/practice-exams/aws-certified-cloud-practitioner): 2 questions
- [AIP-C01](https://blowstack.com/practice-exams/aws-certified-generative-ai-developer-professional): 2 questions
- [DVA-C02](https://blowstack.com/practice-exams/aws-certified-developer-associate): 1 question

## What is IP Routing

IP routing moves packets between networks by examining their destination IP addresses and selecting an appropriate next hop. A route normally identifies a destination address range, expressed as a CIDR prefix, and a forwarding target such as a gateway or network interface. Routers and cloud networking systems use routing information to decide where traffic should go; routing does not itself decide whether an application is authorized to receive that traffic.

When multiple routes match a destination, the most specific matching prefix generally wins. For example, a route for 10.20.0.0/16 takes precedence over a default route for 0.0.0.0/0 when the destination is 10.20.5.8. The default route handles IPv4 destinations without a more specific match. IPv6 uses separate routes, with ::/0 representing its default route. Configuring an IPv4 route does not automatically provide an equivalent IPv6 path.

In cloud networks, a virtual private network boundary contains subnets and routing configuration. In AWS, Amazon VPC provides this network boundary, and each subnet is associated with one subnet route table at a time. Without an explicit association, the subnet uses the VPC's main route table. Multiple subnets can share a route table. VPC route tables include local routes for communication within the VPC address ranges, although security controls can still block that communication.

AWS classifies a subnet as public when its route table has a direct route to an internet gateway. For direct IPv4 internet communication through that gateway, an instance also needs a public IPv4 address or Elastic IP address and appropriate security rules. Merely attaching an internet gateway to the VPC does not make every subnet public, and placing a resource in a public subnet does not automatically make it reachable from the internet.

A private subnet can support outbound IPv4 internet access by routing traffic to a public NAT gateway in a public subnet. The public subnet then routes internet traffic through an internet gateway. For example, application servers can download software updates without accepting unsolicited inbound internet connections through the NAT gateway. NAT translates addresses; routing selects the forwarding path. For IPv6, an egress-only internet gateway supports outbound-initiated internet communication without performing NAT.

Routing also connects cloud networks to other cloud networks and on-premises environments. Peering connections, transit gateways, VPNs, and dedicated connectivity provide different forwarding targets and network topologies. Static routes offer explicit control but require maintenance. Dynamic routing can distribute network reachability automatically, but introduces route propagation and policy considerations. Address planning matters because overlapping network ranges can prevent straightforward private connectivity.

Practical troubleshooting follows both the outbound and return paths. Check the source subnet's route table, the selected target, destination-side routing, and security controls. Security groups filter traffic at supported resource network interfaces, while network ACLs filter traffic at subnet boundaries; neither replaces routing. A valid route can still lead to blocked traffic, and an allow rule cannot create a missing route. Centralized gateways can simplify management, but their placement and design affect availability, traffic inspection, and processing or data-transfer costs.

## Learn IP Routing in lessons

10 short lessons on IP Routing in 5 certification courses.

- CLF-C02: IP Addressing vs IP Routing (Premium), https://app.blowstack.com/lessons/ip-addressing-vs-ip-routing-clf-c02
- SOA-C03: IP Routing vs Network Address Translation (free), https://app.blowstack.com/lessons/ip-routing-vs-network-address-translation-soa-c03
- AIP-C01: IP Routing: controlled hybrid forwarding paths (Premium), https://app.blowstack.com/lessons/ip-routing-controlled-hybrid-forwarding-paths-aip-c01
- DOP-C02: IP Routing: enforcing security inspection paths (Premium), https://app.blowstack.com/lessons/ip-routing-enforcing-security-inspection-paths-dop-c02
- SAA-C03: IP Routing: subnet route tables (Premium), https://app.blowstack.com/lessons/ip-routing-subnet-route-tables-saa-c03
- CLF-C02: IP Routing: subnet route tables (Premium), https://app.blowstack.com/lessons/ip-routing-subnet-route-tables-clf-c02
