In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
TCP/IP is the abbreviation of Transmission Control Protocol/Internet Protocol, which is the transmission control protocol / Internet protocol.
A) the protocol structure includes link layer, network layer, transport layer and application layer.
1) the link layer is mainly responsible for the characteristics of physical equipment and receiving data.
2) the network layer is mainly responsible for the ip header encapsulation of the transport layer data, sending the data to the network interface, and checking whether the ip header receives data or continues to transmit data.
3) the transport layer is responsible for 3 handshakes and 4 disconnections for the application.
A handshake: the client sends a serial number (for example, m) to the server.
Two-way handshake: the server receives (m) and sends the serial number (masking 1jinn).
Three-way handshake: the client receives (masks 1) and sends a serial number (nasty 1) to establish a connection.
Disconnect 4 times the same principle, why 4 times is because the client and the server have two connections.
4) the application layer is mainly responsible for the connection of the application.
two。 The data of the application program is processed by the application protocol to reach the head of the transport layer encapsulation tcp, to the network layer encapsulation ip header, and to the link layer.
IP header format
The 4 digits of the version number represent the ipv4 protocol, and the versions of both sides of the communication should be the same.
The unit of header length is 32bit, so the maximum length is 60 bytes. When the header length of an ip packet is not an integer multiple of 4 bytes, it must be filled with the final fill field.
The service type mainly defines the priority of the service.
The total length represents the length of the sum of the header and the data, in bytes, up to 65535.
The link layer has the largest unit of transmission, and when the data is larger than this unit, it needs to be segmented, and the value of this identification is copied to the representation field of all Datagram slices, and the identifier can indicate which packets are in one data.
The first identifier of the 3-bit mark is useless, the second bit indicates that if 1 means the data is not segmented, and the third bit indicates that 0 represents the last segment of the data.
The slice offset represents the position of the data segment in the data.
The number of times the time-to-live data passes through the route prevents an infinite loop, after which the value of the route is reduced by one, and the data is discarded at 0.
The protocol defines the type of upper layer protocol, and 6 represents the tcp protocol.
Checksum to check the correctness of the ip header.
32 options are optional and not fixed
Below the option is the fill, which completes the data by an integer multiple of 4 bytes.
TCP header
The Source Port host source port, and the source ip indicate the data return address.
Destination Port destination Port
The sequence number of the first byte of the Sequence Number data message
Acknowledgment Number wants to receive its own serial number first for the next piece of data.
Data Offset indicates the start of the data, in 4 bytes from the head of the tcp.
Reserved reserved area.
URG emergency bits, data should be delivered as soon as possible.
ACK confirms the bit, and 1 indicates that the data is valid.
PSH push bits, submit immediately.
PST reset bit, data transmission error, need to re-establish the connection.
SYN synchronization bits, synchronization sequence number when establishing a connection.
When the FIN terminates the bit, 1 indicates that the data transmission is complete and the connection is released.
The size of the Window receive window.
Checksum checksum, data correctness.
Urgent Pointer emergency pointer. Between the sequence number and the emergency pointer is emergency data, and after the pointer is normal data, provided that URG is 1.
The length of Options varies. The first byte defines the option type, 4 byte multiples.
Padding fills an integer with a tcp header length of 4 bytes.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.