0% found this document useful (0 votes)
3 views

IPV4 Protocol

The IPv4 protocol defines a datagram structure that includes fields such as version number, header length, type of service, datagram length, time-to-live, protocol, header checksum, source and destination IP addresses, options, and data payload. Each field serves a specific purpose, such as determining the datagram format, ensuring data integrity, and directing the datagram to the correct transport-layer protocol. The typical IP datagram has a 20-byte header and can carry various types of data, including TCP or UDP segments.

Uploaded by

Manisha Rathod
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

IPV4 Protocol

The IPv4 protocol defines a datagram structure that includes fields such as version number, header length, type of service, datagram length, time-to-live, protocol, header checksum, source and destination IP addresses, options, and data payload. Each field serves a specific purpose, such as determining the datagram format, ensuring data integrity, and directing the datagram to the correct transport-layer protocol. The typical IP datagram has a 20-byte header and can carry various types of data, including TCP or UDP segments.

Uploaded by

Manisha Rathod
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 8

IPV4 Protocol

Version Number:-
These 4 bits specify the IP protocol version of
the datagram. By looking at the version number, the
router can determine how to interpret the remainder of
the IP datagram. Different versions of IP use different
datagram formats.

Header Length:-
These 4 bits are needed to determine where in
the IP datagram the data actually begins. Most IP
datagrams do not contain options, so the typical IP
datagram has a 20-byte header.
Type of Service:-
The type of service (TOS) bits were included in the
IPv4 header to allow different types of IP datagrams (for
example, datagrams particularly requiring low delay, high
throughput, or reliability) to be distinguished from each other.
For example, it might be useful to distinguish real-time
datagrams (such as those used by an IP telephony application)
from non-real-time traffic (for example, FTP). The specific level
of service to be provided is a policy issue determined by the
router’s administrator.

Datagram Length:-
This is the total length of the IP datagram (header plus data),
measured in bytes. Since this filed is 16 bits long, the
theoretical maximum size of the IP datagram is 65,535 bytes.
However, datagrams are rarely larger than 1,500 bytes.
Time-to-live:-
The time-to-live (TTL) field is included to ensure that datagrams
do not circulate forever (due to, for example, a long-lived routing loop) in
the network. This field is decremented by one each time the datagram is
processed by a router. If the TTL field reaches 0, the datagram must be
dropped.

Protocol:-
This field is used only when an IP datagram reaches its final
destination. The value of this field indicates the specific transport-layer
protocol to which the data portion of this IP datagram should be passed.
For example, a value of 6 indicates that the data portion is passed to
TCP, while a value of 17 indicates that the data is passed to UDP(User
Datagram Protocol).
Header Checksum:-
The header checksum aids a router in detecting bit errors
in a received IP datagram. The header checksum is computed by
treating each 2 bytes in the header as a number and summing
these numbers using 1s and complement arithmetic. The 1s
complement of this sum, known as the internet checksum, is
stored in the checksum field. A router computes the header
checksum of each received IP datagram and detects an error
condition if the checksum carried in the datagram header does not
equal the computed checksum. Routers typically discard
datagrams for which an error has been detected.

Source and Destination IP Addresses:-


When a source creates a datagram, it inserts its IP address
into the source IP address field and inserts the address of the
ultimate destination into the destination IP address field. Often the
source host determines the destination address via a DNS lookup.
Options:-
The options fields allow an IP header to be extended.
Header options were meant to be used rarely – hence the
decision to save overhead by not including the information in
options fields in every datagram header.

Data (Payload):-
Finally, we come to the last and most important field.
In most circumstances, the data field of the IP datagram
contains the transport-layer segment (TCP or UDP) to be
delivered to the destination. However, the data field can carry
other types of data, such as ICMP messages.

Note that an IP datagram has a total of 20 bytes of header. If


the datagram carries a TCP segment, then each
(nonfragmented) datagram carries a total of 40 bytes of
header (20 bytes of IP header plus 20 bytes of TCP header)
along with the application-layer message.
O U
K Y
A N
TH

You might also like