In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
Today, the editor will share with you the related knowledge of what the main task of the OSI model transport layer is, detailed content, clear logic, I believe most people still know too much about this knowledge, so share this article for your reference, I hope you can get something after reading this article, let's take a look at it.
Figure-1 basic functions of the transport layer
In the OSI reference model, the first bottom-up layer to provide end-to-end services is the transport layer.
The role of the transport layer is to provide services for the communication between the application processes in the two hosts, while for the network layer, it provides host-to-host communication, the so-called end-to-end refers to the application process to the application process.
02TCP connection establishment process
SYN (synchronous) is the handshake signal used by TCP/IP to establish a connection. When a normal TCP network connection is established between the client and the server, the client first sends a SYN message, the server uses the SYN+ACK reply to indicate that the message is received, and finally the client responds with the ACK message. In this way, a reliable TCP connection can be established between the client and the server, and the data can be passed between the client and the server.
TCP establishes a connection
In the first message sent, A randomly selects a sequence number x as the initialization sequence number to send to B.
The second time B uses ack to acknowledge the Datagram of A, because the packet with sequence number x has been received and is ready to receive the packet with sequence number xroom1, so ack=x+1 sends its own initialization sequence number seq=y at the same time.
Seq is the sequence number of the Datagram itself; ack is the sequence number of the packet that is expected to continue to be sent.
The first packet connected by TCP, a very small packet. SYN attacks include a large number of such packets, which cannot be effectively processed because they appear to be from sites that do not actually exist. It takes a few seconds for each machine's spoofing package to try before giving up providing a normal response.
As shown in the following figure, the IP address is at the beginning of the IP Datagram, while the hardware address is placed at the beginning of the MAC frame. IP addresses are used above the network layer, while hardware addresses are used at and below the link layer.
Connection end point
The connection endpoint of TCP is called socket. According to the TCP protocol, port numbers are concatenated to IP addresses to form sockets.
In other words, the endpoint of the TCP connection is not the host, not the IP, not the application process, but the socket.
Socket socket = (IP address: Port number)
Socket socket = (IP address: Port number)
TCP connection:: = {socket1, socket2} = {(IP1: port1), (IP2: port2)}
A Socket connection is a quintuple, including protocol type, source IP, source port, destination address, and destination port
0201TCP serial number
TCP is stream-oriented, with each byte corresponding to a sequence number.
The sequence number in the header of each message segment sent by TCP is the sequence number of the first byte of the message segment.
The confirmation number returned by the receiver is the highest sequence number plus 1 of the data received.
The data portion of a TCP message segment is at most
Maximum length of IP Datagram = 2 ^ 16-1mm 65535 (bytes)
Data part of TCP message segment = maximum length of IP Datagram-header of IP Datagram-header of TCP message segment = 65535-20-20 "65495 (bytes)
Figure 2 Encapsulation of IP address and hardware address
In the IP layer abstract Internet, all we see is the IP Datagram, and the router chooses the route according to the IP address of the destination station. At the link layer of the specific physical network, all we see is the MAC frame, and the IP Datagram is encapsulated in the MAC frame.
When a MAC frame is transmitted on different networks, the header of the MAC frame is different. This change is not visible on the IP layer above. Each router has an IP address and a hardware address. Using IP address and hardware address, although the hardware address system of the connected network is different, the abstract Internet of the IP layer shields these complex details of the lower layer and enables us to communicate with a unified and abstract IP address.
When a router finds a Datagram check and error, it will be discarded directly.
03 resource subnet and communication subnet
The network layer is located at the highest layer of the communication subnet, which realizes the network communication function.
The transport layer is located in the lowest layer of the resource subnet, which realizes the function of resource sharing.
Figure 3 Communication subnet and resource subnet
Thinking
Example: why is there a header length field in the header of TCP, but not in the header of UDP?
A: this is the difference between TCP and UDP packet. The first field of TCP package can better ensure the reliability and security of data transmission, while UDP cannot, so UDP is faster than TCP, uninterrupted but unreliable. For example, QQ video uses UDP, which is often immobile. This is the reason.
Problems related to TCP confirmation sequence
Figure 4-TCP confirmation number
04 congestion control and flow control
There are too many packets in the network, resulting in packet delay and loss, thus reducing transmission performance, which is called congestion. The network layer and the transport layer share the responsibility of dealing with congestion.
A brain map about congestion
The reason for congestion control is the demand for resources (bandwidth, cache of switching nodes, processors) > available resources. Function: congestion control is to prevent too much data from being injected into the network, so that routers or links in the network will not be overloaded. There is a premise for congestion control: the network can bear the existing network load.
Compared to flow control: congestion control is a global process that involves all hosts, routers, and all factors related to reducing the network. Flow control often points to the control of point-to-point traffic, which is an end-to-end problem. Flow control is only concerned with the point-to-point transmission volume of the sender and receiver. Its task is to handle the ability to send more than the ability to accept.
These are all the contents of the article "what are the main tasks of the transport layer of the OSI model?" Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.