2009年4月9日星期四

IP protocol

IP protocol is part of the Internet layer of the TCP/IP protocol suite. It is one of the most important Internet protocols because it allows the development and transport of IP datagrams (data packets), without however ensuring their "delivery". In reality, IP protocol processes IP datagrams independently from each other by defining their representation, routing and forwarding.
IP protocol determines the recipient of the message using 3 fields:
The IP address field: machine address
The subnet mask field: a subnet mask enables the IP protocol to establish the part of the IP address which relates to the network
The default gateway field: enables the Internet protocol to know which machine to deliver a datagram to if ever the destination machine is not on the local area network.


Version (4 bits): this is the version of IP protocol being used (currently version 4 IPv4 is being used) in order to verify the validity of the datagram. It is coded over 4 bits.
Header length or IHL for Internet Header Length (4 bits): this is the number of 32 bit words making up the header (NB: the minimum value is 5). This field is coded over 4 bits.
Service type (8 bits): indicates the way in which the datagram must be processed.
Total length (16 bits): indicates the total size of the datagram in bytes. The size of this field being 2 bytes, the total size of the datagram cannot exceed 65536 bytes. Used jointly with the header size, this field makes it possible to determine where the data is located.
Identification, flags and fragment offsetting are fields which enable datagram fragmentation, they are explained below.
TTL or Time to Live (8 bits): this field specifies the maximum number of routers through which the datagram may pass. So this field is decremented with each passage through a router and when it reaches the critical value of 0, the router destroys the datagram. This prevents the network being overloaded with lost datagrams.
Protocol (8 bits): this field, in decimal notation, makes it possible to find out which protocol the datagram comes from.
ICMP: 1
IGMP: 2
TCP: 6
UDP: 17

Header checksum (16 bits): this field contains a value coded over 16 bits which enables the integrity of the header to be monitored in order to establish whether it has been altered during transmission. The checksum is the addition of one to all the 16 bit words of the header (checksum field excluded). This is done so that when the header fields are added together (inclusive checksum), a number with all the bits positioned at 1 is obtained.
Source IP address (32 bits): This field represents the IP address of the originator machine, it enables the recipient to respond.
Destination IP address (32 bits): IP address of the message recipient

没有评论:

发表评论