📚 TCP/IP Protocol Stack Exam Essentials | TCP/IP 协议栈考点精讲
Understanding the TCP/IP protocol stack is a cornerstone of the GCSE Edexcel Computer Science syllabus. These four layers – Application, Transport, Internet, and Link – govern how data is packaged, addressed, transmitted, and reassembled across modern networks, including the internet. This article breaks down each layer’s roles, key protocols, address types, and the TCP connection establishment process, providing clear, exam-focused explanations with paired English–Chinese text to help you master every required detail.
理解 TCP/IP 协议栈是 GCSE Edexcel 计算机科学课程的核心基础。这四层——应用层、传输层、网际层和链路层——决定了数据如何封装、寻址、传输以及在现代网络(包括互联网)中重组。本文逐层拆解各层职责、关键协议、地址类型以及 TCP 连接建立过程,采用中英对照的清晰讲解,帮助你掌握每个考试要点。
1. The Four-Layer TCP/IP Model | 四层 TCP/IP 模型
The TCP/IP model used in Edexcel GCSE consists of four layers: Application, Transport, Internet, and Link (sometimes called Network Interface or Data Link). This is a simplified version of the original four-layer ARPANET model, and it maps closely to real-world internet protocols. Data passes down through the layers when being sent, gaining a header (and sometimes a trailer) at each stage; it passes upwards when received, with headers removed.
Edexcel GCSE 中使用的 TCP/IP 模型包含四层:应用层、传输层、网际层和链路层(有时也称为网络接口层或数据链路层)。这是原始 ARPANET 四层模型的简化版本,与现实世界的互联网协议紧密对应。数据在发送时依次向下经过各层,每一层添加报头(有时还有报尾);接收时则向上传递并逐层拆除报头。
2. Layer 4: Application Layer | 第四层:应用层
The Application layer provides network services directly to user applications. Protocols here define the structure of messages and the rules for exchanging data. Common examples include HTTP/HTTPS for web browsing, FTP for file transfer, SMTP/POP3/IMAP for email, and DNS for domain name resolution. At this layer, the data unit is simply called a message or data stream, and no network addressing is yet involved.
应用层直接向用户应用程序提供网络服务。该层协议定义了消息结构及数据交换规则。常见示例包括用于网页浏览的 HTTP/HTTPS、文件传输的 FTP、电子邮件的 SMTP/POP3/IMAP,以及域名解析的 DNS。在应用层,数据单元被称为消息或数据流,尚未涉及网络寻址。
3. Layer 3: Transport Layer | 第三层:传输层
The Transport layer handles end-to-end communication between processes on different hosts. It breaks data from the Application layer into smaller chunks and adds a header that includes source and destination port numbers. The two major protocols are TCP (Transmission Control Protocol), which guarantees reliable, ordered delivery through acknowledgements and retransmissions, and UDP (User Datagram Protocol), which offers faster, connectionless delivery without recovery mechanisms. The data unit here is called a segment (TCP) or a datagram (UDP).
传输层负责不同主机上进程之间的端到端通信。它将来自应用层的数据拆分成较小的块,并添加包含源端口号和目标端口号的报头。两大主要协议是 TCP(传输控制协议),通过确认和重传机制保证可靠有序的传输;以及 UDP(用户数据报协议),提供更快速的、无连接且无恢复机制的传输。该层的数据单元称为报文段(TCP)或数据报(UDP)。
4. TCP Three-Way Handshake | TCP 三次握手
Before TCP can transfer data, it must establish a connection using a three-way handshake. The client sends a SYN segment with a random sequence number. The server replies with a SYN-ACK, acknowledging the client’s sequence number and providing its own. Finally, the client sends an ACK back, and the connection is open. This handshake ensures both sides are ready and synchronises initial sequence numbers for reliable delivery.
TCP 在传输数据前必须通过三次握手建立连接。客户端发送一个带有随机序列号的 SYN 报文段。服务器回复 SYN-ACK,确认客户端的序列号并提供自己的序列号。最后,客户端发回 ACK,连接建立。这次握手确保了双方准备就绪,并同步初始序列号以实现可靠传输。
5. TCP Reliability Mechanisms | TCP 可靠传输机制
TCP provides reliability through sequence numbers, acknowledgements, checksums, and timers. Each byte is numbered; the receiver acknowledges the next expected byte. If an ACK is not received within the timeout period, the sender retransmits the missing segment. Flow control using a window size prevents a fast sender from overwhelming a slow receiver. The checksum field allows error detection; corrupted segments are discarded and treated as lost, triggering retransmission.
TCP 通过序列号、确认、校验和以及计时器来提供可靠性。每个字节都被编号;接收方确认期望的下一个字节。若在超时时间内未收到 ACK,发送方重传丢失的报文段。使用窗口大小的流量控制可防止快速发送方压迫慢速接收方。校验和字段可实现差错检测;损坏的报文段被丢弃并视为丢失,从而触发重传。
6. Layer 2: Internet Layer | 第二层:网际层
The Internet layer is responsible for logical addressing and routing packets across multiple networks. Its core protocol is IP (Internet Protocol). IP adds a header containing source and destination IP addresses, and routers use these to forward packets hop by hop towards the destination. IP provides a best-effort, connectionless delivery service – it does not guarantee delivery, ordering, or duplicate protection. The data unit here is called a packet or datagram.
网际层负责逻辑寻址以及跨多个网络的路由选择。其核心协议是 IP(互联网协议)。IP 添加包含源 IP 地址和目的 IP 地址的报头,路由器利用这些地址逐跳将数据包转发至目的地。IP 提供尽力而为的无连接传输服务——它不保证交付、顺序或重复防护。该层的数据单元称为数据包或数据报。
7. IPv4 and IPv6 Addresses | IPv4 与 IPv6 地址
IPv4 addresses are 32-bit numbers, typically written in dotted decimal notation like 192.168.1.1. The exhaustion of IPv4 addresses led to the development of IPv6, which uses 128-bit addresses expressed as eight groups of four hexadecimal digits, e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334. IPv6 offers a vastly larger address space and enhanced features such as simpler header format and built-in security. Edexcel expects you to compare both versions and recognise the format.
IPv4 地址是 32 位数字,通常用点分十进制表示,如 192.168.1.1。IPv4 地址耗尽问题促成了 IPv6 的开发,IPv6 使用 128 位地址,表示为八组四位十六进制数,例如 2001:0db8:85a3:0000:0000:8a2e:0370:7334。IPv6 提供了更大的地址空间并增强了特性,如更简化的报头格式和内置安全。Edexcel 要求你对比两个版本并识别格式。
8. The Role of Routers and Routing | 路由器与路由选择的作用
Routers operate at the Internet layer. They examine the destination IP address of a packet and consult a routing table to decide on the best next hop. Routing protocols such as OSPF and BGP dynamically update routing tables. Unlike switches that use MAC addresses, routers make decisions based on IP addresses, enabling inter-network communication. Each router decrements the TTL (Time To Live) field, and if it reaches zero, the packet is discarded, preventing infinite loops.
路由器工作于网际层。它们检查数据包的目的 IP 地址并查路由表以决定最佳下一跳。诸如 OSPF 和 BGP 的路由协议动态更新路由表。与使用 MAC 地址的交换机不同,路由器基于 IP 地址做出决策,实现网络间通信。每个路由器将 TTL(生存时间)字段减一,若归零则丢弃数据包,从而防止无限循环。
9. Layer 1: Link Layer | 第一层:链路层
The Link layer governs communication on the local physical network segment. It frames packets from the Internet layer, adding physical source and destination addresses (MAC addresses) and an error-checking trailer (e.g., CRC). This layer includes the hardware (NIC, cables, switches) and protocols like Ethernet and Wi-Fi. When data arrives, the Link layer checks the frame’s integrity using the trailer and discards damaged frames. The unit of data is a frame.
链路层负责本地物理网段上的通信。它将网际层的数据包封装成帧,添加物理源地址和目的地址(MAC 地址)以及差错检测报尾(如 CRC)。该层包含硬件(网卡、线缆、交换机)以及以太网和 Wi-Fi 等协议。当数据到达时,链路层利用报尾检查帧的完整性,丢弃损坏的帧。数据单元为帧。
10. MAC Addresses vs IP Addresses | MAC 地址与 IP 地址对比
MAC addresses are 48-bit physical addresses hardcoded into network interface cards, typically written in hexadecimal as six octets separated by colons (e.g., 00:1A:2B:3C:4D:5E). They are used by the Link layer for local delivery within the same network. IP addresses are logical and can change when a device moves networks. A key distinction tested in exams: MAC addresses identify a specific device’s NIC; IP addresses identify a device’s location on a network. ARP (Address Resolution Protocol) maps IP addresses to MAC addresses for local delivery.
MAC 地址是固化在网卡中的 48 位物理地址,通常用冒号分隔的六个十六进制八位组表示(如 00:1A:2B:3C:4D:5E)。它们被链路层用于同一网络内的本地传输。IP 地址是逻辑地址,当设备移动到不同网络时可以改变。考试中常考的一个关键区别是:MAC 地址标识特定设备的网卡;IP 地址标识设备在网络中的位置。ARP(地址解析协议)负责将 IP 地址映射为 MAC 地址以进行本地交付。
11. Encapsulation and the Data Journey | 封装与数据旅程
As data moves down the TCP/IP stack for transmission, encapsulation occurs: the Application layer creates a message; the Transport layer adds a TCP/UDP header to form a segment/datagram; the Internet layer prepends an IP header to create a packet; the Link layer adds a frame header and trailer containing MAC addresses and CRC. On arrival, the process is reversed, with each layer stripping its corresponding header. Understanding encapsulation is essential for tracing a packet’s path in exam scenarios.
当数据向下穿过 TCP/IP 栈进行传输时,封装发生:应用层创建消息;传输层添加 TCP/UDP 报头形成报文段/数据报;网际层前置 IP 报头生成数据包;链路层添加帧报头和包含 MAC 地址与 CRC 的报尾形成帧。到达目的地时流程反转,各层剥离对应的报头。理解封装对于考试中追踪数据包路径至关重要。
12. Common Protocols Summary Table | 常见协议汇总表
Below is a quick-reference table of the most important protocols and their TCP/IP layers. Use this for revision and recall.
以下是考试中最重要协议及其所属 TCP/IP 层的速查表,用于复习和记忆。
| Protocol | Layer | Function |
|---|---|---|
| HTTP / HTTPS | Application | Retrieving web pages (encrypted in HTTPS) |
| FTP | Application | Transferring files |
| SMTP / POP3 / IMAP | Application | Sending and receiving email |
| DNS | Application | Resolving domain names to IP addresses |
| TCP | Transport | Reliable, connection-oriented data delivery |
| UDP | Transport | Unreliable, connectionless delivery (e.g., streaming) |
| IP | Internet | Routing packets based on IP addresses |
| Ethernet / Wi-Fi | Link | Physical frame transmission and MAC addressing |
| ARP | Internet/Link boundary | Maps IP addresses to MAC addresses |
Remember that the TCP/IP model is central to the Edexcel GCSE specification. Exam questions frequently ask you to identify the layer at which a given protocol operates, describe encapsulation steps, or explain why protocols are needed at each layer. Practise tracing a web request through all four layers, and always link a protocol to its primary function.
请记住,TCP/IP 模型是 Edexcel GCSE 考纲的核心。试题经常要求你判断某个协议工作在哪一层、描述封装步骤,或解释为什么每一层都需要协议。请练习将一个网页请求穿越所有四层的完整过程,并始终将协议与其主要功能挂钩。
Published by TutorHao | Computer Science Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)

或截图后用「扫一扫 → 相册」选择本图