当前位置:网站首页>Tcp/udp Fundamentals

Tcp/udp Fundamentals

2022-06-23 19:41:00 51CTO

port

Distinguish between different applications of a computer

Each application needs to go through a unique port to get in and out of the network Identify which application should handle the data through the port number

The server is usually a fixed port Most clients are 1024 The above random ports

TCP encapsulation

TCP/UDP The basic principle _ Applications

Sequence Number Serial number

Acknowledgement Number Confirmation no.

Acknowledgement mechanism

Seq = Last time ACK

Ack = Last time seq+ length

If not received Or receive incomplete Will be sent again Ack Request the other party to resend [seq unchanged Ack

End of the mandatory RST Set to 1 Forcibly interrupt TCP Connect

URG Emergency switch Indicates that the data segment has urgent data to be forwarded

URG Pointer Pointer to an emergency Surface data address

Data Offset It's a Offset . The reason this quantity exists is TCP Header The length of the part is variable , So you need a number to describe which byte the data starts from .

windows Window mechanism The sliding window By announcing the local receiving capacity Achieve flow control

Checksum Check sequence

OPtion Expand Padding fill

High bandwidth consumption Large transmission delay

Applicable to high data integrity Scenarios that do not require high transmission delay


UDP

TCP/UDP The basic principle _ data _02


Low bandwidth usage Low transmission delay There is no reliability mechanism

High requirements for transmission delay But the data integrity requirements are low

原网站

版权声明
本文为[51CTO]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/174/202206231833087620.html