Fundamentals 25 min read

Understanding Computer Networks: Basics, OSI Model, TCP/UDP, and DNS Explained

This comprehensive guide introduces computer networks, covering their definition, core hardware and software components, functional roles, classification, the OSI seven‑layer model, detailed TCP and UDP protocols, DNS operations, and the step‑by‑step process of a user accessing a website.

MaGe Linux Operations
MaGe Linux Operations
MaGe Linux Operations
Understanding Computer Networks: Basics, OSI Model, TCP/UDP, and DNS Explained

Computer Network Overview

Computer networks connect multiple computers and external devices across different locations via communication lines, enabling resource sharing and information exchange under the management of network operating systems, management software, and communication protocols.

Basic Components

Hardware

Computers (servers and clients) – servers provide shared resources and services, while clients use them.

Network Interface Cards – convert data between the computer and the transmission medium.

Transmission Media – physical channels such as twisted pair, coaxial cable, fiber optics, and wireless media.

Network Interconnection Devices – repeaters, bridges, routers, and gateways for extending and linking networks.

Software

Network Operating Systems – core software (e.g., Windows Server, Linux, Unix) that manages resources and provides unified services.

Network Communication Protocols – rules for data format, transmission, error handling, spanning physical, data link, network, transport, and application layers (e.g., TCP/IP).

Network Management Software – tools for monitoring, configuring, and securing the network.

Functions

Resource sharing – sharing hardware, software, and data resources across devices.

Data communication – transmitting text, images, audio, video, etc., via email, instant messaging, etc.

Distributed processing – dividing tasks among multiple computers for faster execution.

Reliability – using redundancy and backup mechanisms to ensure continuous operation.

Classification

By Geographic Scope

LAN – local area network, limited to a building or campus.

MAN – metropolitan area network, covering a city or region.

WAN – wide area network, spanning countries or the globe.

By Topology

Bus – all devices share a single communication line.

Star – devices connect to a central hub or switch.

Ring – devices form a closed loop.

Tree – hierarchical structure combining multiple star segments.

Mesh – devices interconnect with multiple paths for high reliability.

OSI Model

The OSI model divides network communication into seven layers, each with specific responsibilities.

Physical Layer

Handles raw bit transmission over the physical medium.

Data Link Layer

Encapsulates data into frames and adds MAC addresses.

Network Layer

Routes packets using IP addresses.

Transport Layer

Provides end‑to‑end data transfer, supporting reliable (TCP) and unreliable (UDP) services.

Session Layer

Manages session establishment, maintenance, and termination.

Presentation Layer

Handles data format conversion, encryption, and decryption.

Application Layer

Offers network services such as HTTP, HTTPS, SSH, FTP, DNS, etc.

TCP and UDP Protocols

TCP (Transmission Control Protocol)

Connection‑oriented, reliable, byte‑stream protocol defined in RFC 793.

TCP Packet Structure

TCP packet structure
TCP packet structure

Sequence Number (Seq) – 32‑bit identifier for each segment.

Acknowledgment Number (Ack) – confirms receipt (Ack = Seq+1).

Flags – URG, ACK, PSH, RST, SYN, FIN indicating control functions.

TCP Features

Connection‑oriented (three‑way handshake).

Reliable transmission with acknowledgments, retransmission, and ordering.

Byte‑stream oriented.

UDP (User Datagram Protocol)

Connection‑less, simple, unreliable protocol used for low‑latency applications.

UDP Packet Structure

UDP packet structure
UDP packet structure

No connection setup; each datagram contains source/destination ports, length, and checksum.

Supports unicast, multicast, and broadcast.

TCP vs UDP Comparison

Feature

UDP

TCP

Connection type

Connectionless

Connection‑oriented

Reliability

Unreliable

Reliable

Speed

Fast

Relatively slower

Data unit

Datagram

Byte stream

Communication type

Unicast, multicast, broadcast

Unicast

Typical use cases

Real‑time video, DNS queries

File transfer, web browsing, email

DNS (Domain Name System)

DNS maps human‑readable domain names to IP addresses, providing name resolution, load balancing, and fault‑tolerance.

DNS Functions

Name resolution – converting domain names to IP addresses.

Load balancing – distributing traffic across multiple servers.

Fault tolerance – redirecting requests to backup servers when failures occur.

DNS Resolution Process

Check local DNS cache.

Check the hosts file.

Query the local DNS server.

If needed, the local server queries root servers, then top‑level domain servers, then authoritative name servers to obtain the final IP address.

The result is returned to the client and cached locally.

DNS Query Commands

Windows:

ipconfig /displaydns
ipconfig /flushdns

Linux:

dig example.com
dig +trace example.com

User Accessing a Website – Simplified Process

Client sends an HTTP request.

DNS resolves the domain name to an IP address (checking cache, hosts file, local DNS, root, TLD, and authoritative servers).

TCP three‑way handshake establishes a connection (SYN, SYN‑ACK, ACK).

Server processes the request and returns an HTTP response.

TCP four‑way handshake terminates the connection (FIN, ACK exchanges).

This overview provides a foundational understanding of computer networking concepts, protocols, and the typical workflow of web communication.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

TCPDNSUDPnetwork fundamentalsComputer Networks
MaGe Linux Operations
Written by

MaGe Linux Operations

Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.