Current location - Quotes Website - Team slogan - Computer network -5. transport layer
Computer network -5. transport layer
1. Difference between network layer and transport layer

2. The role of the transport layer

3. Port-based demultiplexing and multiplexing functions

3. Two different transport agreements

TCP and UDP:

The solution to this problem is to use the protocol port number at the transport layer.

1. Software ports and hardware ports:

Hardware port is the interface for different hardware devices to interact, while software port is the address for various protocol processes in the application layer to interact with transmission entities.

2.TCP/IP transport layer port

3. Two types of ports

Commonly used well-known ports:

UDP only adds several functions to the IP datagram service: multiplexing and demultiplexing, and error detection (for the data part).

The main features of 1. User Datagram Protocol (user datagram protocol)

Calculate UDP checksum:

The concept of TCP flow orientation;

"Stop waiting" means to stop sending a packet immediately after sending it, and wait for the confirmation of the other party before sending the next packet (both parties in full-duplex communication are the sender and receiver).

1. error-free

make a mistake

3. Confirm the loss and be late

If the data packet sent by sender A is received, the above-mentioned receiver B will send back an acknowledgement ... Then there will also be errors in the process of sending this acknowledgement, such as lost acknowledgement and late acknowledgement.

Automatic repeat request ARQ:

4. Channel utilization rate

The advantage of stop-and-wait protocol is simple, but the disadvantage is that the channel utilization rate is too low.

5. Pipeline transmission

Send cache:

Receive cache:

The choice of retransmission time is one of the most complicated problems in TCP, which is generally a little longer than the round-trip propagation delay, and it is difficult to determine the round-trip propagation delay, that is, the variance of the round-trip delay is very large. In addition, because the sender can't tell whether the acknowledgement sent by the receiver is the first acknowledgement or the acknowledgement after retransmission, the round-trip delay becomes difficult to determine and calculate.

When the data 1, 2, 4, 5, 3 sent by the sender is lost on the way, the receiver cannot give the confirmation of data 3, but the confirmation of data 4, 5 has been received by the sender. Therefore, the sender will not find data 3 and data after data 3, and will choose to retransmit all data starting from 3. How to avoid this problem and retransmit only the third data? The method is: Select OK.

As I said before, the speed at which the sender sends data depends on the speed at which the receiver receives data. Once the sender's sending speed is too fast, the receiver will have no time to receive it, which may cause data loss and unreliable transmission. Flow control means that the receiver tells the sender that the data you sent is too fast for me to receive. A sliding window will be used.

Indicators for detecting network congestion:

1. Overview

TCP uses a window-based method for congestion control. TCP sender maintains a congestion window CWND (congestion window).

2. The principle of controlling congestion window

The principle of controlling the congestion window is that as long as the network is not congested, the congestion window can be increased to send more packets, which can improve the utilization rate of the network. However, as long as the network is congested or likely to be congested, the congestion window must be reduced to reduce the number of packets injected into the network, thus alleviating the congestion in the network.

3. Congestion judgment

4.TCP congestion control algorithm

Slow start

Congestion avoidance