IP header: The highest bit at 0bit, the lowest bit at 31bit, transmission time every 8bit transmission, become the network byte sequence
4bit protocol version: typically 4
4bit Header Length: The IP header length is the number of the first to occupy 32bit, the longest is 15*4=60 bytes, the general value is 5, so the value of the front 8bit is usually 0x45
8bit Service Type: 3bit priority subfield +4bit TOS subfield and 1bit 0.4bit sub-fields represent: Minimum delay, maximum throughput, maximum reliability, minimum cost
Total length of 16bit: is the number of 1byte, the IP datagram length can be up to 65,535 bytes, but generally produce shards, the value will vary with
16bit identification: Identifies each datagram sent by the host, each sending a message its value is added 1
The 3bit flag field:
13bit chip Offset: The above 3 kinds are used in the generation of shards
8bit lifetime: The TTL represents the number of routers that can pass through a router, whose value is reduced by 1,ttl to 0 o'clock, datagrams discarded, and ICMP packet notification hosts are sent
8bit protocol: Identify which protocol sends data to IP when one level is up (ICMP,IGMP,TCP,UDP)
16bit of the first Test and: The calculation of IP datagram test and, firstly set to 0, the header of every 16bit binary inverse code summation, the results exist 16-bit inspection and in, the receiver of the IP header and another anti-code summation (including the test and itself), if 1, indicating that the datagram transmission is correct
32bit Source IP Address:
32bit Destination IP Address:
IP Routing options:
Each entry in the routing table contains the following information:
1: The destination IP address, if the host address bit has a non 0, is a full host address, if the host bit is not 0, then a network address (by the flag field specified type)
2: Next stop (or next hop) router IP address, or directly connected network IP address: (Specified type by flag field)
3: Flag: A flag indicating whether the destination IP address is a network address or a host address, and another flag indicating if the next station router is the next station router or a directly connected network interface.
4: Specify a network interface for the transmission of datagrams
IP Routing Features:
1: Search the routing table, look for a table with the destination IP exactly match, find the message sent to the specified next station route or directly connected network interface (depending on the flag field)
2: Search the routing table, look for and destination IP network number matching table, find the message sent to the specified next station route or directly connected network interface (depending on the flag field), at this time all the hosts on the destination network can be disposed of by this table
3: Search the routing table for the default router
By setting a subnet mask, you can differentiate between the next station router being in the same subnet or being forwarded through the slip link. Typically, the subnet mask is 255.255.255.0, when the subnet mask is set to 255.255.255.192, the first 11 bits are the subnet number. Specify the subnet number after 3 bits for 0x001 when the data through the subnet of the host forwarding, the subnet number after 3 bits is 0x010 when the data through the Slip link forwarding, to avoid the host across different networks
IP: Internet Protocol