1 / 23

TCP

TCP. Today ’ s topics. TCP Functions provided by TCP TCP ’ s error recovery TCP ’ s congestion control TCP performance analysis Application Layer DNS FTP, Telnet, WWW browsing, email Intranet Extranet. TCP is a connection for the two end hosts.

macha
Télécharger la présentation

TCP

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. TCP

  2. Today’s topics • TCP • Functions provided by TCP • TCP’s error recovery • TCP’s congestion control • TCP performance analysis • Application Layer • DNS • FTP, Telnet, WWW browsing, email • Intranet Extranet

  3. TCP is a connection for the two end hosts Connectionless IP network (not aware of TCP connection) A B Full duplex connection TCP TCP

  4. Sender Receiver Data ACK Functions provided by TCP • Clocks • Buffer status • Sequencing packets • Duplication reminder • ACK generate • Retransmit lost packets (reliable service) • Adapt transmission speed (congestion control)

  5. Connection established

  6. TCP Sliding window Sender side (in bytes) ……17 18 19 20 21 22 23 24 25 26 27 ……

  7. Source Port # Destination P # Sequence # ACK # HL RES Flags Window Size Checksum URG Pointer Option DATA TCP header Flags: URG ACK PSH RST SYN FIN

  8. Source Port Destination Port Length Checksum Data UDP Header

  9. TCP Tunnel If the sender launcher a new packet every time it receives an ACK, then it will deliver data at exactly the same rate of the bottleneck link.

  10. TCP bandwidth as a function of Window Size and RTT • TCP BW= WS/RTT

  11. Delayed ACK • Suppose that “delayed ACK” is set. When does the receiver send ACK upon receiving a packet? • There is a data packet to send • 200ms expires • Receiver buffer increased by 2 segments (Thus one ACK is send for every other packet received) • Out of order packet received

  12. “Slow start” through the use of congestion window • Sender wants to be conservative, I.e. not to send a whole window-worth data: • At the beginning of a new connection • After a packet loss • This is called “slow start”, it uses a advertised window and congestion window.

  13. TCP throughput • TP = win/RTT, win=min (adv_win, cwnd) • RTT includes propagation and queueing delays • Bandwidth-Delay product: link_rate *2*propgation

  14. 传输层 • 传输层是计算机网络体系结构中承上启下的一层,起着屏蔽通信子网细节,向上提供通用的进程通信服务的作用。 • 传输层的作用是向信源机与信宿机提供端到端的数据传输,而传输层以下各层只提供相邻机器的点到点的传输。 • 传输层面临的主要问题是可靠性。面向连接的传输协议为此做了大量的工作,包括:传输层连接的管理、流控、崩溃恢复等。

  15. 传输层连接的管理:TCP端口 • TCP层与IP层在功能上的区别:TCP提供进程间通信的能力,而IP层不能。 • 协议端口:在进程通信的意义上,网络通信的最终地址就不仅仅是主机地址,还包括了可以描述进程的某种标识符。为了标识通信的进程,TCP/UDP提出了协议端口的概念。 • TCP/IP的端口分配方案:将端口分为两部分,一部分是保留端口,一部分是自由端口。其中保留端口之占很小的数目(小于256的端口号),以全局方式分配。也就是说,不同机器上同样的服务器,其端口号相同。自由端口占去全部端口的绝大部分,以本地方式分配。 • 进程标识:在Internet中,一个完整的进程需要一个五元组: 协议,本地地址,本地端口号,远地地址,远地端口号

  16. 传输层连接的管理:连接的建立、撤除 • 建立连接时,客户发送一个请求报文,服务器若愿意接受请求,则发送一个响应报文。 • 超时重传机制解决报文丢失。 • 对于确认与超时重传机制造成的延迟重复,传输层采用报文生存时间和三次握手机制。 CR(初始序号=X) 第一次 CR(初始序号=X) CC(初始序号=Y 确认X) CC(初始序号=Y 确认X) CR:连接请求 CC:连接确认 DATA:数据 第二次 DATA(序号=X 确认Y) 第三次 DATA(序号=X 确认Y)

  17. TCP(Transport Control Protocol) 有连接的流传输; 用于一次传输要交换大量报文的情形; 协议复杂,提供高可靠性服务。 UDP(User Datagram Protocol); 无连接的报文交换; 用于一次交换少量报文的情形; 相对简单,提供高效的服务; 传输层协议:TCP与UDP 两个协议共存于Internet中

  18. TCP协议 • TCP提供面向连接的流传输。 流:无报文丢失、重复、和失序的正确的数据序列。 • TCP的可靠性技术 1.确认与超时重传:TCP确认针对流中的字节。一般情况下,接收方确认已经正确收到的、最长的、连续的流前部,每个确认指出下一个希望接收的字节。 TCP流 0123456789101112131415 流前部 确认

  19. TCP可靠性技术 2. 流量控制:TCP采用可变窗口进行流控。一旦窗口前部报文得到确认,则窗口向前滑动。 3. 拥塞控制:基于滑动窗口协议,通过限制发送端向往罗注入报文的速率来达到控制拥塞的目的。 滑动窗口 1 2 3 4 5 6 7 8 9 10 11 下一个可发送报文 窗口当前位置

  20. TCP/IP协议簇及其依赖关系 用户 应用程序 NFS CMOT FTP SNMP CMOT XDR ASN.1 Rlogin ASN.1 SMTP TELNET DNS TFTP BOOTP RPC rsh TCP UDP IP ARP RARP 硬件协议(链路控制和介质访问协议) 硬件

  21. 下周的主题 • TCP/IP :拥塞控制等 • 布置规划作业

  22. TCP/IP发展的新动向 • TCP/IP的发展动力来自四个方面: • Internet负载和规模的增长,导致的问题包括寻径、管理和用户查询、服务查询等。 • 新应用的需求 • 新技术的出现:高速、低误码率通信技术的出现。 • 新的管理策略的出现:Internet的安全性、自动配置等问题。

More Related