📚 TCP/IP In-Depth for IB & WJEC Computer Science | IB WJEC 计算机:TCP/IP 考点精讲
The TCP/IP protocol suite is the backbone of the modern internet and a central topic in both IB Computer Science and WJEC Computer Science specifications. Understanding its layered architecture, core protocols, addressing schemes, and data transmission mechanisms is essential for achieving top marks in networking questions. This revision guide consolidates all key areas, providing clear explanations in English and Chinese to support bilingual learners.
TCP/IP 协议族是现代互联网的根基,也是 IB 计算机科学和 WJEC 计算机科学考纲中的核心主题。要拿到网络题的高分,必须透彻理解其分层架构、核心协议、寻址机制以及数据传输原理。本复习指南系统梳理了所有重点,并以中英双语提供清晰讲解,助力双语学习者。
1. The TCP/IP Model – A Layered Approach | 层次化的 TCP/IP 模型
The TCP/IP model organises network communication into four abstraction layers, each responsible for a distinct function. From top to bottom, these layers are: Application, Transport, Internet, and Network Access (also called Link layer). This modular design allows protocols to operate independently, making the system scalable and easy to troubleshoot. In contrast to the seven‑layer OSI model, the TCP/IP model is older and more closely aligned with real‑world implementations such as the internet.
TCP/IP 模型将网络通信划分为四个抽象层,每层承担不同职责。自上而下依次为:应用层、传输层、互联网层和网络接入层(也称链路层)。这种模块化设计使得各协议可以独立运行,整个系统易于扩展和排错。与七层 OSI 模型相比,TCP/IP 模型更早提出,且更贴近互联网的实际实现。
2. Application Layer – User‑Facing Services | 应用层——面向用户的服务
The Application layer provides network services directly to end‑user applications. It includes high‑level protocols such as HTTP (web browsing), HTTPS (secure web), FTP (file transfer), SMTP (email sending), IMAP/POP3 (email retrieval), and DNS (domain name resolution). In the WJEC specification, you are expected to recall the purpose and well‑known port numbers of these protocols. IB students should also be able to explain how application‑layer data interacts with the transport layer via sockets.
应用层直接向最终用户的应用程序提供网络服务。它包含 HTTP(网页浏览)、HTTPS(安全网页)、FTP(文件传输)、SMTP(邮件发送)、IMAP/POP3(邮件接收)以及 DNS(域名解析)等高层协议。WJEC 考纲要求记住这些协议的用途及其公认端口号,而 IB 学生还应能解释应用层数据如何通过套接字与传输层交互。
3. Transport Layer – Reliable vs Unreliable Delivery | 传输层——可靠与不可靠的传递
The Transport layer manages end‑to‑end communication between host devices. It uses two major protocols: TCP (Transmission Control Protocol) and UDP (User Datagram Protocol). TCP provides a connection‑oriented, reliable service that guarantees data delivery and order through sequencing, acknowledgements, and retransmission. UDP, on the other hand, is connectionless and offers no delivery guarantees, making it faster and suitable for real‑time applications like video streaming or online gaming.
传输层负责主机之间的端到端通信。该层使用两种主要协议:TCP(传输控制协议)和 UDP(用户数据报协议)。TCP 提供面向连接的可靠服务,通过序列号、确认应答和重传机制保证数据按序送达。UDP 则无连接且不保证送达,因此速度更快,适用于视频流、在线游戏等实时应用。
4. TCP Three‑Way Handshake – Connection Establishment | TCP 三次握手——建立连接
Before data can be transmitted over TCP, the sender and receiver must establish a virtual connection using the three‑way handshake. Step one: the client sends a SYN segment with an initial sequence number x. Step two: the server replies with a SYN‑ACK segment, acknowledging x+1 and providing its own sequence number y. Step three: the client sends an ACK segment acknowledging y+1. After this exchange, full‑duplex communication can begin. The concept is a key exam favourite in both IB and WJEC papers.
通过 TCP 发送数据前,发送方与接收方必须借助三次握手建立虚拟连接。第一步:客户端发送一个 SYN 段,附带初始序列号 x。第二步:服务器回复一个 SYN‑ACK 段,确认 x+1 并提供自己的序列号 y。第三步:客户端发送 ACK 段,确认 y+1。完成此次信息交换后,双工通信便可开始。三次握手是 IB 和 WJEC 试卷中的高频考点。
5. Flow Control and Congestion Control | 流量控制与拥塞控制
TCP implements flow control using a sliding window mechanism. The receiver advertises a window size, indicating how many bytes it is prepared to accept. The sender may not exceed this limit, thus preventing buffer overflow at the receiver. Congestion control, on the other hand, aims to avoid overwhelming intermediate routers. Algorithms such as slow start, congestion avoidance, fast retransmit, and fast recovery dynamically adjust the sending rate. WJEC questions often require identification of these strategies, while IB essays may ask for an evaluation of their impact on network performance.
TCP 通过滑动窗口机制实现流量控制。接收方广播一个窗口大小,表明自己准备接收的字节数。发送方发送的数据量不得超过此值,从而防止接收方缓冲区溢出。拥塞控制则旨在避免中间路由器过载,具体算法包括慢启动、拥塞避免、快速重传和快速恢复,可动态调整发送速率。WJEC 考题常要求识别这些策略,而 IB 的论述题可能要求评价它们对网络性能的影响。
6. Internet Layer and IP Addressing | 互联网层与 IP 寻址
The Internet layer handles logical addressing and routing. Its core protocol, Internet Protocol (IP), delivers packets from source to destination based on IP addresses. IPv4 uses 32‑bit addresses written in dotted decimal notation (e.g., 192.168.1.10), while IPv6 uses 128‑bit addresses expressed in hexadecimal to address the shortage of IPv4 addresses. Devices are identified by an IP address combined with a subnet mask, which determines the network and host portions. Subnetting is a tested skill in WJEC, and IB students should also understand the structure of an IP packet header.
互联网层处理逻辑寻址和路由。其核心协议——网络互联协议 (IP) 根据 IP 地址将数据包从源头发送到目的地。IPv4 采用 32 位地址,以点分十进制表示(如 192.168.1.10);IPv6 则采用 128 位地址,用十六进制书写,以应对 IPv4 地址枯竭的问题。设备由 IP 地址和子网掩码共同标识,后者划分出网络位和主机位。子网划分是 WJEC 的实操考点,IB 学生还需了解 IP 数据包头的结构。
7. Routing and Packet Forwarding | 路由与数据包转发
Routers operate at the Internet layer and use routing tables to determine the best path for packets. A routing table contains entries for destination networks, next‑hop addresses, and metrics. When a router receives a packet, it examines the destination IP, performs a longest prefix match, and forwards the packet to the appropriate interface. Dynamic routing protocols such as OSPF and BGP automatically update routing tables. For exams, you may be asked to trace a packet journey or explain why a default gateway is essential.
路由器工作于互联网层,利用路由表为数据包确定最佳路径。路由表中包含目的网络、下一跳地址和度量值等条目。当路由器收到数据包时,会检查目的 IP,进行最长前缀匹配,然后将包转发到相应接口。OSPF 和 BGP 等动态路由协议可自动更新路由表。考试中可能出现数据包路径追踪题,或要求解释默认网关为何不可或缺。
8. Network Access Layer – Hardware and MAC | 网络接入层——硬件与 MAC
The Network Access layer defines the physical transmission of data and the protocols needed to access the medium. It encompasses Ethernet, Wi‑Fi, and the Address Resolution Protocol (ARP). ARP maps an IP address to a physical MAC address, enabling frames to be sent within a local network segment. WJEC specifications often include questions about MAC addresses (48 bits, unique per NIC), collision domains, and the role of switches. IB students should also connect this layer to OSI layers one and two.
网络接入层定义了数据的物理传输方式以及访问介质所需的协议。它涵盖以太网、Wi‑Fi 和地址解析协议 (ARP)。ARP 将 IP 地址映射为物理 MAC 地址,从而在局域网段内发送帧。WJEC 考纲常涉及 MAC 地址(48 位、每块网卡唯一)、冲突域以及交换机的作用,而 IB 学生还需将该层与 OSI 的第一、二层联系起来。
9. TCP/IP vs OSI Model – Key Comparisons | TCP/IP 与 OSI 模型的关键比较
Although the TCP/IP model is more commonly used, exam boards often require a comparison with the OSI model. The OSI model splits the Application layer into three separate layers (Application, Presentation, Session) and inserts a strict separation between Data Link and Physical layers. TCP/IP combines these into fewer layers. The following table summarises the mapping:
尽管 TCP/IP 模型更为常用,但考纲仍常要求将其与 OSI 模型对比。OSI 模型将应用层细分为三个独立层(应用层、表示层、会话层),并严格划分数据链路层和物理层,而 TCP/IP 把它们合并为较少的层。下表总结了二者的对应关系:
| TCP/IP Layer | OSI Layer(s) | Example Protocols |
|---|---|---|
| Application | Application, Presentation, Session | HTTP, DNS, FTP |
| Transport | Transport | TCP, UDP |
| Internet | Network | IP, ICMP |
| Network Access | Data Link, Physical | Ethernet, ARP |
For revision, remember that the OSI model is a theoretical framework, while TCP/IP is a practical implementation. IB essays may require a critical discussion of the benefits of a layered architecture, such as modularity, interoperability, and ease of troubleshooting.
复习时请记住,OSI 模型是一个理论框架,而 TCP/IP 是实际实现。IB 的论述题可能要求批判性讨论分层架构的好处,如模块化、互操作性和排错便利性。
10. Common Port Numbers and Socket Communication | 常用端口号与套接字通信
Each transport‑layer service is identified by a 16‑bit port number. Well‑known ports (0‑1023) are assigned to standard protocols: HTTP uses port 80, HTTPS uses 443, FTP uses 21 for control and 20 for data, SMTP uses 25, POP3 uses 110, IMAP uses 143, and DNS uses 53. A socket is the combination of an IP address and a port number, uniquely identifying a process on a host. Both WJEC and IB papers feature questions that test recognition of these port numbers and the concept of multiplexing.
传输层的每项服务都由一个 16 位端口号标识。公认端口(0‑1023)分配给标准协议:HTTP 使用端口 80,HTTPS 使用 443,FTP 控制连接使用 21、数据连接使用 20,SMTP 使用 25,POP3 使用 110,IMAP 使用 143,DNS 使用 53。套接字是 IP 地址与端口号的组合,唯一标识主机上的一个进程。WJEC 和 IB 试卷中均会出现考查这些端口号和多路复用概念的题目。
11. Typical Exam Questions and Answering Strategies | 常见考题与答题策略
In WJEC past papers, you might be asked: “Describe the role of the transport layer in the TCP/IP model” or “Explain how a web page is fetched using TCP/IP protocols.” IB questions often present a scenario and ask you to trace data flow, discuss the reliability of TCP versus UDP, or compare the TCP/IP model with OSI. Always structure your answer to address the command terms: ‘describe’, ‘explain’, ‘compare’. Use diagrams in your revision notes, but write clear prose in the exam.
在 WJEC 历年试题中,可能出现“描述传输层在 TCP/IP 模型中的作用”或“解释如何使用 TCP/IP 协议获取网页”等题目。IB 试题常给出一个场景,要求追踪数据流、讨论 TCP 与 UDP 的可靠性,或比较 TCP/IP 模型与 OSI 模型。答题时务必紧扣指令词(描述、解释、比较)。复习笔记中可以画图辅助,但考试时要写出条理清晰的文字。
12. Summary – Mastering TCP/IP for Your Exam | 总结——攻克 TCP/IP 考试
TCP/IP is a vast but structured topic. Focus on the four‑layer model, the handshake and reliability mechanisms of TCP, IP addressing and subnetting, the differences between TCP and UDP, and the mapping of key protocols to their functions and ports. Practice drawing the packet encapsulation process (data → segment → packet → frame) and explain how headers are added at each layer. With this bilingual revision guide, you now have a comprehensive resource to achieve top marks in IB and WJEC Computer Science networking components.
TCP/IP 是一个庞大但条理清晰的主题。请重点掌握四层模型、TCP 的握手与可靠传输机制、IP 寻址与子网划分、TCP 与 UDP 的差异,以及各关键协议的功能和端口对应关系。多加练习数据封装过程(数据 → 段 → 包 → 帧),并能解释每层如何添加头部信息。有了这份双语复习指南,你将拥有在 IB 和 WJEC 计算机科学网络板块中取得高分的完整资源。
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课程辅导,国外大学本科硕士研究生博士课程论文辅导