TCP/IP of IP datagram ip slicing ip slicing process
Main functions of the host, router network layer.
image.png
We will cover the format of ip datagrams in detail in this article First, the ip datagram is divided into two parts, the header and the data
image.png
We analyze in detail the meaning of each field in the header
image.png
The version number field takes up 4 bits: The version number of the IP protocol, usually with two values, if 4 means it is IPv4, 6 means it is IPv6 protocol. 4 → IPv4, 6 → IPv6
The initial length field occupies 4 bits: IP packet initial length, here it is in four bytes, if the value is 5, it means the initial length is 20 bytes (5×4), you can also see from the figure that the shortest ip initial length should be 20 bytes, excluding the variable part, the fixed part is 20 bytes.
The Type of Service (TOS) field takes up 8 bits: indicates what type of service is expected
The total length field takes up 16 bits: the total number of bytes of the IP packet (first + data)
Time to Live (TTL) field occupies 8 bits: the number of routers (or hop steps) an IP packet can pass through in the network
The protocol field occupies 8 bits: indicates which protocol packet is encapsulated in the IP packet
The first checksum field takes up 16 bits: enabling error detection of IP packet headers
The source IP address and destination IP address fields each occupy 32 bits: identify the IP address of the source host/router (network interface) that sent the packet and the destination host/router (network interface) that received the packet, respectively
The options field accounts for variable length, ranging from 1 to 40B: carries security, source selection paths, timestamps, and routing records ** Rarely used in practice **
The fill field accounts for a variable length, ranging from 0 to 3B: the purpose is to fill in the entire First part, conforming to 32-bit alignment, i.e. ensuring that the length of the first part is a multiple of 4 bytes
When introducing the ip datagram header fields, we ignored the introduction of the second line of fields because the fields in this line relate to the slicing of ip datagrams, and we will introduce the slicing of ip datagrams before we introduce the meaning of these fields.
Network Link Presence MTU (Maximum Transmission Unit)-The upper limit of data that can be encapsulated in a link layer data frame. ** Different MTUs for different links **.
image.png
Large IP packets can be "fragmented" when forwarded to smaller MTU links
The relevant fields in the IP header are used to identify the slice and to determine the relative order of the slice
image.png
image.png
The identifier field takes up 16 bits: identifies an IP group
The flag bit field takes up 3 bits.
image.png
The Slice Offset field takes up 13 bits: an IP packet slice encapsulates the original IP packet data relative offset
image.png
image.png
image.png
image.png