华南理工大学计算机网络2010年真题
华南理工大学计算机网络2010年真题
计算机网络之旅!
选择题
Which of the following is different from others? ( B ) 哪个选项与其他不同?(B) A. CSMA/CD B. TDMA C. ALOHA D. CSMA
答案: B. TDMA 解释: CSMA/CD、ALOHA 和 CSMA 都属于随机访问协议,而 TDMA (时分多址) 是一种时分复用技术,不同于其他三个协议。
这四个选项都属于网络通信中的不同协议,它们有不同的工作原理。下面是它们各自的解释:
1. CSMA/CD (Carrier Sense Multiple Access with Collision Detection)
- 用途: 这是一种用于以太网(Ethernet)的网络访问控制协议,主要用于避免数据传输时的冲突。
- 工作原理:
- 载波侦听(Carrier Sense): 设备在发送数据之前,会监听信道是否空闲。
- 多路访问(Multiple Access): 多个设备共享同一信道。
- 碰撞检测(Collision Detection): 如果两个设备在同一时刻发送数据(发生碰撞),它们会检测到冲突并重新发送。
- 适用场景: 以太网中的共享信道数据传输。
2. TDMA (Time Division Multiple Access)
- 用途: 这是一种时分多址协议,用于多路访问控制,尤其在无线通信中使用。通过分配不同的时间片给不同的用户来共享同一信道。
- 工作原理:
- 时分复用: TDMA 将信道分为多个时间段,每个用户在指定的时间段内传输数据。
- 定时分配: 每个设备都有一个独立的时间片来发送数据,避免冲突。
- 适用场景: 移动通信(如GSM、卫星通信等),多个用户共享同一频率信道。
3. ALOHA
- 用途: 这是一种简单的随机接入协议,主要用于无线通信网络。
- 工作原理:
- 传输和等待确认: 设备随机选择时机发送数据。如果没有收到碰撞确认信号,设备会重试发送。
- 冲突: 如果两个设备在相同时间发送数据,它们会发生冲突,导致数据丢失,之后设备会在随机的时延后重新尝试发送。
- 适用场景: 早期的无线网络协议(如UNIX网络、卫星通讯)。
4. CSMA (Carrier Sense Multiple Access)
- 用途: 这是一种基于载波侦听的多路访问协议,与 CSMA/CD 类似,但是没有碰撞检测机制。
- 工作原理:
- 载波侦听(Carrier Sense): 设备在发送数据之前会监听信道是否空闲。
- 没有碰撞检测: 如果信道空闲,设备发送数据。如果有碰撞,设备不会检测并重新发送。
- 适用场景: 用于无线通信(如Wi-Fi),需要避开传输中的冲突。
选择 B. TDMA 的原因:
- TDMA 和其他选项不同,因为它不是一种“随机访问协议”,而是通过分配时间片来实现多个设备共享信道。这意味着 TDMA 具有严格的时间管理和分配机制,而 CSMA/CD、ALOHA 和 CSMA 都是“随机访问”协议,设备在这些协议中共享信道并通过随机方式发送数据,它们的冲突管理是基于等待、侦听和重试的。
总结:
- CSMA/CD, ALOHA, 和 CSMA 是随机访问协议,设备在共享信道上发送数据,并且根据情况采取不同的方式来避免或处理冲突。
- TDMA 是通过时间分配来共享信道的,属于时分复用技术。
Based on TCP/IP architecture, which of the following protocol belongs to data-link layer? ( D ) 基于TCP/IP架构,以下哪种协议属于数据链路层?(D) A. HTTP B. IP C. UDP D. PPP
答案: D. PPP 解释: PPP(点对点协议)属于数据链路层,用于在两个节点之间传输数据;而其他选项(HTTP、IP、UDP)属于应用层或网络层。
About the encapsulation relationships of segment, datagram, and frame, which of the following is correct? ( C ) 关于段、数据报和帧的封装关系,以下哪个是正确的?(C) A. Segment is encapsulated within the frame, and the frame is encapsulated within the datagram. B. Datagram is encapsulated within the Segment, and the Segment is encapsulated within the frame. C. Segment is encapsulated within the datagram, and the datagram is encapsulated within the frame. D. Frame is encapsulated within the datagram, and the datagram is encapsulated within the segment.
答案: C. Segment is encapsulated within the datagram, and the datagram is encapsulated within the frame. 解释: 在 OSI 模型中,应用层产生数据,传输层将数据分成段(Segment),网络层将段封装成数据报(Datagram),而数据链路层将数据报封装成帧(Frame)。
Which of the following is right? ( C ) 以下哪项是正确的?(C) A. The function of route selecting is provided by application layer.路由选择是网络层 B. The communication between processes is provided by network layer.进程是传输层 C. The services which are connection-oriented and connectionless are provided by transport layer. D. The end-to-end communication is provided by transport layer.
答案: C. The services which are connection-oriented and connectionless are provided by transport layer. 解释: 传输层提供面向连接的服务(如 TCP)和无连接的服务(如 UDP)。其他选项不符合传输层的功能。
Which of the following functions belong to a link-layer protocol? ( D ) 以下哪个功能属于链路层协议?(D) A. Framing B. Link access C. Error detection D. All of the above
答案: D. All of the above 解释: 链路层协议的功能包括:数据封装(Framing)、链路访问(Link access)、错误检测(Error detection)。这些都是链路层的基本功能。
Which of the following is the main function of DNS? ( C ) 以下哪项是DNS的主要功能?(C) A. Query the computer name of a host. B. Query the MAC address of a host. C. Get the information between host and network through querying. D. Assign rationally the usage of IP addresses.
答案: C. Get the information between host and network through querying. 解释: DNS(域名系统)主要用于通过查询来获取主机和网络之间的相关信息,通常是将域名转换为IP地址。
这道题目考察的是 DNS(域名系统)的主要功能。我们逐个分析四个选项:
A. Query the computer name of a host.
- 分析: 这个选项不完全正确。DNS 的主要功能是将 域名(如 www.example.com)转换为-yh5fp43i1o8d/) IP 地址(如 192.0.2.1),而不是查询计算机的主机名。虽然可以通过反向 DNS 查找(PTR 记录)来获得主机名,但这不是 DNS 的主要功能。
- 正确答案: 错误。
B. Query the MAC address of a host.
- 分析: 这个选项也不正确。MAC 地址是物理地址,用于网络接口之间的通信,而 DNS 并不负责查询或映射 MAC 地址。MAC 地址通常由 ARP(地址解析协议) 负责解析和查询。
- 正确答案: 错误。
C. Get the information between host and network through querying.
- 分析: 这个选项是正确的。DNS
的主要功能确实是通过查询将 域名 转换为 IP
地址,从而帮助主机与网络进行通信。例如,当你在浏览器中输入一个网址时,DNS
会查询该网址对应的 IP 地址,帮助你访问网站。
- DNS 将用户输入的域名(如 www.example.com)映射为-yh5fj44eufq/) IP 地址(如 192.0.2.1),这个过程确保了通过网络中的 IP 地址进行通信。除此之外,DNS 还可以查询其他与主机和网络相关的信息,如 MX 记录(邮件交换服务器),NS 记录(域名服务器)等。
- 正确答案: 正确。
D. Assign rationally the usage of IP addresses.
- 分析: 这个选项不正确。IP 地址的分配和管理通常由 IANA(互联网号码分配局) 和 各地的网络管理机构(如 ARIN、RIPE)负责。虽然 DNS 会关联域名与 IP 地址,但它不负责 IP 地址的分配。IP 地址的分配是一个管理工作,DNS 只负责提供域名与 IP 地址之间的映射。
- 正确答案: 错误。
总结:
- 正确答案是 C。DNS 的主要功能是通过查询域名信息来获取主机和网络之间的相关信息,最常见的就是将域名解析为 IP 地址。
- 其他选项(A、B、D)要么描述的是与 DNS 无关的功能,要么是 DNS 功能的次要方面,因此不正确。
Suppose Host A wants to send a file to Host B, the path from Host A to Host B has three links, their rates R1=500 kbps, R2=250 kbps, and R3= 1 Mbps. Assuming no other traffic in the network, what is the throughput for the file transfer? ( C ) 假设主机A想要将文件发送给主机B,主机A到主机B的路径有三条链路,它们的速率分别为R1=500 kbps,R2=250 kbps和R3=1 Mbps。假设网络中没有其他流量,那么文件传输的吞吐量是多少?(C) A. 500 kbps B. 1 Mbps C. 250 kbps D. 1.75 Mbps
答案: C. 250 kbps 解释: 在多个链路传输中,吞吐量由瓶颈链路的带宽限制。在这种情况下,R2的速率最慢,为250 kbps,因此吞吐量为250 kbps。
In network communication, what are the uses for the well-known ports usually? ( B ) 在网络通信中,通常情况下,知名端口的用途是什么?(B) A. Start of the three handshakes of TCP B. Identify the network applications which are being accessed C. Identify the server D. Identify the client
答案: B. Identify the network applications which are being accessed 解释: 知名端口通常用于标识正在访问的网络应用程序,例如HTTP(端口80)用于网页访问。
Consider sending a packet from a source host to a destination host over a fixed route, which of the end-to-end delays are variable? ( A ) 考虑从源主机向目标主机通过固定路径发送数据包,哪些端到端延迟是可变的?(A) A. Queuing delays B. Processing delays C. Propagation delays D. Transmission delays
答案: A. Queuing delays 解释: 排队延迟是可变的,取决于网络中的流量情况和路由器队列的状态。而其他延迟(处理、传播、传输)通常是固定的或受限于硬件和路径。
- What is the relationship between Internet and World Wide Web (WWW)? ( B ) 互联网与万维网(WWW)之间的关系是什么?(B) A. Both are Internet, just has different name B. WWW is only an application of Internet C. No relationship between them. D. Internet is the World Wide Web
答案: B. WWW is only an application of Internet 解释: WWW(万维网)是互联网的一个应用,利用互联网提供的协议和资源来实现网页浏览等功能,而互联网是一个更广泛的网络基础设施。
The function of URL is ( B ). URL的功能是(B)。 A. locating the host address. B. locating the network resource address. C. converting from the host domain name to IP address. D. indicating the email address.
答案: B. locating the network resource address. 解释: URL(统一资源定位符)的功能是定位网络资源的地址,通常用于指定网页、文件或其他网络资源的位置。
A socket consists of ( C ). 一个套接字由以下组成(C)。 A. a machine address and a port number. B. a machine address and an IP address. C. the IP addresses and the port numbers. D. a host name and a port number.
答案: C. the IP addresses and the port numbers. 解释: 套接字由IP地址和端口号组成,标识网络中的一个端点。
Forwarding packets for Ethernet are based on ( B ). 以太网转发数据包是基于(B)。 A. IP address B. MAC address C. LLC address D. port number
答案: B. MAC address 解释: 在以太网中,数据包的转发是基于MAC地址进行的,MAC地址是网络接口卡(NIC)唯一的物理地址。
Which of the following is the physical address for Ethernet? ( B ). 以下哪个是以太网的物理地址?(B) A. 10.254.1.220 B. 00-60-08-00-A6-38 C. 10-65-08 D. 10.0.0.1
答案: B. 00-60-08-00-A6-38 解释: 这是一个典型的以太网MAC地址,通常由六个字节组成,用来唯一标识网络设备。
In Internet communication, IP datagram will go through the source host and routers to reach the destination host, usually ( D ). 在互联网通信中,IP数据报将通过源主机和路由器到达目标主机,通常(D)。 A. both source host and routers all know the complete path to the destination host that will be reached by IP datagram. B. source host knows the complete path to destination host that will be reached by IP datagram, but none the intermediate routers. C. the intermediate routers know the complete path to destination host that will be reached by IP datagram, but none the source host. D. neither source host nor the intermediate routers know the complete path to destination host that will be reached by IP datagram.
答案: D. neither source host nor the intermediate routers know the complete path to destination host that will be reached by IP datagram. 解释: 在IP协议中,源主机和中间路由器都不需要知道到目标主机的完整路径,路由器只根据路由表决定转发路径,而源主机通过目标IP地址发送数据包,IP数据报的路由是由每个路由器动态决定的。
填空题
Fill the blank. ( 20 scores, every blank is 1 score )
填空题(20分,每个空1分):Data link layer in IEEE802.3 is divided to two function sub-layers. They are ( LLC ) and ( MAC ).
IEEE802.3的数据链路层被划分为两个功能子层,分别是(LLC)和(MAC)。DNS provides the convert from ( domain name ) to ( IP address ), APR provides the convert from ( IP address ) to ( MAC address ).
DNS提供从(域名)到(IP地址)的转换,ARP提供从(IP地址)到(MAC地址)的转换。The routing protocol ( OSPF ) is recommended for an intra AS, which is based on ( link state ) routing algorithm, and the routing protocol ( BGP ) is recommended for inter AS, which is based on ( distance vector ) routing algorithm.
建议在同一自治系统(AS)中使用路由协议(OSPF),它基于(链路状态)路由算法;而在自治系统间使用(BGP)协议,它基于(距离矢量)路由算法。In E-mail system, SMTP is a protocol used to ( sending ) E-mail, and POP3 is a protocol used to ( receiving ) E-mail.
在电子邮件系统中,SMTP是用于(发送)电子邮件的协议,而POP3是用于(接收)电子邮件的协议。( Virtual circuit ) subnet and ( datagram ) subnet provide connection-oriented services and connectionless services respectively.
(虚电路)子网和(数据报)子网分别提供面向连接服务和无连接服务。RIP advertisements typically announce ( the number of hops ) to various destinations; BGP updates, on the other hand, announce the ( sequence of ASs on the routes ) to the various destinations.
RIP广告通常宣布到达各个目的地的(跳数);而BGP更新则宣布到达各个目的地的(AS序列)。The task of the data link layer is providing data transmission services between ( adjacent nodes ); the task of the network layer is providing data transmission services between ( end-to-end hosts ); and the task of transport layer is providing data transmission services between ( application processes ).
数据链路层的任务是提供相邻节点之间的数据传输服务;网络层的任务是提供端到端主机之间的数据传输服务;传输层的任务是提供应用进程之间的数据传输服务。In the TCP, connection establishment of transport layer uses method of ( three-way handshake ).
在TCP中,传输层的连接建立采用(三次握手)方法。
判断题
ARP is a network layer protocol. F
解释:ARP (Address Resolution Protocol) 是一个数据链路层协议,不是网络层协议。它的作用是根据IP地址查找MAC地址。C/S model is one of network architectures. F
解释:C/S (Client/Server) 模型是一种通信模型,而不是网络架构。网络架构指的是网络的设计和构造方式。Virtual circuit switching is not the same as circuit switching, but a packet switching. T
解释:虚拟电路交换 (Virtual Circuit Switching) 是一种包交换技术,尽管它提供类似于电路交换的连接,但它仍属于包交换的一种方式。When a TCP connection is established, there is no any change for the size of RcvWindow. F
解释:在TCP连接建立过程中,接收窗口 (RcvWindow) 会发生变化,因为连接的双方会交换流量控制信息来确定接收窗口的大小。TCP is an end to end transport protocol, but UDP is not. F
解释:虽然TCP是端到端的传输协议,但UDP也是端到端的协议,只是UDP不提供像TCP那样的可靠性保证。Every end-system must use the same operating system in Internet. F
解释:互联网中的不同终端系统可以使用不同的操作系统,互联网协议(如TCP/IP)保证了不同操作系统之间的互通性。In a P2P file-sharing application, there is no notion of client and server sides of a communication session. F
解释:尽管P2P文件共享应用程序中客户端和服务器的角色可以是动态的,但仍然存在通信会话中客户端和服务器的角色划分。It is possible to have the same alias for an organization Web server and Email server. T
解释:同一个组织的Web服务器和邮件服务器可以共享相同的域名别名 (Alias),它们通过不同的端口进行区分。There are the same address table entries for forwarding tables in routers and in two-layer switches. F
解释:路由器和二层交换机的转发表是不同的。路由器使用IP地址进行转发,而二层交换机使用MAC地址进行转发。With a window size of 1, SR, GBN, and the alternating bit protocol are functionally equivalent. T
解释:当窗口大小为1时,选择重传(SR)、Go-Back-N(GBN)和交替比特协议(Alternating Bit Protocol)在功能上是等效的,因为它们都实现了按顺序传输数据的机制。
简答题-1
- To take TCP/IP architecture for an example, summarize the process of data encapsulation.
Answers ① 应用层将要发送的报文送到传输层,假如报文长度过大则将其分成若干块,每块封装成一个报文段中,报文段包含应用层载荷和具有地址信息(端口号)和序列号的头部。 (Translation: The application layer sends the message to the transport layer. If the message is too large, it is divided into several segments, each of which is encapsulated in a transport layer segment. The segment contains the application layer payload and a header with address information (port number) and sequence numbers.)
② 传输层报文段送到网络层,并封装成网络层分组,每个分组除传输层载荷外,包含一个有地址信息(IP地址)和其它控制信息的头部。 (Translation: The transport layer segment is passed to the network layer, where it is encapsulated into a network layer packet. Each packet, in addition to the transport layer payload, contains a header with address information (IP address) and other control information.)
③ 网络层分组传递到数据链路层,分组被封装到链路层数据帧中,除网络层载荷,每帧还包含有地址信息(MAC)和其它控制信息等的头部。 (Translation: The network layer packet is passed to the data link layer, where it is encapsulated into a data link layer frame. Each frame, in addition to the network layer payload, contains a header with address information (MAC address) and other control information.)
④ 数据链路层帧送到物理层,在物理层被转化成电气信号或者光信号,通过物理媒介进行传输,最终到达目标设备。 (Translation: The data link layer frame is passed to the physical layer, where it is converted into electrical or optical signals and transmitted through physical media to reach the destination device.)
Explanation
- The process of data encapsulation follows a hierarchical layering system. Each layer adds its own header information, which contains addressing and control data to guide the transmission of the message.
- At the application layer, the message is prepared for transmission and sent to the transport layer.
- The transport layer divides large messages into segments, adds its header (containing port numbers and sequence numbers), and passes the segments to the network layer.
- The network layer adds its own header (containing IP addresses and routing information) and encapsulates the transport segment into packets.
- The data link layer adds its own header (containing MAC addresses and error-checking information) and encapsulates the network layer packet into frames.
- Finally, at the physical layer, the data is converted into electrical or optical signals for transmission over physical media to the destination.
中文解释
- 数据封装过程遵循分层结构,每一层为数据添加自己的头部信息,包含地址和控制数据,帮助消息的传输。
- 在应用层,消息被准备好并发送到传输层。
- 传输层将大的消息分割成报文段,添加头部(包含端口号和序列号),并将报文段传递给网络层。
- 网络层添加自己的头部(包含IP地址和路由信息),并将传输层报文段封装成分组。
- 数据链路层添加自己的头部(包含MAC地址和错误检查信息),将网络层分组封装成数据帧。
- 最终,在物理层,数据被转化为电信号或光信号,通过物理介质传输到目标设备。
每一层都会加入自己的头部信息,应用层将消息准备好,传输层将其分割成报文段,添加头部,包括端口号和路由信息,网络层则是添加IP地址和路由信息,整理成为分组!再来到数据链路层就是帧了,会包含MAC地址和错误检查信息!最后在物理层会是一些特殊信号,通过适当介质传输到目标设备!
简答题-2
(1) 描述SR(选择重传)可靠数据传输的主要原理,如图1所示。
答案:
- “窗口”最大为N,允许连续未确认的包,必要时缓冲包
- 在选择重传(SR)协议中,发送方可以在等待确认(ACK)之前发送多个数据包,最多可以发送窗口大小(N)个数据包。接收方对数据包进行缓冲,并按需重新排序。
- ACK(n):单独确认所有正确接收的包,发送方对每个未确认包有一个定时器
- 接收方会为每个正确接收的数据包发送确认(ACK)。每个ACK对应于成功接收到的单个数据包。发送方为每个未确认的数据包维护一个定时器,确保必要时进行重传。
- 超时(n)- 重传未收到ACK的数据包
- 如果发送方在指定时间内没有收到某个数据包的确认(ACK),则会重传该数据包。
解释:
- 选择重传(SR)是一种可靠的数据传输协议,其中发送方维持一个滑动窗口,发送多个数据包而不需要等待每个包的确认。
- 接收方会对收到的数据包进行缓冲,按顺序处理,并为每个正确接收的数据包发送单独的ACK。如果发送方在超时时间内没有收到某个包的ACK,它会重传该包。
(2) 假设主机A通过路由器R发送数据报到主机B。请根据要求填写帧中的源MAC地址、目标MAC地址、源IP地址和目标IP地址。
答案:
- 从A到路由器R
- 源MAC地址: 74-29-9C-E8-FF-55
- 目标MAC地址: E6-E9-00-17-BB-4B
- 源IP: 111.111.111.111
- 目标IP: 222.222.222.222
- 从路由器R到B
- 源MAC地址: 1A-23-F9-CD-06-9B
- 目标MAC地址: 49-BD-D2-C7-56-2A
- 源IP: 111.111.111.111
- 目标IP: 222.222.222.222
解释:
- 在第一段传输(从A到R),源MAC地址为主机A的MAC地址,目标MAC地址为路由器R的MAC地址。源IP地址和目标IP地址不变,依然是主机A和主机B的IP地址。
- 在第二段传输(从R到B),源MAC地址变为路由器R的MAC地址,目标MAC地址为主机B的MAC地址。源IP和目标IP地址依然不变,表示源主机和目标主机。
注意可以如此类比,ip类比为目的地,无论如何目的地终究不会发生改变!而MAC可以类比位交通工具,那么就是在每一站搭乘不一样交通工具!
综合题-1
题目解析
我们有一个网络地址为 192.168.75.0,其中有五台主机 A、B、C、D 和 E,它们的 IP 地址和子网掩码如下:
Host | IP Address | Subnet Mask |
---|---|---|
A | 192.168.75.18 | 255.255.255.240 |
B | 192.168.75.146 | 255.255.255.240 |
C | 192.168.75.158 | 255.255.255.240 |
D | 192.168.75.161 | 255.255.255.240 |
E | 192.168.75.173 | 255.255.255.240 |
子网掩码 255.255.255.240 的二进制形式是 11111111.11111111.11111111.11110000,即 /28。这意味着: • 网络部分:前 28 位(即前 3 个字节 + 前 4 位)
• 主机部分:后 4 位(即每个子网有 (2^4 = 16) 个 IP 地址,其中第一个是网络地址,最后一个是广播地址,可用主机地址为 14 个)
子网划分规则: 1. 子网大小:16(因为主机部分占 4 位)。 2. 子网范围:从 192.168.75.0 开始,每 16 个地址为一个子网: • 192.168.75.0 ~ 192.168.75.15
• 192.168.75.16 ~ 192.168.75.31
• 192.168.75.32 ~ 192.168.75.47
• ...
• 192.168.75.160 ~ 192.168.75.175
• ...
主机所属子网: • 主机 A (192.168.75.18):
• 属于子网 192.168.75.16 ~ 192.168.75.31
• 网络地址:192.168.75.16
• 广播地址:192.168.75.31
• 主机 B (192.168.75.146):
• 146 ÷ 16 = 9 余 2,所以子网范围是 192.168.75.144 ~ 192.168.75.159
• 网络地址:192.168.75.144
• 广播地址:192.168.75.159
• 主机 C (192.168.75.158):
• 和 B 在同一子网(192.168.75.144 ~ 192.168.75.159)
• 主机 D (192.168.75.161):
• 161 ÷ 16 = 10 余 1,所以子网范围是 192.168.75.160 ~ 192.168.75.175
• 网络地址:192.168.75.160
• 广播地址:192.168.75.175
• 主机 E (192.168.75.173):
• 和 D 在同一子网(192.168.75.160 ~ 192.168.75.175)
问题解答:
[1] How many subnets do the five hosts A, B, C, D and E belong to? List the hosts that belong to the same subnet.
• 主机 A:192.168.75.16 ~ 192.168.75.31
• 主机 B 和 C:192.168.75.144 ~ 192.168.75.159
• 主机 D 和 E:192.168.75.160 ~ 192.168.75.175
• 答案:分属 3 个子网,同一子网的主机是 A、BC、DE。
A. 分属3个网段,位于同一网段的有A、BC、DE。
[2] What is the network address of the host D?
• 主机 D 的 IP 是 192.168.75.161,子网掩码 255.255.255.240。
• 网络地址计算:IP AND 子网掩码
• 161 的二进制:10100001
• 240 的二进制:11110000
• AND 结果:10100000(即 160)
• 网络地址:192.168.75.160
(注:题目答案中写的是 168.192.80.160,可能是笔误,应为 192.168.75.160)
[3] To add the sixth host F, make it together with A belong to the same subnet, what is the IP address range?
• 主机 A 的子网是 192.168.75.16 ~ 192.168.75.31。
• 可用主机地址范围:192.168.75.17 ~ 192.168.75.30(因为 .16 是网络地址,.31 是广播地址)。
• 题目答案中写的是 168.192.80.17 ~ 168.192.80.29,可能是笔误,应为 192.168.75.17 ~ 192.168.75.30。
C. 答案应为:192.168.75.17到192.168.75.30
[4] If adding a host in the network, its IP address is 168.192.80.164, what is its broadcast address? Which hosts can receive its broadcast information?
• 题目中突然出现 168.192.80.164,可能是笔误(应为 192.168.75.164)。
• 假设是 192.168.75.164:
• 子网掩码 255.255.255.240,所以子网范围是 192.168.75.160 ~ 192.168.75.175。
• 广播地址:192.168.75.175。
• 同一子网的主机是 D 和 E,所以它们可以收到广播信息。
• 题目答案写的是 168.192.80.175,DE,可能是笔误。
D. 192.168.75.175,DE
[5] If using VLAN technology to divide the subnet, what device can implement the data forwarding between VLAN?
• VLAN 间通信需要通过三层设备:路由器或三层交换机。
E. 路由器/三层交换机
总结: • [1] A
• [2] 网络地址应为 192.168.75.160(题目答案可能是笔误)
• [3] C(IP 范围应为 192.168.75.17 ~ 192.168.75.30)
• [4] D(广播地址应为 192.168.75.175,主机是 D 和 E)
• [5] E
可能的笔误: 题目中出现了 168.192.80.x 的地址,可能是将 192.168.75.x 写反了。实际应为 192.168.75.x。
综合题-2基于TCP拥塞控制机制
问题 (2) 背景
假设TCP协议的行为如图3所示
问题与答案详解
a) TCP慢启动(Slow Start)的时间区间
• 答案:[1,4]
和 [12,14]
• 解释:
• 慢启动阶段:TCP窗口大小(cwnd
)从初始值(通常为1
MSS)开始,每收到一个ACK后指数增长(cwnd *= 2
)。
• 区间
[1,4]
:窗口从1增长到8(1→2→4→8),符合指数增长。
• 区间
[12,14]
:窗口从1重新开始增长(可能是超时重传后的重置),再次指数增长。
b) TCP拥塞避免(Congestion
Avoidance)的时间区间
• 答案:[4,8]
和 [9,11]
• 解释:
• 拥塞避免阶段:当 cwnd
达到阈值(ssthresh
)后,转为线性增长(每RTT增加1
MSS)。
• 区间
[4,8]
:窗口从8开始线性增长(如8→9→10→11→12)。
• 区间
[9,11]
:可能是丢包后阈值减半,重新进入线性增长。
c) 初始阈值的值(第一次传输轮次)
• 答案:初始阈值为 8
• 解释:
• 在区间 [1,4]
中,cwnd
在 4
轮次达到 8
后转为线性增长(拥塞避免),说明初始
ssthresh = 8
。
d) 第8轮传输后发生的事件及TCP版本
• 答案:
• 事件:收到3个重复ACK(Triple Duplicate ACK),cwnd
减半。
• TCP版本:Reno
• 解释:
• Reno与Tahoe的区别:
◦ Reno:收到3个重复ACK时,触发快速重传(Fast Retransmit),`cwnd = ssthresh / 2`,进入快速恢复(Fast Recovery)。
◦ Tahoe:直接重置 `cwnd = 1`,重新慢启动。
• 题目中 cwnd
减半而非重置为1,说明是 Reno。
e) 假设第16轮传输前无丢包,窗口大小是多少?
• 答案:窗口大小为 6
选择题
问题与答案解析
(1) CRC(循环冗余校验)计算
题目:
数据位 D = 101110
,生成多项式
G = 1001
,求CRC校验位 R
。
选项:
A. 011
B. 101
C. 110
D. 111
答案:A. 011
解释:
1. 步骤:
• 在数据 D
后补 (G的位数-1)
个
0
,得到 101110000
。
• 用 101110000
除以
1001
(模2除法,即异或操作)。
• 计算过程:
1
2
101110000 ÷ 1001 = 101011(商,忽略)
余数 = 011 → CRC校验位 R = 011
验证:
• 最终发送数据:101110
+011
=101110011
。• 接收方用
1001
除101110011
,若余数为0
则无错误。
(2) IP数据报经过的路由器接口数
题目:
源主机到目标主机之间有 3
台路由器,忽略分片,IP数据报会经过多少接口?
选项:
A. 3
B. 5
C. 7
D. 8
答案:D. 8
解释:
1. 接口计数规则:
• 每台路由器有 入口和出口 两个接口。
• 路径:源主机 → R1 → R2 → R3 → 目标主机。
计算:
• 源主机发送到 R1:1
(源主机网卡) +1
(R1入口) =2
。• R1 → R2:
1
(R1出口) +1
(R2入口) =2
。• R2 → R3:
1
(R2出口) +1
(R3入口) =2
。• R3 → 目标主机:
1
(R3出口) +1
(目标主机网卡) =2
。• 总计:
2 + 2 + 2 + 2 = 8
个接口。
(3) 以太网的物理地址
题目:
以下哪个是以太网的物理地址?
选项:
A. 10.254.1.220
B. 01-6E-09-00-A6-38
C. 2001:da8:2000:2193:23:33
D. 10.0.0.1
答案:B. 01-6E-09-00-A6-38
解释:
物理地址(MAC地址):
• 格式:6
字节十六进制,用-
或:
分隔(如01-6E-09-00-A6-38
)。其他选项:
• A 和 D:IPv4 地址。• C:IPv6 地址。
(4) 使用UDP的原因
题目:
与TCP相比,我们有时使用UDP的原因是?
选项:
A. 快速
B. 简单
C. 容忍数据丢失
D. 以上所有
答案:D. All of above
解释:
1. UDP特性:
• 快速:无连接、无握手、无拥塞控制。
• 简单:头部仅 8
字节(TCP为 20
字节)。
• 容忍丢失:不保证可靠传输,适合实时应用(如视频流、VoIP)。
- 对比TCP:
• TCP可靠但开销大(确认、重传、流量控制等)。
总结
1. CRC计算:模2除法求余数。
2. 接口计数:每台路由器贡献 2
个接口(入口+出口)。
3. MAC地址:6
字节十六进制格式。
4. UDP优势:快速、简单、容忍丢失,适合实时应用。
综合题-3
(1) Dijkstra最短路径算法计算(从节点u到所有节点)
(2) TCP/IP数据封装过程总结
TCP/IP协议栈的数据封装分为以下五层,每层添加特定的头部信息:
应用层: • 数据单元:报文(Message)
• 功能:生成原始数据(如HTTP请求、DNS查询)。
• 封装:添加应用层协议头(如HTTP头部)。
传输层: • 数据单元:段(Segment,TCP)或数据报(Datagram,UDP)
• 功能:提供端到端通信(端口号)、可靠性(TCP)或实时性(UDP)。
• 封装:添加TCP/UDP头部(含源/目的端口、序列号等)。
网络层: • 数据单元:数据包(Packet)
• 功能:路由和寻址(IP地址)。
• 封装:添加IP头部(含源/目的IP地址、TTL等)。
数据链路层: • 数据单元:帧(Frame)
• 功能:本地网络传输(MAC地址)。
• 封装:添加帧头(如以太网头部)和帧尾(FCS校验)。
物理层: • 数据单元:比特流(Bits)
• 功能:将帧转换为电信号/光信号传输。
• 封装:无头部,直接传输原始比特。
封装流程示例(以发送HTTP请求为例): 1
应用层:HTTP报文 → 传输层:TCP段 → 网络层:IP数据包 → 数据链路层:以太网帧 → 物理层:比特流
关键点总结 1. Dijkstra算法:通过逐步扩展最短路径集合,计算从源节点到所有其他节点的最小成本路径。 2. TCP/IP封装:数据从高层到低层逐层添加协议头,确保可靠传输和正确路由。
综合 -4 子网划分与地址分配
题目要求 •
给定网段:214.97.254/23
(范围:214.97.254.0
~
214.97.255.255
,共 512
个地址)。
• 子网需求:
• 有主机的子网:
◦ Network A:支持 `250` 个接口。
◦ Network B:支持 `120` 个接口。
◦ Network C:支持 `120` 个接口。
• 无主机的子网(仅需支持 2 个接口):
◦ Network D、E、F。
• 分配规则:
• 每个子网需以 a.b.c.d/x
或
a.b.c.d/x - e.f.g.h/y
格式表示。
子网划分步骤 1. 确定子网掩码长度:
• A(250接口):需 256
地址(/24
)。
• B/C(120接口):需 128
地址(/25
)。
• D/E/F(2接口):需 4
地址(/30
或
/31
,但 /31
为特殊用途,通常用
/30
)。
优先级分配:
• 从大子网到小子网依次分配,避免地址碎片化。具体分配方案:
• Subnet A:214.97.255.0/24
(256
地址,满足 250 接口)。• Subnet B:
214.97.254.0/25
(128
地址,满足 120 接口)。• Subnet C:
214.97.254.128/25
(128
地址,满足 120 接口)。• Subnet D:
214.97.254.0/31
(2
地址,用于点对点链路)。• Subnet E:
214.97.254.2/31
(2
地址)。• Subnet F:
214.97.254.4/30
(4
地址,实际可用 2 接口)。
验证地址范围与冲突 • Subnet
A:214.97.255.0/24
• 范围:214.97.255.0
~
214.97.255.255
(不与其他子网重叠)。
• Subnet B:214.97.254.0/25
• 范围:214.97.254.0
~ 214.97.254.127
。
• Subnet C:214.97.254.128/25
• 范围:214.97.254.128
~
214.97.254.255
。
• Subnet D/E/F:
• D: 214.97.254.0/31
(.0
~
.1
)
• E: 214.97.254.2/31
(.2
~
.3
)
• F: 214.97.254.4/30
(.4
~
.7
)
• 无重叠:所有子网地址范围互不冲突。
最终答案 1
2
3
4
5
6Subnet A: 214.97.255.0/24 (256 addresses, supports 250 interfaces)
Subnet B: 214.97.254.0/25 (128 addresses, supports 120 interfaces)
Subnet C: 214.97.254.128/25 (128 addresses, supports 120 interfaces)
Subnet D: 214.97.254.0/31 (2 addresses, for point-to-point links)
Subnet E: 214.97.254.2/31 (2 addresses)
Subnet F: 214.97.254.4/30 (4 addresses, 2 usable)
关键点说明 1. 子网掩码选择:
• /24
对应 256
地址,/25
对应
128
地址,/30
对应 4
地址。
特殊子网:
•/31
通常用于点对点链路(仅 2 地址),但部分设备不支持,因此F
使用/30
。地址利用率:
• 分配后剩余地址:214.97.254.8
~214.97.254.255
中未使用的部分(可留作未来扩展)。