Networking Engineering / NETWORK FOUNDATIONS & IP ROUTING / NET-001

Suggested study path · Step 1 of 3 · G1

Request Path

Explore concept graph

Materi

Tujuan: kamu bisa menelusuri satu request POST /transfers dan membuktikan di mana enam kegagalan berbeda terjadi.

Mulai: gambar empat lapisan HTTP → TCP → IPv4 → Ethernet. Ini urutan data saat dikirim pada contoh HTTP/1.1 melalui TCP/IP di jaringan Ethernet, bukan susunan universal semua versi HTTP.

Mengapa perlu?

Log controller yang kosong bukan bukti bahwa backend tidak bermasalah; bisa saja request gagal pada nama host, interface, routing, firewall, TCP listener, atau proxy. Sebaliknya, kode 503 yang diterima client sudah merupakan sebuah respons HTTP dari origin atau intermediary.

Peta konsep statis. Ikuti alur teks dari atas ke bawah.
POST /transfers  [HTTP/1.1]
         ↓ encapsulation
TCP connection / stream
         ↓
IPv4 datagram ── router / filter ── next hop
         ↓                                 ↓
Ethernet frame (link A)          Ethernet frame (link B)
                                           ↓
                            [HTTP proxy / LB, optional]
                                           ↓
                              Backend HTTP handler
                                           ↓
                        HTTP response OR transport error

Pelajari mekanismenya

Konsep 1 / 3

Explain the role of each boundary in an HTTP request without mistaking an OSI diagram for a wire trace.

When POST /transfers fails, a status code exists only if some HTTP component replies. The first task is to locate the boundary of failure.

Mulai dari sini

Draw four boxes in order: HTTP application, TCP transport, IP internet, and Ethernet link; add one arrow for outgoing data.

Intuisi utama

The layers are a reasoning map: HTTP supplies request meaning; TCP supplies a byte-stream connection in this example; IP selects packet delivery toward a destination; a local link carries frames toward the next hop.

RFC 1122 describes link, internet and transport layers, with application protocols above them. The model is useful but not an implementation mandate. This lesson uses HTTP/1.1 over TCP/IPv4/Ethernet as a bounded example. HTTPS adds security and HTTP/3 uses a different transport; therefore this stack must not be universalized.

Contoh bertahap

A browser or CLI posts a JSON transfer to api.example.test via an HTTP/1.1 origin.

  1. Label the request POST /transfers and the intended HTTP target.

    Mengapa: The method and target identify application semantics.

    Hasil yang diharapkan: HTTP is the application-layer message, not a router command.

  2. Add TCP, then IP, then Ethernet below HTTP for the outbound request.

    Mengapa: Each layer transports the payload of the layer above in this example.

    Hasil yang diharapkan: The outgoing stack reads HTTP → TCP → IPv4 → Ethernet.

  3. Reverse the order on the receiving host.

    Mengapa: The receiver removes lower-layer framing before parsing the application message.

    Hasil yang diharapkan: The inbound stack reads Ethernet → IPv4 → TCP → HTTP.

Konsep 2 / 3

Trace the client, router and server roles for POST /transfers and explain what changes at a hop.

A transfer request can fail before it arrives at the backend. Looking only at the controller hides the router or TCP boundary.

Mulai dari sini

Write Client → Router → Server and mark the destination IP that each routing decision concerns.

Intuisi utama

A router forwards IPv4 datagrams using IP addressing; the frame that carries an IP packet is scoped to a link. A TCP session is maintained by communicating endpoints, not by every intermediate router.

RFC 791 describes IP datagrams, addresses and routing through gateways. RFC 9293 defines connection state and data transport at the endpoints. In common Ethernet routing, a frame is replaced on each hop even though the routed packet continues toward its IP destination; NAT or gateways can also transform headers. A packet may be dropped before any HTTP code runs.

Contoh bertahap

POST /transfers travels across one IPv4 router to a remote API.

  1. Show a client choosing a destination IP and next hop.

    Mengapa: An IP packet must be directed toward a host reachable through a network path.

    Hasil yang diharapkan: IP destination identifies the target origin or gateway, not the HTTP path /transfers.

  2. Draw a new link frame for the router's outgoing interface.

    Mengapa: Ethernet delivery is local to each directly connected link.

    Hasil yang diharapkan: A frame addresses the next hop; the router forwards the IP datagram.

  3. Show the server TCP endpoint receiving bytes and its HTTP handler parsing the request.

    Mengapa: TCP delivers a stream to the server endpoint; only an HTTP participant interprets the method and target.

    Hasil yang diharapkan: POST /transfers is interpreted at the receiving HTTP server or intermediary.

Konsep 3 / 3

Classify six request failures by boundary and produce an observable diagnostic for each.

A remote API can be broken in several ways. Treating all failures as HTTP 500 wastes incident-response time and may hide network exposure or readiness issues.

Mulai dari sini

Label a 503 HTTP response separately from ECONNREFUSED and write what each one proves.

Intuisi utama

An HTTP status is an application-protocol message received from an origin or intermediary. A DNS, link, routing or TCP setup failure can stop the exchange before any HTTP response exists.

A practical six-case taxonomy is: (1) name lookup fails, (2) link/neighbor reachability fails, (3) IP route unavailable, (4) firewall policy blocks the flow, (5) TCP listener refuses the connection, and (6) an HTTP component returns a 5xx response. Cases 1–5 are not automatically HTTP responses; a gateway might generate an HTTP error on behalf of a failed upstream, so record who emitted the status. Use DNS tools, route/interface inspection, firewall policy/logs, listener checks and HTTP response inspection as distinct evidence. The bundled Node fixture verifies only locally generated 201/503 responses versus a refused TCP connection; it does not emulate DNS, routing, or network firewalls.

Contoh bertahap

A local Node HTTP endpoint returns 201 on /transfers, 503 on /unavailable, then stops listening.

  1. Run node generation/fixtures/NET-001/request-path.mjs from the repository.

    Mengapa: The fixture starts a loopback server on an operating-system-assigned port and sends real HTTP requests.

    Hasil yang diharapkan: http-created=201 and http-unavailable=503.

  2. After the server closes, try a fresh TCP request to the same port.

    Mengapa: Without a listener the connection is refused before any HTTP response can exist.

    Hasil yang diharapkan: connect-error=ECONNREFUSED.

  3. Categorize each output as HTTP or transport.

    Mengapa: A numeric status code implies HTTP response handling; ECONNREFUSED is a connection error.

    Hasil yang diharapkan: Both status lines are HTTP responses; connect-error is not one.

Batas contoh

Fixture hanya menguji HTTP 201, HTTP 503 dan koneksi TCP yang ditolak. Ia tidak memalsukan capture Wireshark, DNS, routing, atau simulasi firewall. Untuk diagnosis produksi, gunakan observasi jaringan yang sebenarnya.

Sumber teknis

Sumber

Cross-domain connections

Curated relationships for this unit at G1. Proposed edges are suggestions, not prerequisites.

Concept connectionsG1 · 4 visible concepts · 4 curated links
100%

Dashed = proposed relationship; solid = reviewed connection. Only reviewed prerequisites constrain a learning path. Keyboard and text links remain available.