Computer Networks

What is Networking?

Independent machines exchanging messages over a shared, unreliable medium.

Level: beginner

What is it?

Computer networking connects independent systems so they can exchange data using agreed formats and protocols. Data crosses links and intermediate devices, while addressing, routing, transport, and application protocols handle different parts of delivery.

Why does it matter?

A network lets applications communicate without sharing memory or physical hardware. It also introduces delay, packet loss, reordering, partial failure, security boundaries, and the need to define what happens when a peer is unavailable.

Mental model

Treat the network as a message path where each hop may delay or drop data. Protocol layers create contracts: local delivery on a link, routing between networks, transport between processes, and application meaning.

How it works

  • Link technologies transfer frames across one local segment; switches forward them using link-layer information.
  • IP addresses identify interfaces for routing across networks; routers choose next hops.
  • Transport protocols such as TCP and UDP carry data between application endpoints using ports.
  • Applications define their own request and response formats, timeouts, retries, and authentication.
  • A timeout tells you a response was not observed in time; it does not prove the remote operation never happened.

Steps

  • A browser resolves a hostname to an IP address using DNS.
  • It opens a transport connection to the destination service.
  • Packets traverse local links and routers toward the server.
  • The application exchanges messages and handles errors, delays, or retries.

Real-world usage

  • Debugging connectivity from DNS through TCP/UDP to application protocols.
  • Explaining the difference between latency, bandwidth, loss, and throughput.
  • Designing robust client behavior for timeouts and partial failures.

Common mistakes

  • Assuming that a timeout means the server did not process a request.
  • Confusing a local MAC address with an end-to-end IP address.
  • Retrying non-idempotent operations without an idempotency key or deduplication strategy.

Interview questions

Why does a network protocol need more than an address?

Endpoints also need delivery rules, message formats, sequencing/reliability where required, and application semantics; an address alone does not describe the communication.

What does a client timeout prove?

Only that the client did not observe completion before its deadline; the server may have completed the request and the response may have been delayed or lost.

Related concepts

Continue learning

Browse the full computer science library