📚 IB WJEC Computer Science: Networking Fundamentals | IB WJEC 计算机:网络基础 考点精讲
Welcome to this comprehensive revision guide on Networking Fundamentals tailored for IB and WJEC Computer Science examinations. This article covers essential topics, from network topologies and protocols to IP addressing and security measures, ensuring you master the key concepts required for top marks.
欢迎阅读这份针对 IB 和 WJEC 计算机科学考试的网络基础全面复习指南。本文涵盖了从网络拓扑和协议到 IP 地址与安全措施等核心主题,帮助您掌握获得高分所需的关键概念。
1. Network Types and Topologies | 网络类型与拓扑结构
A Local Area Network (LAN) spans a small geographical area such as a school, office, or home, offering high data transfer rates and low latency. A Wide Area Network (WAN) connects LANs across cities, countries, or globally, often using leased telecommunication lines or satellite links. Personal Area Networks (PANs) are very short-range networks centered around an individual, typically using Bluetooth.
局域网(LAN)覆盖学校、办公室或家庭等较小的地理区域,提供高数据传输速率和低延迟。广域网(WAN)跨城市、国家或全球连接多个局域网,通常使用租用的电信线路或卫星链路。个人区域网(PAN)是以个人为中心的极短距离网络,通常使用蓝牙技术。
Common network topologies include star, bus, ring, and mesh. In a star topology, all devices connect to a central hub or switch; failure of a single cable only disconnects one device, but the central node is a single point of failure. A bus topology has all devices sharing a single backbone cable, which is simple but prone to collisions and limited in scalability. Ring topologies pass data in one direction, avoiding collisions but suffering from a break in the ring affecting the whole network. Mesh topologies provide multiple redundant paths between devices, offering high reliability but at a higher cabling cost.
常见的网络拓扑结构包括星型、总线型、环型和网状型。在星型拓扑中,所有设备连接到一个中央集线器或交换机;单根电缆故障只会断开一台设备,但中央节点是单点故障。总线型拓扑中所有设备共享一条主干电缆,设计简单但易发生冲突,可扩展性有限。环型拓扑中数据沿一个方向传递,避免了冲突,但环路的断裂会影响整个网络。网状拓扑在设备之间提供多条冗余路径,可靠性高,但布线成本较高。
2. Network Models: OSI and TCP/IP | 网络模型:OSI 与 TCP/IP
The Open Systems Interconnection (OSI) model is a conceptual framework dividing network communication into seven layers: Physical, Data Link, Network, Transport, Session, Presentation, and Application. Each layer serves specific functions and communicates with the layers directly above and below it. The TCP/IP model is a more streamlined, four-layer architecture consisting of the Link, Internet, Transport, and Application layers, mirroring the protocol suite that powers the modern internet.
开放系统互连(OSI)模型是一个概念框架,将网络通信分为七层:物理层、数据链路层、网络层、传输层、会话层、表示层和应用层。每一层承担特定功能,并与直接上下层通信。TCP/IP 模型是一个更精简的四层架构,包括链路层、互联网层、传输层和应用层,它反映了驱动现代互联网的协议套件。
Understanding these models is crucial for troubleshooting network issues. For instance, a faulty Ethernet cable is a Physical layer problem, an incorrect IP address relates to the Network layer, and a web browser failing to load a page often points to the Application layer or above. The TCP/IP model’s Internet layer handles logical addressing and routing via IP, while the Transport layer manages end-to-end communication using TCP or UDP.
理解这些模型对于排查网络问题至关重要。例如,有故障的以太网电缆是物理层问题,错误的 IP 地址与网络层相关,而网页浏览器无法加载页面通常指向应用层或更高层。TCP/IP 模型的互联网层通过 IP 处理逻辑寻址和路由,而传输层使用 TCP 或 UDP 管理端到端通信。
3. Protocols and Ports | 协议与端口
Network protocols define rules for data exchange. Each service is associated with a standard port number, enabling devices to direct traffic to the correct application. Below are some critical protocols and their well-known ports:
网络协议定义了数据交换的规则。每项服务都与一个标准端口号相关联,使设备能将流量定向到正确的应用程序。以下是一些关键协议及其众所周知的端口:
- HTTP (HyperText Transfer Protocol) – port 80, used for unencrypted web traffic
- HTTPS (HTTP Secure) – port 443, encrypts web traffic using TLS/SSL
- FTP (File Transfer Protocol) – ports 20 and 21, transfers files between a client and server
- SMTP (Simple Mail Transfer Protocol) – port 25, sends emails from a client to a server or between servers
- POP3 (Post Office Protocol 3) – port 110, retrieves emails from a server to a local client, typically deleting them from the server
- IMAP (Internet Message Access Protocol) – port 143, allows email management on the server without downloading
- DNS (Domain Name System) – port 53, translates domain names to IP addresses
- DHCP (Dynamic Host Configuration Protocol) – ports 67 and 68, automatically assigns IP addresses to devices
- SSH (Secure Shell) – port 22, provides encrypted remote terminal access
- HTTP(超文本传输协议) – 端口 80,用于未加密的网页流量
- HTTPS(安全 HTTP) – 端口 443,使用 TLS/SSL 加密网页流量
- FTP(文件传输协议) – 端口 20 和 21,在客户端和服务器之间传输文件
- SMTP(简单邮件传输协议) – 端口 25,将邮件从客户端发送给服务器或在服务器之间传递
- POP3(邮局协议版本3) – 端口 110,从服务器检索邮件到本地客户端,通常从服务器上删除邮件
- IMAP(互联网消息访问协议) – 端口 143,允许在服务器上管理邮件而无需下载
- DNS(域名系统) – 端口 53,将域名转换为 IP 地址
- DHCP(动态主机配置协议) – 端口 67 和 68,自动为设备分配 IP 地址
- SSH(安全外壳) – 端口 22,提供加密的远程终端访问
4. IP Addressing and Subnetting | IP 地址与子网划分
IPv4 addresses are 32-bit numbers usually written in dotted-decimal notation, e.g., 192.168.1.10. Each address belongs to a class (A, B, C, D, E), but classless addressing (CIDR) is widely used today. A subnet mask, such as 255.255.255.0 or /24, defines the network and host portions of an IP address.
IPv4 地址是 32 位数字,通常以点分十进制格式书写,如 192.168.1.10。每个地址属于一个类别(A、B、C、D、E),但如今广泛使用的是无类地址(CIDR)。子网掩码,例如 255.255.255.0 或 /24,定义了 IP 地址的网络部分和主机部分。
Subnetting allows a network administrator to divide a larger network into smaller, more manageable subnetworks. The number of usable host addresses in a subnet is calculated as:
子网划分允许网络管理员将较大的网络分割成更小、更便于管理的子网。一个子网中可用的主机地址数量计算公式为:
Usable hosts = 2^(32 − n) − 2
where n is the prefix length. The subtraction of two accounts for the network address and the broadcast address. Private IP ranges (e.g., 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) are reserved for internal use and are not routable on the public internet. Network Address Translation (NAT) allows multiple devices with private addresses to share a single public IP.
其中 n 是前缀长度。减去 2 是因为要保留网络地址和广播地址。私有 IP 范围(如 10.0.0.0/8、172.16.0.0/12、192.168.0.0/16)保留用于内部网络,不能在全球互联网上路由。网络地址转换(NAT)允许多个使用私有地址的设备共享一个公共 IP。
5. MAC Addresses and ARP | MAC 地址与 ARP
A Media Access Control (MAC) address is a unique 48-bit identifier burnt into the network interface card (NIC) by the manufacturer. It is represented as 6 pairs of hexadecimal digits, e.g., 00:1A:2B:3C:4D:5E. MAC addresses operate at the Data Link layer and are essential for delivering frames within a local network segment.
介质访问控制(MAC)地址是由制造商烧录在网络接口卡(NIC)中的唯一 48 位标识符。它表示为 6 对十六进制数字,如 00:1A:2B:3C:4D:5E。MAC 地址工作于数据链路层,对于在本地网段内传送帧至关重要。
The Address Resolution Protocol (ARP) resolves IP addresses to MAC addresses. When a device wants to communicate with another on the same LAN, it broadcasts an ARP request asking, “Who has IP address X?” The target device replies with its MAC address, and the mapping is stored in an ARP cache for future use. Reverse ARP (RARP) performs the opposite function, now largely replaced by DHCP.
地址解析协议(ARP)将 IP 地址解析为 MAC 地址。当一台设备想与同一局域网上的另一台设备通信时,会广播一个 ARP 请求,询问“谁拥有 IP 地址 X?”目标设备以其 MAC 地址回应,该映射关系被存储在 ARP 缓存中供将来使用。反向 ARP(RARP)执行相反功能,现已被 DHCP 大量取代。
6. Network Hardware: Routers, Switches, Hubs | 网络硬件:路由器、交换机、集线器
A hub is the simplest device, forwarding all incoming data to every port, which leads to collisions and inefficient bandwidth usage. A switch is more intelligent; it learns MAC addresses of connected devices and forwards frames only to the intended destination port, drastically reducing collisions. A router operates at the Network layer, connecting different networks and making forwarding decisions based on IP addresses. Routers maintain routing tables and exchange information using protocols like OSPF or BGP.
集线器是最简单的设备,将所有传入数据转发到每个端口,导致冲突和带宽使用效率低下。交换机更为智能;它能学习连接设备的 MAC 地址,并只将帧转发到目标端口,从而大幅减少冲突。路由器工作在网络层,连接不同的网络,并根据 IP 地址做出转发决策。路由器维护路由表,并使用 OSPF 或 BGP 等协议交换信息。
Additional devices include bridges, which filter traffic between two LAN segments, and gateways, which translate between different protocols. Modems modulate and demodulate signals for transmission over telephone lines, cable, or fibre. In modern home setups, a single device often combines the functions of a modem, router, switch, and wireless access point.
其他设备包括网桥,用于过滤两个局域网段之间的流量;以及网关,用于在不同协议间进行转换。调制解调器调制和解调信号,以便通过电话线、电缆或光纤传输。在现代家庭设置中,单个设备通常集成了调制解调器、路由器、交换机和无线接入点等多种功能。
7. Domain Name System (DNS) | 域名系统 (DNS)
The Domain Name System translates human-friendly domain names (like http://www.example.com) into machine-readable IP addresses. It is a hierarchical, distributed database. When a user enters a URL, the resolver first checks the local cache and hosts file. If not found, it queries a recursive DNS server, which may contact root servers, top-level domain (TLD) servers, and authoritative nameservers until the IP address is resolved.
域名系统将人类易记的域名(如 http://www.example.com)转换为机器可读的 IP 地址。它是一个分层、分布式数据库。当用户输入一个 URL 时,解析器首先检查本地缓存和 hosts 文件。若未找到,则查询递归 DNS 服务器,该服务器可能会联系根服务器、顶级域(TLD)服务器和权威名称服务器,直到解析出 IP 地址。
DNS uses both iterative and recursive queries. In an iterative query, the DNS server responds with the best answer it has, often a referral to another server. In a recursive query, the server takes full responsibility for finding the answer, querying other servers on behalf of the client. DNS records (A, AAAA, CNAME, MX, etc.) serve different functions, like mapping a domain to an IPv4 or IPv6 address or directing email servers.
DNS 使用迭代和递归查询。在迭代查询中,DNS 服务器以其所拥有的最佳答案进行回应,通常是建议查询另一台服务器。在递归查询中,服务器承担查找答案的全部责任,代表客户端查询其他服务器。DNS 记录(A、AAAA、CNAME、MX 等)提供不同功能,如将域名映射到 IPv4 或 IPv6 地址,或指示邮件服务器。
8. Network Security: Firewalls and Encryption | 网络安全:防火墙与加密
Network security protects data integrity, confidentiality, and availability. A firewall monitors incoming and outgoing traffic based on predefined rules. Packet-filtering firewalls inspect headers and drop packets that do not meet criteria. Stateful inspection firewalls maintain a state table of active connections, offering deeper analysis. Proxy firewalls act as intermediaries, hiding internal network addresses.
网络安全保护数据的完整性、机密性和可用性。防火墙根据预定义的规则监控进出流量。包过滤防火墙检查包头,丢弃不符合条件的数据包。状态检测防火墙维护一个活动连接的状态表,进行更深入的分析。代理防火墙充当中介,隐藏内部网络地址。
Encryption transforms plaintext into ciphertext to prevent unauthorised access. Symmetric encryption uses the same key for encryption and decryption (e.g., AES), while asymmetric encryption uses a public-private key pair (e.g., RSA). SSL/TLS protocols secure HTTP traffic, resulting in HTTPS, and use a combination of asymmetric encryption for key exchange and symmetric encryption for bulk data transfer. Other security measures include intrusion detection systems (IDS), virtual private networks (VPNs), and robust authentication methods.
加密将明文转换为密文以防止未授权访问。对称加密使用相同的密钥进行加密和解密(如 AES),而非对称加密使用公钥-私钥对(如 RSA)。SSL/TLS 协议用于保护 HTTP 流量,从而形成 HTTPS,并采用非对称加密交换密钥、对称加密传输大量数据的组合方式。其他安全措施包括入侵检测系统(IDS)、虚拟专用网络(VPN)以及强健的身份验证方法。
9. Data Switching: Circuit Switching and Packet Switching | 数据交换:电路交换与分组交换
Circuit switching establishes a dedicated physical path between two endpoints for the duration of a communication session. The dedicated path guarantees constant bandwidth and in-order delivery, making it suitable for real-time voice calls. However, it is inefficient for bursty data because the circuit remains tied up even during silent periods.
电路交换在通信会话期间为两个端点建立专用的物理路径。专用路径保证了恒定的带宽和按序传输,使其适用于实时语音通话。但对于突发性数据而言,效率低下,因为即使在静默期电路仍然被占用。
Packet switching breaks data into small packets that are routed independently through the network. Each packet contains source and destination addresses and a sequence number, allowing them to be reassembled at the destination. This offers highly efficient utilisation of network resources, as multiple communications can share the same links. The internet is based on packet switching, which can lead to variable delays and out-of-order delivery but is robust to failures and highly scalable.
分组交换将数据分成小的数据包,在网络中独立路由。每个数据包包含源和目的地址以及序列号,以便在目的地重组。这使网络资源得到高效利用,因为多路通信可以共享相同链路。互联网基于分组交换,这可能导致变化的延迟和乱序到达,但对故障具有鲁棒性且高度可扩展。
10. Wireless Networks and Standards | 无线网络与标准
Wireless local area networks (WLANs) typically follow the IEEE 802.11 family of standards. Common versions include 802.11b, 802.11g, 802.11n (Wi-Fi 4), 802.11ac (Wi-Fi 5), and 802.11ax (Wi-Fi 6). These differ in frequency bands (2.4 GHz vs. 5 GHz vs. 6 GHz), data rates, and modulation techniques. MIMO technology in newer standards uses multiple antennas to improve throughput and range.
无线局域网(WLAN)通常遵循 IEEE 802.11 系列标准。常见版本包括 802.11b、802.11g、802.11n(Wi-Fi 4)、802.11ac(Wi-Fi 5)和 802.11ax(Wi-Fi 6)。它们在频段(2.4 GHz 对比 5 GHz 对比 6 GHz)、数据速率和调制技术方面有所不同。较新标准中的 MIMO 技术使用多天线来提高吞吐量和覆盖范围。
Security in wireless networks is paramount. WPA2 (Wi-Fi Protected Access 2) with AES encryption has long been the standard; WPA3 introduces stronger encryption and protection against offline dictionary attacks. Bluetooth is a short-range wireless technology for PANs, using frequency-hopping spread spectrum to reduce interference. While Wi-Fi is designed for high-throughput networking, Bluetooth focuses on low-power device interconnectivity.
无线网络中的安全性至关重要。采用 AES 加密的 WPA2(Wi-Fi 保护访问 2)长期以来一直是标准;WPA3 引入了更强的加密和针对离线字典攻击的保护。蓝牙是用于 PAN 的短距离无线技术,采用跳频扩频技术减少干扰。Wi-Fi 专为高吞吐量网络设计,而蓝牙则侧重于低功耗设备互连。
11. VPN and Proxy Servers | 虚拟专用网络与代理服务器
A Virtual Private Network (VPN) creates an encrypted tunnel over a public network, allowing remote users to securely access a private internal network. It protects data confidentiality and can make a user’s traffic appear to originate from a different location. Common VPN protocols include IPsec, OpenVPN, and WireGuard.
虚拟专用网络(VPN)在公共网络上创建加密隧道,允许远程用户安全地访问私有内部网络。它保护数据的机密性,并可使用户的流量看起来来自不同位置。常见的 VPN 协议包括 IPsec、OpenVPN 和 WireGuard。
A proxy server acts as an intermediary between a client and the internet. It can filter web requests, cache content, and hide the client’s IP address. Unlike a VPN, a standard proxy does not encrypt all traffic, and it typically operates at the application level. Both technologies are used for bypassing geographic restrictions and enhancing privacy, but VPNs generally provide a higher degree of security and anonymity.
代理服务器充当客户端与互联网之间的中介。它可以过滤网络请求、缓存内容并隐藏客户端的 IP 地址。与 VPN 不同,标准代理并不加密所有流量,且通常工作在应用层。这两种技术都可用于绕过地理限制和增强隐私,但 VPN 通常提供更高程度的安全性和匿名性。
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课程辅导,国外大学本科硕士研究生博士课程论文辅导