华南理工大学计算机网络试卷期中卷

选择题


1. 问题
英文: What is the term to describe the maximum number of bits that can be transferred in a given amount of time?
中文: 描述在给定时间内可以传输的最大比特数的术语是什么?

选项:
A. impedance(阻抗)
B. propagation(传播)
C. attenuation(衰减)
D. bandwidth(带宽)

答案: D. bandwidth
解释:
• 英文: Bandwidth refers to the maximum data transfer rate of a network or communication channel, measured in bits per second (bps).

• 中文: 带宽指网络或通信信道的最大数据传输速率,单位为比特每秒(bps)。


2. 问题
英文: Which factor reduces throughput?
中文: 以下哪个因素会降低吞吐量?

选项:
A. increased number of users(用户数增加)
B. decreased number of users(用户数减少)
C. increased distance of network(网络距离增加)
D. decreased distance of network(网络距离减少)

答案: A. increased number of users
解释:
• 英文: More users sharing the same network resources (e.g., bandwidth) lead to congestion, reducing effective throughput.

• 中文: 更多用户共享同一网络资源(如带宽)会导致拥塞,从而降低有效吞吐量。


3. 问题
英文: Which of the following best describes networking protocols?
中文: 以下哪项最准确地描述了网络协议?

选项:
A. 管理网络设备间信息交换的规则和约定的正式描述
B. 所有网络使用相同的拓扑结构
C. 可自定义以满足个人需求的一组指南
D. 以上所有

答案: A. a formal description of a set of rules and conventions that govern how devices on a network exchange information
解释:
• 英文: Protocols are standardized rules (e.g., TCP/IP, HTTP) defining data formats, error handling, and communication procedures.

• 中文: 协议是标准化规则(如TCP/IP、HTTP),定义了数据格式、错误处理和通信流程。


4. 问题
英文: What is the function of the session layer?
中文: 会话层的功能是什么?

选项:
A. 处理数据结构和数据传输语法的协商
B. 提供跨物理层的数据可靠传输
C. 提供端系统间的连通性和路径选择
D. 管理表示层实体间的数据交换

答案: D. manages data exchange between presentation layer entities
解释:
• 英文: The session layer (Layer 5) establishes, maintains, and synchronizes dialogues between applications (e.g., login sessions).

• 中文: 会话层(第5层)负责建立、维护和同步应用间的对话(如登录会话)。


5. 问题
英文: Which of the following are not the advantages of UTP cable installation?
中文: 以下哪项不是UTP电缆安装的优点?

选项:
A. 比光纤介质更便宜
B. 灵活且易于在建筑物中安装
C. 比光纤介质更少受到RFI和EMI干扰
D. 被认为是最快的铜基介质

答案: C. receives less RFI and EMI interference than fiber optic media
解释:
• 英文: UTP (Unshielded Twisted Pair) is more susceptible to RFI/EMI than fiber optics, which use light and are immune to electromagnetic interference.

• 中文: UTP(非屏蔽双绞线)比光纤更易受射频/电磁干扰(RFI/EMI),光纤使用光信号,不受电磁干扰影响。


6. 问题
英文: What is the Organizational Unique Identifier (OUI)?
中文: 什么是组织唯一标识符(OUI)?

选项:
A. MAC地址的所有十六进制数字
B. MAC地址的前6位十六进制数字
C. MAC地址的后6位十六进制数字
D. 所有网络设备型号的前缀

答案: B. the 1st 6 hex digits of a MAC address
解释:
• 英文: The OUI is the first 3 bytes (6 hex digits) of a MAC address, assigned by IEEE to manufacturers (e.g., 00:1A:2B). The last 6 digits are device-specific.

• 中文: OUI是MAC地址的前3字节(6位十六进制数),由IEEE分配给厂商(如00:1A:2B),后6位由厂商自定义。


7. 问题
英文: In a connection-oriented system, what happens before any user data is transferred?
中文: 在面向连接的系统中,用户数据传输前会发生什么?

选项:
A. 与接收方的本地路由器建立连接
B. 在发送方和接收方之间建立连接
C. 与发送方的本地路由器建立连接
D. 实际数据传输前不联系目标设备

答案: B. a connection is established between the sender and receiver
解释:
• 英文: Connection-oriented protocols (e.g., TCP) require a handshake (e.g., 3-way handshake) to establish a session before data transfer.

• 中文: 面向连接的协议(如TCP)需通过握手(如三次握手)建立会话,然后才传输数据。


8. 问题
英文: Two peer hosts exchange data using UDP. If a datagram fails to arrive, what is true about retransmission?
中文: 两台主机使用UDP交换数据。若数据报未到达目的地,关于重传哪项正确?

选项:
A. 源主机的重传计时器超时后重传
B. 目标主机的重传计时器超时后重传
C. 重传由应用层协议控制
D. 仅重传序号≥当前数据报的数据

答案: C. Datagram retransmission is controlled by the application layer protocol.
解释:
• 英文: UDP itself does not retransmit. If reliability is needed, the application layer (e.g., QUIC, DNS retry) must handle retransmission.

• 中文: UDP本身不负责重传。若需可靠性,应用层协议(如QUIC、DNS重试)需自行实现重传。 、

UDP是不保障这个的!


9. 问题
英文: What describes the time to move a packet from the data link layer to the physical layer?
中文: 描述数据包从数据链路层移动到物理层所需时间的术语是什么?

选项:
A. 数据包延迟
B. 传输时间
C. 收敛
D. 排队

答案: B. Transmission time
解释:
• 英文: Transmission time = time to push all bits of a packet onto the physical medium (depends on packet size and link bandwidth).

• 中文: 传输时间 = 将数据包所有比特推送到物理介质的时间(取决于数据包大小和链路带宽)。


10. 问题
英文: Switches that receive the entire frame before sending it, use what type of frame forwarding?
中文: 在发送前接收完整帧的交换机使用哪种帧转发方式?

选项:
A. 直通转发
B. 接收并发送
C. 复制并发送
D. 存储转发

答案: D. Store-and-forward
解释:
• 英文: Store-and-forward switches buffer and check the entire frame for errors before forwarding, unlike cut-through (A) which forwards immediately after reading the destination MAC.

• 中文: 存储转发交换机会缓存并检查完整帧的完整性,而直通转发(A)仅读取目标MAC后立即转发。


11. 问题
英文: Frame tagging functions at what OSI layer?
中文: 帧标记(Frame tagging)在OSI哪一层起作用?

选项:
A. 2(数据链路层)
B. 3(网络层)
C. 1(物理层)
D. 4(传输层)

答案: A. 2
解释:
• 英文: Frame tagging (e.g., IEEE 802.1Q for VLANs) adds a tag to Ethernet frames to identify VLAN membership, which operates at Layer 2 (Data Link Layer).

• 中文: 帧标记(如VLAN使用的IEEE 802.1Q)在数据链路层(第2层)为以太网帧添加标记以标识VLAN归属。


12. 问题
英文: Dynamic VLANs can be based on which of the following?
中文: 动态VLAN可以基于以下哪项配置?

选项:
A. MAC地址
B. 协议类型
C. 逻辑地址
D. 以上所有

答案: D. All of the above
解释:
• 英文: Dynamic VLANs can assign ports to VLANs based on:

• MAC addresses (most common).

• Protocol type (e.g., IP vs. IPX).

• Logical addressing (e.g., subnet-based VLANs).

• 中文: 动态VLAN可根据以下条件分配端口:

• MAC地址(最常见)。

• 协议类型(如IP或IPX)。

• 逻辑地址(如基于子网的VLAN)。


13. 问题
英文: VLANs, along with routers, establish which of the following?
中文: VLAN与路由器共同建立了什么?

选项:
A. 广域网(WAN)
B. 局域网(LAN)
C. 广播域
D. 冲突域

答案: C. Broadcast domains
解释:
• 英文: VLANs segment broadcast domains (each VLAN is a separate broadcast domain). Routers further isolate broadcasts between VLANs.

• 中文: VLAN用于分割广播域(每个VLAN是一个独立广播域),路由器则隔离不同VLAN间的广播。


14. 问题
英文: What do HDLC, PPP, Frame Relay, and ISDN have in common?
中文: HDLC、PPP、帧中继和ISDN的共同点是什么?

选项:
A. 它们工作在物理层。
B. 它们工作在网络层。
C. 它们工作在数据链路层。
D. 它们是专有标准。

答案: C. They operate at the data link layer.
解释:
• 英文: These protocols are Layer 2 (Data Link Layer) technologies for WAN connections:

• HDLC/PPP: Point-to-point links.

• Frame Relay: Packet-switched networks.

• ISDN: Digital telephony (D channel uses LAPD, a data link protocol).

• 中文: 这些协议均属于数据链路层(第2层)的广域网技术:

• HDLC/PPP:点对点链路。

• 帧中继:分组交换网络。

• ISDN:数字电话(D信道使用LAPD协议)。


15. 问题
英文: What PPP protocol is used to establish, maintain, and terminate the point-to-point connection?
中文: PPP协议中,用于建立、维护和终止点对点连接的是什么?

选项:
A. SNMP(简单网络管理协议)
B. IPX/SPX(Novell协议栈)
C. TCP/IP(传输控制协议/网际协议)
D. LCP(链路控制协议)

答案: D. LCP
解释:
• 英文: LCP (Link Control Protocol) is a sub-protocol of PPP responsible for link setup, maintenance, and teardown.

• 中文: LCP(链路控制协议)是PPP的子协议,负责链路的建立、维护和断开。


问答题


问题1
英文: Why Ethernet chooses CSMA/CD as its protocol instead of others. Please list its advantages and compare it with slotted ALOHA, pure ALOHA and CSMA.
中文: 为什么以太网选择CSMA/CD作为其协议?请列出其优势,并与时隙ALOHA、纯ALOHA和CSMA进行比较。

答案与解析:

  1. CSMA/CD的优势:
    • 冲突检测(Collision Detection):

    ◦ 英文: CSMA/CD detects collisions during transmission and immediately stops sending, reducing wasted bandwidth.

    ◦ 中文: 在传输中检测到冲突后立即停止发送,减少带宽浪费。

    • 高效信道利用率:

    ◦ 英文: Higher efficiency than ALOHA variants because it minimizes collision windows.

    ◦ 中文: 相比ALOHA协议,通过减少冲突窗口提高信道利用率。

    • 适应性:

    ◦ 英文: Adapts to dynamic network loads (e.g., exponential backoff for retransmission).

    ◦ 中文: 适应动态网络负载(如指数退避重传机制)。

  2. 与其他协议的对比:
    | 协议 | 英文特点 | 中文特点 | | ------------- | ---------------------------------------------------- | --------------------------------------- | | Pure ALOHA | No carrier sensing; collisions frequent. | 无载波侦听,冲突率高。 | | Slotted ALOHA | Time-slotted transmission; doubles efficiency. | 时隙划分传输,效率翻倍但仍低于CSMA/CD。 | | CSMA | Listens before sending but cannot detect collisions. | 发送前侦听,但无法检测冲突。 | | CSMA/CD | Listens + detects collisions; optimal for Ethernet. | 侦听+冲突检测,是以太网的最优选择。 |

总结:
• 英文: CSMA/CD balances efficiency and practicality, making it ideal for wired Ethernet where collision detection is feasible.

• 中文: CSMA/CD在效率和实用性间取得平衡,适用于有线以太网(冲突检测可行)。


问题2
英文: Use module 2 arithmetic to compute the CRC code for message 101101110011 with the generator 10011.
中文: 使用模2算术计算消息101101110011的CRC校验码(生成多项式为10011)。

答案与解析:

  1. 步骤:
    • Step 1: Append n-1 zeros to the message (n = generator length).

    ◦ 消息扩展: 101101110011 + 0000 = 1011011100110000.

    • Step 2: Divide the extended message by 10011 using XOR (模2除法).

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    1011011100110000  
    XOR 10011
    ------------
    00101
    XOR 10011
    ------------
    01000
    XOR 10011
    ------------
    00110 (余数 = CRC码)
    • Step 3: Append the remainder (0110) to the original message.

    ◦ 最终CRC帧: 101101110011 + 0110 = 1011011100110110.

  2. 关键点:
    • 英文: The CRC code is the remainder of the division. It ensures data integrity by detecting errors during transmission.

    • 中文: CRC码是模2除法的余数,用于检测传输中的错误。

图示:

1
2
3
4
生成多项式: 1 0 0 1 1 (x⁴ + x + 1)  
消息: 1 0 1 1 0 1 1 1 0 0 1 1
扩展消息: 1 0 1 1 0 1 1 1 0 0 1 1 0 0 0 0
余数: 0 1 1 0 → CRC码 = 0110

最终答案:
• CRC校验码: 0110

• 完整传输帧: 1011011100110110


总结
1. CSMA/CD:以太网选择其因冲突检测和高效性,优于ALOHA和CSMA。
2. CRC计算:通过模2除法生成校验码,确保数据完整性。

问题3:数据链路层LLC协议从“无限制单工协议”到“滑动窗口协议”的发展过程

英文答案与解析
Question: Explain the evolution of the data link layer LLC protocol from "An Unrestricted Simplex Protocol" to "Sliding Window Protocols".

Answer:

  1. Unrestricted Simplex Protocol (无限制单工协议)
    • Characteristics:

    ◦ Simplex Communication: Data flows one-way (sender → receiver).

    ◦ No Flow Control: The sender transmits frames continuously without waiting for acknowledgments (ACKs).

    ◦ No Error Control: If a frame is lost/corrupted, there is no recovery mechanism.

    • Limitation:

    ◦ Useless in real networks where errors and bidirectional communication are required.

  2. Stop-and-Wait Protocol (停止等待协议)
    • Improvements:

    ◦ Half-Duplex: Adds ACKs (acknowledgments) for reliability.

    ◦ Flow Control: The sender waits for an ACK before sending the next frame.

    ◦ Error Handling: If no ACK is received within a timeout, the sender retransmits.

    • Limitation:

    ◦ Low efficiency (only 1 frame in transit at a time).

  3. Sliding Window Protocols (滑动窗口协议)
    • Key Innovations:

    ◦ Full-Duplex: Allows bidirectional data flow with ACKs piggybacked on data frames.

    ◦ Window-Based Transmission:

    ◦ The sender can transmit multiple frames (up to window size) without waiting for individual ACKs.  
    
    ◦ The receiver uses cumulative ACKs (e.g., ACK=n means all frames up to n-1 are received).  

    ◦ Selective Repeat / Go-Back-N:

    ◦ Go-Back-N: Retransmits all frames from the lost one (simpler but less efficient).  
    
    ◦ Selective Repeat: Retransmits only the lost frame (higher efficiency but complex).  

    • Advantages:

    ◦ Maximizes throughput by keeping the link busy.

    ◦ Handles errors and flow control dynamically.


中文答案与解析
问题:解释数据链路层LLC协议从“无限制单工协议”到“滑动窗口协议”的发展过程。

答案:

  1. 无限制单工协议
    • 特点:

    ◦ 单向通信:数据只能从发送方→接收方。

    ◦ 无流量控制:发送方持续发送帧,无需等待确认(ACK)。

    ◦ 无差错控制:若帧丢失/损坏,无法恢复。

    • 缺点:

    ◦ 无法在实际网络中应用(需双向通信和差错控制)。

  2. 停止等待协议
    • 改进:

    ◦ 半双工:引入ACK确认机制确保可靠性。

    ◦ 流量控制:发送方必须收到ACK后才发送下一帧。

    ◦ 差错处理:超时未收到ACK则重传。

    • 缺点:

    ◦ 效率低(同一时间只能传1帧)。

  3. 滑动窗口协议
    • 核心改进:

    ◦ 全双工:支持双向数据传输,ACK可搭载在数据帧上。

    ◦ 基于窗口的传输:

    ◦ 发送方可连续发送多帧(窗口大小内),无需逐帧等待ACK。  
    
    ◦ 接收方使用累积ACK(如ACK=n表示n-1及之前的帧已接收)。  

    ◦ 选择重传/回退N帧:

    ◦ 回退N帧:从丢失帧开始全部重传(简单但效率低)。  
    
    ◦ 选择重传:仅重传丢失帧(高效但复杂)。  

    • 优势:

    ◦ 通过保持链路繁忙最大化吞吐量。

    ◦ 动态处理差错和流量控制。


关键对比总结
| 协议 | 英文关键点 | 中文关键点 | | -------------- | -------------------------------------------------- | -------------------------------- | | 无限制单工协议 | One-way, no ACKs, no error recovery. | 单向、无ACK、无差错恢复。 | | 停止等待协议 | Adds ACKs and timeout-based retransmission. | 引入ACK和超时重传机制。 | | 滑动窗口协议 | Window-based, full-duplex, dynamic error handling. | 基于窗口、全双工、动态差错控制。 |

图示演进过程:

1
单向无控制 → 半双工+ACK → 全双工+窗口+动态重传

技术意义:
• 英文: Sliding window protocols (e.g., TCP) are the foundation of modern reliable communication.

• 中文: 滑动窗口协议(如TCP)是现代可靠通信的基础。

问题4:计算CSMA/CD网络的最小帧大小
英文问题:
Consider building a CSMA/CD network running at 500 Mbps over a 2-km cable with no repeaters. The signal speed in the cable is 200,000 km/sec. What is the minimum frame size? Why?

中文问题:
假设构建一个基于CSMA/CD协议的网络,速率为500 Mbps,使用2公里长的电缆(无中继器),信号在电缆中的传播速度为200,000 km/sec。最小帧大小是多少?为什么?


答案与解析
1. 计算原理:
• 英文:

 ◦ CSMA/CD requires that a frame must be long enough to detect collisions before transmission completes.  

 ◦ Round-trip propagation delay (RTT) = $ \frac{2 \times \text{distance}}{\text{speed}} = \frac{2 \times 2\,\text{km}}{200,000\,\text{km/sec}} = 20\,\mu\text{sec} $.  

 ◦ Minimum frame transmission time ≥ RTT to ensure collision detection.  

 ◦ Frame size = $ \text{Data rate} \times \text{Time} = 500\,\text{Mbps} \times 20\,\mu\text{sec} = 10,000\,\text{bits} $.  

• 中文:

 ◦ CSMA/CD要求帧的传输时间必须不小于往返传播延迟,以确保冲突检测。  

 ◦ 往返延迟(RTT) = $ \frac{2 \times 2\,\text{公里}}{200,000\,\text{公里/秒}} = 20\,\mu\text{秒} $。  

 ◦ 最小帧传输时间 ≥ 20 μsec。  

 ◦ 最小帧大小 = $ 500\,\text{Mbps} \times 20\,\mu\text{秒} = 10,000\,\text{比特} $。  
  1. 结果:
    • 最小帧大小:10,000 bits(即1250字节)。

    • 英文原因:If the frame were shorter, a collision might occur after the sender finishes transmission, making it undetectable.

    • 中文原因:若帧更短,冲突可能在发送完成后才发生,导致无法检测。


问题5:存储转发与直通交换机的区别
英文问题:
Briefly describe the difference between store-and-forward and cut-through switches.

中文问题:
简要描述存储转发(store-and-forward)与直通(cut-through)交换机的区别。


答案与解析
| 特性 | Store-and-Forward(存储转发) | Cut-Through(直通) | | -------- | ------------------------------------------------------------ | ------------------------------------------------------------ | | 工作方式 | 英文:Receives the entire frame before forwarding.
中文:接收完整帧后再转发。 | 英文:Forwards after reading the destination MAC (immediately).
中文:读取目标MAC后立即转发。 | | 延迟 | 英文:Higher latency (waits for full frame).
中文:延迟较高(需缓存完整帧)。 | 英文:Lower latency.
中文:延迟更低。 | | 错误检测 | 英文:Checks CRC before forwarding (drops corrupted frames).
中文:转发前校验CRC(丢弃错误帧)。 | 英文:No error checking (may forward bad frames).
中文:无差错检测(可能转发错误帧)。 | | 适用场景 | 英文:Used in reliable networks (e.g., enterprise LANs).
中文:高可靠性网络(如企业网)。 | 英文:Used in low-latency applications (e.g., HFT).
中文:低延迟场景(如高频交易)。 |

关键区别图示:

1
2
存储转发: [帧开始 → 接收完整帧 → 校验CRC → 转发]  
直通: [帧开始 → 读取目标MAC → 立即转发]

总结:
• 英文:Store-and-forward ensures reliability at the cost of latency; cut-through prioritizes speed but risks error propagation.

• 中文:存储转发牺牲延迟保证可靠性,直通牺牲可靠性追求低延迟。

问题6:根据图片内容识别协议并解释字段含义


1. 协议识别(Protocol Identification)
英文:
The figures depict two distinct data link layer protocols:
1. Figure 1 & 2: PPP (Point-to-Point Protocol)
• Key Evidence:

 ◦ Flags (`01111110`) for frame delimitation.  

 ◦ 8-bit Address (`11111111`) and Control (`00000011`) fields (standard in PPP).  

 ◦ Variable-length Data and 16-bit Checksum.  
  1. Figure 3: Ethernet II (DIX) Frame
    • Key Evidence:

    ◦ 6-byte MAC addresses (Destination/Source).

    ◦ Type field (e.g., 0x0800 for IPv4).

    ◦ Data (0–1500B) and 4-byte FCS (Frame Check Sequence).

中文:
图片展示了两种数据链路层协议:
1. 图1和图2:PPP(点对点协议)
• 依据:

 ◦ 帧定界标志(`01111110`)。  

 ◦ 8位地址(`11111111`)和控制字段(`00000011`,PPP标准字段)。  

 ◦ 变长数据和16位校验和。  
  1. 图3:以太网II(DIX)帧
    • 依据:

    ◦ 6字节MAC地址(目的/源)。

    ◦ 类型字段(如0x0800标识IPv4)。

    ◦ 数据域(0–1500字节)和4字节帧校验序列(FCS)。


2. 字段详解(Field-by-Field Explanation)

PPP(图1 & 2)
| 字段 | 英文解释 | 中文解释 | | --------------------- | ------------------------------------------------------------ | ------------------------------------------- | | Flags (01111110) | Delimits start/end of frame. Escape (01111101) if flag appears in data. | 帧起始/结束标志。数据中出现的标志需转义。 | | Address (11111111) | Broadcast address (unused in most PPP implementations). | 广播地址(实际PPP中通常忽略)。 | | Control (00000011) | Indicates "Unnumbered Information" (UI) for connectionless transmission. | 表示无编号信息(UI),用于无连接传输。 | | Protocol (01111110) | Encapsulated protocol (e.g., IPv4/IPv6). Mislabeled in figure (should be 1–2B). | 上层协议标识(图中标注错误,应为1–2字节)。 | | Data | Variable-length payload (e.g., IP packet). | 变长有效载荷(如IP数据包)。 | | Checksum | 16-bit CRC for error detection. | 16位CRC校验,检测传输错误。 |

Ethernet II(图3)
| 字段 | 英文解释 | 中文解释 | | ------------ | ------------------------------------------------------------ | ------------------------------------------- | | Preamble | 7-byte alternating 10101010 + 1-byte SFD (10101011) for synchronization. | 7字节时钟同步信号 + 1字节帧开始定界符。 | | Dest/Src MAC | 6-byte hardware addresses. Broadcast: FF:FF:FF:FF:FF:FF. | 6字节物理地址。广播地址全FF。 | | Type | Identifies payload protocol (e.g., 0x0800 = IPv4). | 标识上层协议(如0x0800为IPv4)。 | | Data + Pad | Payload (46–1500B). Padding ensures minimum 64B frame size. | 有效载荷(46–1500字节),填充保证最小帧长。 | | FCS | 32-bit CRC checksum. Discards corrupted frames. | 32位CRC校验,丢弃损坏帧。 |


3. 关键区别(Key Differences)
| 特性 | PPP | Ethernet II | | -------- | ------------------------------------------------------------ | ---------------------------------------------- | | 用途 | 英文:Point-to-point links (e.g., dial-up).
中文:点对点链路(如拨号)。 | 英文:LAN communication.
中文:局域网通信。 | | 地址字段 | 8-bit (often ignored). | 6-byte MAC addresses. | | 错误检测 | 16-bit CRC. | 32-bit CRC. | | 帧定界 | Flags (01111110). | Preamble + SFD. |

图示对比:

1
2
PPP帧: [Flag][Addr][Control][Protocol][Data][Checksum][Flag]  
以太网帧: [Preamble][Dest MAC][Src MAC][Type][Data][FCS]

总结:
• 英文:PPP is designed for simple point-to-point links, while Ethernet handles multi-device LANs with robust addressing and error checking.

• 中文:PPP用于简单点对点链路,以太网则通过MAC地址和强校验支持多设备局域网通信。