📚 A-Level Computer Science: Network Fundamentals and Communication | A-Level计算机:网络基础与通信
In A-Level Computer Science, networking is a fundamental topic that explains how computers exchange data across different distances. Candidates need to understand the structure of networks, the roles of hardware devices, the protocols that govern communication, and the mechanisms that secure data in transit. This article provides a comprehensive revision guide aligned with the CIE syllabus.
在A-Level计算机科学中,网络是一个基础主题,它解释了计算机如何在不同距离之间交换数据。考生需要理解网络的结构、硬件设备的作用、管理通信的协议以及在传输过程中保护数据的安全机制。本文提供了一份与CIE考纲一致的全面复习指南。
1. Computer Networks and LAN/WAN | 计算机网络与局域网/广域网
A computer network is a collection of interconnected devices that can share data, software and hardware resources. Networks are classified by their geographic scope, ownership and the technology used to connect them.
计算机网络是一组互连设备,可以共享数据、软件和硬件资源。网络按地理范围、所有者和连接技术进行分类。
-
LAN (Local Area Network): A LAN covers a small area such as a school, office or home. It is usually owned privately, offers high data transfer speeds and low latency.
-
局域网(LAN): 局域网覆盖较小的区域,例如学校、办公室或家庭。它通常为私人所有,提供较高的数据传输速度和较低的延迟。
-
WAN (Wide Area Network): A WAN spans a large geographic area, often connecting multiple LANs across cities or countries. The Internet is the largest example of a WAN. WAN links often rely on telecommunications infrastructure and are slower and more expensive than LANs.
-
广域网(WAN): 广域网跨越较大的地理区域,通常连接跨城市或国家的多个局域网。互联网就是广域网最大的例子。广域网链路通常依赖电信基础设施,速度较慢且费用高于局域网。
-
MAN (Metropolitan Area Network): A MAN connects multiple LANs within a city or campus, offering a middle ground between LAN and WAN in terms of speed, cost and coverage.
-
城域网(MAN): 城域网连接城市或园区内的多个局域网,在速度、成本和覆盖范围方面介于局域网和广域网之间。
In CIE exams, candidates are often asked to compare LAN and WAN, so remember key points: area covered, ownership, bandwidth, latency and reliability.
在CIE考试中,常要求比较局域网和广域网,因此需记住关键点:覆盖区域、所有权、带宽、延迟和可靠性。
2. Network Topologies | 网络拓扑结构
A network topology describes the physical or logical arrangement of devices in a network. Understanding the advantages and disadvantages of each topology is essential for exam questions.
网络拓扑描述了网络中设备的物理或逻辑排列方式。理解每种拓扑的优缺点对考试题目至关重要。
-
Star topology: All devices connect to a central switch or hub. Data is sent through the central device. Advantages: easy to add new devices, centralised management, failure of one cable does not affect other nodes. Disadvantages: if the central device fails, the whole network stops; more cabling is required.
-
星型拓扑: 所有设备都连接到中心交换机或集线器。数据通过中心设备发送。优点:易于添加新设备,管理集中,单条电缆故障不会影响其他节点。缺点:如果中心设备故障,整个网络停止工作;需要的布线更多。
-
Bus topology: All devices share a single backbone cable with terminators at both ends. Advantages: low cost and simple to install. Disadvantages: a break in the backbone disables the entire network; performance degrades as more devices are added.
-
总线型拓扑: 所有设备共享一根主干电缆,两端带有终端电阻。优点:成本低且安装简单。缺点:主干电缆断裂会导致整个网络瘫痪;随着设备增加,性能下降。
-
Ring topology: Each device is connected to two neighbours, forming a closed loop. Data travels in one direction around the ring. Advantages: no collisions, predictable performance. Disadvantages: a single cable fault can break the entire ring unless a bypass mechanism is used.
-
环型拓扑: 每个设备与两个相邻设备相连,形成一个闭合环路。数据沿环路单向传输。优点:无冲突,性能可预测。缺点:除非使用旁路机制,否则单根电缆故障可能导致整个环中断。
-
Mesh topology: Devices are interconnected, either fully or partially. Advantages: high redundancy and fault tolerance; failure of one link does not stop communication. Disadvantages: expensive cabling and complex configuration.
-
网状拓扑: 设备之间相互连接,可以是全网状或部分网状。优点:冗余度高、容错性强;一条链路故障不会阻断通信。缺点:布线成本高、配置复杂。
When answering topology questions, always relate the topology to its typical use: star for LANs, mesh for critical backbone networks, bus for simple small networks.
回答拓扑题时,务必联系拓扑的典型应用:星型用于局域网,网状用于关键主干网络,总线用于简单小型网络。
3. Network Hardware and Devices | 网络硬件与设备
Various hardware components are used to build and operate networks. Each device has a specific role in enabling communication.
构建和运行网络需要使用各种硬件组件。每台设备在实现通信方面都有特定作用。
-
Network Interface Card (NIC): A NIC allows a device to connect to a network. Each NIC has a unique MAC address burned into the hardware, used for local addressing.
-
网卡(NIC): 网卡允许设备连接到网络。每张网卡在硬件中烧录了唯一的MAC地址,用于本地寻址。
-
Switch: A switch forwards data frames only to the intended destination device using MAC addresses. It operates at the data link layer and reduces unnecessary network traffic.
-
交换机: 交换机使用MAC地址只将数据帧转发给目标设备。它工作在数据链路层,减少不必要的网络流量。
-
Router: A router forwards packets between different networks using IP addresses. It operates at the network layer and is essential for connecting a LAN to the Internet.
-
路由器: 路由器使用IP地址在不同网络之间转发数据包。它工作在网络层,对于将局域网连接到互联网至关重要。
-
Hub: A hub broadcasts all incoming data to every port. It is inefficient because every connected device receives the data even if it is not the intended recipient.
-
集线器: 集线器将所有进入的数据广播到每一个端口。由于每个连接设备都会收到数据(即使不是目标接收者),效率较低。
-
Modem: A modem modulates digital signals into analogue signals for transmission over telephone or cable lines, and demodulates incoming analogue signals back to digital.
-
调制解调器: 调制解调器将数字信号调制成模拟信号,以便在电话线或电缆线路上传输,并将接收到的模拟信号解调回数字信号。
-
Access Point (AP): An access point allows wireless devices to connect to a wired network by converting between wireless and wired signals.
-
无线接入点(AP): 无线接入点通过转换无线和有线信号,允许无线设备连接到有线网络。
Exam tip: know the layer at which each device operates and the difference between MAC addressing and IP addressing.
考试提示:了解每个设备工作的层,以及MAC寻址与IP寻址之间的区别。
4. The OSI Seven-Layer Model | OSI七层模型
The Open Systems Interconnection (OSI) model divides network communication into seven abstract layers. Each layer has a defined function and communicates with the layer above and below it.
开放系统互连(OSI)模型将网络通信划分为七个抽象层。每一层都有明确的功能,并与上下层进行通信。
| Layer (层号) | Name (名称) | Function (功能) |
|---|---|---|
| 7 | Application | Provides network services to user applications, e.g. HTTP, FTP, SMTP. |
| 7 | 应用层 | 向用户应用程序提供网络服务,如HTTP、FTP、SMTP。 |
| 6 | Presentation | Handles data encoding, encryption and compression. |
| 6 | 表示层 | 处理数据编码、加密和压缩。 |
| 5 | Session | Establishes, manages and terminates sessions between applications. |
| 5 | 会话层 | 建立、管理和终止应用程序之间的会话。 |
| 4 | Transport | Provides end-to-end data delivery, flow control and error recovery. TCP and UDP work here. |
| 4 | 传输层 | 提供端到端数据传输、流量控制和错误恢复。TCP和UDP在此层工作。 |
| 3 | Network | Handles logical addressing, routing and packet forwarding. Routers operate here. |
| 3 | 网络层 | 处理逻辑寻址、路由和数据包转发。路由器在此层工作。 |
| 2 | Data Link | Transfers frames between directly connected nodes using MAC addresses. Switches operate here. |
| 2 | 数据链路层 | 使用MAC地址在直接相连的节点之间传输帧。交换机在此层工作。 |
| 1 | Physical | Transmits raw bits over physical media such as copper cables, fibre optics or radio waves. |
| 1 | 物理层 | 通过铜缆、光纤或无线电波等物理介质传输原始比特。 |
A useful mnemonic is “Please Do Not Throw Sausage Pizza Away” for layers 1 to 7 from bottom to top.
一个有用的记忆法是“Please Do Not Throw Sausage Pizza Away”,代表从下到上的第1层到第7层。
5. The TCP/IP Protocol Suite | TCP/IP协议族
The TCP/IP protocol suite is the foundation of the Internet. It contains four layers that correspond broadly to the OSI model but are simplified for practical implementation.
TCP/IP协议族是互联网的基础。它包含四层,大致对应OSI模型,但为了实际实现进行了简化。
-
Application layer: Provides protocols such as HTTP/HTTPS, FTP, SMTP, POP3 and DNS. It combines the functions of the OSI application, presentation and session layers.
-
应用层: 提供HTTP/HTTPS、FTP、SMTP、POP3和DNS等协议。它结合了OSI应用层、表示层和会话层的功能。
-
Transport layer: Offers TCP and UDP. TCP is connection-oriented, reliable and slower; UDP is connectionless, faster and less reliable.
-
传输层: 提供TCP和UDP。TCP面向连接、可靠但较慢;UDP无连接、更快但可靠性较低。
-
Internet layer: Handles logical addressing and routing using IP. The main protocol is IP, along with ICMP.
-
互联网层: 使用IP处理逻辑寻址和路由。主要协议是IP,以及ICMP。
-
Network interface layer: Combines the OSI data link and physical layers, allowing frames to be sent over the actual hardware.
-
网络接口层: 结合OSI数据链路层和物理层,允许帧在实际硬件上发送。
The table below compares TCP and UDP, which is a frequent exam topic.
下表比较TCP和UDP,这是常见的考试主题。
| Feature (特性) | TCP | UDP |
|---|---|---|
| Connection (连接) | Connection-oriented (面向连接) | Connectionless (无连接) |
| Reliability (可靠性) | High, with acknowledgements and retransmission (高,有确认和重传) | Low, no guaranteed delivery (低,不保证送达) |
| Speed (速度) | Slower (较慢) | Faster (较快) |
| Use cases (应用场景) | Web browsing, email, file transfer (网页浏览、电子邮件、文件传输) | Live streaming, VoIP, online gaming (直播、网络电话、在线游戏) |
6. IP Addressing and Subnetting | IP寻址与子网划分
Every device on an IP network needs a unique logical address. IP addressing operates at the network layer.
IP网络上的每台设备都需要唯一的逻辑地址。IP寻址工作在网络层。
IPv4 is a 32-bit address written as four decimal octets, e.g. 192.168.1.10. Each octet ranges from 0 to 255.
IPv4 是32位地址,写成四个十进制八位组,例如192.168.1.10。每个八位组范围为0到255。
IPv6 is 128 bits long, written in hexadecimal groups separated by colons, e.g. 2001:0db8:85a3:0000:0000:8a2e:0370:7334. IPv6 was introduced to solve IPv4 address exhaustion.
IPv6 长128位,以十六进制组表示,用冒号分隔,例如2001:0db8:85a3:0000:0000:8a2e:0370:7334。IPv6是为解决IPv4地址枯竭而引入的。
A subnet mask is used to split an IP address into network and host parts. For example, 255.255.255.0 means the first three octets identify the network and the last octet identifies the host.
子网掩码用于将IP地址划分为网络部分和主机部分。例如,255.255.255.0表示前三个八位组标识网络,最后一个八位组标识主机。
Subnet mask 255.255.255.0 → network part: first 3 octets; host part: last octet
子网掩码255.255.255.0 → 网络部分:前3个八位组;主机部分:最后1个八位组
-
MAC address: A 48-bit physical address like 00:1A:2B:3C:4D:5E, assigned by the manufacturer and used within a local network.
-
MAC地址: 类似于00:1A:2B:3C:4D:5E的48位物理地址,由制造商分配,在本地网络内使用。
-
Compare IP and MAC: IP addresses are logical, routable and changeable; MAC addresses are physical, not routable across networks and usually permanent.
-
比较IP与MAC: IP地址是逻辑的、可路由的且可更改;MAC地址是物理的、不能跨网络路由且通常固定不变。
In CIE questions, you may be asked to calculate the number of usable hosts in a subnet. For a subnet mask with n host bits, the number of usable addresses is 2ⁿ − 2.
在CIE题目中,可能要求计算子网中可用的主机数。对于有n个主机位的子网掩码,可用地址数为2ⁿ − 2。
Usable hosts = 2ⁿ − 2 (where n = number of host bits)
可用主机数 = 2ⁿ − 2 (其中n为主机位数)
7. Packets and Switching Techniques | 数据包与交换技术
Data transmitted over networks is usually split into smaller units called packets. Each packet contains both payload and header information.
网络上传输的数据通常被拆分为较小的单元,称为数据包。每个数据包包含有效载荷和头部信息。
-
Packet header: Includes source IP address, destination IP address, protocol type, sequence number and time-to-live (TTL).
-
数据包头部: 包括源IP地址、目标IP地址、协议类型、序号和生存时间(TTL)。
-
Payload: The actual application data being transported.
-
有效载荷: 正在传输的实际应用程序数据。
-
Circuit switching: A dedicated communication path is established between sender and receiver before data transfer. It guarantees constant bandwidth but wastes resources when idle. Traditional telephone networks use circuit switching.
-
电路交换: 在数据传输之前,发送方和接收方之间建立专用通信路径。它能保证恒定带宽,但空闲时浪费资源。传统电话网络采用电路交换。
-
Packet switching: Data is divided into packets and routed independently through the network. Packets may take different paths and be reassembled at the destination. The Internet uses packet switching for efficient resource sharing.
-
分组交换: 数据被分成数据包,并独立地通过网络路由。数据包可能走不同路径,在目的地重新组装。互联网使用分组交换以提高资源共享效率。
Packet switching is more robust because if one link fails, packets can be rerouted dynamically. However, packets may arrive out of order or be lost, requiring higher-layer protocols such as TCP to manage recovery.
分组交换更加健壮,因为如果一条链路故障,数据包可以动态重新路由。然而,数据包可能乱序到达或丢失,因此需要TCP等高层协议来管理恢复。
8. Error Detection and Correction | 错误检测与纠正
Data transmitted across networks can be corrupted by noise, interference or faults. Error detection methods are used to verify that received data matches the sent data.
网络中传输的数据可能因噪声、干扰或故障而损坏。错误检测方法用于验证接收到的数据与发送数据是否一致。
-
Parity check: An extra parity bit is added to a block of data. In even parity, the parity bit is chosen so that the total number of 1s is even; in odd parity, the total is odd.
-
奇偶校验: 在一组数据中增加一个额外的奇偶校验位。在偶校验中,奇偶校验位的取值使1的总数为
Published by TutorHao | A-Level Computer Science Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)
屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导