IP packet

IP packets
to discuss the I nternet protocol processing more accurately, we have to define some terms. The figure shows the various
terms used to describe the data when the data transfer between the I nternet layer.
We transport protocol to IP data called packets. A typical packet contains a transport layer header and the number of applications
data. FIG transport protocol is UDP. Plus its own IP header to form a datagram packet headers before. The
fruit in the selected network, the length of the datagram is too large, put the IP datagram split into several slices, each slice contains its
own data section and the header of the original IP datagram. FIG showing a datagram is divided into three slices.
When submitted for transfer to the data link layer, an IP fragment or without a small fragmented IP datagrams is called divided
groups. The data link layer is preceded by its own packet header, and transmits the resulting frame.
IP only consider adding its own IP header itself neither checks nor changes to the message (unless fragmentation). FIG 8 - 8 substantially
illustrates the structure of the header portion of the IP.
FIG ip including the name of each member structure, N et / 3 IP header by the access structure.
47--67 because in the memory, the physical order of the bit fields in accordance with different machines and different compilers, so the # ifs
ensure structural members are arranged according to IP standard compiler. Thus, when N et / 3 ip put a covering structure in a memory when the IP packet to the structural member to be able to access the correct bit packet.

IP header contains the IP packet format, content, addressing, routing information, and slice.
IP packet format specified by the version ip _ v, typically 4; header length ip _ hl, typically metric units of 4 bytes; division
of length ip _ len bytes metric; p generated in the IP packet transmission protocol _ data; ip _ sum and is, inspection and
measurable change in the transmission header.
Standard IP header length is 20 bytes, ip _ hl must be greater than or equal to 5. Represent more than 5 IP options immediately
header after standard. The maximum value is 15 ip _ hl (24-1), to allow the option of up to 40 bytes (20 + 40 = 60). IP data
maximum packet length is 65535 (216-1) bytes because ip _ len is a 16 bit field. FIG whole configuration.

 

Guess you like

Origin www.cnblogs.com/momenglin/p/11441363.html