现代计算机网络讲义6(英语)+传输层ppt课件_第1页
现代计算机网络讲义6(英语)+传输层ppt课件_第2页
现代计算机网络讲义6(英语)+传输层ppt课件_第3页
现代计算机网络讲义6(英语)+传输层ppt课件_第4页
现代计算机网络讲义6(英语)+传输层ppt课件_第5页
已阅读5页,还剩62页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、2021/2/3,1,Chapter 6,The Transport Layer Heart of the whole protocol hierarchy. Providing reliable, cost-effective data transport from the source to the destination,2021/2/3,2,6.1 The Transport Service,Services Provided to the Upper Layers Connection-oriented and connectionless Subnet vs Host Transp

2、ort Service Primitives A standard set of primitives and work on a wide variety of networks Berkeley Sockets An Example of Socket Programming: An Internet File Server,2021/2/3,3,6.1.1 Services Provided to the Upper Layers,The network, transport, and application layers. The Transport address,2021/2/3,

3、4,6.1.2 Transport Service Primitives (1,The primitives for a simple transport service,2021/2/3,5,6.1.2 Transport Service Primitives (2,A state diagram for a simple connection management scheme,2021/2/3,6,6.1.3 Berkeley Sockets,The socket primitives for TCP,2021/2/3,7,6.2 Elements of Transport Protoc

4、ols,Addressing Connection Establishment Connection Release Flow Control and Buffering Multiplexing Crash Recovery,2021/2/3,8,6.2.1 Addressing (1,TSAPs, NSAPs and transport connections A time-of-day server process listens at TSAP 1522 of host 2 to wait for an incoming call. An application process on

5、host 1 issues a CONNECT request specifying TSAP 1208 as the source and TSAP 1522 as the destination. The time server process responds with the current time. Well-known TSAP,2021/2/3,9,6.2.1 Addressing (2,Initial connection protocol process server As a proxy for less heavily used servers. Listen to a

6、 set of ports at the same time The requested server inherits the existing connection with the user,2021/2/3,10,Name server or Directory server. services do exist independently of the process server User sets up a connection to the name server (a well-known TSAP). Specifying the service name, Name se

7、rver sends back the TSAP address. User releases the connection with the name server Establishes a new one with the desired service. A new service must register itself with the name server,6.2.1 Addressing (3,2021/2/3,11,6.2.2 Connection Establishment(1,CONNECTION REQUEST and CONNECTION ACCEPTED. Pro

8、blem: network can lose, store, and duplicate packets. Establishing connections in a reliable way Throw-away transport addresses Makes the process server model impossible Give each connection a connection identifier i.e. a sequence number Maintain a certain amount of history information, crash? Ensur

9、e that no packet lives longer than some known time,2021/2/3,12,T is some small multiple of the true maximum packet lifetime Each host with a time-of-day clock. The clocks at different hosts need not be synchronized. The clock continue running even if the host goes down. A binary counter increments a

10、t uniform intervals. The number of bits in the counter must equal or exceed the number of bits in the sequence numbers,6.2.2 Connection Establishment(2,2021/2/3,13,6.2.2 Connection Establishment(3,Ensure that two identically numbered TPDUs are never outstanding at the same time. When a connection is

11、 set up, the low-order k bits of the clock are used as the initial sequence number (also k bits, for data). Each connection starts numbering its TPDUs with a different initial sequence number. The sequence space should be so large that by the time sequence numbers wrap around, old TPDUs with the sam

12、e sequence number are gone. Once connection established on the initial sequence number, any sliding window protocol can be used for data flow control,2021/2/3,14,6.2.2 Connection Establishment (4,Forbidden region a host crashes TPDUs may not enter the forbidden region. The resynchronization problem.

13、 the delayed duplicate problem for data TPDUs solved,2021/2/3,15,6.2.2 Connection Establishment (5,Establishing a connection using a three-way handshake. (CR - CONNECTION REQUEST) Control TPDUs may also be delayed Normal operation Old CONNECTION REQUEST appearing out of nowhere. Duplicate CONNECTION

14、 REQUEST and duplicate ACK,2021/2/3,16,6.2.3 Connection Release(1,Releasing a connection is easier than establishing one, but . Asymmetric release Abrupt disconnection with loss of data,2021/2/3,17,6.2.3 Connection Release (2,Symmetric release Treats the connection as two unidirectional connections

15、Requires each one to be released separately The two-army problem. no protocol exists that works,2021/2/3,18,6.2.3 Connection Release (3,Releasing a connection using a three-way handshake (a) Normal case of a three-way handshake. (b) final ACK lost,2021/2/3,19,6.2.3 Connection Release (4,c) Response

16、lost. (d) Response lost and subsequent DRs lost,6-14, c,d,2021/2/3,20,6.2.4 Flow control and buffering(1,Difference between Link layer and Transfer Layer A router usually has few lines, a host may have numerous connections and needs more buffer. Buffer size, wide variation in TPDU size Dynamically a

17、djust their buffer allocations,2021/2/3,21,6.2.5 Flow Control and Buffering (2,Dynamic buffer allocation,2021/2/3,22,6.2.5 Multiplexing,a) Upward multiplexing. If only one network address is available on a host (b) Downward multiplexing. needs more bandwidth,2021/2/3,23,6.2.6 Crash Recovery (1,When

18、network or router crashes, recovery is straightforward Datagram services Connection oriented services: building a new connection and retransfer from not received TPDU Host Crashes A trouble,2021/2/3,24,6.2.6 Crash Recovery (2,A example Client is sending a file to server using a stop-and-wait protoco

19、l The server passes the incoming TPDUs to the transport user, one by one. Server crashes and reboots, reinitializes its tables, so no longer knows precisely where it was. Server sends a broadcast TPDU to all other hosts, requests its clients inform the status of all open connections,2021/2/3,25,6.2.

20、6 Crash Recovery (3,Client can be in one of two states: One TPDU outstanding, S1 Or no TPDU outstanding, S0 Whether to retransmit the most recent TPDU? Events are possible at the server: Sending an acknowledgement (A), Writing to the output process (W), Crashing (C,2021/2/3,26,6.2.6 Crash Recovery (

21、4,Different combinations of client and server strategy. There are always situations where the protocol fails to recover properly. Recovery from layer N crash can only be done by layer N + 1,2021/2/3,27,6.3 A Simple Transport Protocol,The Example Service Primitives The Example Transport Entity The Ex

22、ample as a Finite State Machine,2021/2/3,28,6.3.1 The Example Service Primitives,CONNECT During the call, the caller is blocked If the connection succeeds, the caller is unblocked and can start transmitting data. Or rejected and the caller is unblocked and given an error return LISTEN To accept inco

23、ming calls The process then blocks until some remote process attempts to establish a connection to its TSAP. DISCONNECT When both sides have disconnected, the connection is released. A symmetric disconnection model,2021/2/3,29,6.3.1 The example service primitives(2,SEND An active call, transmits dat

24、a RECEIVE A passive call, blocks until a TPDU arrives. Each primitive corresponds to a library procedure that executes the primitive. The parameters library procedures: connum = LISTEN(local) connum = CONNECT(local, remote) status = SEND(connum, buffer, bytes) status = RECEIVE(connum, buffer, bytes)

25、 status = DISCONNECT(connum,2021/2/3,30,6.3.2 The Example Transport Entity(1,Using a connection-oriented, reliable network service Procedures to_net and from_net , parameters Connection identifier, which maps onto network virtual circuits Q bits, indicate control message, only one (CREDIT) in exampl

26、e M bits, more data in the next packet Packet type A pointer to the data itself An integer giving the number of bytes of data,2021/2/3,31,6.3.2 The Example Transport Entity(2,The network layer packets type used in example,2021/2/3,32,6.3.2 The Example Transport Entity (3,Each connection is in one of

27、 seven states Idle Connection not established yet. Waiting CONNECT has been executed, CALL REQUEST sent. Queued A CALL REQUEST has arrived; no LISTEN yet. Established The connection has been established. Sending The user is waiting for permission to send a packet. Receiving A RECEIVE has been done.

28、Disconnecting a DISCONNECT has been done locally,2021/2/3,33,6.3.2 The Example Transport Entity (4,Transitions occurs when the following events occur a primitive is executed a packet arrives the timer expires. A flow control mechanism different from the sliding window. When RECEIVE is called, a spec

29、ial credit message is sent to the sending machine When SEND is called, the transport entity checks to see if a credit has arrived on the specified connection. If so, the message is sent and the credit decremented; if not, the transport entity puts itself to sleep until a credit arrives,2021/2/3,34,T

30、he example protocol in graphical form,2021/2/3,35,2021/2/3,36,2021/2/3,37,2021/2/3,38,2021/2/3,39,2021/2/3,40,2021/2/3,41,2021/2/3,42,2021/2/3,43,6.3.3 The Example as a Finite State Machine(1,The example protocol as a finite state machine Each entry has an predicate, an action, and the new state. Bl

31、ank entries correspond to impossible or invalid events The advantage of representing the protocol as a matrix It is easier to systematically check each combination of state and event to see if an action is required. gives a much more regular and systematic design protocol description,2021/2/3,44,6.3

32、.3 The Example as a Finite State Machine (2,Congestion: too many packets into the network too quickly in transport layer Congestion control mechanisms Desirable bandwidth allocation Regulating the sending rate,6.4 Congestion Control,6.4.1 Desirable Bandwidth Allocation (1,a) Goodput and (b) delay as

33、 a function of offered load,Efficiency allocation: to use all of the available network capacity Power = load(goodput)/delay,Fairness: how to divide bandwidth between senders Max-min Fairness allocation If the bandwidth given to one flow cannot be increased without decreasing the bandwidth given to a

34、nother flow,6.4.1 Desirable Bandwidth Allocation (2,Max-min bandwidth allocation for four flows,6.4.1 Desirable Bandwidth Allocation (3,Changing bandwidth allocation over time,Convergence To converge quickly to the ideal operating point,6.4.2 Regulating the Sending Rate (1,The sending rate is limite

35、d by receiver and network,6.4.2 Regulating the Sending Rate (2,The form of the feedback returned by the network Explicit or implicit Precise or imprecise Some congestion control protocols,Additive Increase Multiplicative Decrease (AIMD) control law,User 1s allocation,User 2s allocation,6.4.2 Regulat

36、ing the Sending Rate (3,2021/2/3,52,6.4.3 TCP Congestion Control(1,Congestion Window in TCP Tahoe Slow start followed by additive increase,6.4.3 TCP Congestion Control (2,Fast recovery and the sawtooth pattern of TCP Reno,2021/2/3,54,6.4.4 Wireless Networks,Packet loss, a congestion signal or transm

37、ission errors? Some wireless links have a long round-trip times, such as satellites. Wireless links have variable capacity,2021/2/3,55,6.5 The Internet Transport Protocols: TCP,Introduction to TCP The TCP Service Model The TCP Protocol The TCP Segment Header TCP Connection Establishment TCP Connecti

38、on Release TCP Connection Management Modeling TCP Transmission Policy TCP Congestion Control TCP Timer Management Wireless TCP and UDP Transactional TCP,2021/2/3,56,6.6 Performance Issues,Performance Problems in Computer Networks Network Performance Measurement System Design for Better Performance F

39、ast TPDU Processing Protocols for future high-performance networks,2021/2/3,57,Congestion, caused by resource overloads Structural resource imbalance Synchronous overloads Poor system tuning Incorrect timeouts setting Bandwidth-delay product The window must be at least as large as the bandwidth-dela

40、y product Time-critical applications,6.6.1 Performance Problems in Computer Networks (1,2021/2/3,58,6.6.1 Performance Problems in Computer Networks (2,The bandwidth-delay product The state of transmitting (a) At t = 0 (b) After 500 sec (c) After 20 msec (d) after 40 msec,2021/2/3,59,6.6.2 Network Pe

41、rformance Measurement (1,The basic loop for improving network performance. Measure relevant network parameters. how long a activity takes how often some event has happened the amount of something Try to understand what is going on. Change one parameter,2021/2/3,60,When measuring network performance,

42、 pay attention to: Sample size is large enough Samples are representative Be careful when using a coarse-grained clock Nothing unexpected is going on during your tests Caching can wreak havoc with measurements Understand what you are measuring Be careful about extrapolating the results,6.6.2 Network Performance Measurement (2,2021/2/3,61,6.6.3 System Design for Better Performance,Rules: CPU speed is more important than network s

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论