《IP网络技术基础ppt课件(英文).ppt》由会员分享,可在线阅读,更多相关《IP网络技术基础ppt课件(英文).ppt(41页珍藏版)》请在三一办公上搜索。
1、1,End-to-End Protocol,Outline Simple Demultiplexer (UDP) Reliable Byte-Stream (TCP)Connection Establishment/TerminationSliding Window Revisited Flow Control,2,The Layered Network Stack,Physical Layer,Application Layer,Transport Layer (TCP/UDP),Network Layer (IP),Data Link Layer,Internet Stack,3,End-
2、to-End Protocols,Underlying best-effort networkdrop messagesre-orders messagesdelivers duplicate copies of a given messagelimits messages to some finite sizedelivers messages after an arbitrarily long delayCommon end-to-end servicesguarantee message deliverydeliver messages in the same order they ar
3、e sentdeliver at most one copy of each messagesupport arbitrarily large messagessupport synchronizationallow the receiver to flow control the sendersupport multiple application processes on each host,4,Transport layer uses the network layer, to send and receive data.Transport Protocol Data Unit (TPD
4、U)Each layer adds its partTCP segment, IP packet, Data link frame,Overview of Transport Layer,5,Overview of Transport Layer(cont.),6,Two types of transport servicesconnection-orientedconnectionless,End-to-End Protocols,7,Simple Demultiplexor (UDP),Transport protocol above IPsimply passes IP through
5、to the upper (application) layersUnreliable and unordered datagram serviceAdds multiplexingNo flow controlEndpoints identified by portsservers have well-known portsFTP - 21, Telnet - 23, http - 80, pop - 110, DNS - 53,8,UDP “Features”,Gives apps the option to send packets unreliablyUseful for multic
6、ast appsLow delay transmission for interactive text/audio/videoMinimal connection state: “connectionless”Minimal connection setup timeNo congestion control blast awayBuild own application-level protocol on top of UDP,9,UDP,UDP Header:Only 8 bytes! (vs. IP 20 bytes header)Source port for UDP sending
7、processDest port for UDP receiving processLength in bytes of UDP header + payloadChecksum over UDP header + payload,Source Port #,Dest. Port #,UDP length,Checksum,16,32,UDP payload data,UDP payload,IPhdr,UDPhdr,Error Detection,10,Error Detection,Why is there error detection in the transport layer gi
8、ven that the same function is provided by the data link layerReliable transmission along each link is still no guarantee of error-free transmission between the source and the destination.,11,Error Detection (cont.),12,TCP Overview,Connection-orientedTCP provides:Reliable delivery of packets,Stream o
9、r in-order delivery,Full duplexFlow control: keep sender from overrunning receiverCongestion control: keep sender from overrunning network,13,Transport Control Protocol,Provides a reliable end-to-end byte stream over an unreliable network such as IP.Provides connection oriented user-to-user servicec
10、onnection managementNo intermediate nodes are involved in connection establishment.TCP service is obtained by having both the sender and receiver create end points called sockets.Each socket is associated (bound) withIP address of the host16-bit number local to the host called a port,14,Transport Co
11、ntrol Protocol(cont.),15,Data Link Versus Transport,Potentially connects many different hostsneed explicit connection establishment and termination Potentially different RTTneed adaptive timeout mechanismPotentially long delay in networkneed to be prepared for arrival of very old packetsPotentially
12、different capacity at destination need to accommodate different node capacityPotentially different network capacityneed to be prepared for network congestion,16,TCP Segment,A segment consists of a fixed 20-byte header (plus an optional part) followed by zero or more data bytes,17,TCP Segment (cont.)
13、,Source port (16 bits) Specifies the application sending the segment.,18,TCP Segment (cont.),Destination port (16 bits) Identifies the application to which the segment is sent.,19,TCP Segment (cont.),Sequence number (32 bits) Contains the sequence number of the first byte of data.,20,TCP Segment (co
14、nt.),Acknowledgment number (32 bits) Contains the byte sequence number which the receiving TCP entity expects to receive next.,21,TCP Segment (cont.),Header length (4 bits): the size of the TCP header.,22,TCP Segment (cont.),Flags (6 bits) Control functions for establishing and removing connections
15、etc. Include URG, ACK, PSH, RST, SYN, FIN.,23,TCP Segment (cont.),Window (16 bits) Tells the receiving TCP entity how many data bytes the sending TCP entity can accept.,24,TCP Segment (cont.),Checksum (16 bits) Used for transport layer error detection. pseudo header(12Bytes) + TCP header + data,25,T
16、CP Segment (cont.),Urgent pointer (16 bits) Signal the receiver to deliver the data to the higher layer as quickly as possible.,26,TCP Segment (cont.),Options/padding - maximum segment size,27,Segment Format (cont),Each connection identified with 4-tuple:(SrcPort, SrcIPAddr, DsrPort, DstIPAddr)Slidi
17、ng window + flow controlacknowledgment, SequenceNum, AdvertisedWinow,28,Connection Establishment,Active participant,(client),Passive participant,(server),SYN, SequenceNum =,x,SYN + ACK, SequenceNum =,y,ACK, Acknowledgment =,y,+,1,Acknowledgment =,x,+,1,SequenceNum =x+1,29,Connection Termination,30,S
18、tate Transition Diagram,31,Sliding Window Revisited,Sending sideLastByteAcked = LastByteSentLastByteSent = LastByteWrittenbuffer bytes between LastByteAcked and LastByteWritten,Receiving sideLastByteRead NextByteExpectedNextByteExpected = LastByteRcvd +1buffer bytes between NextByteRead and LastByte
19、Rcvd,32,Flow Control,Send buffer size: MaxSendBufferReceive buffer size: MaxRcvBufferReceiving sideLastByteRcvd - LastByteRead MaxSenderBufferAlways send ACK in response to arriving data segmentPersist when AdvertisedWindow = 0,33,Flow Control,Transport protocols resemble the data link protocolsFlow
20、 control, error control, sequencingA sliding window is used for flow controlDifferencesA router usually has only a few links to others, while a transport entity may have numerous connections.This difference makes it impractical to implement a data link buffering strategy in the transport layer.The r
21、eceiver may not dedicate specific buffers to specific connections.,34,Flow Control,Dynamic buffer management - credit mechanismInitially, the sender requests a certain number of buffers (credit), based on its perceived needs.The receiver grants as many of these as it can afford.Every time the sender
22、 transmits a TPDU, it decreases its allocation (credit), stopping when the allocation (credit) reaches zero.The receiver returns both acknowledgments and buffer allocations (credit).,35,Move forward by ACK,100,200,300,400,500,600,700,800,900,101,201,301,401,501,601,701,801,1,Data that can be sent,不可
23、发送,Sender wants to send 900 bytes 9 segments(100 bytes each segment). The sender window is 500 bytes.Sender can move the window forward by the ACK from the receiver. In addition, the sender maintain a pointer to identify the data which have been sent.,Data that cannot be sent,36,100,200,300,400,500,
24、600,700,800,900,101,201,301,401,501,601,701,801,1,不可发送,100,200,300,400,500,600,700,800,900,101,201,301,401,501,601,701,801,1,发送窗口,可发送,不可发送,Send window moves forward,The sender have send 400 bytes. And the sender only receive the ACK of the top 200 bytes. The window is 500.So the sender can still sen
25、d 300 bytes.,Data that can be sent,Move forward by ACK,500,600,700,800,900,501,601,701,801,不可发送,Data that cannot be sent,Data that can be sent,Data that cannot be sent,37,100,200,300,400,500,600,700,800,900,101,201,301,401,501,601,701,801,1,pointer,The sender receive the ACK of the following 200 byt
26、es. The window is changed to 400.So the sender can send 400 bytes.,100,200,300,400,500,600,700,800,900,101,201,301,401,501,601,701,801,1,不可发送,Send window moves forward,Data that can be sent,Data that cannot be sent,Data that can be sent,Data that cannot be sent,38,Flow Control (cont.) - Example,Assu
27、me each entity agree to a credit of 200 bytesAssume entities send 100 bytes in each TPDU,39,Protection Against Wrap Around,32-bit SequenceNumBandwidthTime Until Wrap AroundT1 (1.5 Mbps)6.4 hoursEthernet (10 Mbps)57 minutesT3 (45 Mbps)13 minutesFDDI (100 Mbps)6 minutesSTS-3 (155 Mbps)4 minutesSTS-12
28、(622 Mbps)55 secondsSTS-24 (1.2 Gbps)28 seconds,40,Keeping the Pipe Full,16-bit AdvertisedWindow (the max win.=64KB)BandwidthDelay x Bandwidth ProductT1 (1.5 Mbps)18KBEthernet (10 Mbps)122KBT3 (45 Mbps)549KBFDDI (100 Mbps)1.2MBSTS-3 (155 Mbps)1.8MBSTS-12 (622 Mbps)7.4MBSTS-24 (1.2 Gbps)14.8MB assuming 100ms RTT,41,HOMEWORK,Exercises 10Review question1. How does TCP establish a connection?2. Give the UDP segment format. Required Reading Stallings chapter 5.1, 5.2,