xxleyi / learning_list

聚集自己的学习笔记
11 stars 3 forks source link

Transport #99

Open xxleyi opened 5 years ago

xxleyi commented 5 years ago

TCP Service Model

image

xxleyi commented 5 years ago

image SYN is short for synchronize, because A also sends along the base number it will use to identify bytes in the byte stream. If it sends “0” then the numbers will start at zero. If it sends “1,000” then they will start at 1,000.

B responds with what we call a SYN + ACK. B signals an ACK because B is acknowledging A’s request and agreeing to establish the communication from A to B. The TCP layer at B also sends a SYN back to A to indicate that the TCP layer at B wants to establish a connection with the TCP layer at A. It sends a number too, indicating the starting number for the byte stream.

Finally, A responds with an ACK to indicate that it is accepting the request for communication in the reverse direction. The connection is now setup in both directions.

xxleyi commented 5 years ago

image

xxleyi commented 5 years ago

image image image image image

xxleyi commented 5 years ago

image

In summary, TCP provides in-order, reliable delivery of a stream of bytes between application processes.

xxleyi commented 5 years ago

UDP Service Model

image image image

DNS DHCP 是目前典型的使用 UDP 的应用服务,反倒是大部分视频服务不再使用 UDP,而是使用 TCP。

In summary, UDP provides a simpler, datagram delivery service between application processes.

xxleyi commented 5 years ago

ICMP Service Model

ICMP, the internet control message protocol, provides information about the network layer to end hosts and routers.

It sits above the IP layer and, therefore, strictly speaking, it's a transport layer mechanism. Although it's really there to serve the network layer.

The commonly used tools ping and traceroute both rely on ICMP, and I'd encourage you to try both of them out and play with them. They, they give you a huge amount of information about reachability and paths through the internet.

image

xxleyi commented 5 years ago

image image image image image