Skip to main content
⚡ OpenDevDocs
Networking
networkingnetworkingCore ConceptBeginner

What is a Computer Network?

Understand computer networking, packets, OSI 7-layer model, and TCP/IP protocol suite for modern software developers.

Verified: 2026-09-30
Platforms:
webnodelinux
#networking#osi-model#tcp-ip#packets#architecture

Overview

A Computer Network is a collection of interconnected computing devices (nodes) that communicate and exchange data using standardized protocols.


How Data Moves: Packets

Information transferred across the internet is not sent as one continuous stream. Large payloads (files, images, web pages) are sliced into smaller units called Packets. Each packet contains:

  1. Header: Metadata including Source IP, Destination IP, sequence number, and protocol type.
  2. Payload: The actual application data slice.
  3. Trailer / Checksum: Error detection bits to verify data was not corrupted in transit.

The OSI 7-Layer Model vs TCP/IP Model

The OSI Model describes network communication across 7 conceptual layers, while the practical TCP/IP Model condenses this into 4 functional layers:

Layer #OSI Layer NameTCP/IP LayerPrimary RoleKey Protocols / Examples
7ApplicationApplicationHigh-level user & app protocolsHTTP, HTTPS, SSH, DNS, WebSockets
6PresentationData formatting, TLS encryptionJSON, TLS/SSL, Gzip, UTF-8
5SessionManages persistent connectionsSockets, RPC sessions
4TransportTransportEnd-to-end reliability & portsTCP, UDP, QUIC
3NetworkInternetRouting packets between hostsIP (IPv4/IPv6), ICMP, BGP
2Data LinkNetwork AccessPhysical frame delivery on local linkEthernet, Wi-Fi (802.11), MAC addresses
1PhysicalRaw bit transmission over cables/radioFiber optics, copper cables, radio signals

Encapsulation & Decapsulation

When a developer calls fetch("https://api.example.com"):

  1. Application Layer: Generates the HTTP request string.
  2. Transport Layer: Wraps HTTP string into TCP segments with source and destination ports.
  3. Network Layer: Wraps TCP segment into IP packets with source and destination IP addresses.
  4. Data Link Layer: Wraps IP packet into Ethernet frames with MAC addresses.
  5. Physical Layer: Converts frames into electrical voltages or light pulses over wire.

Upon reaching the server, the reverse process (Decapsulation) extracts the payload back up to the web server.

On this page