📚 TCP/IP Essentials for IB and Edexcel Computer Science | IB Edexcel 计算机:TCP/IP 考点精讲
The TCP/IP protocol suite is the backbone of modern networking and a fundamental topic in both IB Computer Science and Edexcel Computer Science qualifications. Understanding its layered architecture, key protocols, addressing schemes, and data flow is essential for exam success. This article distills the must-know concepts, common pitfalls, and exam-style insights to help you master TCP/IP with confidence.
TCP/IP协议族是现代网络的基石,也是IB计算机科学和Edexcel计算机科学考试中的核心主题。理解其分层架构、关键协议、寻址方案和数据流对于考试成功至关重要。本文提炼了必知概念、常见错误和应试技巧,帮助你自信掌握TCP/IP。
1. The TCP/IP Protocol Stack | TCP/IP协议栈
The TCP/IP model organises network communication into four abstract layers: Application, Transport, Internet, and Network Access (also called the Link layer). This structure simplifies the complex process of data transmission across interconnected networks. Each layer provides services to the layer above it and relies on the layer below to deliver data.
TCP/IP模型将网络通信组织为四个抽象层:应用层、传输层、网际层和网络接入层(也称链路层)。这种结构简化了数据在互联网络中传输的复杂过程。每一层为其上层提供服务,并依赖下层来传递数据。
Unlike the OSI model’s seven layers, TCP/IP was developed from practical implementations and maps more directly to real-world Internet protocols. Both IB and Edexcel exams frequently ask you to compare the two models or identify protocols at each layer.
与OSI模型的七层不同,TCP/IP模型源于实际实现,更直接地映射到现实世界的互联网协议。IB和Edexcel考试经常要求比较这两种模型或识别各层的协议。
| Layer (TCP/IP) | Function | Example Protocols |
|---|---|---|
| Application | High-level protocols for user applications | HTTP, HTTPS, FTP, SMTP, DNS |
| Transport | Host-to-host communication, reliability, flow control | TCP, UDP |
| Internet | Logical addressing, routing, packet forwarding | IP (IPv4, IPv6), ICMP, ARP |
| Network Access | Hardware addressing, access to physical media | Ethernet, Wi-Fi (802.11), PPP |
2. Application Layer Protocols | 应用层协议
Application layer protocols define how applications exchange data over a network. You must know their default port numbers and whether they use TCP or UDP. IB and Edexcel often test protocol–port–transport pairings, such as HTTP on TCP port 80.
应用层协议定义了应用程序如何在网络上交换数据。你必须知道它们的默认端口号以及使用TCP还是UDP。IB和Edexcel经常测试协议-端口-传输层的配对,例如HTTP使用TCP端口80。
Commonly tested application protocols include HTTP (port 80, TCP), HTTPS (443, TCP), FTP (21/20, TCP), SMTP (25, TCP), POP3 (110, TCP), IMAP (143, TCP), DNS (53, UDP/TCP), DHCP (67/68, UDP), SSH (22, TCP), and Telnet (23, TCP).
常见的考点应用协议包括HTTP(端口80,TCP)、HTTPS(443,TCP)、FTP(21/20,TCP)、SMTP(25,TCP)、POP3(110,TCP)、IMAP(143,TCP)、DNS(53,UDP/TCP)、DHCP(67/68,UDP)、SSH(22,TCP)和Telnet(23,TCP)。
DNS primarily uses UDP for queries, but zone transfers rely on TCP. FTP employs a separate control (port 21) and data (port 20) connection, a classic exam distinction.
DNS主要使用UDP进行查询,但区域传送依赖TCP。FTP使用独立控制连接(端口21)和数据连接(端口20),这是经典考点。
3. Transport Layer: TCP vs UDP | 传输层:TCP与UDP
The transport layer provides end-to-end communication. TCP (Transmission Control Protocol) offers reliable, connection-oriented delivery with error checking and flow control. UDP (User Datagram Protocol) provides connectionless, low-overhead delivery without guarantees, suitable for real-time applications.
传输层提供端到端通信。TCP(传输控制协议)提供可靠、面向连接的传输,具有错误检查和流量控制。UDP(用户数据报协议)提供无连接、低开销的传输,不保证送达,适用于实时应用。
TCP features a three-way handshake, sequencing, acknowledgements, sliding window, and congestion control. UDP skips the handshake, does not order packets, and is lightweight, making it ideal for streaming, DNS, and VoIP.
TCP的特性包括三次握手、序号、确认、滑动窗口和拥塞控制。UDP跳过握手,不排序数据包,轻量级,非常适合流媒体、DNS和VoIP。
| Feature | TCP | UDP |
|---|---|---|
| Connection | Connection-oriented | Connectionless |
| Reliability | Reliable, guarantees delivery | Unreliable, best-effort |
| Ordering | Sequenced via sequence numbers | No sequencing |
| Overhead | Higher (header 20 bytes) | Lower (header 8 bytes) |
| Error recovery | Retransmissions, checksum | Checksum only (optional) |
| Use cases | Web browsing, email, file transfer | Streaming, VoIP, DNS queries, online gaming |
4. TCP Three-Way Handshake | TCP三次握手
TCP establishes a connection using a three-way handshake: SYN, SYN-ACK, ACK. The client sends a SYN segment with a random sequence number. The server replies with SYN-ACK, acknowledging the client’s SYN and sending its own sequence number. The client then sends an ACK to confirm the connection.
TCP通过三次握手建立连接:SYN、SYN-ACK、ACK。客户端发送一个带有随机序列号的SYN报文段。服务器回复SYN-ACK,确认客户端的SYN并发送自己的序列号。然后客户端发送ACK以确认连接。
Client → Server: SYN, seq=x
Server → Client: SYN-ACK, seq=y, ack=x+1
Client → Server: ACK, seq=x+1, ack=y+1
The sequence and acknowledgement numbers ensure reliable in-order delivery. After the handshake, a full-duplex connection exists.
序列号和确认号确保可靠有序的传递。握手之后,全双工连接建立
Published by TutorHao | IB Computer Science Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)
屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导Cancel reply