Full details of IPv4 and IPv6 || Difference Between IPv4 and IPv6

Full details of IPv4 and IPv6 || Difference Between IPv4 and IPv6

What is IP?

An IP (Internet Protocol) address is a unique numeric identifier assigned to each device connected to a network. It allows devices to communicate with each other and to send and receive data over the Internet or a local network.


IPv4 (Internet Protocol Version 4)

Definition:

IPv4 is the fourth version of the Internet Protocol and the first version widely used. It is the backbone of the Internet and still carries a significant portion of Internet traffic today.

Format:

  • IPv4 is a 32-bit address.
  • It is divided into four octets, each consisting of 8 bits.
  • Written in decimal format, separated by periods (dots).
  • Example: 192.168.1.1

Address Range:

  • Minimum: 0.0.0.0
  • Maximum: 255.255.255.255

Total Addresses:

  • Total possible unique addresses: 2³² = 4,294,967,296

IPv4 Address Classes:

ClassRange (1st Octet)Subnet MaskPurposeExample IP
A1 – 126255.0.0.0Large networks10.0.0.1
B128 – 191255.255.0.0Medium networks172.16.0.1
C192 – 223255.255.255.0Small networks192.168.1.1
D224 – 239N/A (Multicast)Multicasting224.0.0.1
E240 – 255ReservedResearch and experimental use250.0.0.1

Class A, B, and C are used for unicast addressing.
Class D is for multicast, and Class E is reserved for future or experimental use.


Types of IPv4 Addresses:

TypeDescriptionExample
Public IPRoutable over the internet; assigned by ISPs.8.8.8.8
Private IPUsed within private networks; not routable on internet.192.168.0.1
Static IPManually assigned and doesn’t change.203.0.113.5
Dynamic IPAutomatically assigned by DHCP; can change over time.192.168.0.100
Loopback IPUsed to test network configurations locally.127.0.0.1
Broadcast IPUsed to send data to all devices in a subnet.192.168.1.255
Multicast IPUsed for one-to-many communication.224.0.0.9
APIPAAutomatic Private IP Addressing when DHCP fails (169.254.x.x).169.254.1.1

IPv6 (Internet Protocol Version 6)

Definition:

IPv6 is the latest version of the Internet Protocol developed to replace IPv4 due to the exhaustion of IPv4 addresses.

Format:

  • IPv6 is a 128-bit address.
  • Written as eight groups of four hexadecimal digits, separated by colons (:).
  • Example: 2001:0db8:85a3:0000:0000:8a2e:0370:7334

Consecutive zeros can be compressed using :: once in an address.
Example: 2001:0db8:0000:0000:0000:0000:1428:57ab2001:db8::1428:57ab

Address Range:

  • The number of unique addresses: 2¹²⁸ ≈ 3.4 × 10³⁸ (340 undecillion addresses)

Types of IPv6 Addresses:

TypeDescriptionExample
UnicastIdentifies a single device/interface.2001\:db8::1
MulticastOne-to-many communication.ff00::/8
AnycastOne-to-nearest communication from multiple interfaces with the same address.Depends on routing
Link-localUsed for communication within the same physical or logical link.fe80::1
Global UnicastRoutable and unique; similar to IPv4 public IPs.2000::/3
LoopbackRefers to the local host, similar to 127.0.0.1 in IPv4.::1
Unique LocalFor local communication within sites; similar to IPv4 private addresses.fc00::/7

Differences Between IPv4 and IPv6

FeatureIPv4IPv6
Address Length32-bit128-bit
Address FormatDecimal (e.g., 192.168.1.1)Hexadecimal (e.g., 2001\:db8::1)
Address Space~4.3 billion addresses340 undecillion addresses
Header Size20 bytes40 bytes
SecurityOptional (IPSec optional)Built-in (IPSec mandatory)
NAT SupportRequired in many networksNot required (end-to-end connectivity)
ConfigurationManual or via DHCPAuto-configuration using SLAAC or DHCPv6
BroadcastingSupportedNot supported (uses multicast instead)
Routing EfficiencyLess efficientMore efficient due to simplified header
FragmentationRouters & HostsHosts only
ChecksumIncludedNot used (handled by upper layers)
CompatibilityWidely usedGrowing adoption

Summary

CategoryIPv4IPv6
Bit Length32-bit128-bit
Total Addresses4.3 Billion340 Undecillion
NotationDotted DecimalHexadecimal with colons
UsageStill dominantGradually replacing IPv4
SecurityOptionalBuilt-in
ConfigurationManual/DHCPStateless or Stateful (DHCPv6)
BroadcastingYesNo (uses Multicast & Anycast)

Comments

No comments yet. Why don’t you start the discussion?

    Leave a Reply

    Your email address will not be published. Required fields are marked *