TCP/IP Protocol and Internet Protocol Suite

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.
insert image description here

1. Application layer

  • Provide inter-application communication capabilities
    insert image description here

2. Transport Layer

  • Provides host-to-host communication capabilities
    insert image description here

3. Internet Layer

  • Provides address-to-address communication capabilities
    insert image description here

4. Link Layer

  • Provides device-to-device communication capabilities
    insert image description here

TCP/IP packets

insert image description here
Complete TCP protocol header:
insert image description here

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
    insert image description here

three handshake

1. Why do you need a 3-way handshake to establish a connection?

insert image description here
abnormal situation:
insert image description here

2. TCP/IP three-way handshake

insert image description here

Transfer and process data order

insert image description here
insert image description here

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

insert image description here
data transmission:
insert image description here

wave (disconnect)

insert image description here
insert image description here

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)

Guess you like

Origin blog.csdn.net/baidu_39009276/article/details/125970642