当前位置:网站首页>Interview focus - TCP protocol of transport layer
Interview focus - TCP protocol of transport layer
2022-07-27 15:43: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
边栏推荐
- 初识结构体
- HaoChen CAD building 2022 software installation package download and installation tutorial
- go语言慢速入门——go运算符
- Leetcode 191. number of 1 bits bit operation /easy
- Network equipment hard core technology insider router Chapter 16 dpdk and its prequel (I)
- Spark 3.0 DPP implementation logic
- JS operation DOM node
- Spark Bucket Table Join
- How to take satisfactory photos / videos from hololens
- Network equipment hard core technology insider router 19 dpdk (IV)
猜你喜欢

C语言:函数栈帧

Jump to the specified position when video continues playing

【剑指offer】面试题49:丑数

Spark 3.0 adaptive execution code implementation and data skew optimization

学习Parquet文件格式

NPM install error unable to access

Record record record

Complexity analysis

Spark Filter算子在Parquet文件上的下推
![[0 basic operations research] [super detail] column generation](/img/cd/f2521824c9ef6a50ec2be307c584ca.png)
[0 basic operations research] [super detail] column generation
随机推荐
Spark troubleshooting finishing
shell脚本读取文本中的redis命令批量插入redis
使用解构交换两个变量的值
Leetcode 240. search two-dimensional matrix II medium
multimap案例
【剑指offer】面试题46:把数字翻译成字符串——动态规划
【剑指offer】面试题50:第一个只出现一次的字符——哈希表查找
Pictures to be delivered
flutter —— 布局原理与约束
Fluent -- layout principle and constraints
Spark 任务Task调度异常分析
QT (IV) mixed development using code and UI files
Zhaoqi scientific innovation and entrepreneurship competition planning and undertaking organization, mass entrepreneurship and innovation platform, project landing and docking
Multi table query_ Sub query overview and multi table query_ Sub query situation 1 & situation 2 & situation 3
Leetcode 1143. dynamic programming of the longest common subsequence /medium
《吐血整理》C#一些常用的帮助类
C语言:扫雷小游戏
后台返回来的是这种数据,是什么格式啊
HaoChen CAD building 2022 software installation package download and installation tutorial
Use deconstruction to exchange the values of two variables

















































Mechanism to solve dead links 








Highlight the situation 2 











