? The transport layer is responsible for providing a reliable end-to-end connection between two application processes in a network
? Abstracting away the physical subnet
? Does not involve intermediate nodes
? Takes a network address (IP) and transport address (port) to ensure packets are received by the desired service
·传输层负责在网络中的两个应用进程之间提供可靠的端到端连接
·抽象出物理子网
·不涉及中间节点
·获取网络地址(IP)和传输地址(端口),以确保数据包被所需的服务接收
? Much of the functionality of the Transport and Datalink layers are the same but with any complex network between hosts abstracted away
? The Network layer is run by communications providers while the Transport layer is run by communicating hosts
·传输层和数据链路层的大部分功能都是相同的,但主机之间的任何复杂网络都被抽象掉了。
·网络层由通信提供商运行,而传输层由通信主机运行
? Well known ports are (usually) assigned to a standard service that a
system offers.
? In combination with an IP, the port is used to move packets from the network to the desired application layer service. An example might be
127.0.0.1:22 for SSH
? This combination of IP + port is called a socket
·众所周知的端口(通常)被分配给标准服务,系统报价。
·与IP结合,端口用于将数据包从网络移动到所需的应用层服务。一个例子可能是127.0.0.1:22用于SSH
·这种IP +端口的组合称为套接字
? Used to encapsulate transport layer data
? Passed to the Network layer, which is passed to the Datalink layer, which is passed to the Physical layer, sent across a network, then back up the stack and unwrapped
·用于封装传输层数据
·传递到网络层,然后传递到数据链路层,再传递到物理层,通过网络发送,然后备份堆栈并解包
? Unicast is a one-to-one transmission from one node in a network to another
? Multicast is a one-to-many transmission from one node in a network to many selected nodes
? Broadcast is a one-to-all transmission from one node to all other nodes on the network
·单播是从网络中的一个节点到另一个节点的一对一传输
·多播是从网络中的一个节点到许多选定节点的一对多传输
·广播是从网络上的一个节点到所有其他节点的一对多传输
? There are two commonly supported transport layer protocols
? Designed for “one request, one response” applications where setting up a connection is too much work
? An unreliable transport protocol
? UDP is not very popular but has its use cases
? “IP with extra header”
? Many systems reject UDP on non-standard ports by default
·专为“一个请求,一个响应”的应用程序,其中设置连接是太多的工作
·不可靠的传输协议
UDP不是很流行,但有它的用例
·“IP with extra header”
·许多系统默认拒绝非标准端口上的UDP
? Designed to be robust under unreliable internet conditions
? Provides end-to-end connection
? Utilises a 3-way handshake for connection
? Utilises a sliding window protocol for flow control
·在不可靠的互联网条件下保持稳定
·提供端到端连接
·使用3次握手进行连接
·利用滑动窗口协议进行流控制
The TCP 3-Way Handshake prevents duplicate connections,and allows the nodes to reject spurious packets
? TCP operates a sliding window mechanism where each acknowledge includes the amount of data the receiver is now willing to accept.
? A number of measures are commonly employed to ensure that the window size is roughly a multiple of the senders desired segment size.
? Different flow control schemes are one of the main differences between different versions of TCP used today (there are several).
TCP采用滑动窗口机制,其中每个确认包括接收方现在愿意接受的数据量。
·通常采用许多措施来确保窗口大小大致为所需分段大小的倍数。
不同的流量控制方案是当今使用的TCP不同版本之间的主要差异之一(有几个)。
? Sender sends 2048 bits to start
? Receiver’s buffer has capacity so it acks the send and sets the window
? Sender sends the same amount which fills receiver’s buffer
? Receiver acks the send and sets the window to 0 until the buffer is cleared
? Receivers buffer gets cleared 2048 bits so it acks the last send again and sends the new window
·UART发送2048位启动
·接收方的缓冲区有容量,因此它确认发送并设置窗口
·发送器发送与填充接收器的缓冲区相同的量
·接收方确认发送并将窗口设置为0,直到缓冲区被清除
·接收器缓冲区被清除2048位,因此它再次确认最后一次发送并发送新窗口
UDP
? Connectionless
? Unicast, Multicast, or Broadcast communication
? No guarantees (packets may be lost, out of order,dropped)
? Faster due to “fire and forget” model
TCP
? Connection oriented
? Unicast communication
? Data delivery guarantees
– Packets arrive in order
– Duplicate packets are rejected
– Dropped packets are retransmitted
? Slower due to connection overhead
? Can deal with congestion
UDP
·无连接
·单播、多播或广播通信
·无保证(数据包可能丢失、乱序、丢失)
·更快,因为“火灾和遗忘”模式
TCP
·面向连接
·单播通信
·数据传输保证
- 数据包按顺序到达
- 拒绝重复的数据包
- 重传丢弃的数据包
·由于连接开销而变慢
·可以处理拥塞
In order to deal with packet congestion,TCP utilises an algorithm called slow start
Another way TCP deals with congestion is by utilising a threshold