Ravindra BagaleCourses & study guides मराठी Track your progress

Chapter 2: The OSI Model and TCP/IP Model

AWS Cloud

2.3 The TCP/IP model and comparison

OSI is the language we speak; TCP/IP is what actually runs the internet. In other words, OSI is for talking, TCP/IP is for real running. Got it? Let's compare them.

The TCP/IP (Internet) model is the practical model on which the internet runs. It has 4 layers (some books show 5 by splitting the bottom layer).

        OSI Model                    TCP/IP Model
  +---------------------+      +----------------------+
  | 7 Application       |      |                      |
  | 6 Presentation      | ---> |  Application         |  HTTP, DNS, SSH
  | 5 Session           |      |                      |
  +---------------------+      +----------------------+
  | 4 Transport         | ---> |  Transport           |  TCP, UDP
  +---------------------+      +----------------------+
  | 3 Network           | ---> |  Internet            |  IP, ICMP
  +---------------------+      +----------------------+
  | 2 Data Link         | ---> |  Network Access      |  Ethernet, Wi-Fi, ARP for IPv4
  | 1 Physical          |      |  (Link)              |
  +---------------------+      +----------------------+
Point OSI model TCP/IP model
Layers 7 4 (or 5)
Developed by ISO (reference/theoretical) US DoD / DARPA (practical)
Approach Model first, protocols later Protocols first, model later
Session & presentation Separate layers Merged into Application
Usage Teaching, troubleshooting vocabulary Actual internet implementation
Transport layer Connection-oriented and connectionless TCP (connection) and UDP (connectionless)

Where AWS services sit

Layer AWS example
L7 Application Load Balancer (routes by URL/host), CloudFront, AWS WAF, Route 53 (DNS)
Transport and traffic filtering Network Load Balancer listener behavior depends on its settings. Security groups and network ACLs can both evaluate protocol, address and port fields where applicable.
L3 VPC address ranges, subnets, route table decisions and gateway paths
L1–L2 Managed by AWS (physical data centres, Nitro hardware, ENIs)

Ravindra Bagale's Tip

Think of the OSI model like sending a parcel by courier: packing the item (application data), the flat number (port), the full address with pin code (IP), the route of the local delivery van (MAC/data link), and the road itself is the physical layer. But in exams and interviews always explain the real mechanism – protocols can add headers or other control information when carrying data. The receiving component interprets that protocol information to recover the carried data.

Ravindra Bagale's Tip

For interviews, explain what the rule evaluates. Security groups track flows. Network ACLs evaluate subnet traffic in each direction without connection state. Both can match protocol, addresses and applicable ports. Describe the actual listener when comparing an ALB and an NLB.

Practice task

Kagdavar OSI vs TCP/IP cha diagram kadha aani pratyek TCP/IP layer samor Mauli Dairy chya website madhla ek udaharan liha – udaharan mhanje Application: HTTP aani DNS, Transport: TCP 443, Internet: EC2 cha public IP, Network Access: AWS che hardware aani ENI.

Got it? OSI is the dictionary, TCP/IP is the real internet. Now let's move on to my favourite interview question – what exactly happens when you open a website?

Translate a single request between the two models

Use the same classroom service for both drawings. A browser needs a timetable from a training portal. It resolves a name, connects to an endpoint and requests an application resource. The sender and receiver have operating systems and attached networks. Between them sit network devices that forward traffic. The OSI diagram groups this work into seven layers. The common TCP/IP diagram groups related jobs into four. The request remains the same when you move from one drawing to the other.

In the OSI view, begin at the physical layer with the means of carrying signals. The data-link layer handles local delivery. The network layer supplies addressing and forwarding among networks. The transport layer supports communication between endpoints. The upper layers describe the conversation, the representation of information and the application protocol's messages. These names let you describe a small enough responsibility that another engineer can recognise it.

In the four-layer view, the link layer collects the work of using the attached network. The internet layer supplies IP forwarding and related control. The transport layer provides communication between endpoints, using facilities such as TCP or UDP. The application layer collects the protocols and many upper-layer functions used by programs. TCP/IP is also the name used for the Internet protocol suite. As a teaching diagram, its layer count and boundaries depend on the convention the book uses.

Read the five-layer teaching version as a useful variation. It assigns separate names for physical and data-link work rather than grouping them at the bottom. If a colleague shows five rows while a book shows four, compare which row is split. There is no need to move IP or TCP to another function to resolve that difference. For a quiz, state the numbering convention you are using. For an engineering incident, name the protocol and evidence in addition to the layer.

Observed taskOSI descriptionTCP/IP grouping
Carry signals and deliver an Ethernet frame to a local next hopPhysical and data linkLink in the four-layer view
Forward the IP packet toward its destination prefixNetworkInternet
Open a TCP connection to the selected listenerTransportTransport
Interpret the web request, its representation and application stateApplication plus relevant presentation and session responsibilitiesApplication

Use the table as a crosswalk and avoid treating every row as a rule about implementation. When explaining encrypted HTTP over TCP, describe TLS between the HTTP exchange and the TCP byte stream. When explaining HTTP/3, describe HTTP over QUIC, with QUIC packets carried by UDP and a security handshake using TLS 1.3. A rigid rule that always puts TLS in the same separate OSI box would hide what changes in those two cases. The essential questions are who provides the service and which endpoints interpret the relevant protocol fields.

Compare an endpoint's view with a forwarding device's view

Write the fictional URL https://training.example/notes. The application gives the computer a host name and asks for a secure web exchange. In a simple scenario the operating system has an address for that name, and the browser starts a connection to that address and port. An intermediate IP router typically needs the destination IP and a route to choose its next hop. It does not need to parse that browser request to perform ordinary IP forwarding. A request is one event, while each device observes a different part of it.

Use the local connection to distinguish names. Suppose the client is at 10.40.1.25. The sample host resolves to 192.0.2.18. The IP destination equals that sample address. The next-hop router's local link address is used to deliver the frame on the first link. Port 443 is part of the client-side transport selection in the HTTPS example. The web request also contains information identifying the host and path for the application protocol. Write the jobs those values support before putting them into the seven- or four-layer diagram.

In the absence of address translation, a router does not need to replace that IP destination with its own address simply because the first frame goes to the router. The local frame is specifically for a link hop. A new frame can carry the packet onward on another link. An address translation device can intentionally change certain addresses and ports according to its configuration. If an engineer asks why an internal IP differs from a public observation, mark the point where such a transformation occurs and record evidence from each side. Compare observations from the same flow.

At a receiving host, the IP layer delivers suitable data toward transport. The operating system uses the transport identifiers and local state to deliver the application conversation to the expected endpoint when allowed. The program or its library then interprets the data under the application protocol. The IP packet's receipt does not establish a successful web response. The application could be missing, reject the identity or route a different path. The reference models are useful here because each answer narrows the next question.

Use a simple comparison in notes. The router's question is “Where do I send this packet next?” The listening host's question is “Which local endpoint handles this exchange?” The application’s question is “What action does this request ask for, and can I provide it?” At the end, the user wants a response displaying the timetable. A test at one device cannot replace all three. A correctly prepared drawing shows where you would place each diagnostic observation.

Map a client's two exchanges without forcing them into one diagram

A new browser request can depend on a separate name lookup before it exchanges web traffic. The resolver process talks to a DNS service with its own addresses and protocol messages. Its result can then help the browser select a web destination. In a common case DNS uses UDP or TCP; encrypted DNS arrangements can carry name requests over other protocols. The important result for the browser is the usable answer. In terms of the model, DNS is an application protocol whose carrying path can vary.

Sketch the two cases on one page. Draw a short exchange from the client or configured resolver path to the naming service. Draw a second from the client to the chosen web address. Mark which operation is a DNS lookup and which is an HTTP request. The two operations can reach different systems and use different routes. This story explains why successfully resolving the name cannot prove the web service's listener and why a locally cached answer can remove visible resolver traffic on a later visit.

Repeat with a browser that has a reusable secure web connection. A later application request may use the connection already set up. It may not perform a new name lookup or a new ordinary TCP handshake for that request. An introductory diagram that starts every page view with DNS and a three-way handshake is a good description of one fresh connection, not a prediction for all traffic. Mark the assumed cache and connection state before teaching which events a learner should expect to observe.

Now compare TCP with QUIC. TCP provides a byte stream that can carry HTTP/1.1 or HTTP/2 under appropriate implementations, often protected by TLS on the web. QUIC carries network packets over UDP and provides features such as protected connections and reliable streams for HTTP/3. If a particular development or enterprise path uses only one of these choices, diagnose the actual protocol. A test of TCP reachability does not test UDP in the same direction. If you need to verify both in a real environment, use approved observability and service configuration rather than assuming a single test proves them both.

Record which AWS control answers which question

In an AWS VPC, a subnet belongs to a portion of the VPC address space, and a route table controls forwarding decisions for associated resources. A route entry associates a destination with a target under the routing rules. An internet gateway supports the appropriately configured path between a VPC and the internet. A public address alone is insufficient. The resource needs the expected route, attachment and traffic permissions for the intended path. The running program also needs a listener accessible through that path.

A security group controls eligible traffic for associated resources and uses stateful tracking. Its rules can consider source or destination and protocol information, and port ranges for protocols that use them. A network ACL controls subnet traffic separately in each direction and is stateless. It can also match protocol and port details where applicable. Categorising ACLs as only Layer 3 and security groups as only Layer 4 makes a student overlook rule fields each supports. Learn what information each resource considers, where it applies and whether it tracks the return flow.

Read a practice rule with the packet values visible. A client at an approved source uses temporary port 52000 and connects over TCP to a service on port 443. On the request leg the destination is 443. The response reverses source and destination transport roles. Its destination is now the client's temporary port. A stateful security group allowing the request can allow the corresponding response by tracking that flow. A subnet ACL can evaluate the relevant return packets under its rules. Write the direction and port being matched in both rules before testing.

Keep the host's operating system in the drawing. A subnet can be routed correctly while an instance firewall rejects connections or the application binds only to loopback. A private backend can intentionally accept traffic only from an approved load balancer, so direct tests from unrelated internet sources should fail. Good reasoning does not treat all failure as a configuration mistake. It compares each observation with the intended scope. That is especially important in a beginner lab, where broad public rules can make a flawed test appear to work while weakening the desired design.

Put DNS and content services on the same drawing using their actual roles. Route 53 provides DNS functions. Some records lead clients to services such as a load balancer, after which the client makes a different application connection. CloudFront can serve HTTP content at a cache or request it from an origin. AWS WAF can evaluate web request components in supported placements. None of these service names identifies every network dependency in the path. Record which point can see the key evidence, and what connection the visible response traversed.

Choose a listener by the decision it needs to make

Suppose the public training portal serves a welcome page and secured course information. The front door accepts HTTPS for training.example. The item you want to route by is the path. Put welcome requests through the usual group, and direct approved requests whose path starts with the course pattern to a course target group. An Application Load Balancer can interpret HTTP request properties and apply listener rules. This is why calling that rule an application-layer decision is useful. State the specific listener, condition and action instead of merely naming the product.

Draw the frontend connection using client address and port 443. The load balancer can terminate the frontend TLS connection. It then follows a target group configuration that defines a separate backend protocol and port. In a practice design with a backend on port 8080, the client does not send a request to the backend address directly. The load balancer makes the target-side exchange according to the listener and target settings. If you require protected traffic on both legs, configure and verify the backend leg independently instead of inferring it from the public URL scheme.

Review each layer of the training request. Client-side name resolution can find a front address. The client can complete its transport connection and accept a certificate supplied by the public endpoint. The front service can choose the course rule. The target still needs to be reachable and able to respond under the configured backend protocol, port and path. Each successful step is necessary under that design. Reaching the front service alone cannot prove which target was contacted or that the backend application was healthy.

Use two requests in an approved lab to evaluate the rule. The general page can return a distinctive training message, while the course path returns a different message from its group. Record selected host, path, status and expected target response. If both paths show the general page, inspect rule priority, conditions and default action before changing target firewall settings. If the rule picked the correct group but the response is a gateway error, look at the backend reachability, listener and logs. Try an equivalent request on an approved internal path if the architecture provides one.

Consider a transport-forwarding requirement instead. A service might need endpoints to establish their own application or TLS connection without an HTTP-rule decision at the load balancer. A Network Load Balancer provides listener protocols documented for that service. For a TCP listener used to pass through encrypted TCP streams, the backend can be responsible for TLS and application semantics. For a TLS listener, the load balancer can terminate the client-side TLS session, so the drawing changes. The same product supports more than one configuration. Inspect actual settings before assigning a layer role.

One useful interview approach is to label the observed information for the rule. “The listener selects the target based on transport information rather than interpreting this HTTP path” explains what a protocol-aware design does. “This listener routes by host and path” explains how an HTTP-aware design decides. A description tied to the rule also avoids confusing NAT devices, security groups and HTTP gateways that all appear in the same architecture. Include termination points in the drawing whenever a connection can be split.

Build a small incident worksheet for the proxy path

Use a case where the browser can reach the training portal but a course request fails. Write frontend and backend evidence in separate columns. Under the frontend, record the original URL, selected address, client-side port, certificate outcome and HTTP result. Under the backend, record the selected target group, protocol, target port, health condition and any event correlated to that request. Leave a cell blank when no authorised evidence is available. An empty cell tells you what to request next instead of giving a false pass.

Observed symptomStart with this comparisonEvidence still needed
Name lookup from one client returns another addressCompare the selected resolver, enabled address families and timingA test to the intended service using the expected name
Both clients connect, but one reports a certificate identity errorCompare the hostname actually sent and frontend certificate configurationA clean validation result through the authorised client path
General page works; course page has unexpected contentRead the relevant listener rule, matching host and exact pathThe selected backend’s application response and request record
Frontend returns a gateway error for the course requestCheck group health and backend listener configurationThe actual backend leg and a corresponding backend log if it reached the app

Walk one row through the diagram. The public listener returns a gateway error at 11:32. This establishes that the client reached an HTTP responder. The target group has an outdated port in this fictional case, so no backend process answers there. Fixing the browser's local resolver would make no difference while it still reaches the responding frontend. The relevant verification is to compare the actual configured target port with the approved service listener and then confirm the end-to-end request. In an AWS environment, do so with the resource owner under the lab's change process.

Consider a second scenario where a correctly configured backend returns a missing-resource response for /classes/schedule. The frontend can route the request correctly and the backend can still lack that route. The indicator is an application-level result tied to the expected responder. A health check for /health need not catch this particular missing route. Test both and attach the distinct results to the handoff. A good worksheet distinguishes “running”, “healthy under this probe” and “returned the classroom operation’s intended response.”

Use this same method when a new proxy introduces another connection. Write the host and port known to the browser on one side, and the target address and service port known to the proxy on the other. Compare both before treating a timeout as evidence of which component is down. Consider whether name resolution occurs on the original client or in a proxy. A diagram containing the whole path is useful when the observations can be matched to specific arrows.

Select evidence from the correct observation point

A client log and a service log answer different questions about the same attempt. Browser or curl output can show whether the client obtained a name, connected, validated the peer and received a response. A listener log or proxy record can show which rule or backend handled a request if the service records that information. An application log can show how the backend interpreted a request that reached it. Choose the evidence that matches the missing decision and use an approved read path for each record.

VPC Flow Logs provide network flow evidence for supported interfaces and traffic. Depending on the record format, you can see fields such as the observed source and destination addresses, ports and whether recorded traffic was accepted or rejected. The record does not contain the full web message or a certificate validation decision. An aggregate and its time interval also may not pinpoint one HTTP request in a busy service. Use request timing, the configured network context and application logs to correlate carefully. Avoid treating a network record as proof of an individual application result.

Draw the evidence across an address translation boundary. Before translation a private instance opens an outbound connection. After translation an external observer can see a different source address or port reflecting the configured mapping. A later application can answer the request through that path. Both sides' records may describe the same flow in different terms. If a team compares two observations without noting the translation or proxy boundary, it can incorrectly conclude that only one is valid. Mark where the address changed before deciding which values should match.

Test design matters as much as the tool. Use one benign request to the exact intended service from a known source, then compare a second client only when you need that different source. If a route was intentionally unavailable to other clients, keep that denied path as a separate negative test. Document what you expect from each observation before running it. The result can then support a conclusion other engineers can verify without exposing any private endpoints or broadening access.

Add a CDN to the design without folding the connections together

Consider a public course listing served through CloudFront. A learner requests a classroom stylesheet through a distribution. The edge can return a cached response when the cache rules and result allow it. For a request that needs the origin, the edge makes a separate origin-side exchange. The origin could be an ALB with its own listener and backend. Draw the edge and ALB as two boxes with a named origin request between them. A diagram of the browser’s connection alone leaves out both the origin and its actual application.

After replacing a lab stylesheet, the browser shows an old version while an authorised origin test shows the updated file. The observation that both requests succeeded is important. The divergence can come from the selected cache key and freshness policy. Compare the exact viewer URL, origin object key and response evidence. If the new file was uploaded under a new path, compare the path the HTML asked for with the one you tested. If it changed at the same path, investigate freshness and invalidation under the lab’s approved procedures. None of these early checks requires replacing the transport listener.

Now suppose the edge shows an HTTP failure from one request when its origin is unavailable, but other cached resources still work. A healthy browser-to-edge connection can coexist with a failing origin request and a successful edge cache hit. A single success check can therefore be misleading if it uses only a resource already at the edge. Pick one known approved request whose origin fetch you need evidence for and compare the expected output. Keep the cache behavior and source checked in the design rather than forcing every case into a single Layer 7 box.

Compare outbound NAT with a client's inbound connection

A student says the private practice backend successfully fetched software updates, so it should be possible to connect to that backend directly from a public client. Draw the outbound update request from the private subnet. An eligible default route can send it toward a public NAT gateway, which supports selected outbound internet access through its own configured route. The outbound path and its tracked return do not turn the private service into a public listener. Management traffic and application ingress require their own intended access paths.

Compare the two drawings without changing the lab. For the outbound update path, identify the private source, route toward NAT, onward route and approved destination. For incoming user requests, identify the public frontend, its allowed caller, and the backend path the frontend initiates. Working outbound checks provide evidence for the first arrangement. To test authorised inbound service, follow the intended hostname and frontend route while keeping the backend private. A successful server update and a denied direct port test can both be desired outcomes.

The distinction is useful in interviews. Avoid saying that a NAT gateway “puts the private subnet on the internet” without explaining the direction and mapping. Avoid saying a public IPv4 address is the complete public-access design. Instead describe which participant creates the connection and which configured path permits its traffic. Tie the answer to the application outcome and the deliberate boundary. A working route to a package server is a different observation from a load balancer forwarding an application request to a private instance.

Lab with a frontend that remains reachable when its backend stops

This lab models two independent HTTP connections on one training computer. It uses command-line curl, Python 3 and three terminals on the same Linux or macOS environment. Students using Windows can use an available Linux training session. The listener bindings are limited to loopback. There are no cloud resources and no real user data. Use this fixture to understand a proxy’s evidence, not as a production web server or a recreation of a specific load balancer.

Before running the code, predict three separate results. The frontend’s own health route should answer whether or not the backend is running. Its workshop route should return backend content if the backend answers the request. When the backend is stopped and the frontend is still running, the frontend should return the gateway error coded for that case. In every case the client talks to the same loopback address and frontend port. The difference comes from the route and the backend leg.

Start the backend

In terminal A create a temporary folder and put one training message in the file named below. Serve it on port 8091 bound to loopback. The process runs in the foreground. If that port is already in use, choose another unused port and use it in the backend command, the frontend URL and any backend checks. Keep the directory variable in this terminal for cleanup.

MODEL_DIR=$(mktemp -d)
printf 'Schedule served by the practice backend\n' > "$MODEL_DIR/workshop.txt"
python3 -m http.server 8091 --bind 127.0.0.1 --directory "$MODEL_DIR"

Read the printed address and port. If Python fails to start, do not continue guessing which service responded. Resolve the local port conflict or check your approved lab tooling. A public bind would test a different path and is unnecessary. You will later stop this one process while leaving the other terminal untouched. That is how you isolate the backend failure.

Start the fixed frontend

In terminal B use the short frontend below. Its local health route produces a text reply inside the process. Its workshop route tries one fixed backend URL. All other requests are rejected as missing paths. The forwarding target is deliberately fixed on loopback, and the URL client inside the frontend is configured to avoid any system proxy. If you change the local frontend port to avoid a collision, change the later curl URLs to match it. Keep all listens on loopback.

python3 - <<'PY'
from http.server import BaseHTTPRequestHandler, HTTPServer
from urllib.error import URLError
from urllib.request import ProxyHandler, build_opener

backend = "http://127.0.0.1:8091/workshop.txt"
local_client = build_opener(ProxyHandler({}))

class PracticeFront(BaseHTTPRequestHandler):
    def text_reply(self, status, body):
        self.send_response(status)
        self.send_header("Content-Type", "text/plain; charset=utf-8")
        self.send_header("Content-Length", str(len(body)))
        self.end_headers()
        self.wfile.write(body)

    def do_GET(self):
        if self.path == "/health":
            self.text_reply(200, b"Frontend process is responding\n")
        elif self.path == "/workshop":
            try:
                with local_client.open(backend, timeout=2) as response:
                    data = response.read(1024)
                self.text_reply(200, data)
            except (URLError, TimeoutError):
                self.text_reply(502, b"Practice backend could not answer\n")
        else:
            self.text_reply(404, b"Unknown practice path\n")

with HTTPServer(("127.0.0.1", 8090), PracticeFront) as httpd:
    print("Frontend on 127.0.0.1:8090", flush=True)
    httpd.serve_forever()
PY

The example translates a failed backend attempt into a gateway response so the two connections are easy to distinguish. In a real managed load balancer, response codes are chosen according to product behavior and the nature of the failure. Do not infer that all outages necessarily yield this one code. Instead ask which software sent the observed response. The small fixture prints a log of each HTTP response the frontend sends. The backend terminal prints any requests that reached it.

Measure both legs, then stop only the backend

In terminal C run the two client-side requests. Confirm both use port 8090. The first response should contain the frontend's own readiness sentence. The second should contain the workshop text from the backend. Verify that the backend log in terminal A includes a request for /workshop.txt. The frontend received /workshop as its own route. This distinction gives you a visible application decision between the two transport connections.

curl --noproxy '*' --connect-timeout 3 -sS -i http://127.0.0.1:8090/health
curl --noproxy '*' --connect-timeout 3 -sS -i http://127.0.0.1:8090/workshop

Now stop only the backend in terminal A with Ctrl+C. Keep the frontend process running in terminal B. Repeat both requests in terminal C. The health path should continue to say the frontend process is responding. The workshop path should now return HTTP 502 with the fixture's gateway message. This experiment preserves every frontend transport value while changing the state of a program on the second leg. Draw an arrow marking each working or missing result.

For one more comparison, stop the frontend too and repeat the health request. The client should get a connection failure before an HTTP status appears, provided the port is free. A connection failure and an HTTP gateway response are different observations. If the expected result differs, check all three terminal contexts, known ports and process outputs. Restart only the local test service you control if you need to repeat a step.

Both Python processes can be stopped from their respective terminals. In terminal A verify the temporary directory variable and then remove only the practice file and empty folder. Terminal B’s inline Python fixture creates no file. Keep a short result table bearing the request, expected response, actual response, and whether the backend saw a request. If cleanup reports a nonempty directory, inspect what is present and leave anything unrelated untouched.

printf '%s\n' "$MODEL_DIR"
rm -- "$MODEL_DIR/workshop.txt"
rmdir -- "$MODEL_DIR"

Paper exercise for state and layered rules

Set up a fictional VPC with a front service in an approved public subnet and a target in a private subnet. The client reaches the front listener on TCP port 443. The front makes its approved backend request to TCP port 8080. The guest program answers on port 8080 only. Draw four arrows covering each request and its response. Write a made-up temporary port at each connection source and reverse the source and destination for its response. Mark the appropriate route and security controls for each arrow.

Run through a failed return example. The front listener can otherwise select the intended target group, but a subnet ACL for the backend leg was written to allow only port 8080 in both directions. On the return leg, the backend source is the listening port, while the frontend's temporary port is the destination. Under the fictional rule the return fails. A stateful security group and a stateless ACL do not automatically make the same decision. Explain which destination range the return packet would need to match under the intended policy. Keep the allowed sources and path appropriate to the exercise.

Run through a failed application example with the security policy fixed on paper. Both transport exchanges finish, but a request for a course path returns the default welcome result. The right next check is the listener's HTTP matching, which can use the path or host. You can validate that result with two differently marked pages. One associated target group might have a passing health check even while the path sends the request elsewhere. Identify which route, protocol, rule or application result you would need to read next in each scenario.

Record the expected behavior of a direct request to the private target from an unrelated network. It should fail in the intended design. The successful frontend result and the intentionally unavailable direct path are both test cases. In a real practice account, use approved source and target resources and inspect the configuration before making any changes. No resources were created by this paper exercise and there is nothing to delete. Preserve just the redacted diagram and desired outcomes.

Questions for a design review and interview

Can you name a device's layer from the type of product it is?

Describe the action first. A routing action can work with IP, while a firewall rule can also look at transport protocol and port. An AWS load balancer offers different capabilities by listener type and configuration. An HTTP rule responsible for host or path selection is an application-layer decision. The physical implementation can perform additional jobs and need not have one fixed label.

Why might an ALB return an error while its public TLS endpoint works?

The public connection can reach the load balancer and complete TLS before the load balancer connects to a target. The target-side protocol, port, path, access and software availability are separate conditions. The local frontend fixture demonstrates this separation. Ask whether the backend actually received the selected route before treating a public certificate or DNS result as evidence of backend health.

How do four-layer and five-layer TCP/IP drawings differ?

The five-layer version often splits physical work from local data-link work. In the four-layer version these lower responsibilities are collected under link. The remaining roles still include internet addressing, endpoint transport and application exchange. Specify the model you are using and anchor the answer in a concrete protocol and stage.

Why should you inspect both directions of a network ACL when a security group looks correct?

The security group uses stateful tracking for allowed connections. A network ACL applied at subnet level evaluates input and output rules without that connection state. The response packet may use the client's temporary port as its destination. Check the rules applicable to the actual subnet path rather than duplicating the server's port in both directions without reading the packet values.

Quick quiz

The browser reaches a named frontend and receives a gateway error. Which statement follows: no transport could possibly have connected, some HTTP responder sent an error, or every backend is healthy?

Check your answer

Some HTTP responder sent an error. The next useful check is which responder issued it and whether its target-side connection succeeded. Our controlled fixture returned a meaningful HTTP error after its backend stopped.

You need a listener to choose a group from a URL path. Should you use the IP route table's destination prefix, an HTTP-aware listener rule, or a rule based only on the incoming port?

Check your answer

An HTTP-aware rule. The path is application information. IP-prefix and port choices are useful for other decisions, but they do not supply the path-based behavior described here.

A client source port is 52000 and the server's destination port is 443. Which destination port should the response in the same transport exchange ordinarily address?

Check your answer

52000 at the client side. Reverse the original transport endpoints when following the reply. A proxy can create another exchange with its own endpoint values, so make sure you are reading the response for the same leg.

Revision cards

Crosswalk

Layers explain different responsibilities in each diagram. In the four-layer view, link collects the two bottom jobs while application collects many upper responsibilities.

Two connections

Record frontend success separately from backend success. A proxy can send its own response, including failure information, to the original client.

Stateful and stateless

Stateful filters can track an allowed flow. Stateless subnet rules evaluate request and response according to the configured direction and packet values.

Useful evidence

Match the observation to the point that made the decision. Flow Logs, listener configuration and application logs each answer different questions.

Primary references

Quick revision cards

Revise this lesson in two minutes. Save the cards on your phone or download them as PNG files. The QR code on each card opens its lesson.

Comparison card: OSI model vs TCP/IP model. OSI model: A teaching model that splits networking into steps. TCP/IP model: The model the real internet runs on.
Comparison: OSI model vs TCP/IP model · Download PNG

More cards: Ravi Sir's Cards.