您的位置:首页 > 文旅 > 旅游 > 洛阳新光建站_海南省海口市疫情最新消息_百度经验_南宁seo排名优化

洛阳新光建站_海南省海口市疫情最新消息_百度经验_南宁seo排名优化

2024/12/23 9:59:08 来源:https://blog.csdn.net/weixin_73545092/article/details/144532387  浏览:    关键词:洛阳新光建站_海南省海口市疫情最新消息_百度经验_南宁seo排名优化
洛阳新光建站_海南省海口市疫情最新消息_百度经验_南宁seo排名优化

Congestion control and the limited size of send buffer prevent the process in Host A from continuously passing data to its TCP socket at rate S bit/s. The send buffer can hold only 1% of the file, which greatly limit the transmission rate, and also according to the "bottleneck" theory, the transmission rate can only up to R bit/s, i.e. S/10 bit/s, due to the bandwidth of the link between Host A and the Internet.

No! TCP can provide congestion control, handle with buffer overflow, ensure in-order delivery, and so on, which the links cannot provide.

When suddenly change the route, the EstimateRTT, DevRTT and TimeOutInterval cannot change so quickly, so some packets that are already sent would be regarded as lost packet due to delayed ACK. Therefore, the TCP sender would retransmit these packets.

Review:

EstimateRTT = (1-alpha) EstimateRTT + alpha SampleRTT;

DevRTT = (1-beta)DevRTT + beta abs(SampleRTT-EstimateRTT);

TimeOutInterval = EstimateRTT + 4 DevRTT;

Q: how to set TCP timeout value? longer than RTT but RTT varies

Too short: premature timeout, unnecessary retransmissions

Too long: slow reaction to segment loss

Q: how to estimate RTT?

SampleRTT: measured time from segment transmission until ACK receipt

ignore retransmissions

SampleRTT will vary, want estimated RTT “smoother” average several recent measurements, not just current SampleRTT

(这个题不太会解释)

下面是ai的回答,我能明白FIN为什么要使用+1的ACK,因为要区分是接收到了数据还是结束信号,但是SYN是为什么呢?感觉和别的数据混了的概率很小。

If the acknowledgment for a SYN or FIN were x instead of x + 1, the receiver would not be able to differentiate between:

  1. The acknowledgment of the SYN/FIN itself.
  2. The acknowledgment of subsequent data or control packets.

Example of Ambiguity

  • Suppose a client sends a <SYN, SequenceNum = x> to initiate a connection.
  • If the server responds with ACK = x instead of ACK = x + 1, the client cannot distinguish whether:
    • The server is acknowledging the SYN packet (indicating that the connection is established), or
    • The server has already received some data with sequence number x (which could happen if there were retransmissions or duplicate packets).

Similarly, for a FIN packet:

  • If a client sends <FIN, SequenceNum = x> to close the connection, and the server responds with ACK = x instead of ACK = x + 1, the client cannot determine if:
    • The server has acknowledged the FIN packet (indicating that the connection is closing), or
    • The server is acknowledging data with sequence number x.

先计算第一个包:

A-S1 9600bit / 10Mb/s = 9.6e-4 s

S1 0.5e-4 s

S1-S2 9600bit / 50Mb/s = 1.92e-4 s

S2 0.5e-4 s

S2-B 9600bit / 20Mb/s = 4.8e-4 s

Propagation Delay 100e-4 s

sum = 117.32e-4 s = 11.732 ms

后面的包的附加时间要根据链路中最慢的来算,也就是9.6e-4 s

所以最终的时间为11.732 ms + 9 * 0.96 ms = 20.372 ms 

复习一下几种delay:

dproc: nodal processing: check bit errors; determine output link; typically < msec

dqueue: queueing delay: time waiting at output link for transmission; depends on congestion level of router

Cumulative acknowledgment is a type of acknowledgment mechanism used in communication protocols where the receiver acknowledges the highest sequence number of data packets that have been received in order and without any gaps.

Go-Back-N protocol discards the out-of-order packets and these packets need to be retransmitted by sender, so cumulative acknowledgement can be used to just send ACK for in-order packets. However, selective repeat protocol allows the receiver to accept and buffer packets that arrive out of order, which makes it impossible to use cumulative acknowledgement.

No, because it just ignores any other packet. Imagine if a former ACK get lost, ignoring the retransimission packet may cause that the sender resends this packet continuously.

Stateless: Server maintains no information about past client requests.

Enhancements: protocol endpoints (maintain state at sender/receiver over multiple transactions), cookies (http messages carry state).

这个题和前面的计算不是一种思路!这个题更宏观一些,忽略了很多因素,主要是看有几个RTT。

Step 1: TCP Connection Establishment

  • A TCP connection requires 1 RTT for the three-way handshake:
    • SYN sent by the client (browser).
    • SYN-ACK sent by the server.
    • ACK sent by the client.
  • Time required: 1 RTT = 200 ms

Step 2: HTTP Request for the Base HTML File

  • After the TCP connection is established, the browser sends an HTTP request for the base HTML file. The server responds with the file.
  • This process requires:
    • 1 RTT for the HTTP request and response (request sent, response received).
    • The base HTML file (3 segments) is transmitted during this RTT.
  • Time required: 1 RTT = 200 ms

Step 3: HTTP Requests for Embedded Objects

  • Once the base HTML file is received, the browser parses it and identifies two embedded objects. Using HTTP/1.1 with pipelining, the browser sends two HTTP requests for the two objects back-to-back.

  • The server responds with both objects in the same RTT:

    • Embedded object 1: 20 segments
    • Embedded object 2: 10 segments
  • Time required: 1 RTT = 200 ms


Total Time Calculation

Now, summing up the time for all steps:

  1. TCP connection establishment: 200 ms
  2. Request and download of the base HTML file: 200 ms
  3. Requests and download of the two embedded objects: 200 ms

Total Time = 200 ms + 200 ms + 200 ms = 600 ms

TCP三次握手的过程如下:

  1. 客户端发送 SYN(同步请求)给服务器。
  2. 服务器回复 SYN + ACK(同步应答)。
  3. 客户端发送 ACK(确认)给服务器。

这三个步骤中,数据包的往返路径如下:

  • 第一步:客户端到服务器(单向传播延迟)。
  • 第二步:服务器到客户端(单向传播延迟)。
  • 第三步:客户端到服务器(但这一步不需要等待返回响应,可以直接开始通信)。

因此,三次握手只需要1个RTT,而不是1.5个或2个RTT。

In CSMA/CD protocol, many settings are related to the channel propagation delay. If the delay becomes larger, the vulnerability window would increase, which is directly proportional to the propagation delay, and this makes it more likely for two devices to begin transmitting simultaneously, resulting in collisions. In addition, the efficiency of CSMA/CD decreases because the protocol must wait for a time period proportional to the propagation delay to ensure the channel is clear and no collisions occur.

不会做

First, in wireless networks, not all nodes can hear each other due to physical obstacles, distance, or signal attenuation, so the collision detection would not be effective. Collision avoidance, on the other hand, use RTS/CTS (Request to send/Clear to send) to preemptively avoid collisions by ensuring that all devices in vicinity are aware of an ongoing transmission.
Second, in wireless networks, a node cannot listen while transmitting on the same frequency. The transmitted signal is much stronger than any received signal, making it impossible to detect collisions during transmission.

iter 0ABCDEF
A's DV02+inf4+inf3
B's DV203+inf1+inf
C's DV+inf302+inf+inf
D's DV4+inf202+inf
E's DV+inf1+inf201
F's DV3+inf+inf+inf10

Bellman-Ford Function:

d_x(y) = \min_V \{c(x,v)+d_v(y)\}

  1. IP address alone is not enough to uniquely identify connections when multiple devices are behind the NAT router.
  2. Rewriting the port number ensures that each connection is unique on the public side, allowing the NAT router to properly forward response packets to the correct internal device.
  3. It avoids port conflicts and maintains the state of each connection in the NAT table.

Review: NAT(Network Address Translation)

为了解决ipv4地址短缺的问题,我们从公网ip中拿出一些来作为私有ip,然后在一个组织内部来使用私有ip,共享一个公网ip。

在本地网络中我们使用内部地址,内部地址对外是不可见的,外面看到的时一个统一的IP,但是当需要在内部的某个主机和外部建立联系时,就需要NAT来帮助转换IP和端口。

外部不知道内部的情况,所以外部不可以发起通信。

176->1011 0000

147.8.10110 / 000.0000 0000

1 2 4 8 16 32 64 128 256 512

50个地址需要6位来表示 xx/26

200个地址需要8位来表示xx/24

500个地址需要9位来表示xx/23

如果要减少空洞的话可以先分配大的再分配小的

于是

D 147.8.176.0/23

C 147.8.178.0/24

B 147.8.179.0/24

A 147.8.180.0/26

interval: 147.8.180.64-147.8.183.255

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com