【MOOC Homework】Chapter 3 Transport Layer

Not a standard answer nor a reference answer

Do questions only from personal understanding


1. (20 points) ‍A TCP connection has been established between host A and host B. The maximum segment length of TCP is 1000 bytes. If the current congestion window of host A is 5000 bytes, send 2 After the maximum segment, the first confirmation segment sent by host B is successfully received, and the receiving window size announced in the confirmation segment is 3000 bytes, so what is the maximum number of bytes that host A can send to host B at this time?

Host A needs to ensure that the amount of unconfirmed data is less than:

LastByteSent-LastByteAcked\leq min\{cwnd,rwnd\}

Substitute values ​​are:

LastByteSent-1000\leq 3000

So the serial number that can be sent to is:

LastByteSent\leq 4000

The amount of data that can be sent is: 4000-2000=2000B

Just remember the first inequality!

2. (20 points) Host A and host B have established a TCP connection. A always sends data in segments with the size of MSS=1KB, and there is always data to send; Confirmation segment. If A times out at time t, its congestion window is 8KB. Then, starting from time t, when there is no timeout, after 10 RTTs, what is A's sending window?

Host A needs to ensure that the amount of unconfirmed data is less than:

LastByteSent-LastByteAcked\leq min\{cwnd,10\} 

The change process of the congestion window:

Congestion windows: 2,4,5,6,7,8,9,10,11,12

But since the receive window is 10, the final send window is limited to 10KB.

3. (20 points) Please describe the meanings of the flag bits ACK, SYN, FIN, and RST in the TCP protocol, and describe the process of TCP three-way handshake to establish a connection.

The meaning of the flags:

  • ACK: The content of the confirmation number field is valid only when ACK=1; when ACK=0, the content of the confirmation number field is invalid.
  • SYN: When SYN=1, it means that this is a connection request or connection acceptance message.
  • FIN: When FIN=1, it means that the data of the sender of this message segment has been sent, and it is required to release the transport connection.
  • RST: When RST=1, it indicates that a serious error occurs in the TCP connection, and the connection must be released and re-established.

The process of three-way handshake to establish a connection:

Step1: The client sends a SYN message to the server:

  • Does not contain application layer data
  • SYN=1,ACK=0
  • Customer's initial serial number

Step2: The server receives the SYN message, allocates buffers and variables for the TCP connection, and responds with a SYN/ACK message:

  • Does not contain application layer data
  • SYN=1,ACK=1
  • Confirmation number: customer's initial serial number +1
  • The server's initial serial number

Step3: The client receives the SYN/ACK message, allocates buffers and variables for the TCP connection, and responds with an ACK message:

  • May contain application layer data
  • SYN=0,ACK=1
  • Confirmation number: the initial serial number of the server + 1

4. (20 points) ‌What is multiplexing? What is demultiplexing? Please explain the two concepts separately and describe the multiplexing and demultiplexing of the transport layer.

① Multiplexing: The source host collects data blocks from different sockets, and encapsulates the header information for each data block to generate a message segment, and then passes the message segment to the network layer.

② Demultiplexing: Deliver the data in the transport layer segment to the correct socket.

Divided into: connectionless multiplexing and demultiplexing, connection-oriented multiplexing and demultiplexing.

5. (20 points) ‍The difference between TCP and UDP?

Services provided by TCP:

  • connection control
  • reliable data transmission
  • flow control
  • congestion control

Services provided by UDP:

  • connectionless control
  • unreliable data transmission
  • no flow control
  • no congestion control

Both have no delay guarantee and minimum bandwidth guarantee.

Guess you like

Origin blog.csdn.net/m0_64140451/article/details/131371292