Basic overview of TCP and UDP protocols in network protocol

Source: Internet
Author: User

Basic overview


The primary function of the transport layer is to provide end-to-end communication to applications on two hosts, identifying the correspondence between the corresponding programs on the two hosts via the port number. The most important two protocols in the transport layer are TCP and UDP, which can be used to identify the protocol type that transmits the data based on the Protocol field of the IP header.

TCP is a connection-oriented, reliable flow protocol that refers to an uninterrupted data structure. Its task is to put the data from the application into the appropriate small pieces to the following network layer, to confirm the receipt of data grouping. Set the time-out clock for the data block and resend the data once the time has passed. TCP provides a "sequential control" or "re-control" mechanism for reliable transmission. In addition, it also has the functions of "flow control", "congestion control", and providing network utilization.

UDP is a non-connected, unreliable datagram protocol that sends and receives datagrams for an application, sending packets of datagrams from one host to another, but does not guarantee that datagrams will reach the other end, and that any necessary reliability is provided by the application. In the case of UDP, although you can ensure that the message size is sent, there is no guarantee that the message will reach the destination. As a result, the application will be re-sent according to its own needs. The UDP protocol is commonly used in multimedia fields such as small packet data or multicast, broadcast communication and video communication.


Port number


in the data link and network layer, the MAC address and IP address are used respectively. The former is used to identify different computers in the same link, which is used to identify the hosts and routers connected to the TCP/IP network. This allows us to establish communication on any two hosts on the Internet. Because there may be many programs on the same host that require a network, how can we ensure that the corresponding programs are communicating? Use port numbers in the transport layer to identify different applications that communicate on the same computer. Therefore, it is also called the program address. Multiple programs can be run on a computer at the same time, and the Transport Layer protocol uses the port number to identify the applications that are communicating in the native, and to accurately transfer data. The port number is determined by the Transport layer protocol that it uses, and the different transport layer protocols can have the same port number.




to prevent communication confusion between the same port numbers, 5 information is typically used to identify a communication in TCP/IP or UDP/IP communications. They are "Source IP address", "Destination IP Address", "protocol Number", "Source port number", "Destination port number", respectively. As long as one of these items is different, it is considered to be another communication. The following is a communication between the identified programs using these 5 information when identifying multiple requests:





Resources:

"Graphic TCP/IP"

Basic overview of TCP and UDP protocols in network protocol

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.