Introduction to TCP/IP Protocol Group
The TCP/IP protocol group is also called the Internet Protocol Suite (Internet Protocol Suite), similar to the OSI model, a conceptual model of a network protocol.
1. Application layer
- Provide inter-application communication capabilities
2. Transport Layer
- Provides host-to-host communication capabilities
3. Internet Layer
- Provides address-to-address communication capabilities
4. Link Layer
- Provides device-to-device communication capabilities
TCP/IP packets
Complete TCP protocol header:
TCP protocol packet
- Each packet is called a TCP segment (TCP Segment)
- Header is used to describe the transmission behavior (such as source port, destination port, etc.)
- Header is followed by several byte data, each byte has its own serial number
three handshake
1. Why do you need a 3-way handshake to establish a connection?
abnormal situation:
2. TCP/IP three-way handshake
Transfer and process data order
Determining the order of a message: absolute time
- Using sending and receiving time: how to solve the server time difference?
- Use self-incrementing serial number: Can ABAB type session be resolved? How to solve the A-(AB)-B type conversation
The processing method of the TCP/IP protocol: the absolute order of the message is described by the pair of tuples (SEQ, ACK)
- SEQ(Sequence): How many bytes were sent before the message was sent
- ACK (Acknowledge): How many bytes were received before the message was sent
data transmission:
wave (disconnect)
Summary and reflection
Principle of Minimization: If there is not enough to do, there is no need to layer
Think about the difference between a computer conversation and a human conversation? Why is there a three-way handshake?
The TCP protocol provides a perfect solution to the sequence problem in the network, and this method can be migrated. (The value of learning algorithms)