【计算机网络课程课件@中科大】6The Transport Layer

合集下载

计算机网络-5_Transport_Layer(传输层协议)解析

计算机网络-5_Transport_Layer(传输层协议)解析

network layer: logical
Household analogy:
12 kids sending letters to 12 kids
processes = kids
app messages = letters
relies on, enhances, network layer services
Computer Networking: A Top Down Approach Featuring the Internet,
2nd edition. Jim Kurose, Keith Ross Addison-Wesley, July 2002.
Transport Layer
3-1
Chapter 3: Transport Layer

32 bits source port # dest port #
other header fields
application data (message)
TCP/UDP segment format
Transport Layer 3-9
Connectionless demultiplexing
How demultiplexing works
host receives IP datagrams
each datagram has source IP address, destination IP address each datagram carries 1 transport-layer segment each segment has source, destination port number (recall: well-known port numbers for specific applications) host uses IP addresses & port numbers to direct segment to appropriate socket

计算机网络课件 chapter6 Transport Layer

计算机网络课件 chapter6 Transport Layer

network data link physical
application transport network data link physical
– Internet: TCP and UDP
2020/12/9
Computer Networks - 06
6
Quality of Service: QoS
application transport network data link physical
network data link physical
network data link physical
network data link physical
network data link physical
– send side: breaks app messages into segments, passes to network layer
– rcv side: reassembles segments into messages, passes to app layer
• more than one transport protocol available to apps
2020/12/9
Computer Networks - 06
3
• Note: The issue here is that the network layer is in the hands of carriers: organizations that offer a (generally wide-area) computer network to their clients. Clients have nothing to say in what the carrier actually offers.

计算机网络课件-CH5 运输层

计算机网络课件-CH5 运输层

5.1.3 运输层的复用与分用
第 5 章 运输层
11
复用是指在发送方不同的应用进程都可以使用同一个运 输层协议传送数据(当然需要加上适当的首部);
而分用是指接收方的运输层在剥去报文的首部后能够把 这些数据正确交付到目的应用进程。
要能正确地将数据交付给指定应用进程,就必须给每个 应用进程赋予一个明确的标志。
03 拥塞控制
OPTION
5.1.2 因特网的运输层协议
第 5 章 运输层
8
因特网的运输层有两个不同的协议: (1) 用户数据报协议 UDP (User Datagram Protocol) (2) 传输控制协议 TCP (Transmission Control Protocol)
TCP 与 UDP
第 5 章 运输层
1
第五章 运输层
《计算机网络教程》
Computer Network Tutorial
内容导航
CONTENTS
第 5 章 运输层
2
5.1
运输层协议概述
5.2
用户数据报协议 UDP
5.3
传输控制协议 TCP
5.4
拥塞控制
5.1.1 进程之间的通信
第 5 章 运输层
3
从通信和信息处理的角度看,运输层向它上面的应用层提供通信服务,它 属于面向通信部分的最高层,同时也是用户功能中的最低层。
对一)。 TCP 提供可靠交付的服务。 TCP 提供全双工通信。 面向字节流。
TCP 面向流的概念
第 5 章 运输层
26
发送方
应用进程
接收方
应用进程
… …
端口
向发送缓存 写入数据块

【大学课件】本科网络课程讲义:Chapter 6 Network layer(ppt,82页)文档资料

【大学课件】本科网络课程讲义:Chapter 6 Network layer(ppt,82页)文档资料
15
6.3.3链路状态( Link State ) 路由算法


链路状态路由算法于1979年出现在ARPAnet上, 作为一种用来取代DVR的动态路由选择算法, 得到了广泛的应用。 算法:


主动测试邻接节点的状态 定期地将相邻节点的状态信息传送给所有节点 每个节点都有完整的网络拓扑信息,然后计算到每 个节点的最佳路径
① ② ③ 一旦出现拥塞的信号,就不再创建任何虚电路,直至拥塞解 除。 允许建立新的虚电路,但要仔细选择路由,以便所有新的虚 电路绕过拥塞的区域。 在虚电路建立时,子网与主机对所需服务质量进行协商。若 不能满足主机最低要求,则拒绝建立连接;否则就保留连接 所需的多种资源,避免拥塞发生。
24
2. 数据报中的拥塞控制
18
分级路由示例
19
6.4拥塞控制源自什么是网络的拥塞
当大量分组进入通信子网,超出了网络的处理能力 时,就会引起网络局部或整体性能下降,这种现象 称为拥塞。 路由器的队列溢出,分组丢失 拥塞使许多分组重传 导致更多的业务量,直至崩溃 路由器的处理速度、存储空间、带宽不匹配 网络负载的不平衡

拥塞会导致什么后果
B 2 C F

Routing metrics (weight,cost)

7 2 1 E 2 4
3
2 H 2
3 D
A
6 G
10
利用Dijkstra算法求A到D的最短通路
B 2 A 6 G 7 C F 3 2 4 H 3 D A B(2,A) C(∞,-) F(∞,-) A D(∞,-) B(2,A) E(4,B) C(9,B) F(∞,-) D(∞,-) H(∞,-) C(9,B) F(6,E) D(∞,-) G(5,E)

计算机网络课件 Lec-6

计算机网络课件 Lec-6

TCP seq. numbers, ACKs
sequence numbers: byte stream “number” of first byte in segment’s data
acknowledgements: seq # of next byte expected from other side cumulative ACK
Q: how receiver handles out-of-order segments A: TCP spec doesn’t say,
- up to implementor
outgoing segment from sender
source port # dest port #
sequence number acknowledgement number
3.7 TCP congestion control
Transport Layer 3-56
TCP: Overview RFCs: 793,1122,1323, 2018, 2581
point-to-point:
one sender, one receiver
reliable, in-order byte steam:
Transport Layer 3-60
TCP round trip time, timeout
Q: how to set TCP timeout value?
longer than RTT
but RTT varies
too short: premature timeout, unnecessary retransmissions
rwnd
checksum
urg pointer

计算机网络授课课件第十三讲_运输层(2)

计算机网络授课课件第十三讲_运输层(2)

数据通信与计算机网络
套接字 (socket)
(IP地址 端口号) 地址: 套接字 socket = (IP地址: 端口号)
(5(5-1)
连接唯一地被通信两端的两个端点( 每一条 TCP 连接唯一地被通信两端的两个端点(即两个 套接字)所确定。 套接字)所确定。即: TCP 连接 ::= {socket1, socket2} = {(IP1: port1), (IP2: port2)} 2) (5(5-
数据通信与计算机网络
5.3.2
TCP 的连接
把连接作为最基本的抽象。 TCP 把连接作为最基本的抽象。 连接有两个端点。 每一条 TCP 连接有两个端点。 连接的端点不是主机,不是主机的IP 地址, TCP 连接的端点不是主机,不是主机的IP 地址,不是 应用进程,也不是运输层的协议端口。 应用进程,也不是运输层的协议端口。TCP 连接的端 点叫做套接字(socket)或插口。 点叫做套接字(socket)或插口。 套接字(socket) 端口号拼接到 拼接到(contatenated 端口号拼接到(contatenated with) IP 地址即构成了 套接字。 套接字。
31
序 号 TCP 首部 确 数据 偏移 保 留 认 号 窗 口 紧 急 指 针 (长 度 可 变) 填 充
U A P R S F R C S S Y I G K H T N N
20 字节 固定 首部
检 验 和 选 项
确认号字段——占 4 字节,是期望收到对方的下一个 报文段的数据的第一个字节的序号。
可靠通信的实现
使用上述的确认和重传机制,我们就可以在不可靠的 使用上述的确认和重传机制,我们就可以在不可靠的 传输网络上实现可靠的通信。 传输网络上实现可靠的通信。 这种可靠传输协议常称为自动重传请求 自动重传请求ARQ 这种可靠传输协议常称为自动重传请求ARQ reQuest)。 (Automatic Repeat reQuest)。 表明重传的请求是自动进行的。 自动进行的 ARQ 表明重传的请求是自动进行的。接收方不需要请 求发送方重传某个出错的分组 。

计算机网络chapter6

计算机网络chapter6

6.4.1 Introduction to UDP
The UDP header. The UDP length field includes the 8-byte header and the data. The UDP checksum is optional and stored as 0 if not computed.
6.5.3 The TCP Protocol
1. function of TCP TCP (Transmission Control Protocol) was specifically designed to provide a reliable end-to-end stream(可靠的点对点数 据流) over an unreliable internetwork. (1)An internet work differs from a single network because different parts may have wildly different topologies, bandwidths, delays, packet sizes, and other parameters. TCP was designed to dynamically adapt to properties of the internetworks and to be robust(稳健的,鲁棒的) in the face of many kinds of failures. (2)The IP layer gives no guarantee that datagrams will be delivered properly, so it is up to TCP to time out and retransmit them as need be. (3)Datagrams that do arrive may be in the wrong order; it is also up to TCP to reassemble them into messages in the proper sequence.

Chapter 6 The Transport Layer-06

Chapter 6 The Transport Layer-06


connectionless transport service
6.1.2 Transport Service Primitives The primitives for a simple connection-oriented transport service
6.1.2 Transport Service Primitives The state diagram for a simple connection-oriented transport connection management scheme
The two-army problem.
6.2.3 Connection Release
Four protocol scenarios for releasing a connection.
6-14, a, b
(a) Normal case of a three-way handshake. (b) final ACK lost.
The transport layer is responsible for the delivery of a message from one process to another
6.1.1 Services Provided to the Upper Layers

Transport layer compared with data link layer
6.2.3 Connection Release
Four protocol scenarios for releasing a connection.
6-14, c,d
(c) Response lost. (d) Response lost and subsequent DRs lost.
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
2012-8-18 Computer Networks - 06 12/82
Connection-Oriented Socket Communication
2012-8-18
Computer Networks - 06
13/82
2012-8-18
Computer Networks - 06
14/82
Note 2: A real hard part is establishing and releasing connections. The model can be either symmetric or asymmetric
2012-8-18 Computer Networks - 06 16/82
Important: we’re talking about efficient and costeffective services, in particular reliable connections. Note: depending on the services offered by the network layer, the added functionality in the transport layer can vary considerably.
2012-8-18 Computer Networks - 06 9/82
Connection establishment and release
2012-8-18
Computer Networks - 06
10/82
6.1.3 Berkeley Sockets
Example: Consider the Berkeley socket interface, which has been adopted by most UNIX systems, as well as Windows 9X/NT:
2012-8-18
Computer Networks - 06
3/82
Note: The issue here is that the network layer is in the hands of carriers: organizations that offer a (generally wide-area) computer network to their clients. Clients have nothing to say in what the carrier actually offers.
2012-8-18 Computer Networks - 06 6/82
Quality of Service: QoS
Residual error ratio: fraction of lost or garbled messages. Should be as near to zero as possible. Protection: to what extent is a client’s message protected against eavesdropping or tampering. Priority: is it possible for a client to indicate that one connection should be serviced at a higher priority than another one. Resilience: probability that the transport layer looses a connection (i.e., the connection breaks on account of network failures).
Chapter 6 The Transport Layer
Essence: The transport layer is responsible for completing the services of the underlying network to the extent that application development can take place
2012-8-18
Computer Networks - 06
11/82
Socket Communication
The client and server each bind a transport-level address and a name to the locally created socket. The server must listen to its socket, thereby telling the kernel that it will subsequently wait for connections from clients. After that, the server can accept or select connections from clients. The client connects to the socket. It needs to provide the transport-level address by which it can locate the server. After a connection has been accepted (or selected), the client and server communicate through read/write operations on their respective sockets. Communication ends when a connection is closed.
COMPUTER NETWORKS
Chapter 06 The Transport Layer
Shoubao Yang Tel: 3601540 syang@ http://202.38.64.11/~syang September 2006
2012-8-18 Computer Networks - 06 1/82
2012-8-18
Computer Networks - 06
15/82
Some Observations
Note 1: Messages sent by clients are encapsulated as transport protocol data units (TPDUs) to the network layer:
2012-8-18
Computer Networks - 06
5/82
Quality of Service: QoS
Connection establishment delay: how long does it take to establish a connection. The shorter, the better. Connection establishment failure probability: Chance of not being able to establish a connection within the specified maximum delay. Should be as low as possible. Throughput: how many bytes per second can a client pass through a connection. Transit delay: how long does it take for a message to make it from sender to receiver. The shorter, the better.
Symmetric and Asymmetric disconnect
Symmetric: one side sends a disconnect request, and waits for the other to acknowledge that the connection is closed. Yes, there are some problems with this model. In fact, it turns out it is impossible to implement. Asymmetric: one side just closes the connection, and that’s it. Yes, it’s simple, but you may lose some data this way. Not really acceptable.
2012-8-18 Computer Networks - 06 4/82
Consequence: If we want to develop applications that are independent of the particular services offered by a carrier, we’ll have to design a standard communication interface and implement that interface at the client’s sites. The transport layer contains such implementations.
2012-8-18
Computer Networks - 06
8/82

Transport Interface and TPDU TPDU, Transport Protocol Data Unit, for message sent from transport entity to transport entity.
2012-8-18
Computer Networks - 06
相关文档
最新文档