计算机网络作业合辑

1.Drawspace-time diagram for the previous HTTP request scenario assuming persistentconnections and pipelining

    为之前持久性、流水线型的HTTP请求画时空图。


2. Impact ofusing local web cache

   web缓存的影响


        一个对象大小为100K bits, 每秒发送15个对象,那么每秒发送1.5M的数据。

        有40%由缓存器接收,60%由接入链路接收,接收链路的使用速率为1.5M*60%  = 0.9M

       使用率为0.9/1.54 = 0.58.

        总的延迟为 0.6*(2.0+~msecs) + 0.4*~msecs = 1.2sec


3.Q: what relationship between seq # size and window size to avoid problem in (b)?

       为了避免图b所示的问题,序列号大小和窗口大小应该满足什么关系?

   

        问题在于,接收方不知道对方是因为(应答丢失而)没有收到应答且超时而重传某个序列号,而是下几个窗口发送过程中因为丢失又正好轮到了同一个序列号。

        在后面的情况中,接收方会把重复的分组当作新的分组,这样就出现了错误。

        在这个例子中,我们认为是窗口太小,或者说序列号太大导致不能分辨新旧帧。我们假设两者窗口大小不变,而尽可能增大序列号(先认为无穷大)如果出现了ACK全部丢失的极端情况,重传时发送编号0,而此时窗口将会滑动到 3 4 5的位置,接收方得到0后,并不会认为这是新的分组,而导致重复接收。我们必须保证这个窗口不会出现0,所以至少需要序列空间大小为6(3)

        #seq size >= window size*2 (如果发送方和接收方windowsize相等的话,最终接收窗口终止的位置就是两倍window size,在ACK全部丢失情况下,要保证不产生歧义,序列号必须在终止位置时保证不回到新的序列),广义上,如果发送方和接收方windowsize不相等,那么size1 + size2 <=seq size


4.TCP中,为什么三次收到相同序列就认为丢包

        收到相同的ACK,可能是数据丢失,也可能是返回的ACK延迟或者丢失。但是,三次收到连续相同的ACK并且都不是丢包的概率非常低,所以我们一般收到三次连续相同ACK时,我们就认为数据丢失了。


5.两次握手会出现怎样的问题?

        响应后无法得知对方的状态,起码三次才能保障这一点,可能导致的具体问题有:
        ①一方发送请求,一方发送应答,如果应答延迟,客户端将重发请求,而服务器已经建立连接,出现错误。
        ②一方发送请求,一方发送应答,然后客户端不再有反应,而服务端认为连接建立,一直等待。
        ③一方发送请求而延迟,进而重新发送请求,等到连接关闭后,第一次的失效请求达到服务器,建立了第二次不需要存在的连接。
        ……

6.吞吐量相关计算

       已知1500字节的段,100ms的rtt,需要10Gbps的吞吐量。

       (10Gbps = 10^4Mbps = 10^10 bps 1500byte = 12 000 bit,100ms = 0.1s)

    单位时间内流通的段数为(10^10bit/s)/(1.2*10^4bit * 0.1s)= 83 333

    已知平均吞吐量计算公式:

    TCP throughput = 1.22*MSS/(RTT*sqrt(L));

    计算丢包率:

    L = (1.22*MSS/(RTT*throughtput))^2 =(1.22*12 000/0.1*10^10)^2 = 2.143*10^-10


7.交换机自学习:C到I数据交换经历过程,一开始表为空



1.交换表为空,S1泛洪,把数据交给S4

2.S4泛洪,数据交给S3

3.S3泛洪,数据交给I

4.数据通过交换表找到传输链路,从LC回应





  • 0
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
经典计算机网络教材 Computer Networks, Fourth Edition By Andrew S. Tanenbaum Table of Contents Chapter 1. Introduction Section 1.1. Uses of Computer Networks Section 1.2. Network Hardware Section 1.3. Network Software Section 1.4. Reference Models Section 1.5. Example Networks Section 1.6. Network Standardization Section 1.7. Metric Units Section 1.8. Outline of the Rest of the Book Section 1.9. Summary Chapter 2. The Physical Layer Section 2.1. The Theoretical Basis for Data Communication Section 2.2. Guided Transmission Media Section 2.3. Wireless Transmission Section 2.4. Communication Satellites Section 2.5. The Public Switched Telephone Network Section 2.6. The Mobile Telephone System Section 2.7. Cable Television Section 2.8. Summary Chapter 3. The Data Link Layer Section 3.1. Data Link Layer Design Issues Section 3.2. Error Detection and Correction Section 3.3. Elementary Data Link Protocols Section 3.4. Sliding Window Protocols Section 3.5. Protocol Verification Section 3.6. Example Data Link Protocols Section 3.7. Summary Chapter 4. The Medium Access Control Sublayer Section 4.1. The Channel Allocation Problem Section 4.2. Multiple Access Protocols Section 4.3. Ethernet Section 4.4. Wireless LANs Section 4.5. Broadband Wireless Section 4.6. Bluetooth Section 4.7. Data Link Layer Switching Section 4.8. Summary Chapter 5. The Network Layer Section 5.1. Network Layer Design Issues Section 5.2. Routing Algorithms Section 5.3. Congestion Control Algorithms Section 5.4. Quality of Service Section 5.5. Internetworking Section 5.6. The Network Layer in the Internet Section 5.7. Summary Chapter 6. The Transport Layer Section 6.1. The Transport Service Section 6.2. Elements of Transport Protocols Section 6.3. A Simple Transport Protocol Section 6.4. The Internet Transport Protocols: UDP Section 6.5. The Internet Transport Protocols: TCP Section 6.6. Performance Issues Section 6.7. Summary Chapter 7. The Application Layer Section 7.1. DNS—The Domain Name System Section 7.2. Electronic Mail Section 7.3. The World Wide Web Section 7.4. Multimedia Section 7.5. Summary Chapter 8. Network Security Section 8.1. Cryptography Section 8.2. Symmetric-Key Algorithms Section 8.3. Public-Key Algorithms Section 8.4. Digital Signatures Section 8.5. Management of Public Keys Section 8.6. Communication Security Section 8.7. Authentication Protocols Section 8.8. E-Mail Security Section 8.9. Web Security Section 8.10. Social Issues Section 8.11. Summary Chapter 9. Reading List and Bibliography Section 9.1. Suggestions for Further Reading Section 9.1.1. Introduction and General Works Section 9.2. Alphabetical Bibliography

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值