现代计算机网络讲义6(英语)+传输层ppt课件.ppt

上传人:牧羊曲112 文档编号:2093871 上传时间:2023-01-09 格式:PPT 页数:67 大小:7.96MB
返回 下载 相关 举报
现代计算机网络讲义6(英语)+传输层ppt课件.ppt_第1页
第1页 / 共67页
现代计算机网络讲义6(英语)+传输层ppt课件.ppt_第2页
第2页 / 共67页
现代计算机网络讲义6(英语)+传输层ppt课件.ppt_第3页
第3页 / 共67页
现代计算机网络讲义6(英语)+传输层ppt课件.ppt_第4页
第4页 / 共67页
现代计算机网络讲义6(英语)+传输层ppt课件.ppt_第5页
第5页 / 共67页
点击查看更多>>
资源描述

《现代计算机网络讲义6(英语)+传输层ppt课件.ppt》由会员分享,可在线阅读,更多相关《现代计算机网络讲义6(英语)+传输层ppt课件.ppt(67页珍藏版)》请在三一办公上搜索。

1、2023/1/9,1,Chapter 6,The Transport Layer Heart of the whole protocol hierarchy.Providing reliable,cost-effective data transport from the source to the destination,2023/1/9,2,6.1 The Transport Service,Services Provided to the Upper LayersConnection-oriented and connectionlessSubnet vs HostTransport S

2、ervice PrimitivesA standard set of primitives and work on a wide variety of networksBerkeley SocketsAn Example of Socket Programming:An Internet File Server,2023/1/9,3,6.1.1 Services Provided to the Upper Layers,The network,transport,and application layers.The Transport address,2023/1/9,4,6.1.2 Tran

3、sport Service Primitives(1),The primitives for a simple transport service.,2023/1/9,5,6.1.2 Transport Service Primitives(2),A state diagram for a simple connection management scheme.,2023/1/9,6,6.1.3 Berkeley Sockets,The socket primitives for TCP.,2023/1/9,7,6.2 Elements of Transport Protocols,Addre

4、ssingConnection EstablishmentConnection ReleaseFlow Control and BufferingMultiplexingCrash Recovery,2023/1/9,8,6.2.1 Addressing(1),TSAPs,NSAPs and transport connectionsA time-of-day server process listens at TSAP 1522 of host 2 to wait for an incoming call.An application process on host 1 issues a C

5、ONNECT 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,2023/1/9,9,6.2.1 Addressing(2),Initial connection protocolprocess server As a proxy for less heavily used servers.Listen to a set of ports at the

6、same timeThe requested server inherits the existing connection with the user,2023/1/9,10,Name server or Directory server.services do exist independently of the process serverUser sets up a connection to the name server(a well-known TSAP).Specifying the service name,Name server sends back the TSAP ad

7、dress.User releases the connection with the name serverEstablishes a new one with the desired service.A new service must register itself with the name server,6.2.1 Addressing(3),2023/1/9,11,6.2.2 Connection Establishment(1),CONNECTION REQUEST and CONNECTION ACCEPTED.Problem:network can lose,store,an

8、d duplicate packets.Establishing connections in a reliable wayThrow-away transport addresses Makes the process server model impossible Give each connection a connection identifieri.e.a sequence numberMaintain a certain amount of history information,crash?Ensure that no packet lives longer than some

9、known time,2023/1/9,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 at uniform intervals.The number of bits in t

10、he counter must equal or exceed the number of bits in the sequence numbers.,6.2.2 Connection Establishment(2),2023/1/9,13,6.2.2 Connection Establishment(3),Ensure that two identically numbered TPDUs are never outstanding at the same time.When a connection is set up,the low-order k bits of the clock

11、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 same sequence number are gone.Once connection estab

12、lished on the initial sequence number,any sliding window protocol can be used for data flow control.,2023/1/9,14,6.2.2 Connection Establishment(4),Forbidden regiona host crashes TPDUs may not enter the forbidden region.The resynchronization problem.the delayed duplicate problem for data TPDUs solved

13、,2023/1/9,15,6.2.2 Connection Establishment(5),Establishing a connection using a three-way handshake.(CR-CONNECTION REQUEST)Control TPDUs may also be delayedNormal operationOld CONNECTION REQUEST appearing out of nowhere.Duplicate CONNECTION REQUEST and duplicate ACK.,2023/1/9,16,6.2.3 Connection Re

14、lease(1),.,Releasing a connection is easier than establishing one,but.Asymmetric releaseAbrupt disconnection with loss of data,2023/1/9,17,6.2.3 Connection Release(2),Symmetric releaseTreats the connection as two unidirectional connectionsRequires each one to be released separatelyThe two-army probl

15、em.no protocol exists that works,2023/1/9,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.,2023/1/9,19,6.2.3 Connection Release(4),(c)Response lost.(d)Response lost and subsequent DRs lost.,6-14,c,d,2023/1/9,2

16、0,6.2.4 Flow control and buffering(1),Difference between Link layer and Transfer LayerA router usually has few lines,a host may have numerous connections and needs more buffer.Buffer size,wide variation in TPDU size Dynamically adjust their buffer allocations,2023/1/9,21,6.2.5 Flow Control and Buffe

17、ring(2),Dynamic buffer allocation.,2023/1/9,22,6.2.5 Multiplexing,(a)Upward multiplexing.If only one network address is available on a host(b)Downward multiplexing.needs more bandwidth,2023/1/9,23,6.2.6 Crash Recovery(1),When network or router crashes,recovery is straightforward Datagram servicesCon

18、nection oriented services:building a new connection and retransfer from not received TPDUHost Crashes A trouble,2023/1/9,24,6.2.6 Crash Recovery(2),A exampleClient is sending a file to server using a stop-and-wait protocolThe server passes the incoming TPDUs to the transport user,one by one.Server c

19、rashes 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.,2023/1/9,25,6.2.6 Crash Recovery(3),Client can be in one of two states:One TPDU outstanding,S1Or no T

20、PDU outstanding,S0Whether to retransmit the most recent TPDU?Events are possible at the server:Sending an acknowledgement(A),Writing to the output process(W),Crashing(C).,2023/1/9,26,6.2.6 Crash Recovery(4),Different combinations of client and server strategy.There are always situations where the pr

21、otocol fails to recover properly.Recovery from layer N crash can only be done by layer N+1,2023/1/9,27,6.3 A Simple Transport Protocol,The Example Service PrimitivesThe Example Transport EntityThe Example as a Finite State Machine,2023/1/9,28,6.3.1 The Example Service Primitives,CONNECTDuring the ca

22、ll,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 LISTENTo accept incoming calls The process then blocks until some remote process attempts to establish a connection to its TSA

23、P.DISCONNECTWhen both sides have disconnected,the connection is released.A symmetric disconnection model.,2023/1/9,29,6.3.1 The example service primitives(2),SENDAn active call,transmits dataRECEIVEA passive call,blocks until a TPDU arrives.Each primitive corresponds to a library procedure that exec

24、utes the primitive.The parameters library procedures:connum=LISTEN(local)connum=CONNECT(local,remote)status=SEND(connum,buffer,bytes)status=RECEIVE(connum,buffer,bytes)status=DISCONNECT(connum),2023/1/9,30,6.3.2 The Example Transport Entity(1),Using a connection-oriented,reliable network service Pro

25、cedures to_net and from_net,parametersConnection identifier,which maps onto network virtual circuitsQ bits,indicate control message,only one(CREDIT)in example M bits,more data in the next packetPacket typeA pointer to the data itselfAn integer giving the number of bytes of data.,2023/1/9,31,6.3.2 Th

26、e Example Transport Entity(2),.,The network layer packets type used in example,2023/1/9,32,6.3.2 The Example Transport Entity(3),Each connection is in one of seven statesIdle Connection not established yet.Waiting CONNECT has been executed,CALL REQUEST sent.Queued A CALL REQUEST has arrived;no LISTE

27、N yet.Established The connection has been established.Sending The user is waiting for permission to send a packet.Receiving A RECEIVE has been done.Disconnecting a DISCONNECT has been done locally.,2023/1/9,33,6.3.2 The Example Transport Entity(4),Transitions occurs when the following events occur a

28、 primitive is executeda packet arrivesthe timer expires.A flow control mechanism different from the sliding window.When RECEIVE is called,a special credit message is sent to the sending machineWhen SEND is called,the transport entity checks to see if a credit has arrived on the specified connection.

29、If so,the message is sent and the credit decremented;if not,the transport entity puts itself to sleep until a credit arrives,2023/1/9,34,The example protocol in graphical form.,2023/1/9,35,2023/1/9,36,2023/1/9,37,2023/1/9,38,2023/1/9,39,2023/1/9,40,2023/1/9,41,2023/1/9,42,2023/1/9,43,6.3.3 The Examp

30、le as a Finite State Machine(1),The example protocol as a finite state machineEach entry has an predicate,an action,and the new state.Blank entries correspond to impossible or invalid eventsThe advantage of representing the protocol as a matrix It is easier to systematically check each combination o

31、f state and event to see if an action is required.gives a much more regular and systematic design protocol description,2023/1/9,44,6.3.3 The Example as a Finite State Machine(2),Congestion:too many packets into the network too quickly in transport layerCongestion control mechanismsDesirable bandwidt

32、h allocationRegulating the sending rate,6.4 Congestion Control,6.4.1 Desirable Bandwidth Allocation(1),(a)Goodput and(b)delay as a function of offered load,Efficiency allocation:to use all of the available network capacityPower=load(goodput)/delay,Fairness:how to divide bandwidth between sendersMax-

33、min Fairness allocationIf the bandwidth given to one flow cannot be increased without decreasing the bandwidth given to another 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,Con

34、vergenceTo converge quickly to the ideal operating point,6.4.2 Regulating the Sending Rate(1),The sending rate is limited by receiver and network,6.4.2 Regulating the Sending Rate(2),The form of the feedback returned by the networkExplicit or implicitPrecise or impreciseSome congestion control proto

35、cols,Additive Increase Multiplicative Decrease(AIMD)control law.,User 1s allocation,User 2s allocation,6.4.2 Regulating the Sending Rate(3),2023/1/9,52,6.4.3 TCP Congestion Control(1),Congestion Window in TCP TahoeSlow start followed by additive increase,6.4.3 TCP Congestion Control(2),Fast recovery

36、 and the sawtooth pattern of TCP Reno.,2023/1/9,54,6.4.4 Wireless Networks,Packet loss,a congestion signal or transmission errors?Some wireless links have a long round-trip times,such as satellites.Wireless links have variable capacity.,2023/1/9,55,6.5 The Internet Transport Protocols:TCP*,Introduct

37、ion to TCPThe TCP Service ModelThe TCP ProtocolThe TCP Segment HeaderTCP Connection EstablishmentTCP Connection ReleaseTCP Connection Management ModelingTCP Transmission PolicyTCP Congestion ControlTCP Timer ManagementWireless TCP and UDPTransactional TCP,2023/1/9,56,6.6 Performance Issues,Performan

38、ce Problems in Computer NetworksNetwork Performance MeasurementSystem Design for Better PerformanceFast TPDU ProcessingProtocols for future high-performance networks,2023/1/9,57,Congestion,caused by resource overloadsStructural resource imbalanceSynchronous overloads Poor system tuningIncorrect time

39、outs settingBandwidth-delay productThe window must be at least as large as the bandwidth-delay productTime-critical applications,6.6.1 Performance Problems in Computer Networks(1),2023/1/9,58,6.6.1 Performance Problems in Computer Networks(2),The bandwidth-delay product The state of transmitting(a)A

40、t t=0(b)After 500 sec(c)After 20 msec(d)after 40 msec.,2023/1/9,59,6.6.2 Network Performance Measurement(1),The basic loop for improving network performance.Measure relevant network parameters.how long a activity takeshow often some event has happened the amount of somethingTry to understand what is

41、 going on.Change one parameter.,2023/1/9,60,When measuring network performance,pay attention to:Sample size is large enoughSamples are representativeBe careful when using a coarse-grained clockNothing unexpected is going on during your testsCaching can wreak havoc with measurementsUnderstand what yo

42、u are measuringBe careful about extrapolating the results,6.6.2 Network Performance Measurement(2),2023/1/9,61,6.6.3 System Design for Better Performance,Rules:CPU speed is more important than network speed.Reduce packet count to reduce software overhead.Minimize context switches.Minimize copying.Bu

43、y more bandwidth but not lower delay.Avoiding congestion is better than recovering from it.Avoid timeouts.,2023/1/9,62,6.6.4 Fast TPDU Processing(1)*,The fast path from sender to receiver is shown with a heavy line.The processing steps on this path are shaded.,2023/1/9,63,6.6.4 Fast TPDU Processing(

44、2)*,(a)TCP header.(b)IP header.In both cases,the shaded fields are taken from the prototype without change.,2023/1/9,64,6.6.4 Fast TPDU Processing(3),A timing wheel.,2023/1/9,65,6.6.5 Protocols for Gigabit Networks(1),Using 32-bit sequence numbers will fail.Communication speeds have improved much fa

45、ster than computing speeds.Go back n protocol performs poorlyDelay limited rather than bandwidth limited in that long gigabit lines,2023/1/9,66,6.6.5 Protocols for Gigabit Networks(2),Time to transfer and acknowledge a 1-megabit file over a 4000-km line.,2023/1/9,67,Some ways to deal with the proble

46、msDesign for speed,not for bandwidth optimization To build fast network interfaces in hardware To avoid feedbackThe header should contain as few fields as possible,to reduce processing time The header and data should be separately checksummed The maximum data size should be large The protocol softwareTo concentrate on the successful case To minimize copying time,6.6.5 Protocols for Gigabit Networks(3),

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 生活休闲 > 在线阅读


备案号:宁ICP备20000045号-2

经营许可证:宁B2-20210002

宁公网安备 64010402000987号