计网第五次作业 - 图文

更新时间:2023-11-08 04:06:01 阅读量: 教育文库 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

Review Questions:

1. What are some of the possible services that a link-layer protocol can offer to the network layer? Which of these link-layer services have corresponding services in IP? In TCP? 链路层协议提供给网络层的服务有哪些?哪些是给IP的?哪些是给TCP的 ?

Link access, framing, reliable delivery between adjacent nodes, flow control, error detection, error correction, half-duplex and full-duplex. In IP: framing, error detection.

In TCP: framing, reliable delivery between adjacent nodes, error detection, half-duplex and full-duplex.

2. If all the links in the Internet were to provide reliable delivery service, would the TCP reliable delivery service be redundant? Why or why not? 不会多余,因为TCP保证的是传输层的数据传送,而link提供稳定可靠传输保证链路层的传输稳定,二者不完全重叠,所以TCP可靠传输也不会多余。

3. In Section 5.3, we listed four desirable characteristics of a broadcast channel. Which of these characteristics does slotted ALOHA have? Which of these characteristics does token passing have?

4. Suppose two nodes start to transmit at the same time a packet of length Lover a broadcast channel of rate R. Denote the propagation

delay between the two nodes as dprop. Will there be a collision if dprop< L / R? Why or why not?

因为L / R = 包传递的时间,如果dprop < L / R,也就意味着A的信号跑到B的时候B的最后一个分组还没离开B,所以发生碰撞。

7. Suppose nodes A, B, and C each attach to the same broadcast LAN (through their adapters). If A sends thousands of IP datagrams to B with each encapsulating frame addressed to the MAC address of B, will C’s adapter process these frames? If so, will C’s adapter pass the IP datagrams in these frames to the network layer C? How would your answers change if A sends frames with the MAC broadcast address? 不会,C会拆封帧从而读取报头的MAC,因为每一个host的MAC都唯一,C读取到数据报中的MAC和自己的不一样就不会继续拆封数据报,不会投递给C。当使用LAN口广播地址的时候,C的适配器就会拆封帧,向C传递数据。

8. How big is the MAC address space? The IPv4 address space? The IPv6 address space? 2^48,2^32,2^128.

9. Why is an ARP query sent within a broadcast frame? Why is an ARP response sent within a frame with a specific destination MAC address? 因为新加入网络的主机是不知道路由器的IP的,自己也没有IP,所以只能广播

才能得到IP。因为每个主机的MAC地址都是唯一的,而ARP建立转发表的时候会带上MAC地址。

12. In CSMA/CD, after the fifth collision, what is the probability that a node chooses K = 4? The result K = 4 corresponds to a delay of how many seconds on a 10 Mbps Ethernet?

可能,因为第五次K的取值范围是0-(2^5-1)即0-31。Bit time = 1 bit / R = 1 bit / 10 Mbps = 1 msec,K = 4,wait time = 4 * 512 * 1 msec = 2048 msec。

Problems:

1. Suppose the information content of a packet is the bit pattern 1110 1100 1000 1010 and an even parity scheme is being used. What would the value of the field containing the parity bits be for the case of a two-dimensional parity scheme? Your answer should be such that a minimum-length checksum field is used.假设一个数据包的信息含量是XXX,使用偶校验方案。采用二位奇偶校验方案的字段包含的奇偶校验位的字段的值是多少?答案要使用最小长度校验。

10100 10100 10100 10111 00011

2. Suppose the information portion of a packet (D in Figure 5.4) contains 10 bytes consisting of the 8-bit unsigned binary ASCII representation of the integers 0 through 9. Compute the Internet checksum for this data.假设一个包的信息的一部分包括10bytes组成的8-bit无符号二进制码表示的整数0-9,计算该数据的网络校验。 算校验码先把0-9加起来 0000 0000 0000 0010 0000 0100 0000 0110 0000 1000 0001 0100

0000 0001 0000 0011 0000 0101 0000 0111 0000 1001 0001 1001

→→→→ 取反可得 校验码为1110 1011

3. Consider the previous problem, but instead of containing the binary of the numbers 0 through 9 suppose these 10 bytes contain. Compute the Internet checksum for this data.

a. the binary representation of the numbers 1 through 10. 0000 0001

0000 0010

1110 0110

0000 0011 0000 0101 0000 0111 0000 1001 0001 1011

0000 0100 0000 0110 0000 1000 0001 0100 0001 1110

→→→→ 取反可得 1110 0100

b. the ASCII representation of the letters A through J (uppercase). 0100 0001 0100 0011 0100 0101 0100 0111 0100 1001 0101 1000

0100 0010 0100 0100 0100 0110 0100 1000 0100 1010 0101 1111 1110 0001

→→→→ 取反可得 1010 0111

c. the ASCII representation of the letters a through j (lowercase).小写字母表示 0110 0001 0110 0011

0110 0010 0110 0100 1010 0000

本文来源:https://www.bwwdw.com/article/8j32.html

Top