华南理工大学期末考试《Computer Networks》试卷B

1. The MAC Address of a host is 00-01-4A-83-72-1C, and its EUI-64 address is ________________________.

  • Explanation (中文): EUI-64 地址是通过将原始 MAC 地址的第 7 位(即组织唯一标识符 OUI 的部分)反转来构建的。在这个例子中,原始 MAC 地址是 00-01-4A-83-72-1C,根据 IEEE 规定,我们需要插入 FF-FE 来构建 EUI-64 地址,同时反转 MAC 地址的第 7 位。因此 EUI-64 地址为 2014AFFFE83721C

2. In order to reduce collision, Ethernet adopts ________________________ media access control (MAC) technology.

  • English Answer: CSMA/CD
  • Chinese Answer: CSMA/CD
  • Explanation (中文): CSMA/CD(载波监听多路访问/碰撞检测)是一种用于以太网中的媒体访问控制技术。它的工作原理是通过检测网络上的信号是否在传输过程中发生碰撞来减少数据冲突,若发生碰撞,设备会暂停一段时间后重试。

会一边发送一边检测!

3. Category 5 UTP can transmit data to ______________ meters away.

  • English Answer: 100 meters
  • Chinese Answer: 100米
  • Explanation (中文): 类别 5 无屏蔽双绞线(UTP)在常见的以太网应用中可以传输数据的最大距离是 100 米。如果超过这个距离,信号可能会衰减,导致数据传输质量下降。

4. The work principle of Bridge is ___________________________________________.

  • English Answer: flooding, learning, forwarding, filtering
  • Chinese Answer: 泛洪、学习、转发、过滤
  • Explanation (中文): 网桥(Bridge)的工作原理包括以下几个步骤:
    • 泛洪(Flooding):将接收到的数据帧发送到所有端口,除去源端口。
    • 学习(Learning):通过接收数据帧,网桥记录源 MAC 地址及其对应的端口。
    • 转发(Forwarding):根据目标 MAC 地址决定数据帧的转发路径。
    • 过滤(Filtering):如果数据帧的目标地址在同一网段,网桥会过滤掉不转发的帧。

5. List three video formats you know.

  • English Answer: RM, AVI, MP4
  • Chinese Answer: RM, AVI, MP4
  • Explanation (中文): 常见的视频格式包括:
    • RM:RealMedia 视频格式,由 RealNetworks 开发。
    • AVI:音频视频交错格式,是 Microsoft 推出的标准视频格式。
    • MP4:现代视频格式,通常用于网络视频和高质量视频存储。

6. World Wide Web (WWW) is composed of _____________________________, ____________________________, ________________________.

  • English Answer: Resource (HTML), URL, HTTP
  • Chinese Answer: 资源(HTML),URL,HTTP
  • Explanation (中文): 万维网(WWW)由以下三部分组成:
    • 资源(HTML):Web 页面通常使用 HTML 语言编写,是网络内容的表现形式。
    • URL:统一资源定位符,是指定向特定资源的地址。
    • HTTP:超文本传输协议,是在 Web 上请求和传输网页内容的标准协议。

7. List three kinds of dynamic assignment method of IP address: _____, _____, _____.

  • English Answer: RARP, DHCP, BOOTP
  • Chinese Answer: RARP, DHCP, BOOTP
  • Explanation (中文): 动态分配 IP 地址的三种方法包括:
    • RARP(反向地址解析协议):允许设备通过其 MAC 地址请求分配一个 IP 地址。
    • DHCP(动态主机配置协议):为网络设备动态分配 IP 地址,并自动配置其他网络设置。
    • BOOTP(启动引导协议):为设备提供启动配置,通常用于无盘工作站获取 IP 地址。

8. IPv6 packet header has a field which is IPv4 packet header has not, the field is ____________________.

  • English Answer: Flow Label
  • Chinese Answer: 流标签
  • Explanation (中文): IPv6 包头与 IPv4 包头不同,它包含一个称为“流标签”(Flow Label)的字段。流标签是一个用于标识同一数据流的字段,可以帮助路由器优化数据包的处理,以实现更高效的数据流传输。

注意流标签是二者包头的不同,相比之下,Ipv6会省略了许多东西!

判断题

1. In OSI reference model, the top layer is physical layer.

  • English Question: In OSI reference model, the top layer is the physical layer.
  • Chinese Question: 在OSI参考模型中,最顶层是物理层。
  • Answer: False (×)
  • Explanation (中文): 在 OSI 模型中,最顶层是应用层(Application Layer),而物理层是最底层。物理层负责数据的传输媒介和物理连接。

2. The basic unit of bandwidth is bps, and the basic unit of throughput is Mbps.

  • English Question: The basic unit of bandwidth is bps, and the basic unit of throughput is Mbps.
  • Chinese Question: 带宽的基本单位是 bps,吞吐量的基本单位是 Mbps。
  • Answer: False (×)
  • Explanation (中文): 带宽的基本单位通常是 bps(比特每秒),而吞吐量的单位也可以是 bps 或 Mbps(兆比特每秒),但吞吐量和带宽不一定直接等同。

3. In IPv4 address 193.168.125.0/30, Meaning of 30 is host bits number.

  • English Question: In IPv4 address 193.168.125.0/30, Meaning of 30 is host bits number.
  • Chinese Question: 在IPv4地址 193.168.125.0/30 中,30表示主机位数。
  • Answer: False (×)
  • Explanation (中文):193.168.125.0/30 中,30 表示的是网络位数(Network bits),而不是主机位数。IP 地址的子网掩码后面的数字表示网络部分的位数,剩下的是主机部分。

后面代表的是网络部分的位数!

4. In TCP segment header, window size is decided by sender.

  • English Question: In TCP segment header, window size is decided by sender.
  • Chinese Question: 在TCP段头中,窗口大小由发送方决定。
  • Answer: False (×)
  • Explanation (中文): 在 TCP 协议中,窗口大小是由接收方决定的。接收方告诉发送方它的接收窗口大小,以便控制流量。

5. CHAP authentication in PPP is more secure than PAP authentication.

  • English Question: CHAP authentication in PPP is more secure than PAP authentication.
  • Chinese Question: PPP 中的 CHAP 认证比 PAP 认证更安全。
  • Answer: True (√)
  • Explanation (中文): CHAP(挑战握手认证协议)通过使用加密哈希算法来防止被中间人攻击,提供了比 PAP(密码认证协议)更高的安全性,因为 PAP 会以明文传输密码。

6. DNS is a hierarchical, domain-based naming scheme and a distributed database system for implementing this naming scheme.

  • English Question: DNS is a hierarchical, domain-based naming scheme and a distributed database system for implementing this naming scheme.
  • Chinese Question: DNS 是一种层次化的基于域的命名方案和用于实现该命名方案的分布式数据库系统。
  • Answer: True (√)
  • Explanation (中文): DNS(域名系统)采用层次化的命名结构,通过分布式数据库实现。每个域名通过与其对应的 IP 地址相互映射,使用户能够通过域名访问互联网资源。

7. BGP is a distance vector routing protocol, but it has no routing-loop problem.

  • English Question: BGP is a distance vector routing protocol, but it has no routing-loop problem.
  • Chinese Question: BGP 是一种距离向量路由协议,但没有路由回路问题。
  • Answer: False (×)
  • Explanation (中文): BGP(边界网关协议)是 路径向量协议,而不是传统的距离向量协议。虽然 BGP 避免了传统的路由回路问题,但它也可能存在路由环路的问题,尤其是在配置不当的情况下。

8. The field number of basic header of IPv6 packet is much more than that of IPv4 packet header.

  • English Question: The field number of the basic header of an IPv6 packet is much more than that of an IPv4 packet header.
  • Chinese Question: IPv6 数据包的基本头字段数量比 IPv4 数据包的基本头字段多得多。
  • Answer: False (×)
  • Explanation (中文): IPv6 的基本头字段数量比 IPv4 的要少。IPv6 的头部结构更加简化,减少了 IPv4 中的一些字段。

9. Light through fiber has no attenuation, so data can be transmitted far away.

  • English Question: Light through fiber has no attenuation, so data can be transmitted far away.
  • Chinese Question: 光在光纤中传播没有衰减,因此数据可以远距离传输。
  • Answer: False (×)
  • Explanation (中文): 虽然光纤的信号衰减较小,但仍然存在一定程度的衰减。长距离传输需要使用光中继设备来增强信号。

10. Go-back-n is less effective than selective-repeat in channel utilization.

  • English Question: Go-back-n is less effective than selective-repeat in channel utilization.
  • Chinese Question: 在通道利用率方面,Go-back-n 比 Selective-repeat 更低效。
  • Answer: True (√)
  • Explanation (中文): Go-back-n 协议需要在丢失数据包时重新发送所有后续数据包,而 Selective-repeat 协议只重传丢失的数据包,因此 Selective-repeat 在通道利用率上更有效。

一个是会发送之前所有,一个是针对性,后者的利用率会高!

选择题

1. Generally, PSTN (public switched telephone network) is made up of:_____

  • English Question: Generally, PSTN (public switched telephone network) is made up of:_____
  • Chinese Question: 一般来说,PSTN(公共交换电话网络)由以下部分组成:_____
  • Answer: A. Local loop, toll connecting trunk, and intertoll trunk
  • Explanation (中文): PSTN 是由本地环路(Local Loop)、收费中继(Toll Connecting Trunk)和不同地区之间的中继(Intertoll Trunk)构成的。它们共同支持电话服务的传输。

2. ______ forms the heart of the modern telephone system, all time intervals within the telephone system are multiples of _______μsec

  • English Question: ______ forms the heart of the modern telephone system, all time intervals within the telephone system are multiples of _______μsec
  • Chinese Question: ______ 构成现代电话系统的核心,电话系统中的所有时间间隔都是 _______ 微秒的倍数
  • Answer: B. PCM/4000
  • Explanation (中文): PCM(脉冲编码调制)是现代电话系统的核心,其数据传输速率通常为每秒 8000 个样本(即每个样本 125 微秒)。而系统中的时间间隔是 4000 微秒的倍数。

3. Which is correct about RFCs (Request For Comments)?____

  • English Question: Which is correct about RFCs (Request For Comments)?____
  • Chinese Question: 关于 RFC(请求评论),哪项是正确的?____
  • Answer: B. Are technical reports which are stored on-line and can be fetched by anyone
  • Explanation (中文): RFC(请求评论)是在线存储的技术报告,任何人都可以访问和获取。它们不是正式的标准,而是技术文档,许多 RFC 最终成为互联网标准。

4. The metric of RIP (routing information protocol) is_______

  • English Question: The metric of RIP (routing information protocol) is_______
  • Chinese Question: RIP(路由信息协议)的度量标准是_______
  • Answer: A. Hop
  • Explanation (中文): RIP 使用跳数(Hop)作为度量标准,表示数据包从源到目的地通过的路由器数量。最大跳数限制为 15 跳,超过 15 跳的路径视为不可达。

5. Which device would result in extension of collision domain?______

  • English Question: Which device would result in extension of collision domain?______
  • Chinese Question: 哪种设备会导致冲突域的扩展?______
  • Answer: B. Hub
  • Explanation (中文): 集线器(Hub) 会扩展冲突域,因为它是一个工作在物理层的设备,所有连接到集线器的设备共享同一个带宽,这意味着发生碰撞的可能性增加。

6. Which IP address can be used to locally broadcast? ______

  • English Question: Which IP address can be used to locally broadcast? ______
  • Chinese Question: 哪个 IP 地址可以用于本地广播?______
  • Answer: B. 255.255.255.255
  • Explanation (中文): 255.255.255.255 是广播地址,用于局部广播,意味着它会发送到同一局域网内的所有设备。

7. Which is the default subnet mask of D class ? ______

  • English Question: Which is the default subnet mask of D class ? ______
  • Chinese Question: D 类的默认子网掩码是什么?______
  • Answer: D. None
  • Explanation (中文): D 类 IP 地址(从 224.0.0.0 到 239.255.255.255)用于多播,不需要子网掩码。它们用于组播通讯,而不是传统的点对点通讯。
  • English Question: Which is the legal IP address? _______
  • Chinese Question: 哪个是合法的 IP 地址?______
  • Answer: C. 225.23.200.9
  • Explanation (中文): 225.23.200.9 是一个合法的 IP 地址,属于 D 类地址范围(用于组播)。而 127.2.3.5 是回环地址,不可用于网络通讯。
  • English Question: Which is not a legal IP address if subnet mask is 255.255.240.0? _______
  • Chinese Question: 如果子网掩码是 255.255.240.0,哪个不是合法的 IP 地址?______
  • Answer: D. 143.49.49.15
  • Explanation (中文): 使用子网掩码 255.255.240.0 时,合法的 IP 地址应该在给定的网络范围内。143.49.49.15 超出了该网络范围,因此不合法。

10. The metric of OSPF is ________

  • English Question: The metric of OSPF is ________
  • Chinese Question: OSPF 的度量标准是 ________
  • Answer: B. Bandwidth
  • Explanation (中文): OSPF(开放最短路径优先)使用带宽作为度量标准,带宽越大,路由的代价越小。这是 OSPF 和 RIP 的主要区别,后者使用跳数作为度量标准。

注意一个是Hop,一个是带宽

11. Main function of router is ______

  • English Question: Main function of router is ______
  • Chinese Question: 路由器的主要功能是 ______
  • Answer: D. A 和B (Path selecting and Forwarding)
  • Explanation (中文): 路由器的主要功能包括路径选择(Path Selecting)和转发数据包(Forwarding)。路由器根据路由表选择最佳路径,然后将数据包转发到下一个网络。

12. Which transmission media is anti electromagnetism interference?______

  • English Question: Which transmission media is anti electromagnetism interference?______
  • Chinese Question: 哪种传输介质能抗电磁干扰?______
  • Answer: A. fiber optic
  • Explanation (中文): 光纤(Fiber optic)具有抗电磁干扰的特性,因为它是基于光信号传输的,不受电磁干扰的影响,而其他介质如同轴电缆或双绞线容易受到电磁干扰。

13. Which are protocols of Network layer? __________

  • English Question: Which are protocols of Network layer? __________
  • Chinese Question: 哪些是网络层的协议?__________
  • Answer: D. IP、ARP 和ICMP
  • Explanation (中文): 网络层的协议包括 IP(互联网协议)、ARP(地址解析协议)和 ICMP(互联网控制报文协议)。而 TCP 和 UDP 属于传输层协议,FTP、TELNET 和 SMTP 属于应用层协议。

简答题

Question:

  1. In the following figure, Host A wants to send information to Host B, but they have not communicated with each other before. Please describe the whole procedure of transmission (including main technology), from encapsulation to de-capsulation.

Steps:

  1. A’s Encapsulation
  2. ARP/Proxy ARP
  3. Finish Encapsulation
  4. Send to R1, R1’s process, change MAC address
  5. Send to R2 from R1, destination MAC is B
  6. Broadcast to whole LAN in which B is in
  7. B receives bits, and de-capsulation

Explanation of Each Step:

1. A’s Encapsulation (A's Layer 3 Encapsulation)

  • Process:
    • Host A begins by preparing the data to be sent. The data is encapsulated in a Transport Layer protocol (like TCP or UDP).
    • This encapsulated data is then passed down to the Network Layer (Layer 3), where IP headers are added. The source IP address is Host A's IP, and the destination IP address is Host B's IP.
    • MAC addresses are not yet involved at this stage, because Host A needs to know the MAC address of Host B (which it doesn’t know at the moment).

2. ARP/Proxy ARP (Address Resolution Protocol)

  • Process:
    • Host A will now need to find out the MAC address of Host B because it has the IP address but does not know the corresponding MAC address.
    • Host A checks its ARP cache to see if it has a previously learned MAC address for Host B’s IP.
    • If no entry is found in the ARP cache, Host A will broadcast an ARP request to all devices on the network (Layer 2). The ARP request asks, "Who has IP address X.X.X.X (Host B’s IP)?"
    • Proxy ARP may be used if there is a router or gateway on the network that is willing to respond to ARP requests on behalf of Host B (this can occur if Host B is on a different subnet).

3. Finish Encapsulation (Final Layer 2 Header Addition)

  • Process:
    • Once Host A gets the MAC address of Host B (either from its own cache or through the ARP process), it is ready to encapsulate the data fully.
    • The IP packet (Layer 3) is now wrapped in an Ethernet frame (Layer 2), with the destination MAC address of Host B and the source MAC address of Host A.
    • Now the data is ready for transmission at the Data Link Layer (Layer 2), which uses MAC addresses to send the frame to the next hop, which is typically a router (R1 in this case).

4. Send to R1, R1’s Process, Change MAC Address

  • Process:
    • The Ethernet frame from Host A is sent to the router R1 (as it is the default gateway or intermediary router).
    • When R1 receives the frame, it examines the destination IP to determine the next hop.
    • Since the frame is meant for Host B, and R1 doesn’t know the final MAC address of Host B, it will need to perform the same process again to determine the next hop.
    • R1 changes the destination MAC address to the MAC address of the next hop (this could be the MAC address of another router or, if Host B is on the same network as R2, the MAC address of R2).

5. Send to R2 from R1, Destination MAC is B

  • Process:
    • R1 forwards the frame to R2, which is the next hop towards Host B.
    • The destination MAC address is now that of R2, and the source MAC address is R1’s MAC address.
    • R2 will then check the packet’s IP address and determine if Host B is in the local network (i.e., in the same subnet as R2).

6. Broadcast to Whole LAN in which B is in (Broadcast within Local Network)

  • Process:
    • If R2 determines that Host B is in the same local network (LAN), it will broadcast the frame to the entire LAN that Host B is a part of.
    • Broadcasting occurs because R2 doesn’t know the exact MAC address of Host B (since it's at Layer 2). So, it sends the Ethernet frame with a broadcast MAC address (FF:FF:FF:FF:FF:FF), which all devices in the LAN will receive.
    • Only Host B will respond, because its IP matches the destination IP in the frame.

7. B Receives Bits, and De-capsulation

  • Process:
    • Host B receives the broadcasted frame. Since the frame is addressed to Host B (based on the IP and final MAC address), it processes the frame.
    • De-capsulation occurs:
      • Host B first removes the Ethernet header (Layer 2) and then checks the IP packet (Layer 3).
      • If the IP address matches, Host B passes the data up to the Transport Layer, where the appropriate protocol (e.g., TCP or UDP) is used to handle the data.

Summary of Technologies Used:

  1. Encapsulation: Data is encapsulated at each layer (Application → Transport → Network → Data Link) as it is prepared for transmission.
  2. ARP (Address Resolution Protocol): Used to map IP addresses to MAC addresses when the destination MAC is unknown.
  3. Routing (R1, R2): Routers determine the next hop for the packet based on the destination IP.
  4. Ethernet (Layer 2): Data Link Layer protocols, such as Ethernet, handle the actual transmission of frames between devices.
  5. Broadcasting: When a router doesn’t know the exact destination MAC, it broadcasts the frame to the entire local network.

Chinese Explanation:

1. A 的封装 (A 的网络层封装)

  • 主机 A 将数据传送给主机 B。首先,A 在 传输层 使用 TCP 或 UDP 封装数据。
  • 然后,这些数据被传送到 网络层,此时会添加 IP 头部,源 IP 地址是主机 A 的 IP,目的 IP 地址是主机 B 的 IP。
  • 此时,尚未涉及 MAC 地址,因为 A 并不清楚 B 的 MAC 地址。

2. ARP/Proxy ARP (地址解析协议)

  • 主机 A 需要查找主机 B 的 MAC 地址,因为它有 IP 地址,但没有相应的 MAC 地址。
  • 如果主机 A 没有缓存该地址,它会广播 ARP 请求,询问网络上的所有设备:“谁拥有 IP 地址 X.X.X.X(主机 B 的 IP)?”
  • 如果使用 代理 ARP,路由器或网关可能会代表主机 B 响应 ARP 请求。

3. 完成封装 (完成数据链路层封装)

  • 一旦 A 得到 B 的 MAC 地址,数据包就准备好进行 数据链路层 的封装。此时,数据包被包装在 以太网帧 中,目标 MAC 地址是 B 的 MAC 地址,源 MAC 地址是 A 的 MAC 地址。

4. 发送到 R1,R1 处理,改变 MAC 地址

  • 主机 A 将数据发送到路由器 R1,R1 通过路由表判断数据的下一跳,并且会更改 MAC 地址,把目标地址设置为下一跳设备的 MAC 地址。

5. 从 R1 到 R2 发送,目标 MAC 是 B

  • R1 会将帧转发给 R2,此时目标 MAC 地址是 R2 的 MAC 地址。R2 会根据目的 IP 地址决定是否将数据包转发到主机 B。

6. 在 R2 所在的局域网中广播

  • 如果主机 B 在 R2 的局域网内,R2 会广播该帧到整个 局域网,以太网帧的目标 MAC 地址为广播地址(FF:FF:FF:FF:FF:FF)。

7. B 接收位,解封装

  • 主机 B 接收到该帧后,解去 以太网头部,检查 IP 地址。如果 IP 地址匹配,则会将数据传递到 传输层,然后进行相应的处理。
ea275fc238c87e3247ee903a42e8e6c

Question:

  1. A modem constellation diagram is as follows, and it has data points at the following coordinates: (1, 0), (1, 1), (0, 1), (-1, 1), (-1, 0), (-1, -1), (0, -1), and (1, -1). How many bps can a modem with these parameters achieve at 1200 baud? If it has only (0, 1) and (0, 2) data points, then is this amplitude modulation or frequency modulation? Why?

    翻译:

    一个调制解调器的星座图如下,数据点的坐标为:(1, 0),(1, 1),(0, 1),(-1, 1),(-1, 0),(-1, -1),(0, -1),和(1, -1)。在1200波特的情况下,这个调制解调器最多可以达到多少比特每秒(bps)?如果它只有(0, 1)和(0, 2)两个数据点,这时是振幅调制(AM)还是频率调制(FM)?为什么?


Solution:

Step 1: Understanding the constellation diagram

The given constellation diagram has 8 points:

  • (1, 0), (1, 1), (0, 1), (-1, 1), (-1, 0), (-1, -1), (0, -1), (1, -1).

These points represent different combinations of amplitude and phase for modulating a signal. In the case of this diagram:

  • 8 points = 3 bits per baud (2^3 = 8).

Step 2: Bit rate calculation

Since each baud can take on one of 8 different values, and each value corresponds to 3 bits (because 2^3 = 8 points), the bit rate can be calculated by multiplying the baud rate by the number of bits per baud.

  • Given baud rate: 1200 baud.
  • Bits per baud: 3 bits (from the 8 points in the constellation diagram).

Thus, the bit rate = 1200 baud×3 bits/baud=3600 bps

Step 3: Amplitude or frequency modulation?

  • Case 1: If the constellation diagram only has (0, 1) and (0, 2) data points, we need to identify whether the modulation is based on amplitude modulation (AM) or frequency modulation (FM).
    • In this case, there are only two data points, which represent two different amplitudes.
    • Since the only difference is amplitude, this is amplitude modulation (AM), not frequency modulation.

Final Answer:

  • The modem can achieve 3600 bps at 1200 baud with the given constellation.
  • If the diagram only has the points (0, 1) and (0, 2), this is amplitude modulation because it only changes the amplitude, not the frequency or phase.

Chinese Explanation:

第一步:理解星座图

给定的星座图有 8 个点

  • (1, 0),(1, 1),(0, 1),(-1, 1),(-1, 0),(-1, -1),(0, -1),(1, -1)。

这些点表示不同的 振幅和相位组合,用于调制信号。在这种情况下:

  • 8个点 = 每个符号有 3 位(因为 2^3 = 8)。

第二步:比特率计算

由于每个符号(baud)可以采用 8 种不同的值,每种值对应 3 位(因为 2^3 = 8 点),因此比特率可以通过将波特率与每个符号的位数相乘来计算。

  • 给定波特率:1200 波特。
  • 每波特的位数:3 位(来自星座图的 8 个点)。

因此,比特率 = 1200 波特×3 位/波特=3600 bps

第三步:幅度调制还是频率调制?

  • 情况 1: 如果星座图只有 (0, 1)(0, 2) 两个点,我们需要识别是 幅度调制 (AM) 还是 频率调制 (FM)
    • 在这种情况下,只有两个数据点,表示两个不同的 振幅
    • 由于唯一的变化是 振幅,因此这就是 幅度调制 (AM),而不是频率调制。

最终答案:

  • 该调制器在 1200 波特时可以实现 3600 bps 的数据传输率。
  • 如果图中仅有点 (0, 1) 和 (0, 2),则这是 幅度调制,因为它仅改变振幅,而不改变频率或相位。
ea275fc238c87e3247ee903a42e8e6c

中文问题:

  1. 在一个 CDMA 系统中,A、B、C 和 D 的芯片序列分别是(00011011),(00101110),(01011100)和(01000010)。请写出四个站点的双极芯片序列; 当 CDMA 接收机接收到以下芯片序列:(-1 +1 -3 +1 -1 -3 +1 +1) 时,哪些站点进行了传输?每个站点发送了哪些比特?

中文答案:

我们需要计算四个站点的标准化内积:

  1. S.A: $ S.A = = 1 $
  2. S.B: $ S.B = = -1 $
  3. S.C: $ S.C = = 0 $
  4. S.D: $ S.D = = 1 $

根据计算结果:

  • AD 发送了 1 位。
  • B 发送了 0 位。
  • C 没有发送任何数据。

English Question:

  1. In a CDMA system, the chip sequences of A, B, C, and D are (00011011), (00101110), (01011100), and (01000010) respectively. Please write the bipolar chip sequences for the four stations; When a CDMA receiver gets the following chips: (-1 +1 -3 +1 -1 -3 +1 +1). Which stations transmitted, and which bits did each one send?

English Answer:

We need to compute the four normalized inner products:

  1. S.A: $ S.A = = 1 $
  2. S.B: $ S.B = = -1 $
  3. S.C: $ S.C = = 0 $
  4. S.D: $ S.D = = 1 $

Based on the results:

  • A and D transmitted a 1 bit.
  • B transmitted a 0 bit.
  • C was silent.

本题只需要经过正交运算即可解决问题!

这个问题涉及 CDMA(码分多址) 技术和 信号处理 的基本原理,特别是 内积(点积)计算正交性 的概念。下面是一些关键的知识点解释:

1. CDMA(码分多址)

CDMA 是一种通信技术,它允许多个用户在同一频道上传输数据,每个用户使用不同的 伪随机码(即每个用户的芯片序列)。CDMA 的基本思想是通过不同的编码(不同的码字),使得不同的用户的信号能够在同一频带上传输,并且互不干扰。接收机通过 解码 技术,将不同用户的信号分离出来。

在 CDMA 中,每个用户的传输信号被称为 码字,而 码字的长短(即芯片序列的长度)直接影响传输质量和信号的解码。

2. 内积(点积)

在 CDMA 系统中,接收机用每个用户的码字与接收到的信号进行内积运算。内积的计算方式是将接收到的信号与每个用户的伪随机码序列相乘并求和,这个结果用于判断某个用户是否发送了数据。

  • 内积:对于每个用户的芯片序列(比如 A, B, C, D),与接收到的信号进行内积计算,得到的结果可以帮助接收机判定哪个用户发送了信号,且是 0 还是 1。
  • 例如,如果内积的结果大于 0,则说明该用户发送了 1;如果结果小于 0,则说明该用户发送了 0;如果结果接近 0,则说明该用户没有发送信号。

3. 正交性

为了确保不同用户之间的信号不互相干扰,CDMA 使用的码序列(也就是芯片序列)需要具有 正交性。正交性是指,两个信号的内积为 0,也就是说它们在时间上是互不重叠的。正交的码序列能够让接收机通过内积计算准确地区分不同用户的信号。

在这个问题中,计算每个用户的内积时,实际上是在计算接收到的信号与用户的伪随机码之间的相似度,从而确定哪个用户发送了数据以及发送的比特值。

4. 双极性编码

在问题中,芯片序列采用的是 双极性编码(Bipolar Encoding),即用 -1 和 +1 来表示二进制的 0 和 1。这种编码方式有助于减少信号的直流分量,并使信号的能量分布更均匀。

总结:

这道题背后涉及的原理包括:

  • CDMA 技术:通过不同的伪随机码实现多个用户的同时传输。
  • 内积计算:用内积来判断接收到的信号是哪个用户发送的,以及每个用户发送的是哪个比特。
  • 正交性:确保不同用户的码序列之间是正交的,从而避免相互干扰。
  • 双极性编码:使用 -1 和 +1 来表示 0 和 1,从而提高信号的稳定性和抗干扰能力。

通过内积计算,接收机能够有效地识别每个用户的信号,并根据内积的大小确定该用户发送的比特。

问题:

  1. TCP 数据段的最大负载是 65,495 字节。为什么选择这个看起来奇怪的数字?

解决方案:

这个数字来源于 IP 数据包的最大长度限制。在 IPv4 中,IP 数据包的最大长度是 65,535 字节。这个最大长度包括 IP 头部和数据部分。在 IP 头部中,至少有 20 字节用于存放基本的头部信息。因此,剩下的部分(即数据部分)可以用来传输 TCP 数据。

由于 TCP 头部 最小也是 20 字节,因此计算最大 TCP 数据负载的步骤如下:

$ 65,535 - 20 - 20 = 65,495 $

因此,TCP 数据部分的最大负载为 65,495 字节

总结:

选择 65,495 字节作为 TCP 数据段的最大负载,是因为:

  • IP 数据包最大长度 为 65,535 字节。
  • 扣除 IP 头部和 TCP 头部各 20 字节后,剩余 65,495 字节用作 TCP 数据部分。

中文解释:

这个数字来源于 IP 数据包的大小限制。在 IPv4 中,IP 数据包的最大大小是 65,535 字节。减去 IP 和 TCP 头部各 20 字节后,剩余的空间就是 TCP 数据的最大负载 65,495 字节。

去除掉IP和TCP头部即可!

问题分析:

公司有两个分支机构 A 和 B。A 有 3 个子网,其 PC 数量分别为 15、25 和 30;B 有 3 个子网,其 PC 数量分别为 10、20 和 30。公司有两个路由器以及一个 C 类 IP 地址 222.17.46.0,要求进行合理的子网划分,并为路由器的每个接口分配 IP 地址。此外,要求配置静态路由,使得两个路由器能够相互 ping 通。

1. 子网划分:

计算子网掩码:

在 C 类地址中,默认子网掩码是 255.255.255.0 (/24)。我们需要根据各个子网的需求,借用主机位来扩展子网。每个子网的主机数目要求如下:

  • A 子网 1: 15 个主机
  • A 子网 2: 25 个主机
  • A 子网 3: 30 个主机
  • B 子网 1: 10 个主机
  • B 子网 2: 20 个主机
  • B 子网 3: 30 个主机

子网划分细节:

为了满足这些主机数的需求,我们需要选择合适的子网掩码。通过以下计算,确定每个子网需要的主机数:

  • 需要至少 16 个主机:子网掩码为 255.255.255.224 (/27)。
  • 需要至少 32 个主机:子网掩码为 255.255.255.192 (/26)。

子网划分表:

根据需要的主机数选择合适的子网掩码:

子网 子网掩码 地址范围 广播地址 网络地址 是否可用
子网 1 255.255.255.224 (/27) 222.17.46.0-222.17.46.31 222.17.46.31 222.17.46.0
子网 2 255.255.255.224 (/27) 222.17.46.32-222.17.46.63 222.17.46.63 222.17.46.32
子网 3 255.255.255.224 (/27) 222.17.46.64-222.17.46.95 222.17.46.95 222.17.46.64
子网 4 255.255.255.224 (/27) 222.17.46.96-222.17.46.127 222.17.46.127 222.17.46.96
子网 5 255.255.255.224 (/27) 222.17.46.128-222.17.46.159 222.17.46.159 222.17.46.128
子网 6 255.255.255.224 (/27) 222.17.46.160-222.17.46.191 222.17.46.191 222.17.46.160

计算结果:

  • 子网 1: 使用子网掩码 255.255.255.224 (/27),用于满足 15 台主机的需求。
  • 子网 2: 使用子网掩码 255.255.255.224 (/27),满足 25 台主机的需求。
  • 子网 3: 使用子网掩码 255.255.255.224 (/27),满足 30 台主机的需求。
  • 子网 4: 使用子网掩码 255.255.255.224 (/27),满足 10 台主机的需求。
  • 子网 5: 使用子网掩码 255.255.255.224 (/27),满足 20 台主机的需求。
  • 子网 6: 使用子网掩码 255.255.255.224 (/27),满足 30 台主机的需求。

2. 路由器静态路由配置:

接下来,我们为每个路由器配置静态路由。假设路由器 R1 和 R2 的接口分别被分配如下 IP 地址:

  • 路由器 R1
    • S0 (Serial 0): 10.0.0.1
    • E0 (Ethernet 0): 222.17.46.33 (连接到子网 2)
    • E1 (Ethernet 1): 222.17.46.65 (连接到子网 3)
    • E2 (Ethernet 2): 222.17.46.97 (连接到子网 4)
  • 路由器 R2
    • S0 (Serial 0): 10.0.0.2
    • E0 (Ethernet 0): 222.17.46.129 (连接到子网 5)
    • E1 (Ethernet 1): 222.17.46.161 (连接到子网 6)
    • E2 (Ethernet 2): 222.17.46.193 (连接到子网 7)

配置静态路由时,R1 和 R2 需要配置指向对方的静态路由。

路由器 R1 配置:

1
2
ip route 222.17.46.128 255.255.255.224 10.0.0.2
ip route 222.17.46.160 255.255.255.224 10.0.0.2

路由器 R2 配置:

1
2
ip route 222.17.46.32 255.255.255.224 10.0.0.1
ip route 222.17.46.64 255.255.255.224 10.0.0.1

3. 验证:

配置完成后,可以使用 ping 命令验证 R1 和 R2 是否能够互相通信。成功 ping 通则说明静态路由配置正确。


总结:

  1. 子网划分:根据公司需求,划分了 6 个子网,每个子网具有适当的子网掩码,以满足所需的主机数。
  2. 静态路由配置:通过配置静态路由,使得两个路由器能够互相通信。
  3. 验证:通过 ping 命令验证配置是否正确。