2017-02-09 top-down: Transport Layer overview, Transport layer and network layer relationships, multiplexing and multiplexing, UDP introduction

Source: Internet
Author: User
Tags socket port number

2017-02-09 top-down: Transport Layer overview, Transport layer and network layer relationships, multiplexing and multiplexing, UDP introduction

Logical communication (logic communication), transport beginning (segment), Best effort delivery service (Best-effort delivery service), unreliable services (unreliable service), Multiplexing (Transport-layer multiplexing), multi-channel decomposition (demultiplexing), data transfer (reliable data transfer), congestion control (congestion controls), Well-known port number, source port number field (source port, Number field), Destination segment (destination)


3rd Transport Layer

3.1 Overview and Transport Layer Services

The Transport Layer protocol provides logical communication (logic communication) functionality between application processes running on different hosts. From an application perspective, the hosts running different processes appear to be connected directly through logical communication.

The Transport Layer protocol is implemented in the end system and not in the router. At the sending end, the transport layer converts the messages received from the sending application into Transport layer groupings, which are called Transport beginning segments (segment).

3.1.1 The relationship between transport layer and network layer

The network layer provides logical communication between hosts, and the transport layer provides logical communication for processes running between different hosts.

3.1.2 Overview of the Internet Transport layer

The udp/tcp is located in the transport layer. IP-As-an-internetwork protocol is located at the network layer. IP provides logical communication between hosts. The service model for IP is the best effort delivery service (Best-effort delivery services). This means that IP does its "best effort" to deliver the message segment between the hosts of the communication, but it does not make any guarantees. does not ensure the delivery of the message segment, does not ensure sequential delivery, and does not ensure data integrity. For these reasons, IP is known as unreliable services (unreliable service). Each host has an IP address.

The most basic responsibility of UDP and TCP is to extend the delivery service of IP between the two-end systems to the delivery service between two processes running on the end system. Extending the delivery of the mainframe to inter-process delivery is known as the Transport layer of multiplexing (Transport-layer multiplexing) and multi-channel decomposition (demultiplexing).

Process-to-process data delivery and error checking are two of the lowest transport layer services, and the only two available to UDP.

TCP provides reliable data transfer (reliable data transfer) also provides congestion control (congestion controls). Congestion control is more of a service to the entire Internet than a service that is provided to the application that uses it.


3.2 Multiplexing and multi-channel decomposition

A process (as part of a network application) has one or more sockets, which is the equivalent of a portal that passes data from the network to the process and passes data from the process to the network. The work of delivering the data in the transport beginning segment to the correct socket is called multi-Channel decomposition (demultiplexing).

Instead of collecting blocks of data from different sockets in the source host, each block encapsulates the first piece of information to generate a segment of the packet, which is then passed to the network layer, all of which are called multiplexing (multiplexing).


Transport Layer Multiplexing Requirements: (1) The socket has a unique identifier, (2) each message segment has a special field to indicate the socket to which the segment is to be delivered. These special fields are the source port number fields (Source port numbers field) and the destination Segment number field (destination, port.

The port number is a 16-bit number, and its size is between 0-65535. The port number in the 0-1023 range is known as the port number (well-known), which must be assigned a port number when we develop a new application.


3.2.1 Non-connected multiplexing and multi-channel decomposition

Multiplexing and multi-channel decomposition of 3.2.2 physiognomy connections

TCP sockets are identified by a four-tuple (source IP address, source port number, destination IP address, destination port number).

3.2.3 Web server vs. TCP

3.3 No connection transport: UDP

With UDP, there is no handshake between the transport layer entities sending the sender and receiver before sending the message segment. Because of this, UDP is called non-connected. The advantages of UDP are:

The application-level control of when and what data is sent is more granular.

No connection setup is required.

No connection status.

Packet header overhead is small.

Applications that use UDP can achieve reliable data transfer. This can be done by establishing a mechanism for reliability in the application itself.

3.3.1 UDP packet Segment structure

Source port number + Destination segment number + length + Test and + Application data (message)

3.3.2 UDP Inspection and

UDP inspection and error detection capabilities are provided. Although UDP provides error detection, it is powerless to recover from errors.

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.