Comprehensive Overview of Computer Networks and Core Protocols
This article provides a detailed introduction to computer networking, covering network classifications, the OSI and TCP/IP layer models, physical, data link, network, transport, and application layer functions, and explains key protocols such as Ethernet, IP, TCP, UDP, DNS, DHCP, and HTTP/HTTPS.
1. Computer Network Overview
Networks are ubiquitous, ranging from telephone and television networks to computer networks, which combine computing and communication technologies.
1.1 Network Classification
By scope: WAN, MAN, LAN
By users: public networks, private networks
1.2 Layered Architecture
The TCP/IP four‑layer model and the OSI seven‑layer model are compared, highlighting the principle that each layer should be independent, flexible, and fully decoupled.
1.3 Design Principles of Layered Architecture
Layers are independent.
Each layer provides sufficient flexibility.
Layers are completely decoupled.
1.4 Performance Metrics
Key metrics include data rate (bps), various delays (transmission, propagation, queuing, processing), and round‑trip time (RTT).
2. Physical Layer
The physical layer connects devices and transmits bit streams, providing a reliable physical medium for upper layers.
Repeater (amplifier): regenerates signals within the same LAN.
Hub: multi‑port repeater, operates half‑duplex.
Channel types: simplex, half‑duplex, and full‑duplex.
3. Data Link Layer
3.1 Overview
Provides reliable transmission over the physical layer, handling framing, flow control, error detection, and retransmission. Main services include physical address mapping, framing, and error checking.
3.2 Error Detection
Techniques: parity check (limited to single‑bit errors) and cyclic redundancy check (CRC).
3.3 Maximum Transmission Unit (MTU)
Defines the maximum frame size; the path MTU is the smallest MTU along a route.
3.4 Ethernet Protocol
Ethernet uses 48‑bit MAC addresses and provides a widely used LAN technology. Frame structure includes type, destination/source MAC, payload (46‑1500 bytes), and CRC.
4. Network Layer
Responsible for end‑to‑end packet delivery, routing, and addressing. Core protocols: IP, ICMP, ARP, RARP, and routing devices such as routers.
4.1 IP Protocol Details
IP creates a virtual inter‑connected network, handling addressing, routing, and basic error control. Header fields include version, header length, total length, TTL, and protocol identifier.
4.2 IP Forwarding Process
Illustrates how routers forward IP packets based on routing tables.
4.3 Subnetting
Describes class‑A, B, C address structures and the purpose of classes D and E.
4.4 NAT
Network Address Translation allows multiple private hosts to share a single public IP, translating addresses and maintaining a NAT table.
4.5 ARP & RARP
ARP maps IP addresses to MAC addresses; RARP performs the reverse mapping.
4.6 ICMP
ICMP reports errors and diagnostics, used by tools like ping and traceroute.
4.7 Routing Overview
Discusses routing algorithms (link‑state, distance‑vector), autonomous systems, static vs. dynamic routing, and protocols such as RIP, OSPF, and BGP.
5. Transport Layer
Provides end‑to‑end data segmentation, reliability, flow control, and congestion control.
5.1 UDP
Connectionless, low‑overhead protocol with a simple 8‑byte header (source port, destination port, length, checksum).
5.2 TCP
Connection‑oriented, reliable protocol offering segmentation, reassembly, flow control, congestion control, and error detection.
Three‑way handshake (SYN, SYN‑ACK, ACK) establishes a connection.
Four‑step termination (FIN, ACK) gracefully closes a connection.
Congestion control uses slow start, congestion avoidance, fast retransmit, and fast recovery.
第一次:客户端发送 SYN(seq=x)进入 SYN_SEND 状态 第二次:服务器回复 SYN+ACK(seq=y, ack=x+1)进入 SYN_RCVD 状态 第三次:客户端发送 ACK(seq=x+1, ack=y+1)进入 ESTABLISHED 状态6. Application Layer
Provides network services to applications. Key protocols include DNS, DHCP, HTTP/HTTPS, FTP, Telnet, SMTP, POP3.
6.1 DNS
Translates domain names to IP addresses using a hierarchical lookup (cache → hosts file → DNS servers).
6.2 DHCP
Automatically assigns IP addresses to hosts on a LAN using UDP.
6.3 HTTP & HTTPS
HTTP is a reliable, TCP‑based protocol for web communication; HTTPS adds SSL/TLS encryption for security.
Original source: https://blog.csdn.net/Royalic/article/details/119985591
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.