Computer network — basic knowledge (1)

Time:2020-11-26

1. Why does socket provide an interface between the application layer and the transport layer and not between other layers?

Computer network -- basic knowledge (1)

From the analogy operating system and the details of their respective concerns

2. TCP handshake and wave and data transmission process?

Computer network -- basic knowledge (1)

3. Why does the active shutdown party stay in time when TCP waves its hands four times_ Wait status? And why time_ Do you want to maintain 2msl in the wait state?

There are two reasons for the TIME_WAIT state:

  1. To implement TCP’s full-duplex connection termination reliably
  2. To allow old duplicate segments to expire in the network

TCP must prevent old duplicates from a connection from reappearing at some later time and being misinterpreted as belonging to a new incarnation of the same connection. To

do this, TCP will not initiate a new incarnation of a connection that is currently in the TIME_WAIT state. Since the duration of the TIME_WAIT state is twice the MSL, this allows MSL seconds for a packet in one direction to be lost, and another MSL seconds for the reply to be lost. By enforcing this rule, we are guaranteed that when we successfully establish a TCP connection, all old duplicates from previous incarnations of the connection have expired in the network

Computer network -- basic knowledge (1)

4. How does TCP distinguish different connections?

The socket pair for a TCP connection is the four-tuple that defines the two endpoints of the connection: the local IP address, local port, foreign IP address, and foreign port.

5. Connection of concurrent servers?

Computer network -- basic knowledge (1)

6. Protocols for common Internet applications

Computer network -- basic knowledge (1)

This work adoptsCC agreementThe author and the link to this article must be indicated in the reprint