Networking - IPv4

What is IPv4?

IPv4 (Internet Protocol version 4) is the fourth version of the Internet Protocol and the most widely used system for identifying devices on a network. It provides unique numerical addresses to devices so they can send and receive data across the internet or other networks.

Structure of an IPv4 Address:

  • An IPv4 address is a 32-bit number, usually written in dotted decimal format, like this:

    192.168.0.1
    
  • It's made up of four numbers (called octets), each ranging from 0 to 255.

Example Breakdown:

For the IP address 192.168.1.10:

  • 192, 168, 1, and 10 are each 8 bits.

  • Together, they represent the 32-bit address.

Types of IPv4 Addresses:

  1. Public IP Address:

    • Used on the wider internet.

    • Must be unique across the globe.

  2. Private IP Address:

    • Used within local networks (e.g., homes, offices).

    • Common ranges:

      • 192.168.0.0 to 192.168.255.255

      • 10.0.0.0 to 10.255.255.255

      • 172.16.0.0 to 172.31.255.255

  3. Static vs Dynamic:

    • Static IP: Manually assigned and fixed.

    • Dynamic IP: Assigned automatically by a DHCP server and may change.

IPv4 Address Classes:

IPv4 originally used a class-based system:

  • Class A: 1.0.0.0 to 126.255.255.255 (large networks)

  • Class B: 128.0.0.0 to 191.255.255.255 (medium networks)

  • Class C: 192.0.0.0 to 223.255.255.255 (small networks)

  • Class D: 224.0.0.0 to 239.255.255.255 (multicast)

  • Class E: 240.0.0.0 to 255.255.255.255 (reserved)

Today, CIDR (Classless Inter-Domain Routing) is used instead of strict class boundaries.

Limitations of IPv4:

  • Only about 4.3 billion unique addresses are possible.

  • Due to the growth of the internet, IPv4 addresses are running out.

  • This led to the development of IPv6, which offers a much larger address space.

Key Concepts Related to IPv4:

  • Subnetting: Dividing a large network into smaller sub-networks.

  • NAT (Network Address Translation): Allows multiple devices to share a single public IP.

  • DHCP (Dynamic Host Configuration Protocol): Automatically assigns IP addresses to devices.