当前位置:网站首页>Interview focus - TCP protocol of transport layer
Interview focus - TCP protocol of transport layer
2022-07-25 23:42:00 【Skinny monkey 117】
Catalog
TCP The mechanism provided ( Ensure reliability )
Wireshark Caught tools , demonstration TCP Three handshakes
Three handshake state transitions
You can view the TCP Connection ( understand )
1. Know the receiving ability of the object
2. Get the receiving ability of the other party
3. Control the sending volume —— Sliding window mechanism
The reason for byte stream orientation
Sticky packet problem caused by byte stream
TCP Concept
TCP:Transmission Control Protocol
The goal is :process to process Process to process
Ensure reliability , But not to ensure safety
What is reliability ?
1. TCP I will do my best , As far as possible Send data to the other party ; But there is no guarantee 100% You can send it to the other party .2. TCP When the data is not sent to the other party , Give the application layer a Error notification .
Application layer sends data , Or send it to the other party , Or you will know that the data is lost .3. TCP It can guarantee the receiver ( application layer ) Strictly follow the data at the time of sending Sequential reception .
4. TCP Protect data from unintentional damage (UDP This is also done ).
5. TCP Maintain the network quality as much as possible .
TCP The mechanism provided ( Ensure reliability )
About number
TCP Segment The two roles of
About retransmission
Packet loss occurred , How to retransmit ?
Fast retransmission
When a message segment is lost , The sender will always receive 1001 In this way ACK, It's like reminding the sender " I think
What I want is 1001" equally ;
If the sending host receives the same message three times in a row "1001" Such a response , The corresponding data will be 1001 -
2000 To resend ;
At this time, the receiver receives 1001 after , Return again ACK Namely 7001 了 ( because 2001 - 7000) The receiver
In fact, I have received it before , It is placed in the receive buffer of the receiving operating system kernel ;
This mechanism is called " High speed retransmission control "( Also called " Fast retransmission ").
Timeout time
TCP Of Header
TCP The buffer
TCP The connection of
TCP Connect (Connection) The concept of , And connection management
( A connected life = Creation at the beginning + For official use + The destruction )
Three handshakes
syn ack Sign a
Three complete handshakes
Wireshark Caught tools , demonstration TCP Three handshakes
4 Bit head length (header length)
Because the first may contain optional content , therefore TCP The length of the header is uncertain , If the header does not contain any optional fields, the length is 20 byte ,4 The maximum value that can be represented by the bit header length field is 1111, Turn into 10 Into the system for 15,15*4= 60, So the maximum length of the header is 60 byte . The head length is also called data offset , Because the header length actually indicates the starting offset of the data area in the message segment .
Three handshake state transitions
Summary of three handshakes
Four wave phase
Sign a :(FIN) Final/Finish
Active wave side : The party who actively disconnects
Passive wave side : Passively disconnected party
Simultaneous closure : Both sides take the initiative to wave their hands
The active waving party must be the active connecting party ? no !( Those who take the initiative to break up are not necessarily the people who took the initiative to pursue at that time )
Four wave state changes
![]()
CLOSE_WAIT state
TIME_WAIT state
Why keep ?
Examples of why to keep
A lot of TIME_WAIT What happened
Summary of four waves
TCP Exception in
Situation 1
Situation two
Situation three
Situation four
OS Is it hardware or software ?
OS It's software .
Software is a program , It's data + The instruction is to run in CPU On command , And the data to be processed by these instructions .
Mechanism to solve dead links
You can view the TCP Connection ( understand )
flow control
flow control
1. You need to know the receiving ability of the other party , It is better to perceive in real time .
2. Get the receiving ability of the other party -> Send traffic
3. What mechanism is used to control the sending volume
1. Know the receiving ability of the object
2. Get the receiving ability of the other party
3. Control the sending volume —— Sliding window mechanism
Highlight the situation 2
Highlight the situation 2
Sliding window mechanism
Congestion control
The reason for byte stream orientation
Sticky packet problem caused by byte stream
TCP Summary
UDP And TCP contrast
边栏推荐
- BI 系统中为什么会有很多快照表?
- Same origin strategy and cross domain
- About the foundation of fetch
- 【MUDUO】打包EventLoop和Thread
- [wechat applet] page navigation
- [test technology performance test LoadRunner] detailed explanation of common functions of LoadRunner
- Multimodal deep multi modal sets
- redis-扩展数据类型(跳跃表/BitMaps/HyperLogLog/GeoSpatial)
- Recommended system - an embedded learning framework for numerical features in CTR prediction
- Overview of MES system equipment management (Part 2)
猜你喜欢

ratio学习之ratio_add,ratio_subtract,ratio_multiply,ratio_divide的使用

Grain Academy p98 trample pit e.globalexceptionhandler: null

Regular expression (user name form verification / verification of landline number / regular replacement)

ArcGIS cuts TIF images (grid data) according to the vector range, merges shp files in batches, cuts vectors in the region according to the vector range, outputs the geographic coordinate system, conve

ABAP 代码中读取会计科目的字段状态(隐藏、可选、必输)

Qpprogressbar for QT style (QSS) application

numeric学习之iota,accumulate

Unexpected dubug tricks

Read the field status of account in ABAP code (hidden, optional, required)
![[testing technology automated testing pytest] basic summary of pytest](/img/30/7c632cd6ad93c9294745dda7642f17.png)
[testing technology automated testing pytest] basic summary of pytest
随机推荐
Generating random number random learning uniform_ int_ distribution,uniform_ real_ distribution
S4/HANA ME21N创建PO 输出控制消息按钮丢失解决方法(切换EDI 输出模式BRF+至NAST模式)
Mongodb update operator (modifier)
[intelligence question] interview intelligence question
热部署和热加载有什么区别?
Overview of MES system equipment management (Part 2)
Scroll series
Matchmaker's words
Which securities company should a novice choose to open an account? Is it safe?
Promise asynchronous callback function
Problem set
redis-扩展数据类型(跳跃表/BitMaps/HyperLogLog/GeoSpatial)
三板斧!助你成为优秀软件工程师
赋值时'1和'b1有什么区别
Optimize the browsing experience of yandere/konachan site with user scripts
十大排序之快速排序
Practical skills of easyexcel
BI 系统中为什么会有很多快照表?
152. 乘积最大子数组-动态规划
Serialize data type

















































Mechanism to solve dead links 








Highlight the situation 2 











