Chapter 1: Networking Fundamentals
Interview Questions
These networking questions definitely come up in AWS interviews. Don't learn the replies by heart – remember the Amul-style dairy example and say it in your own words.
नेटवर्किंगचे हे प्रश्न AWS इंटरव्ह्यूमध्ये नक्की येतात. उत्तरं पाठांतर करू नका – the Amul-style dairy चं उदाहरण आठवून स्वतःच्या शब्दांत सांगा.
नेटवर्किंग के ये सवाल AWS इंटरव्यू में ज़रूर आते हैं. जवाब रटो मत – the Amul-style dairy का उदाहरण याद करके अपने शब्दों में बताओ.
- Q1. What is the difference between a public and a private IP address?
- A public IPv4 can be routed on the internet when a route exists. An RFC 1918 private IPv4 can be routed within a connected private network. Connections to public IPv4 services can use an appropriate translating gateway or an intermediary.
- Q2. How many usable hosts are there in a /26 subnet? And in an AWS /26 subnet?
- 2^(32−26) = 64 total addresses. A traditional IPv4 LAN /26 usually has 62 usable after network and broadcast reservations. An ordinary AWS IPv4 subnet reserves five, leaving 59 before allocations.
- Q3. What is CIDR and why was it introduced?
- Classless Inter-Domain Routing expresses an aligned block using a prefix length (/n). It supports variable-size power-of-two address blocks and aggregation of compatible prefixes.
- Q4. Why do we need IPv6?
- IPv4 has about 4.3 billion possible values and limited remaining public supply. IPv6 has 128-bit addresses, supports automatic configuration, and makes native IPv6 routing possible without sharing IPv4 addresses. IPv6-only clients still need a compatible path to IPv4-only services. Check AWS pricing for the resources and data paths used.
- Q5. What is the difference between an Elastic IP and an auto-assigned public IP on EC2?
- An ordinary auto-assigned public IPv4 is released on stop and can be replaced on start. An Elastic IP is a static public IPv4 allocated to your account until you release it. You can associate it with the intended supported resource.
- Q6. What is NAT? Where is it used in AWS?
- NAT rewrites IP addresses, and port translation can also distinguish flows by transport port. The AWS internet gateway maps associated public IPv4 addresses to private addresses. A public NAT gateway supports outbound work from private instances on the selected path, and the gateway can also have a separate private translation use case.
- Q7. Which ports are used by SSH, HTTP, HTTPS, MySQL and MongoDB?
- Common TCP defaults are 22, 80, 443, 3306 and 27017 respectively. Check the actual service listener and protocol. HTTPS can also use HTTP/3 over QUIC/UDP.
Build an interview answer from one request and one observation
An interviewer says “Tell me about public and private IPs.” It is tempting to repeat a definition and stop. Instead, picture Mauli Dairy's tracking website. A customer uses its public name, an application server behind the front end uses a private address, and a private database accepts requests from the application. Those three endpoints give you an example you can extend when the interviewer asks how a reply gets back or why a public IP does not establish a working service.
Use a three-step answer. State the definition in one short sentence. Apply it to an exact packet path or number. Then give a check or important boundary, such as inspecting the route association or counting addresses before AWS reserves some. You can answer concisely first and expand when asked. An interviewer needs to understand how you would reason on a whiteboard or console, not merely hear the service's name.
When a question has several valid architectures, begin with your assumptions. “Assume the instance uses an ordinary auto-assigned public IPv4 in an IPv4 VPC” is more useful than guessing that every AWS network works the same way. If the prompt gives you no port or protocol, ask for it or choose an example and say so. A 443 label by itself could refer to a particular TCP or UDP service. Identify the actual transport before describing policy or connection state.
The examples below use 10.40.0.0/16 for Mauli's VPC and documentation IP addresses for internet-side labels. Keep the same topology for different questions. You will be able to explain an address change without forgetting the route, and a failed data request without assuming the customer and database are connected directly.
Practice aloud. A strong first answer can fit into 30 to 60 seconds. The included follow-ups give you ways to show depth. For a calculation, say the prefix and the number of free bits out loud before writing the answer. For a troubleshooting case, say what you learned from each test and which uncertainty it leaves. Good answers distinguish evidence from a prediction.
Scenario questions with worked answers and follow-ups
1. How can an app server be private and still serve a public website?
Opening answer. Put a public entry point such as an internet-facing Application Load Balancer in front of the private application targets. The customer opens the public DNS name and connects to the front end. The front end makes a backend connection to a private server using the intended protocol, port and permitted path. The app can then use a separate private connection to the database.
Trace the flow. Draw a browser, public load balancer, app target and database. Label the first arrow as the customer's HTTPS connection. Label the second as the configured target connection. The target's security group can allow relevant traffic from the load balancer group as appropriate. The target program must listen at the configured port and answer the chosen health path. The database permits the app's expected source and identities on its own listener. Being on the same VPC does not make every caller authorized.
Follow-up. If the interviewer asks why the IP starts with 10, identify RFC 1918 scope for that example. If they ask what still needs a public address, name the public entry point and its address family. If they ask where TLS terminates, state the actual listener setup and the target protocol as separate facts. An architecture conversation can accommodate encryption at more than one connection leg.
2. How many IPv4 addresses does a /26 contain and how many can AWS assign?
Opening answer. IPv4 has 32 bits. A /26 fixes 26, leaving six bits for values inside that block. Two to the sixth power equals 64. A traditional IPv4 LAN /26 usually leaves 62 after setting aside the network and directed broadcast addresses. An ordinary AWS IPv4 subnet reserves five addresses, so the initial maximum available for assignment is 59 before resources consume any.
Work the boundaries. In 10.40.20.64/26, the last octet runs from 64 through 127. Its first four values are .64 to .67, and its last is .127. Those are the five reserved values for this ordinary AWS subnet case. This is why saying “.0 and .255 are always the network and broadcast” is misleading. The exact prefix defines the start and last positions.
Follow-up. If there are already 20 allocated addresses in the standard example, 39 remain in this model. In a live VPC, confirm the actual available IPv4 count and any service placement requirements. The theoretical subnet and the resources that currently use it answer different questions. If an interviewer asks about a different platform or a point-to-point prefix, ask which reservation rules apply rather than always subtracting two or five.
3. Why did classless addressing matter, and how do you split a block?
Opening answer. CIDR expresses how many leading address bits belong to a prefix, independently of old IPv4 address class rules. It makes it possible to allocate appropriately sized blocks and to combine contiguous aligned ranges into larger advertised prefixes when the routing policy allows. A slash length tells you which address bits identify the block.
Work a split. The Mauli app team has 10.40.20.0/24 and needs four equally sized network blocks. Four equals two squared, so borrow two bits from the host side. Each new prefix is /26. The blocks start at .0, .64, .128 and .192 in the last octet. For the third, the network number is 10.40.20.128 and the last value is 10.40.20.191. Write the next block's start and subtract one to check the last value.
Follow-up. If asked why a team can't pick a new base like .150 for a /26, explain alignment. The low six bits at the block's base must be zero. The number .150 already belongs to the block that starts at .128. A host or interface address can be written with its /26, but a canonical route or subnet prefix uses the corresponding base. Validate both size and alignment when reading a plan.
4. What distinguishes RFC 1918 space from other non-public examples?
Opening answer. RFC 1918 allocates 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 for private use. Their addresses can be routed through connected private networks. They are not advertised as global public internet destinations. Other non-global ranges can have different special purposes.
Work the boundaries. Check the second octet of 172.31.8.9 and 172.32.8.9. It needs to be 16 through 31 for the 172 private block. Only the first matches. Now consider 100.72.0.8. It does not match RFC 1918 and falls in the provider Shared Address Space at 100.64.0.0/10. A lookup of a WAN address in that range can prompt a check for provider translation. It is not an ordinary global IPv4 allocation for that router.
Follow-up. If the interviewer asks whether a private address is always unreachable from outside your office, say a connected network can deliver the private route, subject to permission. If they ask whether a public address always works, name route, address association, policy and application listener. Be specific about address classification, connecting path and service response.
5. Why does an IPv6-capable client still need an IPv4 compatibility plan?
Opening answer. IPv6 expands the address space and has its own routing and discovery model. Devices and services can use IPv4, IPv6 or both. A client that only sends IPv6 cannot communicate directly with an IPv4-only endpoint without an appropriate translation or intermediary. Dual stack means the environment can use each address family through its own path.
Work an example. The tracking host publishes an A record and an AAAA record. IPv4 requests work from a laptop but IPv6 requests fail. Check which address the browser selected and compare both address families from the same permitted client. An IPv4 internet route such as 0.0.0.0/0 doesn't create an IPv6 route. An IPv4 source rule doesn't permit an IPv6 source. Verify the IPv6 address assignment, route, intended listener and policy under the real design.
Follow-up. If an IPv6-only AWS app needs an IPv4 service, discuss DNS64 and NAT64 where supported by the endpoint and route. An IPv6 egress-only internet gateway addresses an IPv6 egress requirement. If asked to compress 2001:0db8:0000:0000:0000:0000:0000:0025, give 2001:db8::25 and explain the single omitted zero run. Prefix lengths still apply after changing text form.
6. What survives an EC2 reboot, stop and start, or replacement?
Opening answer. State the operation first. In the ordinary EBS-backed example, rebooting the same instance does not normally change its IP assignments. Stopping releases an ordinary auto-assigned public IPv4, and the configuration can give the instance a new one on start. The primary private IPv4 remains associated under the ordinary same-instance case. A replacement is a different resource and has its own assignments unless your design deliberately preserves an association or endpoint.
Work a before-and-after comparison. On Friday the lab's instance ID is unchanged, the old auto public IP is in a DNS record, and its EBS volume holds the site files. Monday after stop and start, the app may have the same files but the public client may still request the old published IP. Verify the now-current address association, the service status and the DNS response. Compare cached answers where observation points differ.
Follow-up. If a public IPv4 must remain stable for an approved service, discuss an Elastic IP allocation and its association. If customers only require a stable trusted service name, discuss a load balancer and DNS. If a vendor needs a specific egress source, discuss the egress design as a separate requirement. The term “stable” needs an object, such as name, association, instance or outside source.
7. Trace a NAT reply shared by two private callers.
Opening answer. Ordinary source NAT for outbound traffic rewrites the source address. Port translation can let several private flows share an outside address while retaining enough state for replies. For an expected reply, the boundary maps the destination back to the correct inside client and port. The workload keeps its local address.
Work a table. The billing and stockroom PCs use different local addresses but both connect to the vendor's TCP port 443 from local port 51042. The translating device can present outside port 62014 for billing and 62015 for stockroom. The vendor replies to the outside pair it observed. The translator receives each reply and finds its matching flow entry. Include the protocol and relevant endpoints when describing the return mapping. A public IPv4 alone is insufficient to identify which actual workstation sent a specific request.
Follow-up. If the interviewer asks what happens after an idle timeout, say that the old mapping may expire while the application still thinks it can reuse its connection. A fresh connection and timing evidence can distinguish that behavior. If they ask whether NAT lets customers start connections to the stockroom, distinguish the described outbound-only mapping from a separate explicitly configured inbound application path.
8. Which AWS components translate IPv4 on the public and private egress paths?
Opening answer. An internet gateway is a route target. On the direct EC2 public IPv4 path it also maps an associated public IPv4 to the guest's private address. A public NAT gateway lets private workloads initiate permitted connections outside their subnet without giving those workloads their own outside IPv4. On the public egress path the NAT gateway maps the source to its own private address and the internet gateway maps to an associated public address.
Work the zonal example. For a worker in a private subnet, the applicable route sends the internet destination to the zonal public NAT gateway. That gateway is in a public subnet whose route table targets the internet gateway for the outside destination. The vendor sees the public side of the gateway path. The reply reverses the mappings. A more specific route to a service endpoint or connected network may divert that destination to a different path.
Follow-up. If the interviewer says regional public NAT gateway, adjust the drawing. Regional gateways have their own route table and do not need a hosting public subnet. Review current AWS IP management, availability and pricing for the chosen mode. A private NAT gateway is a distinct connected-network use case. Always anchor your answer to a mode and target destination before applying a diagram.
9. How do you tell which of two matching subnet routes is used?
Opening answer. Find the route table effective for the source subnet. Then choose the most specific matching destination prefix in the ordinary case of different prefix lengths. A whole VPC prefix and an IPv4 default can both match a destination. The one with more fixed bits wins when both apply.
Work a route choice. App A uses a table with 10.40.0.0/16 → local, 198.51.100.64/26 → approved private route, and 0.0.0.0/0 → NAT in a worksheet. The database at 10.40.30.40 goes local. The partner example at 198.51.100.70 matches the /26 and default, so the /26 wins. A vendor address in 203.0.113.0/24 with no more specific entry matches the default. The chosen route is directional. Reply delivery and policy still need to fit that path.
Follow-up. If you find no explicit route table association, inspect the subnet's VPC main table. A table named “App route” might exist and apply to no traffic from the failed subnet. If two routes have the same prefix length, consult AWS's route priority rules for their types. The worked example relies on the prefixes having different lengths.
10. How are security groups and network ACLs different?
Opening answer. A security group is a stateful allowed-traffic control for associated AWS resources. Network ACLs apply at subnet scope and evaluate incoming and outgoing traffic separately using ordered rules. A route establishes direction, a path policy decides which packets are accepted, and the application can still require identity.
Work an HTTPS example. A private app target listens on a configured TCP port. Its security group can permit the load balancer group as its intended source. The temporarily assigned source port on the load balancer's connection becomes the destination port of a reply. Relevant ACL rules for that path should allow the required packets under the approved policy. A security group allows eligible replies to its own permitted connection without a separate security group rule only for that reply.
Follow-up. If a trainee asks whether a stateful rule means they can omit a return route, explain that stateful describes one control's decision. The reply still needs a listener that produces it and a usable path. To diagnose a problem, describe traffic in both directions and inspect the exact resource and subnet scopes, not any one rule found by name.
11. What do the familiar port numbers tell you about a connection?
Opening answer. Typical defaults are useful for recognizing common services, such as SSH on TCP 22, HTTP on TCP 80 and HTTPS with TLS over TCP on 443. MySQL often uses TCP 3306 and MongoDB often uses TCP 27017. Applications and frontends can use different ones. Identify the protocol, actual configured listener and target port in the environment.
Work a frontend example. The tracking load balancer listens on HTTPS port 443. Its internal target process might use a TCP-based HTTP listener on port 8080 if that is the approved setup. A rule for the public listener should not be copied as the only rule on the app target. A public listener, a backend target group, a service configuration and health checks can all use different values.
Follow-up. If asked whether a service can use the same numeric port over TCP and UDP, the transport protocols have distinct port spaces. Some modern HTTPS traffic uses HTTP/3 over QUIC/UDP, commonly using 443. Its conditions and path differ from HTTPS over TCP. Ask which service traffic and network permission matter before interpreting a bare numeric port.
12. What does a healthy load balancer target prove about a broken customer flow?
Opening answer. It proves that the target met the configured health check conditions under the observed configuration and time. The check might exercise a simple application path. A complete customer operation also depends on the selected public listener and rule, correct hostname and identity, and any private data paths.
Work the symptom. The target returns the expected status to a health check. A customer opens the tracking site and receives a response saying the order is unavailable. Check which app and listener rule handled it and whether the training customer used the permitted order. For a backend failure, inspect app-to-database name, route, policy, credentials and relevant service outcome in the approved logs. An observed HTML page means a component answered the public request. It does not establish the private data operation succeeded.
Follow-up. If the first symptom were a connection timeout, start earlier at name, selected address and client path. If the first symptom were a certificate name error, check the host and TLS configuration. An interview answer improves when it uses the first confirmed difference to select the next check instead of claiming a universal fix.
13. Why can a VPN fail with private ranges that worked before?
Opening answer. Private ranges can be reused across unrelated networks. When networks become connected, matching or overlapping ranges can cause ambiguous destinations. A system might treat the intended remote address as local. Plan non-overlapping address ranges and verify actual routes and DNS from both ends.
Work the overlap. The office proposes 10.40.44.0/24. The VPC is already 10.40.0.0/16. The first two octets are the same, and every address of the /24 falls inside the /16. This is a conflict even though the textual ranges differ. An alternate proposed 192.168.45.0/24 avoids this example overlap, and the team should also check other networks already in the design. Matching or overlapping CIDRs are disallowed for AWS VPC peering.
Follow-up. Explain how you would diagnose an approved existing connection. Compare the exact prefix tables and return route, then connect through the intended private network and test a known service and name. Work with network owners before renumbering a CIDR. Changes to ranges can affect policy and names in multiple systems. Dynamic allocation or restarting one router does not correct duplicate address meaning.
14. How should you compare a direct IPv4 client and one routed through approved egress?
Opening answer. Record the source at each observation point. An interface address is local to a device or cloud interface. A remote server sees the source presented on the path that reached it. A proxy, firewall translator, home router, cloud NAT gateway or carrier can cause the observed IP to differ. A stable allowlist requirement belongs to the design's actual egress path.
Work the vendor case. Mauli's vendor says the old worker connects but a new worker in another zone does not. The two workers share the application role, but they may use different subnets, NAT associations or public source addresses. First confirm they send an approved request to the same DNS name, port, family and operation. Then inspect each effective route and ask the network owner to compare the intended source seen by the vendor. A working path in one zone does not establish that every zone has the same egress identity.
Follow-up. If the outside sources really match, compare policy, application credentials and target behavior without assuming the NAT is at fault. If the sources differ, coordinate the approved expectation with the vendor and address owner. Preserve the application's identity controls. A shared networking address does not identify which user signed the request or should be allowed to read their order.
15. What distinguishes a DNS lookup, a TCP handshake and an HTTPS request?
Opening answer. A DNS lookup gives the client address information for a name. A TCP handshake establishes a transport connection to a particular address and port. An HTTPS request first uses TLS and then HTTP on its chosen transport. Receiving an address from DNS does not by itself prove that a listener can accept a connection or that HTTPS can complete.
Work the observation. The approved test client receives an A record for the tracking site. Its selected IPv4 connection reaches port 443 and completes a TCP handshake. Next the TLS check reports that the certificate does not match the hostname. Point to the stage that actually failed. Inspect whether the client requested the intended service name and whether the selected listener presents the correct certificate. Changing an internal subnet or requesting a new public IP does not follow from those observations alone.
Follow-up. If TLS succeeds and the HTTP response is 401 from the intended service, application authentication becomes the relevant next check. If the request is HTTP/3 over QUIC, the simple TCP setup description is the wrong transport model for that request. Ask which protocol the client used. An interview answer can describe a common TCP path and make its scope explicit.
16. How does a DHCP lease differ from a static configuration or reservation?
Opening answer. DHCP can provide an address and other settings for a period called a lease. During a normal renewal the same address can remain usable. A reservation can instruct a DHCP service to keep offering a chosen address to a known client identity. A manually configured address is set at the device, and the address plan has to prevent another device from using the same value.
Work the office case. A billing laptop starts on a different Wi-Fi network and obtains an address from that network. A network printer should remain identifiable from the office. If the office chooses a DHCP reservation for the printer, the printer can continue obtaining compatible subnet, gateway or resolver settings from DHCP while its expected address is reserved. A stable local name can also matter to the staff who print. The reservation, name record and connectivity are distinct parts of the same workflow.
Follow-up. An ordinary EC2 guest may receive private IPv4 configuration through DHCP, while EC2 manages the instance's cloud-side address association. If a colleague notices public IPv4 has changed after a stop, first inspect the cloud association. Saying that every public change is the guest's DHCP timer mixes two different mechanisms. Compare lease records and cloud lifecycle evidence at the appropriate layer.
17. What belongs in an egress design operations estimate?
Opening answer. Ask which destinations are required, where the workloads run, what external IPv4 sources partners expect, and which resources and traffic paths the chosen gateway or endpoint use. An egress estimate includes more than the number of NAT gateways drawn on a diagram. It may depend on configured zones, address management, use, data processing and transfer charges.
Work the design question. Mauli's app reads S3 and calls a vendor. A compatible S3 gateway endpoint can serve the storage path with its intended endpoint policy and application permissions. The vendor path may still need public NAT. If the workloads use a zonal gateway across zones, include the real inter-zone path in your study. If the network owner considers a regional gateway, check its current active-zone billing and address management rules. Compare which addresses each vendor will see.
Follow-up. Explain cleanup separately from starting or stopping a workload. A NAT gateway, public address, load balancer or retained volume can have a resource lifetime separate from the EC2 instance that used it. Inventory each relevant item and its owner. An interview answer can describe the cost drivers and how to measure them rather than quoting a particular Region's current prices from memory.
Rehearse a six-minute AWS networking interview
Use paper or a text file and an ordinary timer. One student can work alone by covering the worked example. With a partner, let one person run the clock and produce the next symptom at each step. The simulated service is the Mauli tracking site. The network has a public frontend, private app subnets, private database endpoint and approved public egress. No cloud access or external network requests are required.
Minute one. Draw the customer request and mark where a public address or DNS endpoint belongs. Mark a separate private app connection and one database connection. Expected result: three arrows with direction and appropriate caller, protocol and listener. Explain why the database does not need its own public IPv4 for this operation.
Minute two. Draw the VPC and two Availability Zones. Place app targets in different private subnets and label the relevant prefix lengths. Give App A the
10.40.20.64/26example. Expected result: a VPC spanning zones, each subnet in one zone and 59 initially assignable AWS addresses in the ordinary subnet calculation.Minute three. Add a permitted vendor HTTPS request from an app target. For the zonal public NAT version, draw the app route to that NAT gateway, the public subnet route to the internet gateway, and the vendor-side source. Draw a separate arrow for the database route. Expected result: two outbound destinations with different route choices, and an explanation of what the vendor sees.
Minute four. The interviewer says the frontend check works but tracking returns a backend error. Identify the exact evidence you want next. Expected result: one check on the target or application path, such as confirming target configuration and the request that fails, followed by the app database name and policy if indicated. Explain what the successful frontend check establishes and where uncertainty remains.
Minute five. The partner asks whether moving the work to IPv6 removes every need for connecting to IPv4. Expected result: identify the service and client families, the role of dual stack, and when a supported IPv6-to-IPv4 translation path may still matter. Keep native IPv6 egress separate from compatibility with an IPv4-only destination.
Minute six. Describe one useful verification and a safe change boundary. Expected result: a reproducible check from an approved caller, the actual desired operation and a small authorized change that follows evidence. If your answer proposed broad public access to test the problem, replace that with a scoped observation that identifies the failing leg.
Finish by asking the partner to point to any arrow that has no caller, destination, direction or port. Give each complete arrow one point, then separately give one point for correct /26 math, one for policy and route distinction, and one for an end-to-end verification. Use missed points to choose what to rehearse next. If your explanation drifts away from the scenario, come back to the named customer operation and identify its first failing step. Remove or archive only your scratch notes after the rehearsal.
Defend a route and address calculation against a changed assumption
Prepare three short rows. In the first, place the database at 10.40.30.40 and the app in 10.40.20.64/26 of the 10.40.0.0/16 VPC. State that the app and database lie in different subnets with the same VPC local route. In the second row move the database example to another privately connected network. State what older reasoning still holds and which route and return conditions need fresh evidence. In the third row place both apps and database on an office network and remove AWS entirely. Recalculate using the platform's subnet rules rather than copying the AWS reservation count.
The first row reaches a local VPC route for the database address if the usual local table applies, while its app subnet has 59 initial assignable addresses in the ordinary AWS case. In the second, you need the approved attached connectivity, destination prefix and return route rather than an assumption of VPC-local delivery. The third depends on its actual router and host addressing. A typical traditional /26 offers 62 host addresses before use, and there is no ordinary AWS reservation set in that office example. Give the reason in terms of who owns the routing and reservation behavior.
Ask a partner to exaggerate one rule, for example that every /26 has 59 usable addresses. Explain which part of the original calculation remains stable. Counting 64 values is stable for that prefix. Which values the platform makes assignable depends on where the block is used. If the topology itself changes, consider route behavior separately. The exercise needs no AWS permissions or cleanup beyond your notes.
Grade the explanation using three observable criteria
After giving a first answer, check whether it names the correct scope, works a concrete example and identifies evidence. A student might say “a public subnet is public because it has public IPs.” This starts with the relevant label but misses scope. An improved answer attributes the subnet label to an attached route table path and then discusses one resource's public association separately. Ask the student to draw and point to the two places. A visible distinction is easier to test than a longer memorized definition.
For the concrete example point, use an exact destination or count. “The longest prefix wins” is a useful rule. To demonstrate it, put the database address into both route prefixes and show which one is more specific. “AWS reserves five” is also useful. To show understanding, name the first four and last values in a specific block and state whether the question asks what can be assigned initially or what remains free today. If the example relies on a default, name that default and how you would check it.
For the evidence point, ask what observation would change your answer. If the reported name resolves to a different target from the approved client, revisit DNS and endpoint identity. If the correct connection returns an authentication failure, investigate the receiving service and identity. If the database prefix and app prefix overlap due to a planning error, revisit the address plan and route selection. The observation makes your next action falsifiable. It gives the interviewer a reason to follow your proposed investigation.
Score each criterion separately on your worksheet. After one rehearsal, choose the concept with the weakest evidence sentence and explain it again using the alternate situation in its follow-up. For example, try the return path when the outbound packet used an approved gateway or the same name from a network with a different DNS view. End by explaining what the original answer still establishes. This prepares you for interviewers who alter one fact to see whether you understand the mechanism.
Pick the strongest interview answer and read the reasoning
What is the strongest first response to “The instance is in a public subnet, so why does its private app work?” A. Every resource there has a public IPv4. B. Check the public subnet route, resource association and intended caller independently. C. Every app sits in the VPC main table.
Show answer
B. Public subnet is a route classification. An instance can use a private address and serve a private or load-balanced path. Direct IPv4 use needs the relevant public association and access controls. The route table has to be identified for the actual subnet.
How many IPv4 addresses can a new standard AWS /26 initially assign in this worksheet? A. 64. B. 62. C. 59.
Show answer
C. A /26 yields 64 values, and the ordinary AWS IPv4 subnet reserves five. The traditional /26 figure 62 assumes two traditional network and broadcast reservations. Actual live availability is reduced by resource allocations.
A vendor sends its reply to an outside NAT IPv4 and port. What determines the inside target in the simultaneous requests example? A. The maintained translation match. B. The address class alone. C. The last address used by any phone.
Show answer
A. Translation state distinguishes flows, including the illustrated outer port and transport, then maps the reply to the correct original private source pair. Separate local callers can have the same port and still be tracked.
A prefix outside RFC 1918 reads
100.72.0.8. What is the strongest classification? A. A normal globally reachable IPv4 by exclusion. B. Carrier Shared Address Space. C. One of the three RFC 1918 blocks.Show answer
B. The address belongs to
100.64.0.0/10. Check IANA special-purposes and provider design when an address lies outside the three private blocks. Special-use space is not made globally reachable by exclusion.An application gets a database authentication error from its intended configured endpoint. Which interview response follows? A. Check the expected identity and database permission. B. Open a public address on the database immediately. C. Replace all subnet CIDRs.
Show answer
A. The observed reply indicates a connection reached a responding service. Check approved credential and identity settings, and confirm that the service is the intended one. Broader network access is unrelated to the reported authentication check.
What does an ordinary EC2 reboot and a stop/start share in this example? A. They necessarily change every address. B. They are different operations on the same instance, so first identify which occurred. C. Each always deletes its EBS volume.
Show answer
B. Distinguishing the operation lets you predict which addresses and volumes persist. An ordinary public IPv4 can change after stop and start, while reboot usually retains it. The lifecycle check does not replace observing the current configuration and service behavior.
Revision cards
- Definition, example, evidence
- Start with the concept, apply it to the exact request or number, and state a check that helps prove the answer.
- Address versus access
- Private and public describe routing scope. Access depends on the selected path, network rules, listener and operation.
- Subnet calculation
- Use 2 to the number of host bits for the total. Then apply the platform reservation rules and existing allocations.
- Separate legs
- The public listener, private app target and database have separate connections and separate controls.
- Routes versus policy
- Inspect the effective route table and longest matching prefix. Then verify the correct source and destination are permitted.
- Lifecycle decision
- Name the operation and which identity must persist. An instance, an assigned IPv4, a DNS name and a vendor egress source are different things.
References
- RFC 1918 private IPv4
- RFC 4632 CIDR addressing and aggregation
- RFC 5737 documentation IPv4 addresses
- RFC 6598 provider Shared Address Space
- RFC 5952 IPv6 address representation
- RFC 9114 HTTP/3 over QUIC
- RFC 2131 DHCP and address leases
- RFC 9293 TCP connection behavior
- RFC 9525 TLS service identity
- VPC NAT gateway and public IPv4 pricing
- S3 gateway endpoint behavior
- RFC 3022 traditional NAT
- IANA service names and port numbers
- VPC subnet reservations
- VPC route priority
- VPC route tables
- VPC peering routing and CIDR constraints
- VPC security groups
- VPC network ACLs
- VPC internet gateways
- VPC public and private NAT gateways
- Regional NAT gateways
- AWS NAT64 and DNS64
- Amazon EC2 address behavior
- Amazon EC2 lifecycle
- Amazon EC2 Elastic IPs
- Application Load Balancer health checks