Comprehensive Overview of Computer Networks: Layers, Protocols, and Key Concepts
This article provides a thorough introduction to computer networking, covering the classification of networks, the OSI and TCP/IP layer models, physical, data link, network, transport, and application layer protocols such as Ethernet, IP, TCP, UDP, DNS, and related concepts like routing, NAT, and error detection.
1. Overview of Computer Networks
Computer networks combine computing and communication technologies, existing in many forms such as telephone, television, and the Internet, and even within the human body (e.g., nervous system).
2. Network Classification
According to scope: WAN, MAN, LAN; according to users: public networks and private networks.
3. Layered Architecture
The OSI seven‑layer model and the TCP/IP four‑layer model are compared, emphasizing that each layer should be independent, flexible, and fully decoupled.
3.1 Physical Layer
Provides a reliable physical medium for bit transmission. Typical devices include repeaters (amplifiers) and hubs. Communication channels can be simplex, half‑duplex, or full‑duplex.
3.2 Data Link Layer
Ensures reliable delivery over the physical layer by framing data, using MAC addressing, flow control, error detection (parity check, CRC), and supporting devices such as bridges and switches.
3.3 Network Layer
Handles addressing and routing. Core protocols are IP, ICMP, ARP, and RARP. Routers are the primary devices. Topics include subnetting, NAT, and routing algorithms (static routing, RIP, OSPF, BGP).
3.4 Transport Layer
Provides end‑to‑end communication between hosts.
UDP is a connection‑less protocol with low overhead, no reliability guarantees, and no congestion control.
TCP offers reliable, ordered, full‑duplex transmission with flow control, congestion control (slow start, congestion avoidance, fast retransmit/recovery), and a three‑handshake/four‑handshake connection establishment and termination process.
TCP three‑handshake steps:
第一次客户端发送 SYN(seq=x)进入 SYN_SEND 状态。
第二次服务器回复 SYN+ACK(seq=y, ack=x+1)进入 SYN_RCVD 状态。
第三次客户端发送 ACK(seq=x+1, ack=y+1)进入 ESTABLISHED 状态,服务器也进入 ESTABLISHED 状态。
TCP four‑handshake steps:
第一次客户端发送 FIN(seq=x)进入 FIN_WAIT_1。
第二次服务器发送 ACK(ack=x+1)进入 CLOSE_WAIT,客户端进入 FIN_WAIT_2。
第三次服务器发送 FIN(seq=y)进入 LAST_ACK。
第四次客户端发送 ACK(ack=y+1)进入 TIME_WAIT,随后进入 CLOSED;服务器收到 ACK 后进入 CLOSED。
3.5 Application Layer
Provides network services to applications. Key protocols include:
DNS (Domain Name System) – resolves domain names to IP addresses.
DHCP (Dynamic Host Configuration Protocol) – dynamically assigns IP addresses to hosts.
HTTP/HTTPS – application‑layer protocols for web communication, with HTTPS adding TLS/SSL encryption.
IT Architects Alliance
Discussion and exchange on system, internet, large‑scale distributed, high‑availability, and high‑performance architectures, as well as big data, machine learning, AI, and architecture adjustments with internet technologies. Includes real‑world large‑scale architecture case studies. Open to architects who have ideas and enjoy sharing.
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.