Question: What are the fields in an IP datagram header?
Answer: The various fields in an IP datagram header and their size in bits are shown below:
+-------------+ | Version | 4 bits +-------------+ | IP Header | 4 bits | Length | +-------------+ | Type of | 8 bits | Service | +-------------+ | Size of the | 16 bits | Datagram | +-------------+ | Datagram ID | 16 bits +-------------+ | Control | 3 bits | Flags | +-------------+ | Fragment | 13 bits | Offset | +-------------+ | Time to | 8 bits | Live | +-------------+ | Protocol | 8 bits +-------------+ | Header | 16 bits | Checksum | +-------------+ | Source IP | 32 bits | Address | +-------------+ | Destination | 32 bits | IP Address | +-------------+ | Options | Variable Length +-------------+
The various fields are explained below:
+-----------+-----------------------------------------------------+ | Version | IP protocol version. For IPv4, this value is 4. | +-----------+-----------------------------------------------------+ | IP Header | Length of the IP header in multiples of | | Length | 32-bit words. | +-----------+-----------------------------------------------------+ | Type of | Quality of Service(QOS) requested for this datagram.| | Service | | | (TOS) | | +-----------+-----------------------------------------------------+ | Datagram | Length of the entire datagram in bytes, including | | Size | the header and the payload. | +-----------+-----------------------------------------------------+ | Datagram | Current datagram identifier. | | ID | | +-----------+-----------------------------------------------------+ | Control | Bit 0: Reserved | | Flags | Bit 1: 0 - Allow fragment, 1 - Don't fragment. | | | Bit 2: 0 - Last fragment, 1 - More fragments. | +-----------+-----------------------------------------------------+ | Fragment | Specifies the offset in the original IP datagram, | | Offset | where this fragment begins. This is a multiple of | | | 32 bit words. | +-----------+-----------------------------------------------------+ | Time to | The time upto which this datagram can live in the | | Live | network. | | (TTL) | | +-----------+-----------------------------------------------------+ | Protocol | Indicates to which upper-layer protocol layer this | | | datagram should be delivered. e.g. TCP, UDP | +-----------+-----------------------------------------------------+ | Header | IP header checksum. | | Checksum | | +-----------+-----------------------------------------------------+ | Source IP | IP address of the source host sending this IP | | Address | datagram. | +-----------+-----------------------------------------------------+ | Target IP | IP address of the destination host to which this | | Address | IP datagram must be delivered. | +-----------+-----------------------------------------------------+ | Options | Used for timestamps, security, source routing, etc. | +-----------+-----------------------------------------------------+
Question:
What are the fields in an IP datagram header? Answer:
The various fields in an IP datagram header and their size in bits are shown below:
+-------------+ | Version | 4 bits +-------------+ | IP Header | 4 bits | Length | +-------------+ | Type of | 8 bits | Service | +-------------+ | Size of the | 16 bits | Datagram | +-------------+ | Datagram ID | 16 bits +-------------+ | Control | 3 bits | Flags | +-------------+ | Fragment | 13 bits | Offset | +-------------+ | Time to | 8 bits | Live | +-------------+ | Protocol | 8 bits +-------------+ | Header | 16 bits | Checksum | +-------------+ | Source IP | 32 bits | Address | +-------------+ | Destination | 32 bits | IP Address | +-------------+ | Options | Variable Length +-------------+
The various fields are explained below:
+-----------+-----------------------------------------------------+ | Version | IP protocol version. For IPv4, this value is 4. | +-----------+-----------------------------------------------------+ | IP Header | Length of the IP header in multiples of | | Length | 32-bit words. | +-----------+-----------------------------------------------------+ | Type of | Quality of Service(QOS) requested for this datagram.| | Service | | | (TOS) | | +-----------+-----------------------------------------------------+ | Datagram | Length of the entire datagram in bytes, including | | Size | the header and the payload. | +-----------+-----------------------------------------------------+ | Datagram | Current datagram identifier. | | ID | | +-----------+-----------------------------------------------------+ | Control | Bit 0: Reserved | | Flags | Bit 1: 0 - Allow fragment, 1 - Don't fragment. | | | Bit 2: 0 - Last fragment, 1 - More fragments. | +-----------+-----------------------------------------------------+ | Fragment | Specifies the offset in the original IP datagram, | | Offset | where this fragment begins. This is a multiple of | | | 32 bit words. | +-----------+-----------------------------------------------------+ | Time to | The time upto which this datagram can live in the | | Live | network. | | (TTL) | | +-----------+-----------------------------------------------------+ | Protocol | Indicates to which upper-layer protocol layer this | | | datagram should be delivered. e.g. TCP, UDP | +-----------+-----------------------------------------------------+ | Header | IP header checksum. | | Checksum | | +-----------+-----------------------------------------------------+ | Source IP | IP address of the source host sending this IP | | Address | datagram. | +-----------+-----------------------------------------------------+ | Target IP | IP address of the destination host to which this | | Address | IP datagram must be delivered. | +-----------+-----------------------------------------------------+ | Options | Used for timestamps, security, source routing, etc. | +-----------+-----------------------------------------------------+ Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
There should not be any Spelling Mistakes.
There should not be any Gramatical Errors.
Answers must not contain any bad words.
Answers should not be the repeat of same answer, already approved.
Answer should be complete in itself.
Related Questions
View Answer
Is there a limitation on the minimum size of a IP datagram a network can handle?