Skip to content
Tech Interview Prep
Technical interview guide

Cloud Networking Fundamentals

VPCs, subnets, and security groups: the building blocks every other cloud topic assumes.

Read
22 min
Practice MCQs
25
Interview Q&A
25
Edition
v3
Editorial status
Reviewed

Scope: Vendor-neutral fundamentals with AWS VPC terminology and official references accessed 2026-08-30..

Curated: · Written: · Reviewed:

25 questions

MCQ-1An EC2 instance runs in subnet 10.0.1.0/24 of a VPC with CIDR 10.0.0.0/16, and the subnet auto-assigns public IPv4 addresses, so the instance's ENI holds 10.0.1.42 plus a public address. The VPC has an internet gateway attached, the instance's security group allows all outbound traffic, and the subnet's network ACL allows all inbound and outbound traffic. The instance can reach another instance in the same subnet, but curl to 192.0.2.10 times out. The subnet's route table contains exactly one entry, 10.0.0.0/16 -> local. Why does the outbound connection fail?
MCQ-2A private subnet hosts IPv4-only instances that pull OS updates from vendor repositories reachable only over the public internet. Security policy forbids public IPv4 addresses on the instances and any inbound connection from the internet. The platform team will not run or patch extra EC2 instances. Which design fits?
MCQ-8A dual-stack subnet's route table has 0.0.0.0/0 pointing at the internet gateway but no ::/0 entry. Which traffic is affected?
MCQ-3A router holds two candidate routes to 10.40.8.25: 10.40.0.0/16 learned from a transit provider with administrative distance 20, and 10.40.8.0/24 learned over a peering session with administrative distance 200. Both next hops resolve. Which route does the router install in the forwarding table?
MCQ-16A VPC subnet 10.0.4.0/24 hosts an Auto Scaling group; each instance takes one primary private IP. 248 addresses are currently allocated to running instances, and the group's peak target is 252 instances. Which action lets the group reach that peak?
MCQ-5An instance sits in a subnet whose network ACL has exactly two rules: inbound rule 100 allows TCP 443 from 0.0.0.0/0, and outbound rule 100 allows TCP 443 to 0.0.0.0/0. The instance's security group has one inbound rule, TCP 443 from 0.0.0.0/0, and its default outbound allow-all rule was deleted, so the group has no outbound rules. A client at 203.0.113.7:51234 opens a TCP connection to the instance's port 443. What does the client observe?
MCQ-6A subnet ACL is stateless: it permits inbound TCP 443 to the web tier but has no rule covering the return direction to client ephemeral ports. What symptom is most likely?
MCQ-19A subnet's NACL inbound rules are: 100 ALLOW TCP 0.0.0.0/0 → 443; 200 DENY TCP 198.51.100.0/24 → 443; 300 ALLOW TCP 0.0.0.0/0 → 22; * DENY ALL. A packet arrives from 198.51.100.77:51000 to 10.0.1.20:443. What does the NACL do with it?
MCQ-24During an outage, VPC flow logs show ACCEPT for the request packets entering the application instance's network interface, but clients still time out. What should be checked next?
MCQ-9An application tier runs on autoscaling instances that are replaced on every deploy, so their private IPs change. The tier shares its subnets with other workloads and reaches the database directly over the VPC. The database must accept connections only from that tier. Which inbound rule expresses that intent?
MCQ-4VPC A uses 10.0.0.0/16 and hosts an app instance at 10.0.1.10. VPC B uses 10.0.1.0/24 and hosts a database at 10.0.1.5. The team requests a VPC peering connection between A and B so the app can reach the database. What is the result?
MCQ-10VPC A (10.0.0.0/16) peers with VPC B (10.1.0.0/16); VPC B peers with VPC C (10.2.0.0/16). All three are in the same AWS account and Region, and no transit gateway exists. A packet from A's CIDR arrives at B over the A–B peering connection, addressed to 10.2.0.5. B's route table contains 10.2.0.0/16 → B–C peering connection. What happens to the packet?
MCQ-15A service listens on TCP 8443 on EC2 instances in subnet 10.0.4.0/24. Clients in a peered VPC (10.1.0.0/16) report connection timeouts to 8443, though they can ping the instances and open TCP 22 to them. The peering route tables on both sides contain the peer CIDR, the clients' security groups allow all outbound traffic, and the service's DNS name resolves to the instances' private addresses. VPC flow logs are enabled on the instances' ENIs and the log group is receiving records for those ENIs, but none in the last hour show source 10.1.0.0/16 on port 8443. The instances' security group allows TCP 8443 from 10.1.0.0/16. What does the missing record most likely indicate?
MCQ-12A service in vpc-0a1 (10.10.0.0/16) listens on 10.10.4.17:443. From an instance in vpc-0b2 (10.20.0.0/16), curl https://10.10.4.17/health returns 200, but curl https://api.internal/health times out. dig +short api.internal from that instance returns 10.20.4.17. The VPCs are peered, sg-0a1b2c3d allows 10.20.0.0/16 on 443, and enableDnsSupport is true on vpc-0b2. Which change fixes the hostname path?
MCQ-22A Route 53 private hosted zone resolves correctly for instances in VPC A. Instances in VPC B, which is peered to VPC A, can resolve public names but receive NXDOMAIN for records in the private zone. Routes and security groups are correct. What is the most likely missing configuration?
MCQ-11An analytics job on EC2 instances in a private subnet reads objects from the S3 bucket `reports-prod` in the same Region. The subnet has no NAT gateway and no route to an internet gateway. The team creates a gateway endpoint for S3 and attaches this endpoint policy: ```json {"Effect":"Allow","Action":"s3:GetObject","Resource":"arn:aws:s3:::reports-staging/*"} ``` The instance role's identity policy allows `s3:GetObject` on `arn:aws:s3:::reports-prod/*`, and the bucket policy allows the role. The job's `GetObject` for `reports-prod/2024/q1.csv` fails with `AccessDenied`. The same role's `GetObject` for the same key succeeded last week from an instance in a public subnet that reached S3 over the internet gateway. What is the cause?
MCQ-7A web tier runs in two AZs. Each zone's private subnets route 0.0.0.0/0 to a single NAT gateway in zone A. Egress is steady at 2 Gbps with a few hundred concurrent connections. Which risk deserves explicit treatment in the design review?
MCQ-20An app runs on two instances behind an internet-facing ALB and calls an external payment API over HTTPS. The instances were in public subnets with Elastic IPs; a security review moved them into private subnets, detached the Elastic IPs, and narrowed the target security group to allow inbound 8080 only from the ALB's security group. Inbound user traffic still works, but every checkout now fails with a 500 after a 30-second wait. What is the cause?
MCQ-13An app instance at 10.0.1.15 in a VPC subnet (10.0.1.0/24, default network ACL) opens TCP to 192.168.10.20:443 on premises over a site-to-site VPN attached to a transit gateway. The connection times out. VPC flow logs show the outbound SYN accepted and no inbound records. tcpdump on 192.168.10.20 shows the SYN arriving and a SYN-ACK leaving toward 10.0.1.15. The server's default gateway is 192.168.10.1, the VPN-facing router; that router's table carries 10.0.1.0/24 via the MPLS CE (AD 20) and via the VPN tunnel (AD 200). The MPLS circuit ends at a legacy data centre with no route to the VPC. What explains the missing SYN-ACK?
MCQ-21An AWS Site-to-Site VPN to a Transit Gateway uses dynamic (BGP) routing, and the only CloudWatch alarm fires when the VPN connection state leaves 'available'. Last month one tunnel was down for nine hours; traffic rode the surviving tunnel, so nothing alerted, and the site went dark only when the second tunnel was taken down for maintenance. Which monitoring change closes that gap?
MCQ-23A team is linking a colocated data center to a VPC. A compliance rule requires payload encryption in transit, and the nightly replication job needs steady latency. They can order a 1 Gbps hosted Direct Connect connection, which does not support MACsec, or run an IPsec VPN over the public internet. Which statement about the two transports is correct?
MCQ-17A retailer runs 60 VPCs in a single AWS Region and account, with unique CIDRs, and each VPC keeps its own NAT gateway for internet egress. Every VPC must reach every other VPC and the two on-premises data centres, and product teams add or rebuild a VPC about once a week. The network team is choosing between a full VPC peering mesh and a transit hub. Which property of the hub decides that choice?
MCQ-25An acquisition brings a network that uses 10.0.0.0/16 into a company whose production VPC already uses 10.0.0.0/16. A regulatory freeze blocks renumbering for 18 months. The acquired side runs 40 services the existing VPC must call, and the existing VPC runs 200 services the acquired side must call, over TCP and UDP. Which design meets the requirement?
MCQ-14A 150-instance fleet runs in one VPC; every instance has a public IP and its security group allows inbound TCP 22 from 0.0.0.0/0. Over 30 days sshd logged 6.0M failed publickey attempts across the fleet. The team wants to remove the 0.0.0.0/0 rule. Two constraints: the instances run a custom Linux image that cannot run the SSM agent, and the deploy pipeline needs interactive SSH with local port forwarding from an EC2 instance in the same VPC whose private IP changes whenever its Auto Scaling group replaces it. Which change removes the public exposure while preserving the pipeline?
MCQ-18An image-processing service runs on EC2 in a private subnet. Its security group's outbound rule is 0.0.0.0/0 on all ports, and a NAT gateway routes that traffic to the internet. A pentest finds an SSRF in the /fetch endpoint: it requests any URL the caller supplies and returns the response body. The team replaces the outbound rule with an allowlist of two partner API CIDRs on TCP 443. Which pentest finding is still reproducible after the change?