Network 3: Transport Layer

  Some of the primary issues regarding the transport layer are listed in the following picture.

  In Internet, there are two dominant transport layer protocols. One is User Datagram Protocol (UDP), an unreliable service that can only implement multiplexing/demultiplexing as well as bit error control (checksum). We are going to focus on the other one, Transmission Control Protocol (TCP), which is a reliable service that can implement effective errror control, flow control and congestion control.

  由于 TCP 要提供比 UDP 更多的服务,故 TCP 段头的内容也要比 UDP 段头更丰富。

  TCP 协议是面向连接的(connection-oriented)。一个 TCP 连接由两个端口(IP addr + port #)共同决定。同一时间,一个 TCP 端口只能被一个进程独享,但一个进程可以用同一 TCP 端口建立多个连接。TCP 连接的建立和释放采用 three-way handshaking 的方式,状态图如下(引自《TCP/IP详解卷》):

  The TCP reliable data transfer adopts a hybrid of Go-Back-N and Selective Repeat, and is based on cumulative and piggyback ACKs as well as a single retransmission timer. TCP retransmissions are triggered by either timeout events, or 3 duplicate ACKs (fast retransmission), and everytime only ONE segment will be retransmitted. The TCP timeout value is caculated dynamically according to the following Jacobson‘s Algorithm:

    $\text{RTT}=7/8\cdot\text{RTT}+1/8\cdot \text{measure}$

    $\text{RTTVAR}=3/4\cdot \text{RTTVAR}+1/4\cdot|\text{ measure}-\text{RTT }|$

    $\text{RTO}=\text{RTT}+4\cdot \text{RTTVAR}$

  One should note that, according to Karn‘s Algorithm, RTT and RTTVAR are not updated when a timeout and retransmission occurs, and every time a timeout and retransmission occurs the value of RTO will be doubled (until the segment can get through).

  As regards the TCP flow control, a receiver can only maintain a single buffer pool shared by all connections, and it will advertise to a sender its current window size in the TCP header. A sender who has got a zero window size announcement will not send another segment unless it is urgent data or a request for another window size announcement.

  Rano is a well-known TCP congestion control algorithm derived from Tahoe, which adjusts the congestion window size conforming to AIMD (Additive Increase, Multiplicative Decrease):

  (1) initially, a threshold is set as 64KB, and congWin grows from zero;

  (2) when congWin<threshold, the sender stays in slow-start phase, and the window grows exponentially;

  (3) when congWin>threshold, the sender stays in congestion-avoidance phase, and the window grows linearly;

  (4) when timeout occurs, threshold will be set to congWin/2congWin will be set to 1 MSS, and the sender returns to slow-start phase after a fast retransmission;

  (5) when a triple duplicate ACK occurs, similar to a timeout event, but the discrepancy is that both threshold and congWin will be set to congWin/2, which is called fast recovery.

  A substitue for Rano is TCP Westwood, which estimates available bandwidth according to the arrival rate of ACKs, and use the estimated bandwidth to set threshold when a timeout occurs.

References:

  1. Kurose, James F., Keith W. Ross. Computer Networking: a top-down approach[M]. 北京:高等教育出版社, 2009-08

  2. Tanenbaum, Andrew S., David J. Wetherall. Computer Networks 5th edition[M]. 北京:清华大学出版社, 2011

时间: 2024-10-10 01:04:45

Network 3: Transport Layer的相关文章

Transport layer and Network layer

http://stackoverflow.com/questions/13333794/networking-difference-between-transport-layer-and-networking-layer Transport Layer: The fourth and “middle” layer of the OSI Reference Model protocol stack is the transport layer. I consider the transport l

[Computer Networking] {CMU14-740} Lecture 9: The Transport Layer; UDP

This is the first lecture in a series exploring the Transport layer. This layer is responsible for logical communication between applications running on (usually) different hosts. As such, it is designed with careful consideration for the requirement

网络安全——传输层安全协议(Transport Layer Security) TLS/SSL

网络安全——传输层安全协议(Transport Layer Security) TLS/SSL 1. 综述 TLS/SSL用于认证和加密. TLS/SSL的核心在于公钥和私钥,公钥在安全证书中. 公钥和私钥成对出现,通信个体的公钥公开,私钥则严格保密,只有自己知道:有下面的特性: 1. 公钥加密的数据只能由私钥解密: 2. 私钥加密的数据只能由公钥解密. A用私钥加密后,其他人尝试用A的公钥解密可以判断是否是A发出的数据:发给A的数据用A的公钥加密,则只有A能读取. 2. 对称密码和非对称密码

Host Controller transport layer and AMPs

The logical Host Controller Interface does not consider multiplexing/routing over the Host Controller Transport Layer(s). The Host designer must consider this in deciding which of the multiple controller configurations it will support. Each logical A

SSL/TLS(Secure Sockets Layer / Transport Layer Security)

# 协议概述 缩写 名称 默认端口 安全策略 描述 HTTP Hyper Text Transfer Protocol(超文本传输协议) TCP80 HTTP 协议是明文的,传输内容会被嗅探和篡改. 客户端浏览器或其他程序与Web服务器之间的应用层通信协议 SSL/TLS Secure Sockets Layer(安全套接层)Transport Layer Security(传输层安全) TCP443 1)认证用户和服务器,确保数据发送到正确的客户机和服务器: 2)加密数据以防止数据中途被窃取:

DataComm Review NetworkLayer Part1

Network and transport layer Part1 Features of transport layer and network layer transport layer: end-to-end channel; reliable communication(segmenting + ARQ): addressing of individual applications(ports): network layer: addressing and routing of pack

负载均衡汇总

负载均衡学习笔记 一.总体介绍 1.1 定义 1.1.1 Load balancing Load Balancing is the process of distributing data across disparate services to provide redundancy, reliability, and improve performance. The entire intent of load balancing is to create a system that virtu

[Network]Application Layer

1 Principles of Network Applications 1.1 Application Architectures Client-Server Peer-to-Peer Hybird of C/S and P2P --Skype client-server: find the address of the remote client client-client: direct communication --Instant messaging Similar with Skyp

[Network]Network Layer

1 Introduction 1.1 Forwarding Move pkts from router's input to appropriate router output. 1.2 Routing The trip from source to destination 1.3 Service Model This is similar with other layers. The services consist of short delay, bandwidth or some thin