📚 TCP/IP Essentials for IGCSE AQA Computer Science | IGCSE AQA 计算机:TCP/IP 考点精讲
Understanding TCP/IP is absolutely crucial for IGCSE AQA Computer Science. This article breaks down every examinable concept, from the layered model and core protocols to IP addressing and the three-way handshake. Whether you are revising for your mocks or the final paper, this bilingual walkthrough will help you master the topic with confidence.
理解 TCP/IP 对 IGCSE AQA 计算机科学至关重要。本文拆解所有会考到的概念,从分层模型、核心协议到 IP 寻址和三次握手。无论你正在准备模拟考还是大考,这篇双语精讲都能帮你扎实掌握这一考点,建立信心。
1. Introduction to Protocols and the TCP/IP Model | 协议与 TCP/IP 模型简介
A protocol is a set of rules that governs how data is transmitted and received across a network. The TCP/IP model (Transmission Control Protocol / Internet Protocol) is the foundation of the modern internet, defining how devices communicate in a layered architecture. It allows different hardware and software to work together seamlessly by breaking down network communication into four distinct layers.
协议是一组管理数据如何在网络中发送和接收的规则。TCP/IP 模型(传输控制协议 / 互联网协议)是现代互联网的基石,它定义了设备如何在分层架构中通信。通过将网络通信分解为四个不同的层,该模型让不同的硬件和软件能够无缝协作。
Unlike the OSI model’s seven layers, TCP/IP uses four layers: Application, Transport, Internet (Network), and Link (Network Access). Each layer provides services to the layer above it and adds its own header information during data encapsulation. This modular design simplifies troubleshooting and allows developers to innovate within a single layer without breaking the whole stack.
与 OSI 模型的七层不同,TCP/IP 使用四层:应用层、传输层、互联网层(网络层)和链路层(网络接入层)。每一层为上层提供服务,并在数据封装过程中添加自己的头部信息。这种模块化设计简化了故障排查,并允许开发者在单一层内创新而不影响整个协议栈。
2. The Four Layers of the TCP/IP Stack | TCP/IP 协议栈的四层
The four layers, from top to bottom, are the Application layer, Transport layer, Internet layer, and Link layer. The Application layer is closest to the user, handling protocols like HTTP and SMTP. The Transport layer ensures reliable (TCP) or fast (UDP) data delivery between applications. The Internet layer routes data packets across networks using IP addresses, and the Link layer deals with the physical transmission of data over cables or wireless media using MAC addresses.
从上到下的四层分别是应用层、传输层、互联网层和链路层。应用层最接近用户,处理 HTTP、SMTP 等协议。传输层确保应用之间可靠(TCP)或快速(UDP)的数据交付。互联网层使用 IP 地址跨网络路由数据包,链路层则通过 MAC 地址处理数据在有线或无线介质上的物理传输。
Each layer adds its own header (and sometimes trailer) to the data, a process called encapsulation. When data travels from sender to receiver, the layers add these headers; at the destination, the same layers strip them away in reverse order. This stacking of protocols is why the architecture is called a stack.
每一层都给数据添加自己的头部(有时还有尾部),这个过程称为封装。当数据从发送端传到接收端时,各层添加这些头部;在目的地,同样的层按相反顺序剥离它们。协议的这种堆叠方式正是该架构被称为协议栈的原因。
3. Application Layer – Protocols and Ports | 应用层 – 协议与端口
The Application layer provides network services directly to user applications. Key protocols you must know for AQA IGCSE include HTTP (port 80) for web browsing, HTTPS (port 443) for secure browsing, FTP (port 21) for file transfer, SMTP (port 25) for sending emails, and POP3 (port 110) or IMAP (port 143) for receiving emails. Each protocol uses a specific port number to identify the service on a server.
应用层直接为用户应用程序提供网络服务。AQA IGCSE 必知的协议包括:用于网页浏览的 HTTP(端口 80)、安全浏览的 HTTPS(端口 443)、文件传输的 FTP(端口 21)、发送邮件的 SMTP(端口 25)以及接收邮件的 POP3(端口 110)或 IMAP(端口 143)。每个协议使用特定的端口号来识别服务器上的服务。
Ports allow a single server to run multiple services simultaneously. For example, a web server can listen on port 80 for HTTP and port 443 for HTTPS. A socket is the combination of an IP address and a port number, e.g., 192.168.1.10:80. This unique pair enables precise communication between processes on different devices.
端口让一台服务器能同时运行多种服务。例如,Web 服务器可以在端口 80 监听 HTTP,在端口 443 监听 HTTPS。套接字是 IP 地址与端口号的组合,例如 192.168.1.10:80。这一独特的配对使得不同设备上的进程能够精确通信。
4. Transport Layer – TCP vs UDP | 传输层 – TCP 对比 UDP
The Transport layer has two major protocols: TCP and UDP. TCP (Transmission Control Protocol) is connection-oriented and provides reliable, ordered delivery. It uses sequence numbers, acknowledgements, and error-checking to guarantee that all packets arrive intact. UDP (User Datagram Protocol) is connectionless, sending packets without establishing a connection, which makes it faster but less reliable – ideal for real-time applications like video streaming or online gaming.
传输层有两大协议:TCP 和 UDP。TCP(传输控制协议)是面向连接的,提供可靠有序的交付。它使用序列号、确认机制和错误校验来保证所有数据包完整到达。UDP(用户数据报协议)是无连接的,不建立连接就发送数据包,因此速度更快但可靠性较低——非常适合视频流或在线游戏等实时应用。
TCP is used where data integrity is critical, such as loading a webpage or downloading a file. UDP is preferred when speed outweighs the need for perfection, e.g., live broadcasts where a lost packet only causes a momentary glitch. The AQA specification expects you to compare these two protocols in terms of reliability, speed, and use cases.
TCP 用于数据完整性至关重要的场景,如加载网页或下载文件。当速度优先于完美时,UDP 更受欢迎,例如直播中丢失一个数据包只会造成短暂卡顿。AQA 考纲要求你从可靠性、速度和适用场景等方面对比这两个协议。
5. TCP Connection: Three-Way Handshake | TCP 连接:三次握手
Before TCP can transmit data, it must establish a connection using a three-way handshake. The process: (1) Client sends a SYN (synchronize) packet to the server. (2) Server responds with a SYN-ACK (synchronize-acknowledge) packet. (3) Client sends an ACK (acknowledge) packet back. After this exchange, a full-duplex connection is set up and data transfer can begin.
TCP 在传输数据之前,必须通过三次握手建立连接。过程如下:(1) 客户端向服务器发送一个 SYN(同步)数据包。(2) 服务器回复一个 SYN-ACK(同步确认)数据包。(3) 客户端再发回一个 ACK(确认)数据包。完成此交换后,全双工连接建立,数据传输可以开始。
This handshake synchronises sequence numbers, which are essential for ordering packets and detecting loss. If any packet in the handshake is lost, the process is retried. After communication ends, a similar four-way handshake using FIN flags gracefully closes the connection. Understanding this sequence is a common exam question.
这次握手同步了序列号,这对排序数据包和检测丢失至关重要。如果握手中任何数据包丢失,过程将重试。通信结束后,使用 FIN 标志的类似四次挥手过程会优雅地关闭连接。理解这一序列是常见的考题。
6. Network Layer – IP Addressing and Routing | 网络层 – IP 寻址和路由
The Internet layer (often called the Network layer) handles logical addressing and routing. The Internet Protocol (IP) assigns a unique logical address to each device. IPv4 uses 32-bit addresses written in dotted-decimal notation (e.g., 192.168.0.1), while IPv6 uses 128-bit hexadecimal addresses to solve address exhaustion. Routers operate at this layer, forwarding packets based on the destination IP address.
互联网层(常被称为网络层)处理逻辑寻址和路由。互联网协议(IP)为每个设备分配唯一的逻辑地址。IPv4 使用 32 位地址,以点分十进制表示(如 192.168.0.1),而 IPv6 使用 128 位十六进制地址以解决地址枯竭问题。路由器在此层运行,根据目的 IP 地址转发数据包。
IP is a connectionless, best-effort protocol – it does not guarantee delivery. Packets may take different routes and arrive out of order. TCP at the Transport layer compensates for this by reassembling packets correctly. You should also be familiar with subnet masks (e.g., 255.255.255.0) which split an IP address into network and host portions.
IP 是一种无连接的、尽力而为的协议——它不保证送达。数据包可能走不同路径,乱序到达。传输层的 TCP 会通过正确重组数据包来弥补这一点。你还应熟悉子网掩码(如 255.255.255.0),它把 IP 地址划分为网络部分和主机部分。
7. Link Layer – MAC Addresses and Frames | 链路层 – MAC 地址和帧
The Link layer (also called Network Access or Data Link layer) is responsible for the physical transmission of data between two nodes on the same local network. It uses Media Access Control (MAC) addresses – unique 48-bit identifiers burned into network interface cards (NICs), such as 00:1A:2B:3C:4D:5E. Switches and network bridges work at this layer, forwarding frames using MAC addresses.
链路层(也称为网络接入层或数据链路层)负责同一局域网内两个节点之间的物理数据传输。它使用媒体访问控制(MAC)地址——烧录到网络接口卡(NIC)中的唯一 48 位标识符,例如 00:1A:2B:3C:4D:5E。交换机和网桥在此层工作,使用 MAC 地址转发帧。
Data at this layer is called a frame, which includes a MAC header and a trailer for error detection (e.g., CRC checksum). When a packet arrives from the Internet layer, the Link layer encapsulates it inside a frame before it is placed on the physical medium. This layer deals with technologies like Ethernet, Wi-Fi, and PPP.
这一层的数据被称为帧,它包含 MAC 头部和用于错误检测的尾部(如 CRC 校验和)。当数据包从互联网层到来时,链路层将其封装进一个帧,然后放到物理介质上。该层处理以太网、Wi-Fi、PPP 等具体技术。
8. Data Encapsulation and the Journey of a Packet | 数据封装和包的旅程
As data moves down the TCP/IP stack from Application to Link, each layer adds its own header. For example, an HTTP request first gets a TCP header (with source and destination ports), then an IP header (with source and destination IPs), and finally a Link layer frame header (with MAC addresses) and trailer. This nested structure is called encapsulation.
当数据沿 TCP/IP 栈从应用层向下移动时,每一层都添加自己的头部。例如,一个 HTTP 请求首先获得一个 TCP 头部(含源和目的端口),然后一个 IP 头部(含源和目的 IP),最后是链路层帧头部(含 MAC 地址)和尾部。这种嵌套结构称为封装。
At the receiving end, the process is reversed: the Link layer strips its header and error-checking trailer, the Internet layer processes the IP header, the Transport layer checks ports and sequence numbers, and finally the Application layer delivers the raw data to the appropriate program. This layered journey is a favourite diagram-based exam question.
在接收端,过程相反:链路层剥离其头部和错误校验尾部,互联网层处理 IP 头部,传输层检查端口和序列号,最后应用层将原始数据传递给对应的程序。这种分层之旅是考题中常见的图表题。
9. Packet Switching and Routers | 分组交换与路由器
The internet is a packet-switched network. Data is broken into small packets, each carrying source and destination IP addresses, a sequence number, and part of the overall message. Routers inspect the destination IP of each packet and forward it hop-by-hop towards the destination using a routing table. Packets from the same file can travel different paths and be reassembled later.
互联网是一个分组交换网络。数据被分割成小的数据包,每个数据包都携带源和目的 IP 地址、序列号以及消息的一部分。路由器检查每个数据包的目的 IP,并利用路由表逐跳向目的地转发。同一文件的数据包可以走不同路径,之后再重组。
Packet switching is efficient because it shares bandwidth dynamically; network resources are only used when packets are actually transmitted. If a link fails, routers can find alternative paths automatically. This is different from circuit switching (used in traditional phone lines) where a dedicated path is set up for the entire conversation.
分组交换效率高,因为它动态共享带宽;仅在实际传输数据包时才占用网络资源。如果一条链路断开,路由器可以自动寻找替代路径。这与电路交换(用于传统电话线)不同,后者在整个通话期间建立一条专用路径。
10. Common Protocols and Their Uses | 常见协议及其用途
The AQA IGCSE syllabus expects you to know a range of application-layer protocols and their purposes. Use the table below to solidify your recall. Remember that each protocol is associated with a well-known port number, which is essential for configuring firewalls and network services.
AQA IGCSE 大纲要求你了解一系列应用层协议及其用途。使用下表来巩固记忆。请记住,每个协议都与一个知名端口号关联,这对于配置防火墙和网络服务至关重要。
| Protocol | Port | Purpose |
|---|---|---|
| HTTP | 80 | Accessing web pages (unencrypted) |
| HTTPS | 443 | Secure web access (encrypted with SSL/TLS) |
| FTP | 21 | Transferring files between client and server |
| SMTP | 25 | Sending email from a client to a mail server or between servers |
| POP3 | 110 | Retrieving email from a server; messages are typically deleted from server |
| IMAP | 143 | Retrieving email; messages remain on server and can be managed remotely |
Additionally, DNS (Domain Name System) uses port 53 to translate domain names like www.example.com into IP addresses. DHCP automatically assigns IP configurations to devices. Knowing these protocols and their ports is a straight route to marks in multiple-choice and short-answer questions.
此外,DNS(域名系统)使用端口 53 将像 www.example.com 这样的域名转换为 IP 地址。DHCP 自动为设备分配 IP 配置。熟悉这些协议及其端口是拿到选择题和问答题分数的直接途径。
11. TCP/IP vs OSI Model | TCP/IP 与 OSI 模型对比
You may be asked to compare the TCP/IP model with the OSI (Open Systems Interconnection) seven-layer model. While TCP/IP has four layers, OSI splits the Application layer into Application, Presentation, and Session layers, and separates the Link layer into Data Link and Physical. In practice, TCP/IP is the model actually used on the internet, whereas OSI is a more generic reference.
你可能被要求比较 TCP/IP 模型与 OSI(开放系统互连)七层模型。TCP/IP 有四层,OSI 将应用层拆分为应用层、表示层和会话层,并将链路层拆分为数据链路层和物理层。实际上,TCP/IP 是互联网真正使用的模型,而 OSI 则是一种更通用的参考模型。
Key differences: TCP/IP is protocol-driven and emerged from real-world implementation, while OSI is a theoretical framework. In exams, you might need to label layers on a diagram or identify which TCP/IP layer corresponds to a given device or protocol. For instance, a switch is typically a Link layer device, a router is an Internet layer device.
主要区别:TCP/IP 由协议驱动,源于实际实施,而 OSI 是理论框架。考试中你可能需要为图示标注分层,或识别某个设备或协议对应 TCP/IP 的哪一层。例如,交换机通常是链路层设备,路由器是互联网层设备。
12. Exam Tips: Common Question Types | 考试技巧:常见题型
IGCSE AQA computer science exams frequently test TCP/IP through layered model diagrams, matching protocols to layers, comparing TCP & UDP, and explaining packet switching. Always read questions carefully: if asked to describe the function of a layer, avoid simply listing protocols—explain what the layer does, e.g., ‘The Transport layer segments data and provides end-to-end error recovery using TCP.’
IGCSE AQA 计算机科学考试经常通过分层模型图、将协议匹配到各层、比较 TCP 和 UDP 以及解释分组交换来考查 TCP/IP。务必仔细审题:如果要求描述某一层的功能,别只是列出协议——要解释该层的作用,例如“传输层对数据分段,并使用 TCP 提供端到端的错误恢复”。
For 6-mark explanation questions, use a logical sequence: start with the Application layer, mention the port and protocol, then explain how Transport layer segments and numbers the data, then Internet layer addressing and routing, and finally Link layer framing. Also, be prepared to annotate network diagrams and to suggest protocols for a given scenario (e.g., which protocol for secure file transfer? Answer: FTP over SSL/TLS or HTTPS for web-based).
面对 6 分说明题,使用逻辑顺序:从应用层开始,提到端口和协议,然后解释传输层如何分段和编号数据,接着是互联网层的寻址和路由,最后是链路层的成帧。同时,准备好标注网络示意图,并为给定场景建议协议(例如,安全文件传输用什么协议?回答:FTP over SSL/TLS,或基于 Web 的 HTTPS)。
Finally, don’t overlook foundational concepts like IP vs MAC addresses (logical vs physical, can change vs fixed) and the purpose of routers and gateways. Mastering these details will ensure top marks on the networking section of Paper 1.
最后,不要忽视 IP 地址与 MAC 地址等基本概念(逻辑与物理、可变与固定)以及路由器和网关的作用。掌握这些细节将确保你在试卷一的网络部分拿到高分。
Published by TutorHao | Computer Science Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)
屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导