作业辅导-计算机网络案例

目录

1. 作业题目

2. 作业目的

3. 运行效果

4. 实现过程

5. 知识点巩固

6 知识拓展

7 学习建议

作业辅导解析

CSCI520 Assignment 1 29th January,2019

1.作业题目:

  1. Circuit/packet switching – Suppose users share an 8 Mbps link. Also suppose each user requires a constant bitrate of 2 Mbps when transmitting, but each user transmits only 25% of the time.

    1. When circuit switching is used, how many users can be supported? (5 points)

    2. For the remainder of the question, suppose packet switching is used. Will there be any queuing delay before the link if 4 or fewer users transmit simultaneously? (5 points)

    3. Find the probability that a given user is transmitting. (5 points)

    4. Suppose there are 5 users. Find the probability that at any given time, all 5 users are transmitting simultaneously. (2.5 points) Find the fraction of time during which the queue grows. (2.5 points)

  2. Transmission delay and propagation delay – Consider two hosts, A and B, directly connected by a link of 2500 Km, propagation speed 2.5*108 m/s, and transmission rate 8 Mbps. Assume zero queuing delay.

    1. How long does it take to move a packet of length 1000 bytes from one A to B? (4 points)

    2. Assume the transmission time of the packet is dtrans and the propagation delay dprop. Suppose that host A begins to transmit a packet at time t=0. At time t= dtrans where is the last bit of the packet? (4 points)

    3. Suppose dprop is greater than dtrans. At time t= dtrans, where is the first bit of the packet? (3 points)

    4. Suppose dprop is less than dtrans. At time t= dtrans, where is the first bit of the packet? (3 points)

    5. You want to urgently deliver 40 terabytes of data from Buffalo to San Francisco. You have available a 100 Mbps dedicated link for the data transfer. Would you transmit the data over this link or use FedEx overnight delivery instead? Explain (write down any assumptions). (4 points)

  3. Bandwidth-delay product – Suppose two hosts, A and B, are separated by 30,000 Km and are connected by a direct link of R=3 Mbps. Suppose the propagation speed over the link is 2.5*108 m/s.

    1. Calculate the bandwidth-delay product R* dprop. (2 points)

    2. Consider sending a file of 1,200,000 bits from host A to host B. Suppose the file is sent continuously as a large message. What is the maximum number of bits that will be in the link at any time? (2 points)

    3. What is the width (in meters) of a bit in the link? (2 points)

    4. Repeat (a), (b) and (c) but now with a link of 3 Gbps. (6 points)

  4. Store-and-forward – Consider a packet of length L which begins at Host A and travels over three links to Host B. These three links are connected by two store-and-forward packet switches. Let di, si, Ri denote the length, propagation speed, and the transmission rate of link i, for i = 1, 2, 3. The packet switch delays each packet by dproc.

    1. Assuming no queuing delays, in terms of di, si, Ri (i = 1, 2, 3), and L, what is the total endto-end delay for the packet? (5 points)

    2. Now suppose R1 = R2 = R3 = R and dproc = 0. Further suppose the packet switches do not store-and-forward but instead immediately transmit each bit they receive before waiting for the entire packet to arrive. What is the end-to-end delay? (5 points)

      2.作业目的:

      1、 掌握报文交换、分组交换。

      2、 掌握传播时延和发送时延。

      3、 掌握时延带宽积。

      4、 掌握交换机存储转发模式。

      3.运行效果:

      4.实现过程:

      1. Circuit/packet switching

        1. 8 Mbps / 2 Mbps = 4.

          So 4 users can be supported when circuit switching is used.

        2. If 4 or fewer users transmit simultaneously, because each user requires a constant bitrate of 2 Mbps when transmitting, the maximum bitrate is 8 Mbps which equals to the link bandwidth. There won’t be any queuing delay.

        3. The probability that a given user is transmitting:

          Ptrans = 0.25

        4. The probability that at any given time, all 5 users are transmitting simultaneously:

          P = (Ptrans)5 = 0.255 = 0.0009765625

          The fraction of time during which the queue grows equals to the probability that all users are transmitting simultaneously, which is also 0.0009765625.

      2. Transmission delay and propagation delay

        a) 1,000 bytes = 1,000 * 8 bits = 8,000 bits, 8 Mbps = 8,000,000 bps

        ttrans = 8,000 bits / 8,000,000 bps = 1 ms tprop = (2,500 * 103 m) / (2.5 * 108 m/s) = 10 ms

        t = ttran + tprop = 1 ms + 10 ms = 11 ms

        So it takes 11 ms to move a packet of length 1000 bytes from one A to B.

        1. The last bit of the packet just enter the link from A.

        2. The first bit of the packet is in the middle of the link between A and B.

        3. The first bit of the packet has already arrived at B.

e) Transmission time is (40 * 1012 * 8 bits) / (100 * 106 bps) = 3.2 * 106 s = 37 days.

So transmitting the data with FedEx overnight delivery will be much faster.

  1. Bandwidth-delay product

    1. The propagation delay dprop = (30,000 * 103 m) / (2.5 * 108 m/s) = 0.12 s

      The bandwidth-delay product R * dprop = (3 * 106 bps) * 0.12 s = 3.6 * 105 bits

    2. The maximum number of bits that will be in the link at any time equals to the bandwidth-delay product, which is 360,000 bits.

    3. The width of a bit in the link is (30,000 * 103) / (3.6 * 105) = 83.33 m

    4. With a link of 3 Gbps:

      The bandwidth-delay product R * dprop = (3 * 109 bps) * 0.12 s = 3.6 * 108 bits The maximum number of bits becomes to the file size 1,200,000 bits

      The width of a bit in the link is (30,000 * 103) / (3.6 * 108) = 0.083 m

  2. Store-and-forward

    1. The total end-to-end delay for the packet is:

      t = L +

      d

      i + d * 2

      i=1,2,3 Ri i=1,2,3 si

      proc

    2. Because the switches immediately transmit each bit, the packet only need to be

transmitted into the link once, the end-to-end delay for the packet is:

R

d

s

t = L + i

i=1,2,3 i

5.知识点巩固:

  • 报文/分组交换(circuit/packet switching

    Circuit switching 的最大特点是终端系统之间需要预约传输线路资源才可以进行持续的通讯, 在通讯过程中传输速率保持在一个常数值。也就是说,circuit switching 是一种电路资源预分 配的方式,由于资源已经预先分配,因此在通讯结束之前,不管用户之间是否一直在传输信 息,这条电路始终被这一对用户占用。

  • 传播时延(propagation delay)与发送时延(transmission delay) 传播时延这个概念,是指电磁信号或者光信号在传输介质中传输的时延,而在光纤或者铜线 中,光信号和电磁信号的传播速度都在 20 万公里/秒以上,在传输介质中传输的是电磁信号 或者光信号,而不是数据。发送时延是指结点在发送数据时使数据块从结点进入到传输媒体 所需的时间,也就是从数据块的第一个比特开始发送算起,到最后一个比特发送完毕所需的

时间。发送时延又称为传输时延而带宽,也称媒体接入速率,即数据从结点进入到媒体的速

率。传播时延和要发送的数据大小没有关系,发送数据的大小只与发送时延有关,因为发送 时延=数据/带宽,而传播时延=发送距离/传播速率,在光纤,双绞线,电缆等传输媒体中,传 播速率是固定的,因此,传播时延主要是与传输距离有关,而与发送的数据大小无关。

  • 时延带宽积(bandwidth-delay product将传播时延和带宽相乘,即可得到时延带宽积。时延带宽积代表发送的第一个比特即将达到 终点时、发送端就已经发出了多少个比特。因此时延带宽积又称为以比特为单位的链路长度。 对于一条正在传送数据的链路,只有在代表链路的管道都充满比特时,链路才得到了充分的 利用。

    6.知识拓展:

  • 存储转发(store-and-forward)模式

存储转发模式是指交换机收完整个数据帧,并在 CRC 校验通过之后,才能进行转发操作。如 果 CRC 校验失败,即数据帧有错,交换机则丢弃此帧。这种模式保证了数据帧的无差错传输, 当然其代价是增加了传输延迟,而且传输延迟随数据帧的长度增加而增加。 快速转发模式 快速转发(Fast-forward)模式是指交换机在接收数据帧时,一旦检测到目的地址就立即进行 转发操作。但是,由于数据帧在进行转发处理时并不是一个完整的帧,因此数据帧将不经过 校验、纠错而直接转发,造成错误的数据帧仍然被转发到网络上,从而浪费了网络的带宽。 这种模式的优势在于数据传输的低延迟,但其代价是无法对数据帧进行校验和纠错。自由分 段模式 自由分段模式是交换机接收数据帧时,一旦检测到该数据帧不是冲突碎片就进行转 发操作。冲突碎片是因为网络冲突而受损的数据帧碎片,其特征是长度小于 64 字节。冲突碎 片并不是有效的数据帧,应该被丢弃。因此,交换机的自由分段模式实际上就是一旦数据帧 已接收的部分超过 64 字节,就开始进行转发处理。这种模式的性能介于存储转发模式和快 速转发模式之间。

7.学习建议:

1、 理解计算机网络的组成。

2、 熟悉计算机网络中的术语。

3、 掌握相关网络中的计算方法。