【计算机网络课程课件@中科大】6The 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

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 运输层

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页)文档资料

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)
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

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)

数据通信与计算机网络
套接字 (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

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

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.
第6-8讲运输层PPT课件

不管上面发什么,也不管下面怎么组装
10/15/2024
计算机网络_运输层
30
举例
应用层
35268字节
FTP
106 345 218 1130 46 …… QQ
根据拥塞组装TCP报文 拥塞变化
TCP 10266 10266
不同的应用不能混合组装
4512 4512 ……
IP
1500 1500 1500 ……
计算机网络_运输层
19
5.2 用户数据报协议 UDP UDP 的主要特点
UDP 只在 IP之上增加端口和差错检测的功能。
UDP 是无连接的,即发送数据之前不需要建立 连接。
UDP 使用尽最大努力交付,即不保证可靠交付, 同时也不使用拥塞控制,很适合多媒体通信的 要求。
UDP 支持一对一、一对多、多对一和多对多的 交互通信。
数据到达主机后,如何区分这些应用进程?
10/15/2024
计算机网络_运输层
6
运输层的功能
复用与分用
复用:发送方的多个进程共用一个运输层协议
分用:接收方的运输层把数据分交给不同进程
其他重要功能
可靠传输(差错检测) 拥塞控制
通过“端口”区 分不同的进程
流量控制
10/15/2024
计算机网络_运输层
有联系的。
10/15/2024
计算机网络_运输层
14
三类端口
熟知端口,数值一般为 0~1023。 登记端口号,数值为1024~49151,为没有熟
知端口号的应用程序使用的。使用这个范围的 端口号必须在 IANA 登记,以防止重复。 客户端口号或短暂端口号,数值为 49152~65535,留给客户进程选择暂时使用。 当服务器进程收到客户进程的报文时,就知道 了客户进程所使用的动态端口号。通信结束后, 这个端口号可供其他客户进程以后使用。
10/15/2024
计算机网络_运输层
30
举例
应用层
35268字节
FTP
106 345 218 1130 46 …… QQ
根据拥塞组装TCP报文 拥塞变化
TCP 10266 10266
不同的应用不能混合组装
4512 4512 ……
IP
1500 1500 1500 ……
计算机网络_运输层
19
5.2 用户数据报协议 UDP UDP 的主要特点
UDP 只在 IP之上增加端口和差错检测的功能。
UDP 是无连接的,即发送数据之前不需要建立 连接。
UDP 使用尽最大努力交付,即不保证可靠交付, 同时也不使用拥塞控制,很适合多媒体通信的 要求。
UDP 支持一对一、一对多、多对一和多对多的 交互通信。
数据到达主机后,如何区分这些应用进程?
10/15/2024
计算机网络_运输层
6
运输层的功能
复用与分用
复用:发送方的多个进程共用一个运输层协议
分用:接收方的运输层把数据分交给不同进程
其他重要功能
可靠传输(差错检测) 拥塞控制
通过“端口”区 分不同的进程
流量控制
10/15/2024
计算机网络_运输层
有联系的。
10/15/2024
计算机网络_运输层
14
三类端口
熟知端口,数值一般为 0~1023。 登记端口号,数值为1024~49151,为没有熟
知端口号的应用程序使用的。使用这个范围的 端口号必须在 IANA 登记,以防止重复。 客户端口号或短暂端口号,数值为 49152~65535,留给客户进程选择暂时使用。 当服务器进程收到客户进程的报文时,就知道 了客户进程所使用的动态端口号。通信结束后, 这个端口号可供其他客户进程以后使用。
中科大计算机网络课件06(2024)

PPP(Point-to-Point Protocol)是 一种点对点数据链路层协议,主要用 于拨号上网等场景。PPP协议包括链 路建立、链路维护和链路终止三个阶 段。在链路建立阶段,通信双方进行 协商并确定通信参数;在链路维护阶 段,双方通过定期发送LCP(Link Control Protocol)报文来维护链路 状态;在链路终止阶段,双方通过交 换终止报文来结束通信。
2024/1/28
8
数据链路层的基本概念与功能
数据链路层的基本概念
数据链路层是计算机网络体系结构中 的第二层,负责将数据组合成数据块 (帧),并在相邻节点间进行可靠传 输。
数据链路层的功能
数据链路层的主要功能包括帧同步、 差错控制、流量控制和访问控制等。 通过这些功能,数据链路层能够确保 数据在相邻节点间可靠地传输。
2024/1/28
17
网络安全的基本概念与防护措施
• 网络安全的基本概念:网络安全是指通过采取各种技术和管理措施,保护计算机网络系统免受未经授权的访问、攻击或破 坏,确保网络系统的机密性、完整性和可用性。网络安全涉及多个方面,如物理安全、网络安全、数据安全等。
2024/1/28
18ห้องสมุดไป่ตู้
网络安全的基本概念与防护措施
使用测线仪检测网线是否通路
2024/1/28
30
常见网络故障的诊断与排除方法
更换损坏的网线或接口
数据链路层故障
检查MAC地址配置是否正确
2024/1/28
31
常见网络故障的诊断与排除方法
网络层故障
检查VLAN配置是否正确
检查交换机端口配置是否 正确
01
2024/1/28
03 02
计算机课件第五章运输层共74页文档

计算机课件第五章运输层
41、实际上,我们想要的不是针对犯 罪的法 律,而 是针对 疯狂的 法律。 ——马 克·吐温 42、法律的力量应当跟随着公民,就 像影子 跟随着 身体一 样。— —贝卡 利亚 43、法律和制度必须跟上人类思想进 步。— —杰弗 逊 44、人类受制于法律,法律受制于情 理。— —托·富 勒
• 当运输层采用面E向va连lu接ati的onTConPl协y.议时,尽管下面的 eated网with Aspose.Slides for .NET 3.5 Client Profile 5.2.0
络是C不op可y靠rig的ht(2只00提4供-2尽01最1大A努sp力o服se务P)ty,L但td这. 种逻辑
据报是在运输层的端到端抽象的逻辑信道中传送的。
• TCP报文段是在运输层抽象的端到端逻辑信道中传送,这种信
道是可靠的全双工信道。但这样的信道却不知道究竟经过了哪
些路由器,而这些路由器也根本不知道上面的运输层是否建立
了TCP连接。
Computer Network
10
第五章 传输层协议
三、套接字和端口 1、端口的作用
通信的终点是应用进程,把端口想象是通信的终点。 应用层各种进程是通过相应的端口与传输实体进行交 互。没有端口就无法分开应用层的不同进程。
Computer Network
11
第五章 传输层协议
应
应用进程
用
层
端口
端口
应用进程
应用进程
端口Eval端u口ation端口only. 端口
应用进程
端口
端口
eate传d with Aspose.Slides for .NET 3.5 Client Profile 5.2.0
41、实际上,我们想要的不是针对犯 罪的法 律,而 是针对 疯狂的 法律。 ——马 克·吐温 42、法律的力量应当跟随着公民,就 像影子 跟随着 身体一 样。— —贝卡 利亚 43、法律和制度必须跟上人类思想进 步。— —杰弗 逊 44、人类受制于法律,法律受制于情 理。— —托·富 勒
• 当运输层采用面E向va连lu接ati的onTConPl协y.议时,尽管下面的 eated网with Aspose.Slides for .NET 3.5 Client Profile 5.2.0
络是C不op可y靠rig的ht(2只00提4供-2尽01最1大A努sp力o服se务P)ty,L但td这. 种逻辑
据报是在运输层的端到端抽象的逻辑信道中传送的。
• TCP报文段是在运输层抽象的端到端逻辑信道中传送,这种信
道是可靠的全双工信道。但这样的信道却不知道究竟经过了哪
些路由器,而这些路由器也根本不知道上面的运输层是否建立
了TCP连接。
Computer Network
10
第五章 传输层协议
三、套接字和端口 1、端口的作用
通信的终点是应用进程,把端口想象是通信的终点。 应用层各种进程是通过相应的端口与传输实体进行交 互。没有端口就无法分开应用层的不同进程。
Computer Network
11
第五章 传输层协议
应
应用进程
用
层
端口
端口
应用进程
应用进程
端口Eval端u口ation端口only. 端口
应用进程
端口
端口
eate传d with Aspose.Slides for .NET 3.5 Client Profile 5.2.0
计算机网络chapter6传输层

一个复杂的过程:延迟的重复分组的干扰 解决方法:
– 废弃使用过的传输地址 – 给每个连接分配一个连接标识符 缺陷:每个传输实体长时间保存历史信息。如果系统崩溃,
将造成信息丢失 改进技术,删除在子网中“徘徊”的过时分组:
– 将分组的生命周期限制在一个已知的最大值内: • 受限制的子网设计 • 在每个分组内设计一个站段计数器 • 为每个分组加上时间标记
6-6-1
Client code using sockets.
10
Socket Programming
Example: Internet File Server (2)
Server code using sockets.
11
6.2 Elements of Transport Protocols
Addressing Connection Establishment Connection Release Flow Control and Buffering Multiplexing Crash Recovery
18
ቤተ መጻሕፍቲ ባይዱ
Connection Establishment (3)
传输层的任务:
– 为源端到目的端提供可靠、价格合理的数据 传输
2
6.1 The Transport Service
Services Provided to the Upper Layers Transport Service Primitives Berkeley Sockets An Example of Socket Programming:
16
6.2.2 Connection Establishment
How a user process in host 1 establishes a connection with a time-of-day server in host 2. 17
– 废弃使用过的传输地址 – 给每个连接分配一个连接标识符 缺陷:每个传输实体长时间保存历史信息。如果系统崩溃,
将造成信息丢失 改进技术,删除在子网中“徘徊”的过时分组:
– 将分组的生命周期限制在一个已知的最大值内: • 受限制的子网设计 • 在每个分组内设计一个站段计数器 • 为每个分组加上时间标记
6-6-1
Client code using sockets.
10
Socket Programming
Example: Internet File Server (2)
Server code using sockets.
11
6.2 Elements of Transport Protocols
Addressing Connection Establishment Connection Release Flow Control and Buffering Multiplexing Crash Recovery
18
ቤተ መጻሕፍቲ ባይዱ
Connection Establishment (3)
传输层的任务:
– 为源端到目的端提供可靠、价格合理的数据 传输
2
6.1 The Transport Service
Services Provided to the Upper Layers Transport Service Primitives Berkeley Sockets An Example of Socket Programming:
16
6.2.2 Connection Establishment
How a user process in host 1 establishes a connection with a time-of-day server in host 2. 17
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 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
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