Concept of IPv4

Concept of IPv4

IPv4 (Internet Protocol Version 4) is the most widely known traditional version of IP. It uses a 32-bit address to identify a device/interface on an IP network.

IPv4 Address Structure

  • A 32-bit IPv4 address is divided into four 8-bit parts, called octets.

32 Bits
┌────────┬────────┬────────┬────────┐ │ 8 Bits │ 8 Bits │ 8 Bits │ 8 Bits │ ├────────┼────────┼────────┼────────┤ │ 192 │ 168 │ 1 │ 10 │ └────────┴────────┴────────┴────────┘ 192.168.1.10

Each octet can have a value from:

0 to 255

  • Therefore, an IPv4 address looks like:

192.168.1.10

  • This notation is called dotted-decimal notation.

IPv4 Communication Diagram

┌──────────┐                         ┌──────────┐
│ Computer │                         │ Server   │
│192.168.1.10                       │8.8.8.8  │
└────┬─────┘                         └────▲─────┘
     │                                    │
     │        IP Packet                   │
     └──────────────► Router ─────────────┘
                    │
             Finds destination
             using IP address

  • The router examines the destination IP address and forwards the packet toward the appropriate network.


2. IPv4 Addressing

  • IPv4 addresses have two logical parts:

IPv4 Address
┌─────────────────────┬──────────────────┐
│     Network Part    │    Host Part     │
└─────────────────────┴──────────────────┘

For example, with a /24 prefix:

192.168.1.10/24

Network Part          Host Part
───────────────       ─────────
192.168.1             10

  • The /24 means that the first 24 bits represent the network prefix.


3. IPv4 Private Addresses

  • Some IPv4 address ranges are reserved for use inside private networks.

RangeTypical Use
10.0.0.0/8Private network
172.16.0.0/12Private network
192.168.0.0/16Private network

Example:

PC 1 → 192.168.1.10
PC 2 → 192.168.1.20
Router → 192.168.1.1

  • These addresses are commonly used in homes, colleges, offices and laboratories.


4. Limitations of IPv4

  • The biggest limitation of IPv4 is its limited address space.

IPv4 has:

32 bits

  • Therefore, the theoretical number of addresses is:

2³² = 4,294,967,296

  • Not all of these are usable as ordinary host addresses because some ranges have special purposes.

With the growth of:

  • Computers
  • Smartphones
  • IoT devices
  • Servers
  • Smart TVs
  • Industrial devices
  • The demand for IP addresses increased greatly.

This was one of the major reasons for developing IPv6.

Parts of IPv4

Three components make up an IPv4 address:

Network Part: 

  • The unique variation assigned to the network is indicated by the network part. The designated network category is jointly identified in the network section.

Host Part: 

  • The machine on your network is uniquely identified by the host part. Each host is given this portion of the IPv4 address. 
  • The network portion is the same for every host on the network, but the host portion needs to change.
  • The optional component of IPv4 is the subnet number. Subnet numbers are assigned to local networks with a large number of hosts.

Types of IPv4 Addressing

IPv4 basically supports three different types of addressing modes

Unicast Addressing method: 

  • This addressing method designates a single sender and a single recipient. For instance, visiting a webpage.

Broadcast Addressing Mode: 

  • Sending messages to every device in a network is done via the broadcast addressing option. Sending a message to every device on a local network is one example.

Multicast Addressing Mode: 

  • This addressing mode transmits messages to a collection of devices and is commonly used within a local network or across networks. For instance, simultaneously streaming audio to several devices.

IPv4 Datagram Header

  • These fields together ensure the proper delivery, routing, fragmentation, and reassembly of IP packets across the network.


  • VERSION: Version of the IP protocol (4 bits), which is 4 for IPv4 
  • HLEN: IP header length (4 bits), which is the number of 32 bit words in the header. The minimum value for this field is 5 and the maximum is 15. 
  • Type of service: Low Delay, High Throughput, Reliability (8 bits) 
  • Total Length: Length of header + Data (16 bits), which has a minimum value 20 bytes and the maximum is 65,535 bytes. 
  • Identification: Unique Packet Id for identifying the group of fragments of a single IP datagram (16 bits) 
  • Flags: 3 flags of 1 bit each : reserved bit (must be zero), do not fragment flag, more fragments flag (same order) 
  • Fragment Offset: Represents the number of Data Bytes ahead of the particular fragment in the particular Datagram. Specified in terms of number of 8 bytes, which has the maximum value of 65,528 bytes. 
  • Time to live: Datagram’s lifetime (8 bits), It prevents the datagram to loop through the network by restricting the number of Hops taken by a Packet before delivering to the Destination.
  • Protocol: Name of the protocol to which the data is to be passed (8 bits) 
  • Header Checksum: 16 bits header checksum for checking errors in the datagram header 
  • Source IP address: 32 bits IP address of the sender 
  • Destination IP address: 32 bits IP address of the receiver 
  • Option: Optional information such as source route, record route. Used by the Network administrator to check whether a path is working or not.

Characteristics of IPv4

  • IPv4 could be a 32-bit IP Address.
  • IPv4 could be a numeric address, and its bits are separated by a dot.
  • The number of header fields is twelve and the length of the header field is twenty.
  • It has Unicast, broadcast, and multicast-style addresses.
  • IPv4 supports VLSM (Virtual Length Subnet Mask).
  • IPv4 uses the Post Address Resolution Protocol to map to the MAC address.

Advantages of IPv4

  • IPv4 security permits encryption to keep up privacy and security.
  • IPV4 network allocation is significant and presently has quite 85000 practical routers.
  • It becomes easy to attach multiple devices across an outsized network while not NAT.
  • This is a model of communication so provides quality service also as economical knowledge transfer.
  • IPV4 addresses are redefined and permit flawless encoding.

Limitations of IPv4

  • IP relies on network layer addresses to identify end-points on the network, and each network has a unique IP address.
  • The world's supply of unique IP addresses is dwindling, and they might eventually run out theoretically.
  • If there are multiple hosts, we need the IP addresses of the next class.
  • Complex host and routing configuration, non-hierarchical addressing, difficult to re-numbering addresses, large routing tables, non-trivial implementations in providing security, QoS (Quality of Service), mobility, and multi-homing, multicasting, etc. are the big limitations of IPv4 so that's why IPv6 came into the picture.


Post a Comment

Previous Post Next Post