Comprehensive Guide to Computer Networking: From Physical Layer to Security
This extensive guide covers networking fundamentals across all OSI layers, detailing concepts such as links, nodes, protocols, PDU structures, network topologies, TCP/IP encapsulation, transport protocols, application services, security mechanisms, wireless LAN technologies, and key command‑line tools, providing a complete reference for students and professionals alike.
1. Overview
This document presents a systematic overview of computer networking, starting from basic concepts of links, nodes, protocols, and services, and progressing through the physical, data link, network, transport, and application layers, ending with security and wireless LAN topics.
2. Basic Concepts
Link : Physical connection between nodes (copper, fiber, satellite, etc.).
Node : Devices such as computers, hubs, switches, routers.
Protocol : Rules governing message format, meaning, order, and actions; includes syntax, semantics, and timing.
Service : Layer‑provided functionality to the upper layer.
Entity : Any hardware or software process that can send or receive information.
Peer Entity : Two entities at the same layer communicating with each other.
PDU : Protocol Data Unit exchanged between peer layers.
Network Models
C/S model (client‑server)
P2P model (peer‑to‑peer)
Network Types
LAN, WAN, MAN, PAN – classified by geographic scope.
Performance Parameters
Rate (bits/s)
Bandwidth (maximum data rate)
Throughput (actual data rate)
Delay (time to traverse the network)
Propagation delay = link length / signal speed
Processing delay
Queueing delay
Round‑trip time
Channel utilization (percentage of time the channel carries data)
3. Physical Layer (Chapter 1)
Signal encoding methods include Non‑Return‑to‑Zero (NRZ) and Manchester encoding. Transmission media are classified as:
Twisted‑pair (shielded/unshielded, straight‑through vs. crossover)
Coaxial cable (50 Ω for LAN, 75 Ω for TV)
Fiber optics (single‑mode for long distance, multimode for short distance)
Wireless media
Multiple access technologies: Frequency Division Multiplexing (FDM), Time Division Multiplexing (TDM), Statistical TDM, Wavelength Division Multiplexing (WDM), Code Division Multiple Access (CDMA).
Broadband access methods: ADSL (uses existing telephone lines with FDM), HFC (cable TV network with FDM), FTTH/FTTB/FTTC (fiber‑to‑the‑home, building, or curb).
4. Data Link Layer (Chapter 2)
Key functions:
Framing (adding header and trailer, using SOH/EOT delimiters)
Transparent transmission (bit stuffing to avoid delimiter patterns)
Error detection using CRC (calculate remainder, verify at receiver).
Point‑to‑point link protocols (PPP) – frame format includes flag fields, address, control, protocol, payload, and FCS. Bit‑stuffing and byte‑stuffing methods are described.
Broadcast link uses CSMA/CD: carrier sense, collision detection, backoff algorithm (binary exponential). MAC frame format includes type fields (e.g., 0x0800 for IP, 0x0806 for ARP). Minimum frame size is 64 bytes, maximum 1518 bytes.
5. Network Layer (Chapter 3)
Routing concepts:
Static, dynamic, default, and directly connected routes.
Distance‑vector protocol RIP – hop count metric, maximum 15 hops, split horizon, periodic updates.
Link‑state protocol OSPF – maintains LSDB, runs Dijkstra’s algorithm, supports areas.
External gateway protocol BGP – path‑vector, selects best external routes.
IP addressing:
Classful address ranges (A, B, C, D, E).
Special addresses (network, broadcast, loopback 127.0.0.1, APIPA 169.254.0.0/16).
Subnetting – network mask, calculation of network and broadcast addresses, number of subnets and hosts.
IP header fields: version, header length, total length, identification, flags, fragment offset, TTL, protocol, header checksum.
IPv6 header: priority, flow label, payload length, next header, hop limit. Address representation includes colon‑hex, zero‑compression, CIDR notation. Transition mechanisms: dual‑stack and tunneling.
Multicast concepts: unicast, broadcast, multicast, anycast; multicast IP range 224.0.0.0‑239.255.255.255; corresponding MAC address range 01‑00‑5E‑00‑00‑00 to 01‑00‑5E‑7F‑FF‑FF. IGMP manages group membership.
VPN basics: private IP ranges (10/8, 172.16/12, 192.168/16), tunnel encapsulation, three VPN types (intranet, extranet, remote‑access), NAT operation (replace source address, maintain translation table).
MPLS: label‑switched paths, forwarding equivalence class (FEC), comparison with traditional routing, load‑balancing.
6. Transport Layer (Chapter 4)
Provides end‑to‑end, process‑to‑process communication.
UDP
Connectionless, supports unicast/multicast/broadcast.
Header: source port, destination port, length, checksum.
Checksum calculation: set field to zero, sum 16‑bit words, add carries, complement.
TCP
Connection‑oriented, reliable, ordered delivery.
Header fields: source/destination ports, sequence number, acknowledgment number, data offset, flags (URG, ACK, PSH, RST, SYN, FIN), window size, checksum, urgent pointer, options.
Three‑way handshake (SYN, SYN‑ACK, ACK) and four‑way termination (FIN, ACK).
Reliability mechanisms: timeout‑retransmission (RTO = SRTT + 4·RTTVAR), fast retransmit on three duplicate ACKs.
Flow control: sliding window, advertised window, zero‑window probing.
Congestion control: slow start, congestion avoidance, ssthresh, cwnd adjustments.
7. Application Layer (Chapter 5)
DNS
Maps domain names to IP addresses, provides hierarchical name resolution using root, TLD, authoritative, and local name servers. Supports iterative and recursive queries, caches results.
FTP
File Transfer Protocol uses TCP, control connection on port 21, data connection on port 20 (active mode) or client‑chosen port (passive mode). Supports anonymous access via three methods (command line, browser, dedicated client).
HTTP
Stateless request/response protocol for web resources. URL format: scheme://host[:port]/path. Supports persistent connections and pipelining (HTTP/1.1). Request line, headers, blank line, optional body. Cookies enable stateful interactions. Web documents classified as static, dynamic, or active.
SMTP/POP3/IMAP
SMTP (TCP 25) sends mail, uses ASCII commands and responses. MIME extends messages with multimedia content. POP3 (TCP 110) and IMAP (TCP 143) retrieve mail; IMAP supports server‑side folder management.
DHCP
Dynamic Host Configuration Protocol assigns IP address, subnet mask, default gateway, DNS server. Uses four‑message exchange (DISCOVER, OFFER, REQUEST, ACK) over UDP ports 67/68. Lease time defines address validity; renewal occurs at 50 % of lease.
P2P File Distribution
Peers exchange chunks using tit‑for‑tat strategy, selecting top‑4 fastest neighbors, periodically re‑evaluating, and randomly contacting additional peers.
8. Network Security (Chapter 6)
Common attacks: eavesdropping, data modification, malware, DoS. Cryptography:
Symmetric encryption (same key for encryption/decryption).
Asymmetric encryption (public key for encryption, private key for decryption).
Digital signatures provide authentication, integrity, and non‑repudiation.
Key distribution mechanisms: Key Distribution Center (KDC) for symmetric keys, Certificate Authority (CA) for public‑key certificates.
9. Wireless LAN (Chapter 7)
Two WLAN types: infrastructure (with AP) and ad‑hoc (peer‑to‑peer). Wireless sensor networks (WSN) are low‑power, low‑bandwidth, low‑storage networks for IoT.
CSMA/CA procedure: carrier sense, DIFS wait, random backoff, transmission, SIFS wait, ACK. Collision scenarios include simultaneous backoff expiration and hidden‑node problem.
802.11 frame formats include four address fields (RA, TA, DA, SA) and various management, control, and data frame types.
10. Other Topics (Chapter 8)
Comparative tables of address lengths (MAC 6 bytes, IPv4 4 bytes, IPv6 16 bytes, port 2 bytes) and header sizes (Ethernet 18 bytes, IPv4 20‑60 bytes, IPv6 40 bytes).
Checksum methods for Ethernet CRC, IPv4 header, UDP/TCP (including pseudo‑header). Routing protocols summarized (RIP, OSPF, BGP, MPLS). Data‑link vs. network‑layer error detection.
Differences between TCP and UDP, IPv4 vs. IPv6, P2P vs. C/S, full‑text vs. directory‑based search engines, CSMA/CD vs. CSMA/CA.
Glossary of common networking terms (ISP, IXP, hub, LAN, MAN, WAN, WLAN, VLAN, P2P, C/S, CSMA/CD, CSMA/CA, LiFi, WiFi, ADSL, HFC, FTTH/FTTB/FTTC, URL, VPN, IPSec, NAT, ICMP, IGMP, MSS, BGP, AS, HTTPS, MPLS, AP, SSID, AdHoc, blockchain).
11. Command‑Line Tools
ipconfig /all, /displaydns, /flushdns, /release,
/renew ping -n count -l size -t tracert arp -a, -d, -s These commands assist in diagnosing network configuration, connectivity, and address resolution.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Liangxu Linux
Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
