i) Which field gives no. of hops count?
Hop count: This is an 8-bit field defining the maximum number of hops the packet can travel.
ii) What is the minimum and maximum length of HLEN?
Header length (HLEN): This 4-bit field defines the total length of the datagram header in 4-byte words. This field is needed because the length of the header is variable (between 20 and 60 bytes). When there are no options, the header length is 20 bytes, and the value of this field is 5 (5× 4= 20). When the option field is at its maximum size, the value of this field is 15 (15× 4= 60).
iii) What are the differentiate services explain TOS bits?
Service type: In the original design of IP header, this field was referred to as type of service (TOS), which defined how the datagram should be handled. Part of the field was used to define the precedence of the datagram; the rest defined the type of service (low delay, high throughput, and so on). IETF has changed the interpretation of this 8-bit field. This field now defines a set of differentiated services. The new interpretation is shown in Figure2.
In this interpretation, the first 6 bits make up the codepoint subfield and the last 2 bits are not used. The codepoint subfield can be used in two different ways.
c. When the 3 right-most bits are 0s, the 3 left-most bits are interpreted the same as the precedence bits in the service type interpretation. In other words, it is compatible with the old interpretation. The precedence defines the eight-level priority of the datagram (0 to 7) in issues such as congestion. If a router is congested and needs to discard some datagrams, those datagrams with lowest precedence are discarded first. Some datagrams in the Internet are more important than the others.
d. When the 3 right-most bits are not all 0s, the 6 bits define 56 (64 − 8) services based on the priority assignment by the Internet or local authorities according to Table 1. The first category contains 24 service types; the second and the third each contain 16.
The first category is assigned by the Internet authorities (IETF). The second category can be used by local authorities (organizations). The third category is temporary and can be used for experimental purposes. Note that these assignments have not yet been finalized.
iv) Which fields are related to fragmentation process?
a. When a sending device or router fragments a datagram, it must provide information that will allow the receiving device to be able to identify the fragments and reassemble them into the datagram that was originally sent. This information is recorded by the fragmenting device in a number of fields in the IP datagram header.
b. The fragment size is selected to match the MTU value in bytes. However, fragments must have a length that is a multiple of 8, to allow proper offset specification.
v) How to calculate total length. Give the functional difference between IPV4 & IPV6.
Total length: This is a 16-bit field that defines the total length (header plus data) ofthe IP datagram in bytes. To find the length of the data coming from the upperlayer, subtract the header length from the total length. The header length can befound by multiplying the value in the HLEN field by four.
Length of data = total length − header length
Since the field length is 16 bits, the total length of the IP datagram is limited to 65,535 (216−1) bytes, of which 20 to 60 bytes are the header and the rest is datafrom the upper layer.
Difference between IPV4 & IPV6: