计算机网络---传输层---传输层简介/多路复用和多路解析

原创 2018年04月15日 23:29:49

自己学习计算机网络记的一些笔记,大部分是从自顶向下那本书摘下来的

Transport Layer

 

Transportlayer is residing between the application and network layers which is a centralpiece of layered network architecture. It has the role of providingcommunication services directly to the application processes running on different hosts. In this chapter, wewill discuss about:

  • UDP and TCP transport-layer protocols.
  • The relationship between the transport and network layers.
  • How two entities can communicate reliably over a medium that may lose and corrupt data.
  • How to control the transmission rate of transport-layer entities in order to avoid, recover from, congestion within the network.

 

3.1 Introduction and Transport-Layer Services

 

  • A transport-layer protocol provides for logical communication between application processes running on different hosts. This logical communication means that the hosts running the processes are directly connected (looks like directly connected).
  • Transport-layer protocols are implemented in the end systems but not in network routers. On the sending side, the transport layer converts the application-layer messages it receives from a sending application process into transport-layer packets (also known as transport-layer segments). This is done(possibly) breaking the application messages into smaller chunks and adding a transport-layer headers to each chunk to create the transport -layer segment. The transport-layer then passes the segment to the network layer at the sending end system, where the segment is encapsulated within a network-layer packet (datagram) and sent to the destination. The network routers act only on the network-layer fields of the datagram. (They do not examine the fields of the transport-layer segment). On the receiving side, the network layer extracts the transport-layer segment from the datagram and passes the segment to the transport layer.
  • TCP and UDP

 

3.1.3Relationship Between Transport and Network Layers

  • Transport layer lies just above the network layer
  • Whereas a transport-layer protocol provides logical communication between processes running on different hosts, a network-layer protocol provides logical communication between hosts.

 

3.1.2Overview of the Transport Layer in the Internet

 

  • UDP provides an unreliable, connectionless service to the invoking application.
  • TCP provides a reliable, connection-oriented service to the invoking application.
  • The network layer has a IP protocol which provides best-effort deliver service, but it makes no guarantees. (not guarantee the integrity, not guarantee the order of the segments, not guarantee the segment delivery) IP is said to be an unreliable service. Each host has an IP address.
  • UDP and TCP extend IP's delivery service between two end systems delivery to two processes running on the end systems. This is called transport-layer multiplexing and demultiplexing.
  • UDP and TCP also provide integrity checking by including error detection fields in their segments' headers.
  • Process-to-process service and error detection are the only two services that UDP provides.
  • TCP provides reliable data transfer (using flow control, sequence numbers, acknowledgments, and timers). Thus, TCP ensures that data is delivered from sending process to receiving process, correctly and in order. TCP also provide congestion control.
  • TCP congestion control prevents any one TCP connection from swamping the links and routers between communication hosts with an excessive amount of traffic. It also strives to give each connection traversing a congested link an equal share of the link bandwidth.

 

3.2 Multiplexing and Demultiplexing

 

Multiplexingand demultiplexing service is needed for all computer networks.

 

Thequestion is how to direct the received data to the specific process?

  • A process can have one or more sockets where is the door between the process and the network.  These sockets act as intermediary tools.
  • Each transport-layer segment has a set of fields in the segment for this purpose. At the receiving end, the transport layer examines these fields to identify the receiving socket and then directs the segment to that socket. This job is called demultiplexing.
  • For multiplexing, the sending side will gather data chunks at the source host from different sockets, encapsulating each data chunk with header information to create segments, and passing the segments to the network layer.

 

From thediscussion above, we known that transport-layer multiplexing requires

  • Sockets have unique identifiers
  • Each segment has special fields that indicate the socket to which the segment is to be delivered. These special fields are the source port number field and the destination port number field.

 

Featuresof the port number:

  • Each port number is a 16-bit number, ranging from 0 to 65535
  • The port numbers ranging from 0 to 1023 are called well-known port number and are restricted, which means that they are reserved for use by well-known application protocols such as HTTP (80) and FTP (21)

 

In UDP,each socket in the host could be assigned a port number, and when a segmentarrives at the host, the transport layer examines the destination port numberin the segment and directs the segment to the corresponding socket. Thesegment's data then passes through the socket into the attached.

 

UDPmultiplexing/demultiplexing example

  • Suppose a process in Host A, with UDP port 19157, wants to send a chunk of application data to a process with UDP port 46428 in Host B
  • The transport layer in Host A creates a transport-layer segment that includes the application data, the source port number, the destination port number, and two other values
  • The transport layer then passes the resulting segment to the network layer
  • The network layer encapsulates the segment in an IP datagram and makes a best-effort attempt to deliver the segment to the receiving host
  • The segment arrives at the receiving Host B
  • The transport layer at the receiving host examines the destination port number in the segment and delivers the segment to its socket

 

Note:

  • A UDP socket is fully identified by a two-tuple consisting of a destination IP address and a destination port number. Thus, if two UDP segments have different source IP address and source port numbers, but have the same destination IP address and destination port number, then the two segments will be directed to the same destination process via the same destination socket

 

Connection-Oriented Multiplexing and Demultiplexing

 

A TCPsocket is identified by a four-tuple: (source IP address, source port number,destination IP address, destination port number). Thus, when a TCP segmentarrives from the network to a host, the host uses all four values to direct thesegment to the appropriate socket. Thus, two arriving TCP segments withdifferent source IP addresses or source port numbers will be directed to twodifferent sockets.

 

A TCPserver application has a "welcoming socket" that waits forconnection-establishment requests. When it accept a connection, the serverprocess then creates a new socket. The newly created connection socket isidentified by these four values. All subsequently arriving segments whosevalues matches will be demultiplexed to thissocket.

 

Persistent HTTP and non-persistent HTTP

  • If the client and server are using persistent HTTP, then throughout the duration of the persistent connection the client and server exchange HTTP messages via the same server socket.
  • If the client and server use non-persistent HTTP, then a new TCP connection is created and closed for every request, and hence a new socket is created and later closed for every request.

 

第04章-计算机常用通信指标和术语

本课程主要内容如下: 1 bit、Byte、KB、MB、GB、TB概念和换算关系 2 波特率、比特率、误码率的概念和意义 3 信道、基带信号、频带信号 4 频分多路复用、时分多路复用、异步传输、同步传输
  • 2017年02月27日 18:11

计算机网络运输层之多路复用与多路分解

一、什么是多路复用和多路分解 我们知道,在网络上主机与主机之间的通信,实质上是主机上运行的应用进程之间的通信。例如,当你通过Http上网浏览网页时,实质上是你所访问的主机的服务器进程与你本机的浏览器进...
  • ljianhui
  • ljianhui
  • 2014-03-21 00:13:10
  • 14481

多路复用/多路分解

套接字寻址系统使得TCP和UDP能够执行传输层另一个重要任务:多路复用和多路分解。多路复用是指把多个来源的数据导向一个输出,而多路分解是把从一个来源接收的数据发送到多个输出。 多路传输/...
  • zhouwei1221q
  • zhouwei1221q
  • 2015-08-10 20:22:00
  • 2635

2017-02-09 自顶向下:运输层概述、运输层和网络层的关系、多路复用与多路分解、UDP简介

2017-02-09 自顶向下:运输层概述、运输层和网络层的关系、多路复用与多路分解、UDP简介 逻辑通信(logic communication)、运输层报文段(segment)、尽力而为交付服务...
  • u014222687
  • u014222687
  • 2017-02-12 13:38:25
  • 567

计算机网络传输层知识点全覆盖

传输层概述 作用:传输层为它上面的应用层提供通信服务。 在OSI七层参考模型中,传输层是面向通信的最高层,也是用户功能的最底层。 传输层两大重要的功能:复用 和 分用。 复用:在发送端,多个应用进程...
  • u010425776
  • u010425776
  • 2017-02-12 21:59:27
  • 5903

计算机网络传输层的功能

1).传输层提供进程之间的逻辑通信(即端到端的通信)。 2).复用和分用。复用是指发送方不同的应用进程都可以使用同一个传输层协议传输数据; 分用是指接收方的传输层在接收到报文将其报头剥去之后能将数...
  • l_vaule
  • l_vaule
  • 2016-03-29 18:09:06
  • 443

计算机网络:传输层和网络层

介绍传输层是客户程序和服务器程序之间的联络人,是一个进程之间的连接。传输层服务首先了解一下传输层所提供的服务。进程到进程通信TCP/IP协议簇的5层模型: 其中,网络层负责计算机层次的通信(主机到主...
  • jinzhao1993
  • jinzhao1993
  • 2016-11-26 19:43:02
  • 1276

计算机网络——传输层

一、传输层提供的服务1.传输层的功能(1)提高服务质量(2)多路复用(3)分段与重新组装。2.传输层寻址与端口硬件端口是不同硬件设备进行交互的接口,而软件端口是应用层的各种协议进程与传输实体进行层间交...
  • u010126059
  • u010126059
  • 2016-01-24 20:08:07
  • 623

计算机网络6--多路复用技术

本页内容 1.多路复用介绍         多路复用即一个信道传输多路信号
  • u014581901
  • u014581901
  • 2016-02-05 00:44:45
  • 2111

计算机网路-传输层详解

一、传输层的服务基本原理 1.多路复用和解复用(分路)技术 复用是指:发送方的不同的应用进程都可以使用同一个传输层协议传送数据; 分路技术是指:接收方的传输层剥去报文首部之后能把这些数据正确的传...
  • sinat_38321889
  • sinat_38321889
  • 2018-01-13 20:00:56
  • 105
收藏助手
不良信息举报
您举报文章:计算机网络---传输层---传输层简介/多路复用和多路解析
举报原因:
原因补充:

(最多只允许输入30个字)