分享
Chapter6+The+Transport+Layer.ppt
下载文档

ID:3488152

大小:5.95MB

页数:161页

格式:PPT

时间:2024-05-09

收藏 分享赚钱
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,汇文网负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。
网站客服:3074922707
Chapter6 The Transport Layer
Chapter 6 The Transport Layer,College of Computer Science Chongqing University,Contents,6.1 The Transport Service 6.2 Elements of Transport Protocols 6.3 UDP 6.4 TCP,The end-user cannot control what is in the network.So the end-user establishes another layer,only at end hosts,to provide a transport service that is more reliable than the underlying network service.Using this new network connection,it can send a query to its peer asking which data arrived and which did not,and then pick up from where it left off2.The transport layer allows several concurrent applications to use the transport service.3.Provides a common interface to application writers,regardless of the underlying network layer.In essence,an application writer can write code once using the transport layer primitive and use it on different networks(but with the same transport layer).,Why the transport layer?,Between the communication subnet and resource subnet,shield the underlying details of network off the high-level user,6.1.1 Services Provided to the Upper Layers,6.1.1 Services Provided to the Upper Layers,The network layer is responsible for the delivery of individual packets from the source host to the destination host.,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 network layer,Transport layer compared with data link layer,6.1.1 Services Provided to the Upper Layers,Similarities Both have to deal with error control,sequencing,and flow control,among other issues,differences,Generally directed connectedPoint to Point basedconnection establishment is simple storage management is simple,Out-buffers/in-buffers,Connected via subnetexplicit addressing of destinations is required connection establishment is more complicated Connection based in/out-buffer mangement,6.1.1 Services Provided to the Upper Layers,Transport layer compared with data link layer,Transport layer concept,6.1.1 Services Provided to the Upper Layers,The nesting of TPDUs,packets,and frames,6.1.1 Services Provided to the Upper Layers,End(normally processes in the application layer)to end deliveryReliable deliveryshield the underlying details of network off the high-level userFlow controlMultiplexing,The goal of the transport layer,6.1.1 Services Provided to the Upper Layers,connection-oriented transport service(three phases)Establishment connection data transferrelease connectionconnectionless transport service,Two types of network service,6.1.1 Services Provided to the Upper Layers,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,Transitions labeled in italics are caused by packet arrivals.The solid lines show the clients state sequence.The dashed lines show the servers state sequence,An Excample:Berkeley Sockets,6.1.2 Transport Service Primitives,6.2 Elements of Transport Protocols,AddressingConnection EstablishmentConnection ReleaseBufferingReliable DeliveryFlow Control MultiplexingCrash Recovery,In transport layer,service access points identifies upper-layer services(applications).,6.2.1 Addressing,6.2.1 Addressing,TSAPs Transport Service Access Point NSAPs Network SAP TCP calls TSAP s.ports ATM calls TSAPs.AAL-SAP,6.2.1 Addressing,Levels of Service Access PointsData link level protocols need to know which two computers within a network are communicating.MAC addressNetwork level protocols need to know which two computers within an internet are communicating.IP addressTransport level protocols need to know which upper-layer protocols are communicating.Port,6.2.2 Connection Establishment,End-to-end delivery can be accomplished in either of two modes:Connection-oriented transmission has three stages:connection establishment,data transfer,connection termination.Connectionless transmission,6.2.2 Connection Establishment,Connection-oriented Connection establishment(three-way handshaking),6.2.2 Connection Establishment,Three protocol scenarios for establishing a connection using a three-way handshake.CR denotes CONNECTION REQUEST.(a)Normal operation,(b)Old CONNECTION REQUEST appearing out of nowhere.(c)Duplicate CONNECTION REQUEST and duplicate ACK.,Connection-oriented Connection release(three-way handshaking),Abrupt disconnection with loss of data.,6.2.3 Connection Release,CR=CONNECTION REQUESTDR=DISCONNECTION REQUEST,6.2.3 Connection Release,The two-army problem.,Four protocol scenarios for releasing a connection.,6-14,a,b,6.2.3 Connection Release,(a)Normal case of a three-way handshake.(b)final ACK lost.,6-14,c,d,6.2.3 Connection Release,(c)Response lost.(d)Response lost and subsequent DRs lost.,Four protocol scenarios for releasing a connection.,6.2.4 Buffering,(a)Chained fixed-size buffers.(b)Chained variable-sized buffers.(c)One large circular buffer per connection.,6.2.5 Reliable Delivery,Segmentation and ReassemblyTransport layer adds a sequence number at each segment.This number indicates the order for reassembly.Each segment carries a field that indicates whether it is the final segment or middle segment of a transmission.Concatenation and SeparationWhen the size of the data unit belonging to a single session is so small that several units can fit together into a single datagram.A sequence number at each unit allows correct separation at the destination.,Sequence Control,Error ControlMechanisms for error control are based on error detection and retransmission.Error detections are performed using algorithms implemented in software,such as checksum.We already have error handling at the data link layer,why do we need it at the transport layer?,6.2.5 Reliable Delivery,Loss ControlSequence numbers allow the receivers transport layer protocol to identify any missing segments and request redelivery.,6.2.5 Reliable Delivery,Duplication ControlSequence numbers allow the receiver to identify and discard duplicate segments.,6.2.5 Reliable Delivery,6.2.6 Flow Control,Flow control at transport layer is performed end-to-end rather than across a single link.A sliding window is used to make data transmission more efficient as well as to control the flow of data so that the receiver does not become overwhelmed.Some points about sliding windows at the transport layer:The sender does not have to send a full windows worth of data.An acknowledgment can expand the size of the window based on the sequence number of the acknowledged data segment.The size of the window can be increased or decreased by the receiver.The receiver can send an acknowledgment at anytime.,6.2.6 Flow Control,Sliding window,6.2.6 Flow Control,Sliding windows used at the transport layer are usually byte oriented rather than frame oriented.,Dynamic buffer allocation.The arrows show the direction of transmission.An ellipsis()indicates a lost TPDU.,6.2.6 Flow Control,6.2.7 Multiplexing,Upward MultiplexingThe transport layer can send several transmissions bound for the same destination along the same path.It is useful when the underlying networks have high throughput.Downward MultiplexingIt is useful when the underlying networks have low or slow capacity(e.g.,X.25s three bit sequence code).,Different combinations of client and server strategy.,6.2.8 Crash Recovery,6.3 The Internet Transport Protocols:UDP,“no frills,”“bare bones”Internet transport protocol“best effort”service,UDP segments may be:lostdelivered out of order to appconnectionless:no handshaking between UDP sender,receivereach UDP segment handled independently of others,Why is there a UDP?no connection establishment(which can add delay)simple:no connection state at sender,receiversmall segment headerno congestion control:UDP can blast away as fast as desired,6.3 The Internet Transport Protocols:UDP,6.3.1 Port Numbers,client-server paradigmProcess on the local host,called client,needs services from a process on the remote host,called serverFor communication,we need to defineLocal hostLocal processRemote hostRemote process,Local and remote hosts are defined using IP addressesProcesses are defined by so called port numberThe port number in TCP/IP are integers between 0 to 65,535Client process randomly selects a port number by the UDP ephemeral port numberTCP/IP uses universal port numbers for servers well-known port numbers,6.3.1 Port Numbers,6.3.1 Port Numbers,IP addresses versus port numbers,6.3.1 Port Numbers,De/Multiplexer,De/Multiplexer,IP,IP,Internet,Processes,Buffers,Port Numbers,UDP/TCP,De/Multiplexing,6.3.1 Port Numbers,IANA ranges for the port numbers,6.3.1 Port Numbers,Well-known ports used with UDP,Well-known ports used with TCP,6.3.2 Socket Address,Combination of an IP address and a port number is called a socket addressThe socket address uniquely defines a processIP header contains the IP addressesUDP/TCP header includes the port numbers,2000,Host C,(TCP,IPa,1500),(TCP,IPc,2000),(TCP,IPa,1501),(TCP,IPb,1501),6.3.3 Structure of UDP,UDP packets are called user datagramHeader size is fixed and of 8 bytes,6.3.3 Structure of UDP,Length,16-bit fieldDefines the total length of the user datagram,including the dataMinimum length is 8 bytesThe length of data can be 0 to 65,507 bytes,UDP length=IP length-IP headers length,6.3.3 Structure of UDP,Checksum,Includes three sectionsPseudo-header:necessary IP information for error checkingUDP headerData,Pseudo-header added to the UDP datagram,This information gives protection against misrouted datagrams.,6.3.3 Structure of UDP,Checksum calculation of a simple UDP user datagram,6.3.4 UDP Operation,Connectionless servicesCan not send a stream of dataBetter for short messageNo flow and error controlEncapsulation and decapsulationQueuingQueues are associated with portsQueues are identified by port numbersWhen process terminates,the queues are destroyedMultiplexing and demultiplexing,

此文档下载收益归作者所有

下载文档
你可能关注的文档
收起
展开