Fundamentals 66 min read

Comprehensive Guide to Computer Networking Fundamentals: Layers, Protocols, and Technologies

This extensive guide covers the fundamental concepts of computer networking, including the definitions of links, nodes, protocols, services, PDU layers, network topologies, performance metrics, OSI/TCP‑IP models, routing protocols, security mechanisms, wireless LANs, and many essential networking terms and commands.

MaGe Linux Operations
MaGe Linux Operations
MaGe Linux Operations
Comprehensive Guide to Computer Networking Fundamentals: Layers, Protocols, and Technologies

Chapter 1 Overview

Basic Concepts

Links, Nodes, Protocols, Services, Entities, Peer Entities, and PDU of Each Layer

Link: a connection between nodes, which can be copper cable, fiber, satellite, etc.

Node: a computer, hub, switch, router, etc.

Protocol: communication rules between peer entities, defining message format, meaning, order, and actions; consists of syntax, semantics, and timing.

Service: a layer provides services to the layer above and uses services from the layer below.

Entity: any hardware or software process that can send or receive information.

Peer Entity: two entities at the same layer that communicate with each other, processing the same PDU.

PDU of each layer: the data unit transmitted between peer layers.

- C/S Model, B/S Model, P2P Model

C/S Model: client‑server; client requests services, server provides them; client must know server address.

B/S Model: browser‑server; browser accesses web server which connects to databases like SQL Server or MySQL.

P2P Model: peer‑to‑peer; each host acts as both client and server; essentially a C/S model.

LAN, WAN, MAN, PAN Classification

LAN, WAN, MAN, PAN are classified by network scope: WAN (tens to thousands of km), MAN (5‑50 km), LAN (≈1 km), PAN (≈10 m).

Network Performance Parameters: Rate, Bandwidth, Throughput, Delay, RTT, Channel Utilization

Rate: transmission speed, measured in bit/s.

Bandwidth: maximum data rate a channel can carry, measured in bit/s.

Throughput: actual data rate achieved between sender and receiver, in bit/s.

Delay: time for data to travel from one end of the network to the other.

Transmission delay: frame length (bits) / transmission rate (bit/s).

Propagation delay: distance (m) / propagation speed (m/s).

Processing delay: time routers/hosts need to process a packet.

Queueing delay: time a packet waits in a router's queue.

RTT: total time from sending a packet to receiving its acknowledgment.

Channel utilization: proportion of time the channel carries data; higher utilization can increase delay.

Edge Part : various end systems such as hosts, phones, supercomputers; located at the network edge and run applications. Core Part : interconnected routers; key functions are routing and forwarding; switches forward within a subnet, routers forward between subnets.

Circuit Switching and Packet Switching, Datagram Switching, Virtual Circuit Switching Characteristics

Circuit Switching: classic telephone network; resources are exclusively reserved; three phases – call establishment, communication, call release; uses multiplexing to share a link.

Packet Switching: messages are divided into packets; each packet gets a header with control info; packets are independently routed and reassembled at the destination.

Datagram Switching: entire message is sent to the next node, which looks up a forwarding table and forwards it.

Virtual Circuit Switching: a logical path is established first; each packet carries a virtual circuit identifier instead of a destination address.

4. TCP/IP Architecture – Data Encapsulation and Decapsulation

TCP/IP Architecture

Data Encapsulation and Decapsulation

Note that the link layer adds both a header and a trailer.

Chapter 2 Physical Layer

Signal Coding: NRZ (Non‑Return‑to‑Zero) and Manchester coding.

NRZ: 1 is high level, 0 is low level. Manchester: 1 starts high then transitions low; 0 starts low then transitions high.

Factors affecting signal distortion: transmission rate, distance, medium, noise.

When the transmission rate exceeds a certain limit, inter‑symbol interference occurs.

Transmission media: twisted pair, coaxial cable, single‑mode and multimode fiber, wireless media.

Twisted Pair : consists of four twisted pairs (8 wires). Types: unshielded (UTP) and shielded (STP). Straight‑through cable when both ends use the same T568A/B standard; crossover cable when ends use different standards.

Coaxial Cable :

50 Ω coaxial cable is used for LAN/digital transmission.

75 Ω coaxial cable is used for cable TV/analog transmission.

Fiber (Single‑Mode & Multi‑Mode) :

Core and cladding with different refractive indices; light propagates by total internal reflection.

Multi‑mode: short distance, multiple propagation modes, uses LED.

Single‑mode: long distance, small core, uses laser.

Multiplexing techniques: frequency division, time division, statistical time division, wavelength division, code division.

Frequency Division Multiplexing (FDM): each user occupies a fixed frequency band for the entire communication period.

Time Division Multiplexing (TDM): time is divided into equal slots; each user transmits in its assigned slot.

Statistical TDM: slots are allocated dynamically based on demand.

Wavelength Division Multiplexing (WDM): multiple optical carrier signals are transmitted over a single fiber.

Code Division Multiple Access (CDMA): users use orthogonal codes; strong anti‑interference and security.

Chapter 3 Data Link Layer

Understanding the role of the data link layer and three basic questions.

Link: a physical segment between adjacent nodes.

Data link: link plus communication protocol.

Data link layer is required in hosts and routers.

Functions: framing, transparent transmission, error detection (CRC).

CRC: the sender appends a CRC code computed over the data; the receiver recomputes and checks for zero remainder.

PPP Frame Format (illustrated in image).

In PPP frames, the flag field (F) marks start and end; A and C fields are control; the protocol field indicates the payload type.

Zero‑bit stuffing and byte stuffing methods are described for transparent transmission.

LAN, Broadcast, and Collision Domains, VLAN, STP

Broadcast Domain : the set of stations that receive a broadcast frame. Collision Domain : the set of stations where frames can collide; only one station can transmit at a time. VLAN : virtual LAN that partitions a physical LAN logically. Spanning Tree Protocol (STP) : disables selected links to eliminate loops while preserving physical topology.

Chapter 4 Network Layer

Network devices: repeaters, hubs, switches, routers and their operating layers.

Repeaters and hubs operate at the physical layer; switches at the data link layer; routers at the network layer.

IP Address Classes A (0.0.0.0‑127.255.255.255), B (128.0.0.0‑191.255.255.255), C (192.0.0.0‑223.255.255.255), D (224.0.0.0‑239.255.255.255), E (240.0.0.0‑255.255.255.255).

Special IP addresses: network address (host bits all 0), broadcast address (host bits all 1), loopback (127.0.0.1), APIPA (169.254.x.x).

ARP : maps known IP addresses to MAC addresses; uses broadcast requests and unicast replies; caches results.

IP Datagram Format

Header length (4 bits), total length (16 bits), fragmentation fields (identification, flags, fragment offset), TTL (8 bits), protocol (8 bits), header checksum.

CIDR and Route Aggregation

CIDR notation: address/prefix length (e.g., 200.23.16.0/23). Route aggregation combines contiguous networks into a larger block using longest prefix match.

ICMP

Provides error reporting and network diagnostics (e.g., Destination Unreachable, Time Exceeded, Parameter Problem, Redirect). Used by ping and traceroute utilities.

RIP

Distance‑vector protocol; hop count as metric; maximum 15 hops (16 = unreachable); periodic updates every 30 s; suffers from slow convergence.

OSPF

Link‑state protocol; each router builds a complete topology map and runs Dijkstra’s algorithm to compute shortest‑path tree; areas reduce flooding.

BGP

External gateway protocol; finds reachable routes and applies policy; runs over TCP port 179.

IPv6

Basic header (40 bytes) plus optional extension headers. Fields: version, traffic class, flow label, payload length, next header, hop limit, source and destination addresses.

Address Representation : hexadecimal groups separated by colons; zero compression using ::; CIDR notation; URL syntax with brackets.

Transition Techniques : dual‑stack, tunneling.

IP Multicast

Multicast addresses are in class D (224.0.0.0‑239.255.255.255). Corresponding MAC addresses start with 01‑00‑5E.

IGMP manages group membership on local networks.

VPN

Uses tunneling to encapsulate IP packets; three types: intranet VPN, extranet VPN, remote‑access VPN.

NAT replaces private source addresses with a public address and maintains a translation table.

MPLS

Multi‑Protocol Label Switching assigns short labels to packets at ingress LSRs; forwarding is based on label lookup; supports traffic engineering and fast forwarding.

Chapter 5 Transport Layer

The transport layer provides end‑to‑end, process‑to‑process reliable communication for applications.

UDP and TCP Characteristics

UDP: connectionless, supports unicast/multicast/broadcast, no reliability, any sending rate.

TCP: connection‑oriented, reliable, ordered, flow control, congestion control, unicast only.

TCP Header

Fields: source/destination ports, sequence number, acknowledgment number, data offset, flags (URG, ACK, PSH, RST, SYN, FIN), window size, checksum, urgent pointer, options.

TCP Reliability

Timeout retransmission (RTO = SRTT + 4·RTTVAR), flow control using sliding windows, cumulative acknowledgments, piggybacking, and congestion control (slow start, congestion avoidance, fast retransmit, fast recovery).

TCP Connection Establishment and Termination

Three‑way handshake (SYN, SYN‑ACK, ACK) and four‑way termination (FIN, ACK, FIN, ACK).

Chapter 6 Application Layer

1) DNS

Maps domain names to IP addresses; hierarchical structure; four types of name servers: root, top‑level, authoritative, and local.

Iterative vs. recursive resolution; DNS caching on clients and servers.

2) FTP

File Transfer Protocol uses TCP; control connection on port 21, data connection on port 20; supports anonymous access via command‑line, browser, or dedicated client.

3) WWW Services – HTTP

HTTP provides request/response communication; URL syntax: protocol://host[:port]/path. Persistent connections and pipelining reduce latency. HTTP request line, headers, blank line, optional body; similar for responses. Cookies store client state; web documents can be static, dynamic (CGI), or active (client‑side scripts). Search engines: full‑text (Google, Bing, Baidu) and directory‑based (Yahoo, Sohu, NetEase).

4) Email

Components: client, server, SMTP for sending, POP3/IMAP for retrieval. MIME adds support for multimedia. SMTP uses TCP port 25; POP3 uses 110, IMAP uses 143.

5) DHCP

Dynamic Host Configuration Protocol assigns IP address, subnet mask, default gateway, DNS server. Four‑step process: DISCOVER, OFFER, REQUEST, ACK. Lease time, renewal at 50 % and 87.5 % of lease, release.

6) P2P File Distribution

Peers exchange chunks using tit‑for‑tat strategy; prioritize top‑4 fastest neighbors; random peer selection every 30 s.

7) Network Security

Common attacks: eavesdropping, tampering, malware, DoS. Symmetric encryption uses same secret key; asymmetric (public‑key) uses a key pair. Digital signatures provide authentication, integrity, non‑repudiation. Key distribution via KDC (Kerberos) or CA (PKI).

Chapter 7 Wireless LAN

Two WLAN types: infrastructure (with AP) and ad‑hoc (peer‑to‑peer). CSMA/CA with DIFS, SIFS, random backoff; possible hidden‑node collisions.

802.11 frame formats with up to four address fields.

Other Topics

Address Lengths

MAC: 6 bytes.

IPv4: 4 bytes.

IPv6: 16 bytes.

Port: 2 bytes.

Header Lengths

Ethernet frame header+trailer: 18 bytes.

IPv4 header: 20 bytes + options (0‑40).

IPv6 basic header: 40 bytes.

Error Checking

Frame CRC using polynomial division.

IPv4 header checksum (ones‑complement sum).

UDP checksum includes pseudo‑header.

TCP checksum similar to UDP but covers TCP length.

Routing Technologies

RIP: distance‑vector, hop count metric, max 15 hops.

OSPF: link‑state, Dijkstra algorithm, areas.

BGP: path‑vector, inter‑AS routing.

MPLS: label‑switched paths for fast forwarding.

Data Switching

Circuit switching: dedicated path, call setup/teardown.

Message switching: store‑and‑forward whole messages.

Packet switching: divide messages into packets, independent routing.

TCP vs UDP

TCP: connection‑oriented, reliable, ordered.

UDP: connectionless, best‑effort.

IPv4 vs IPv6

IPv6 offers larger address space, simplified header, built‑in security, better support for QoS.

Differences: fixed header length, removed fields (checksum, options), new fields (traffic class, flow label).

P2P vs C/S

P2P: peers act as both client and server.

C/S: distinct client (requester) and server (provider).

Search Engines

Full‑text: Google, Bing, Baidu.

Directory‑based: Yahoo, Sohu, NetEase.

CSMA/CD vs CSMA/CA

CSMA/CD: carrier sense, collision detection (wired Ethernet).

CSMA/CA: carrier sense, collision avoidance (wireless).

Network Attack Types

Worms, Trojans, logic bombs, backdoors, rogue software, eavesdropping, DoS attacks.

Common Commands

ipconfig /all, /displaydns, /flushdns, /release, /renew.

ping -n count, -l size, -t.

tracert.

arp -a, -d, -s.

Key Terminology

ISP, IXP, hub, LAN, MAN, WAN, WLAN, VLAN, P2P, C/S, CSMA/CD, CSMA/CA, LiFi, WiFi, ADSL, HFC, FTTH, URL, VPN, IPSec, NAT, ICMP, IGMP, MSS, BGP, AS, HTTPS, MPLS, AP, SSID, AdHoc, blockchain.

Source: 入门小站 (© original author, all rights reserved).

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.

TCP/IPComputer 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.