[Computer network] calculation problems Summary

Computer Network Overview

Here Insert Picture DescriptionThe ANS
A) 2Mbps / 1Mbps 2 =
B) is not; the.
C) 0.2
D) p = C 3 k 0. 2 k 0. 8 3 k , k = 3 = 0.008 p = C_{3}^{k}*0.2^k * 0.8^{3 - k}, k = 3 = 0.008
the fraction of time is also 0.008

Here Insert Picture Description d p r o p = m s s e c , d t r a n s = L R s e c , d e = d p r o p + d t r a n s = L R + m s s e c d_{prop} = \frac{m}{s} sec ,d_{trans} = \frac{L}{R} sec ,d_e = d_{prop} + d_{trans} = \frac{L}{R} + \frac{m}{s} sec
Here Insert Picture Descriptiond) At A, just leaving A
e)between A, B; from A s t s* t
f )has reached B
g) m = s L / R = 536 k m m = s*L/R = 536km

1-1

A:
. 1) A: 2M * (. 1 / 10Mbps. 1 + / + 20Mbps. 1 / 10Mbps) = 0.5s; B: 1M * (. 1 / 10Mbps. 1 + / + 20Mbps. 1 / 10Mbps) + 2M / 20Mbps (queuing delay ) = 0.35s
2) 0 ~ 0.1s, a sends 0.1s / (1kb / 10Mbps) = 1000 packets
share the connection to the router from the time t = 0.1s and the B link, the bandwidth share of each average 10Mbps, a then approximately: 1Mb / 10Mbps + 2 × 1kb / 10Mbps = 0.1002s to deliver the remaining packet 1000, 2Mbits a document delivery direction C approximately (0.1 + 0.1002) s≈0.2s.
B to D 1Mbits delivery time is about documents: 1Mb / 10Mbps + 2 × 1kb / 10Mbps = 0.1002s≈0.1s.
3) packet switching is more than fair exchange of messages.

1-2
answer:

  1. dp = L/R
  2. dt = M/V
  3. de = dp + dt = L/R + M/V
  4. 在A到B的路上,距离A:dt * V(米)
    5)L/R = M/V => M = V*L/R = 1280(米)
    1-3
    答:
    1)流水线串行,吞吐量取最小的带宽,500kbps
    2)4MB/500kbps = 320/5 s = 64s

应用层

2-1

解:对于CS模式,最小分发时间为:
Here Insert Picture Description
对P2P模式,最小分发时间为:
Here Insert Picture Description
因此
2-1-years
2-2
答:

  1. 最长时间:迭代查询的话4 * RTTd(主机->本地服务器->根域名服务器->顶级域名服务器->权威域名服务器,再返回去)。
    最短时间: 1 * RTTd(本地域名服务器里面有要的IP地址)

  2. 2* 9 * RTTh = 18RTTh

  3. 2RTTh(建立连接) + 2 * 2 RTTh(pipeline传输) = 6RTTh

  4. 非流水2RTTh +8 * RTTh = 10RTTh; 流水约为2RTTh + RTTh = 3RTTh

传输层

3-1
答:
1)
GBN A发送了 5 + 4 = 9 个报文段,序号为 1 2 3 4 5 ,2 3 4 5,B发送了 (5 - 1)+ 4 = 8个ACK ,序号为 1 1 1 1 ,2 3 4 5。

SR A发送了5 + 1 = 6个报文段,序号为1 2 3 4 5 2,B发送了 4 + 1 = 5个ACK,序号为1 3 4 5 2

TCP A发送了5 + 1 = 6个报文段,序号为1 2 3 4 5 2,B发送了 4 + 1 = 5个ACK,序号为 2 2 2 2 6
//TCP是面向字节流的协议。在TCP协议中,seq被定义为下一个希望收到的信号的第一个字节编号。seq为n代表着前n-1个字节都被收到了。

2)
TCP协议。TCP有快速重传机制,没有等超时相应就重传了没有ACK的2号包。但是GBN乱序要等待重传、SR要缓存乱序并且等待。

3-2
答:
1)为了不丢包,要有TCP端数 * TCP段最大长度(MSS)/带宽 == 链路双向传播时延 ,得到W = 150ms/(1500 * 8 b/ 8Mbps) = 100

2)平均窗口尺寸 W_e = 0.75 * W = 75; 平均吞吐量 = We * MSS / 带宽 = 8Mbps * 0.75 = 6Mbps

3)恢复窗口的过程中每个RTT窗口尺寸增加一个MSS,共用时间 100/2 * 150ms = 7.5 s

网络层

Here Insert Picture Description
答:
1)
根据192.168.1.0/28可以知道,子掩码32位前28位全1,8位一组的话只需要看最后一位,是11110000_二进制 = 240_十进制

因此 默认网关:192.168.1.0;子掩码:255.255.255.240

2)因为lengrh小于MTU,而且DF = 1,因此不会分片;同一个分组之下id一样也没有变化;首部的源IP地址更改为130.11.22.3;转发之前生存时间TTL = TTL - 1,如果减少为0就丢弃了…;首部校验和会重新计算。

3)
路由器需要将该IP分组分为4片,分片结果如下:

第1片:{ID=6789,DF=0,MF=1,length=508,offset=0};

Of 2: {ID = 6789, DF = 0, MF = 1, length = 508, offset = 61};

Of 3: {ID = 6789, DF = 0, MF = 1, length = 508, offset = 122};

Of 4: {ID = 6789, DF = 0, MF = 0, length = 36, offset = 183}.

4-2
answer:

  1. Maximum range: 111.123.15.5/24 ~ 111.123.15.254/24; DHCP dependent since the UDP protocol, the destination IP address 255.255.255.255; source port 0.0.0.0

  2. In addition to IP addresses can also be dynamically obtained through the router subnet mask, default gateway address, DNS server name and IP address.

  3. You can access the WWW server. Because the subnet mask of right (8 * 3 == 24), and the WWW server and host 1 within a subnet, so the host can access a WWW server; can not access the Internet. Since the default gateway IP configuration is 111.123.15.2, should be 111.123.15.1, so routing is not, it is not out of ...

Guess you like

Origin blog.csdn.net/sinat_39763590/article/details/89097453