[Skill Tree Notes] Network Chapter - Analysis of Practice Questions (4)

Table of contents

Preface

1. The role of the transport layer

1.1 The role of the transport layer

1.2 Transport layer PDU

2. Classification and functions of port numbers

2.1 Transport layer PDU

3. Characteristics and applications of TCP protocol

3.1 Transport layer PDU

3.2 Establishment of TCP protocol connection

4. Characteristics and applications of UDP protocol

4.1 Characteristics of UDP protocol

Summarize



Preface

This article provides an analysis of some practice questions in the CSDN network skill tree, and the content is about data transmission between applications . The article not only provides answers to the data transfer exercises between applications, but also provides specific analysis, which friends can refer to for reference. Please see the text for details.


1. The role of the transport layer

1.1 The role of the transport layer

topic:

The incorrect statement about the function of the transport layer is:

A. The transport layer determines the forwarding route of data based on the IP address.

B. The transport layer provides data segmentation function to facilitate packet loss retransmission and reduce the probability of network congestion.

C. The transport layer distinguishes data sent or received by different application layer processes based on the source port number and destination port number.

D. The transport layer provides end-to-end error recovery and flow control

Analysis: Choose A.

A. The transport layer determines the forwarding route of data based on the IP address.

This statement is wrong. The transport layer is not responsible for determining the forwarding route of data, but is a function of the network layer. The network layer uses IP addresses to determine the forwarding path of data packets.

B. The transport layer provides data segmentation function to facilitate packet loss retransmission and reduce the probability of network congestion.

This statement is correct. The transport layer provides data segmentation capabilities, splitting data into smaller pieces (called segments) to improve transmission efficiency and reliability. When a segment is lost, the transport layer can resend the segment, thereby reducing the probability of data loss. Additionally, data segmentation helps reduce network congestion.

C. The transport layer distinguishes data sent or received by different application layer processes based on the source port number and destination port number.

This statement is correct. The transport layer uses source port numbers and destination port numbers to distinguish data sent or received by different application layer processes. In this way, when the data reaches its destination, the transport layer can correctly deliver the data to the specific process in the application layer.

D. The transport layer provides end-to-end error recovery and flow control

This statement is correct. The transport layer provides end-to-end error recovery and flow control mechanisms to ensure reliable transmission of data. Error recovery mechanisms can detect and correct errors that occur during transmission, such as lost packets or corrupted data. Flow control mechanisms control the rate at which data is sent and received to avoid network congestion.

In summary, option A is incorrect.

1.2 Transport layer PDU

topic:

The protocol data unit of TCP is called:

A.Bit

Section B.

C.Character

D.frame

Analysis: Choose B.

A. bits

A bit is a unit of information, representing the smallest unit of binary data. In computers, data is stored and transmitted in the form of bits. Bits are the most basic unit of information and are not the protocol data units in the TCP protocol.

B. Section

This statement is correct. In the TCP protocol, data is divided into smaller units called "segments" for transmission. Each segment contains TCP protocol headers and corresponding application layer data. TCP uses segments as protocol data units to divide data into multiple segments for transmission to improve transmission efficiency and reliability.

C. Characters

Character refers to a single character in text, usually expressed in ASCII code or other encoding form. In the TCP protocol, characters are not used as protocol data units, because TCP transmits not only character data, but also binary data and other forms of data.

D. frame

A frame is a unit of data used for transmission in the data link layer. In the TCP/IP protocol stack, frames are usually encapsulated and decapsulated between the physical layer and the data link layer by a network adapter (network card). Therefore, a frame is not a protocol data unit in the TCP protocol.

In summary, the paragraph in option B is correct.

2. Classification and functions of port numbers

2.1 Transport layer PDU

topic:

When using TCP/IP data encapsulation, which of the following range of port numbers identifies all common applications?

A.256 to 1022

B.0 to 1023

C.49153 to 65535

D.1024 to 2047

Analysis: Choose B.

The TCP/IP protocol uses port numbers to identify different applications. Among them, port numbers from 0 to 1023 are called "privileged ports" or "system ports" and are used to identify some commonly used and common applications, such as HTTP (port number 80), FTP (port number 21), Telnet ( Port number 23), SMTP (port number 25), etc. These port numbers are reserved for specific protocols or services for use by system administrators and privileged applications.

The port number range in option A (256 to 1022) does not exist.

The port number range in Option C (49153 to 65535) is typically used for dynamic or private ports, more for specific applications or custom services.

The port number range in option D (1024 to 2047) is also not a common port number range.

Therefore, only the port number range in option B (0 to 1023) identifies all common applications.

3. Characteristics and applications of TCP protocol

3.1 Transport layer PDU

topic:

The TCP protocol is ().

A. For connectionless and unreliable

B. For connectionless and reliable

C. Connection-oriented and reliable

D. Connection-oriented and unreliable

Analysis: Choose C.

TCP (Transmission Control Protocol) is a connection-oriented protocol that provides reliable data transmission. In the TCP protocol, the communicating parties first establish a connection before transmitting data, and then perform reliable transmission of data through the connection. TCP uses mechanisms such as sequence numbers, acknowledgments, and retransmissions to ensure the reliability and orderliness of data. It also supports flow control and congestion control to adapt to data transmission under different network conditions. Therefore, the TCP protocol is connection-oriented and provides reliable transmission characteristics.

3.2 Establishment of TCP protocol connection

topic:

During the TCP/IP communication process, when the SYN=1 and ACK=1 of the TCP message, it indicates that this is ().

A. Connection response message

B. Connection release message

C. Reject the connection message

D. Connection request message

Analysis: Choose A.

When a TCP connection is established, the two endpoints of the communication are called the client and the server. During the TCP three-way handshake, the client first sends a TCP message with the SYN (synchronization) flag set to 1. This message is called a connection request message. This message indicates that the client wishes to establish a TCP connection with the server.

When the server receives this connection request message, if the server is willing to accept the connection, it will reply with a TCP message with the ACK (confirmation) flag bit set to 1 as a response. The SYN flag in the message will also be set to 1, indicating that the server also wants to establish a TCP connection. This response message is called a connection response message.

Therefore, when SYN=1 and ACK=1 in the TCP message, it means that this is a connection response message, indicating that the server has confirmed the client's connection request online and replied with a message indicating that it is willing to establish a TCP connection.

4. Characteristics and applications of UDP protocol

4.1 Characteristics of UDP protocol

topic:

Which of the following transport layer protocols provides low-overhead transport and can therefore be used in applications that do not require reliable data transport?

A.UDP

B.IP

C.TCP

D.HTTP

Analysis: Choose A.

When choosing a transport layer protocol, you need to consider the application scenarios and requirements. For applications that do not require reliable data transmission, such as video streaming, real-time voice communication, etc., UDP can be a suitable choice.

UDP is a connectionless protocol that does not require the establishment and maintenance of connections between communicating parties, so it has low overhead. In contrast, TCP is a connection-oriented protocol that requires establishing connections between communicating parties, maintaining state information, and providing reliable data transmission. These additional overheads will increase communication delays and resource consumption.

UDP does not provide reliability guarantees when transmitting data, does not care about the exact arrival order of data packets, and does not provide a retransmission mechanism. Therefore, UDP is more suitable for application scenarios that have high real-time requirements for data transmission and relatively low requirements for the arrival of complete data packets. For example, in real-time voice communications, slight data loss or delay may be more acceptable than relatively high reliability.

IP is a network layer protocol that is responsible for routing and address forwarding during the transmission of data packets in the network.

TCP is a connection-oriented protocol that provides reliable data transmission guarantees. TCP uses mechanisms such as sequence numbers, acknowledgments, and retransmissions to ensure the reliability and orderliness of data packets. It also provides flow control and congestion control mechanisms to adapt to data transmission under different network conditions. TCP is suitable for application scenarios that have high requirements on data integrity and reliability, such as file transfer, Web browsing, etc.

HTTP is an application layer protocol that runs on top of TCP or UDP and defines the rules for interaction between clients and servers.

To sum up, when the application scenario does not require reliable data transmission and is sensitive to transmission overhead, UDP can be a suitable choice.


Summarize

This article only gives answers and analysis to the practice questions in the data transmission between applications in the CSDN network skill tree . The content of this article is simple. For detailed information and more knowledge points, please check the reference materials in the network skill tree.

Follow, like, collect, I hope friends can connect three times with one click!

Guess you like

Origin blog.csdn.net/m0_71369515/article/details/133550933