Monday, October 1, 2012

Monday, October 01, 2012 -

Draw IP datagram format and explain about its each field briefly.

The IP datagram header has a minimum length of 20 octets, as illustrated in Fig.
Fig  IP Datagram


VERS: The field contains the IP protocol version. The current version is 4. Version 5 is an experimental version. Version 6 is the version for IPv6 .
HLEN:
The length of the IP header counted in 32-bit quantities. This does not include the data field. Service Type: The service type is an indication of the quality of service requested for this IP datagram. This field contains the information illustrated in Fig
Fig  IP Service Type
Where:
Precedence: This field specifies the nature and priority of the datagram:
• 000: Routine
• 001: Priority
• 010: Immediate
• 011: Flash
• 100: Flash override
• 101: Critical
• 110: Internetwork control
• 111: Network control
TOS: Specifies the type of service value:
• 1000: Minimize delay
• 0100: Maximize throughput
• 0010: Maximize reliability
• 0001: Minimize monetary cost
• 0000: Normal service
MBZ: Reserved for future use.
Total Length: The total length of the datagram, header and data.
Identification: A unique number assigned by the sender to aid in reassembling a fragmented datagram.
Each fragment of a datagram has the same identification number.
Flags: This field contains control flags illustrated in Fig
Fig  IP Flags
Where:
0: Reserved, must be zero.
DF (Do not Fragment): 0 means allow fragmentation; 1 means do not allow fragmentation.
MF (More Fragments): 0 means that this is the last fragment of the datagram; 1 means that additional
fragments will follow.
Fragment Offset: This is used to aid the reassembly of the full datagram. The value in this field
contains the number of 64-bit segments (header bytes are not counted) contained in earlier fragments. If
this is the first (or only) fragment, this field contains a value of zero.
Time to Live: This field specifies the time (in seconds) the datagram is allowed to travel. Theoretically,
each router processing this datagram is supposed to subtract its processing time from this field. In
practise, a router processes the datagram in less than 1 second. Therefore, the router subtracts one from
the value in this field. The TTL becomes a hop-count metric rather than a time metric. When the value
reaches zero, it is assumed that this datagram has been traveling in a closed loop and is discarded. The
initial value should be set by the higher-level protocol that creates the datagram.
Protocol Number: This field indicates the higher-level protocol to which IP
should deliver the data in this datagram. These include:
0: Reserved
1: Internet Control Message Protocol (ICMP)
2: Internet Group Management Protocol (IGMP)
3: Gateway-to-Gateway Protocol (GGP)
4: IP (IP encapsulation)
5: Stream
6: Transmission Control Protocol (TCP)
8: Exterior Gateway Protocol (EGP)
9: Interior Gateway Protocol (IGP)
17: User Datagram Protocol (UDP)
41:Simple Internet Protocol (SIP)
50: SIPP Encap Security Payload (ESP)
51: SIPP Authentication Header (AH)
89: Open Shortest Path First (OSPF) IGP
Header Checksum: This field is a checksum for the information contained in the header. If the header
checksum does not match the contents, the datagram is discarded.
Source IP Address: The 32-bit IP address of the host sending this datagram.
Destination IP Address: The 32-bit IP address of the destination host for this datagram.
Options: An IP implementation is not required to be capable of generating options in a datagram.
However, all IP implementations are required to be able to process datagrams containing options. The Options field is variable in length (there can be zero or more options). There are two option formats. The format for each is dependent on the value of the option number found in the first octet: A type octet alone is illustrated in Fig.
Where:
fc (Flag copy): This field indicates whether (1) or not (0) the option field is
copied when the datagram is fragmented.
class: The option class is a 2-bit unsigned integer:
• 0: Control
• 1: Reserved
• 2: Debugging and measurement
• 3: Reserved
option number: The option number is a 5-bit unsigned integer:
• 0: End of option list. It has a class of 0, the fc bit is set to zero, and it has no length byte or data. That
is, the option list is terminated by a X'00' byte. It is only required if the IP header length (which is a
multiple of 4 bytes) does not match the actual length of the options.
• 1: No operation. It has a class of 0, the fc bit is not set, and there is no length byte or data. It can be
used to align fields in the datagram.
• 2: Security. It has a class of 0, the fc bit is set, and there is a length byte with a value of 11 and 8 bytes
of data). It is used for security information needed by U.S.
• 3: Loose source routing. It has a class of 0, the fc bit is set, and there is a variable length data field.
• 4: Internet time stamp. It has a class of 2, the fc bit is not set, and there is a variable length data field.
The total length can be up to 40 bytes. We discuss this option in more detail later.
• 7: Record route. It has a class of 0, the fc bit is not set, and there is a variable length data field.
• 8: Stream ID. It has a class of 0, the fc bit is set, and there is a length byte with a value of 4 and one
data byte. It is used with the SATNET system.
• 9: Strict source routing. It has a class of 0, the fc bit is set, and there is a variable length data field. We
discuss this option in more detail later.
length: This field counts the length (in octets) of the option, including the type and length fields.
option data: This field contains data relevant to the specific option.
Padding: If an option is used, the datagram is padded with all-zero octets up to the next 32-bit boundary.
Data: The data contained in the datagram. It is passed to the higher-level protocol specified in the protocol field.