0% found this document useful (0 votes)
9 views10 pages

Sns College of Engineering: Department of Artificial Intelligence and Data Science

The document provides an overview of IPv4, detailing its structure as a 32-bit address used to identify devices on the Internet. It explains the concepts of address space, notation, hierarchy in addressing, and the transition from classful to classless addressing due to address depletion. Additionally, it outlines the format of an IPv4 datagram, including fields such as version number, header length, service type, and source and destination addresses.

Uploaded by

msmkd07
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views10 pages

Sns College of Engineering: Department of Artificial Intelligence and Data Science

The document provides an overview of IPv4, detailing its structure as a 32-bit address used to identify devices on the Internet. It explains the concepts of address space, notation, hierarchy in addressing, and the transition from classful to classless addressing due to address depletion. Additionally, it outlines the format of an IPv4 datagram, including fields such as version number, header length, service type, and source and destination addresses.

Uploaded by

msmkd07
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

SNS COLLEGE OF ENGINEERING

Kurumbapalayam(Po), Coimbatore – 641 107


Accredited by NAAC-UGC with ‘A’ Grade
Approved by AICTE, Recognized by UGC & Affiliated to Anna University, Chennai

Department of Artificial Intelligence and


Data Science
Course Name – 23ITT204 - Computer Networks

II Year / IV Semester

Unit 3 – Network Layer

Topic 2- IP Datagram-IPv4

IPV4/ 23ITT204-Computer Networks /P.Revathi / AI&DS/ SNSCE 1/24


IPv4
• The identifier used in the IP layer of the TCP/IP protocol suite to identify the connection of each
device to the Internet is called the Internet address or IP address.

• An IPv4 address is a 32-bit address that uniquely and universally defines the connection of a host
or a router to the Internet.

• The IP address is the address of the connection, not the host or the router, because if the device is
moved to another network, the IP address may be changed.

Address Space
• A protocol like IPv4 that defines addresses has an address space. An address space is the total
number of addresses used by the protocol.

• IPv4 uses 32-bit addresses, which means that the address space is 232 or 4,294,967,296 (more
than four billion). If there were no restrictions, more than 4 billion devices could be connected to
the Internet.

IPV4/ 23ITT204-Computer Networks /P.Revathi / AI&DS/ SNSCE 2/12


IPv4
Notation
• There are three common notations to show an IPv4 address: binary notation (base 2), dotted-
decimal notation (base 256), and hexadecimal notation (base 16).
• In binary notation, an IPv4 address is displayed as 32 bits
• To make the IPv4 address more compact and easier to read, it is usually written in decimal form
with a decimal point (dot) separating the bytes. This format is referred to as dotted-decimal
notation.
• We sometimes see an IPv4 address in hexadecimal notation. Each hexadecimal digit is equivalent
to four bits.
• This means that a 32-bit address has 8 hexadecimal digits. This notation is often used in network
programming

IPV4/ 23ITT204-Computer Networks /P.Revathi / AI&DS/ SNSCE 3/12


IPv4
Hierarchy in Addressing
• A 32-bit IPv4 address is hierarchical, but
divided only into two parts. The first part of the
address, called the prefix, defines the network;
the second part of the address, called the suffix,
defines the node (connection of a device to the
Internet).

Classful Addressing
• When the Internet started, an IPv4 address was
designed with a fixed-length prefix, but to
accommodate both small and large networks,
three fixed-length prefixes were designed
instead of one (n = 8, n = 16, and n = 24).
• The whole address space was divided into five
classes (class A, B, C, D, and E)
• This scheme is referred to as classful
addressing.

IPV4/ 23ITT204-Computer Networks /P.Revathi / AI&DS/ SNSCE 4/12


IPv4
In class A, the network length is 8 bits, but since the first bit, which is 0, defines the class, we can have
only seven bits as the network identifier. This means there are only 27 = 128 networks in the world
that can have a class A address.

In class B, the network length is 16 bits, but since the first two bits, which are (10)2, define the class,
we can have only 14 bits as the network identifier. This means there are only 214 = 16,384 networks
in the world that can have a class B address.

All addresses that start with (110)2 belong to class C. In class C, the network length is 24 bits, but
since three bits define the class, we can have only 21 bits as the network identifier. This means there
are 221 = 2,097,152 networks in the world that can have a class C address.

Class D is not divided into prefix and suffix. It is used for multicast addresses. All addresses that start
with 1111 in binary belong to class E. As in Class D, Class E is not divided into prefix and suffix and is
used as reserve.

IPV4/ 23ITT204-Computer Networks /P.Revathi / AI&DS/ SNSCE 5/12


IPv4
Address Depletion
The reason that classful addressing has become obsolete is address depletion.

Classless Addressing
With the growth of the Internet, it was clear that a larger address space was needed as a long-term
Solution.

A short-term solution was also devised to use the same address space but to change the distribution
of addresses to provide a fair share to each organization.

The short-term solution still uses IPv4 addresses, but it is called classless addressing. In other words,
the class privilege was removed from the distribution to compensate for the address depletion.

IPV4/ 23ITT204-Computer Networks /P.Revathi / AI&DS/ SNSCE 6/12


IPv4
Datagram Format

IPV4/ 23ITT204-Computer Networks /P.Revathi / AI&DS/ SNSCE 7/12


IPv4
Version Number - The 4-bit version number (VER) field defines the version of the IPv4 protocol,
which, obviously, has the value of 4.

Header length (HLen) - defines length of the datagram header in 4-byte words

Service Type - Type of Service (TOS) - allows packets to be treated differently based on application
needs. It is based on one of the parameters delay, throughput, reliability and cost

Length - specifies the total packet length (header plus data). The total length of the IPv4 datagram is
restricted to 65,535 bytes.

Identification - The 16-bit identifier uniquely identifies a datagram.

Flags - t is a 3-bit field. The first bit is reserved. The second bit (D) is called the do not fragment bit.
The third bit (M) is called the more fragment bit.

Time to live - defines lifetime of the datagram (default value 64). It is used to control the maximum
number of hops visited by the datagram. Each router decrements TTL by 1 before forwarding. If the
value is zero, the datagram is discarded to avoid looping.
IPV4/ 23ITT204-Computer Networks /P.Revathi / AI&DS/ SNSCE 8/12
IPv4
Protocol - specifies the higher-level protocol that uses the services of the IPv4 layer such as TCP(6),
UDP(17).

Checksum - contains 16-bit checksum for the packet header to ensure that header information is
Correct.

Source address - 32-bit field source address identifying the sender.


Destination address - 32-bit field destination address for delivery of the datagram

Options - A datagram header can have up to 40 bytes of options. Options can be used for network
testing and debugging.

payload - It is the content of the package

IPV4/ 23ITT204-Computer Networks /P.Revathi / AI&DS/ SNSCE 9/12


THANK YOU

IPV4/ 23ITT204-Computer Networks /P.Revathi / AI&DS/ SNSCE 10/12

You might also like