IP Address

What is an IP Address?

An IP address (Internet Protocol address) is a unique identifier assigned to each device on a network. It allows devices to communicate with each other over a network, such as the internet or a local network (LAN). An IP address functions similarly to a phone number or home address, enabling data to be sent to the correct destination.

Types of IP Addresses

There are two main types of IP addresses:

  1. IPv4 (Internet Protocol version 4):

    • IPv4 is the most widely used IP address version.
    • It consists of 32 bits (4 bytes), which are divided into four octets, each ranging from 0 to 255.
    • Example: 192.168.1.1
  2. IPv6 (Internet Protocol version 6):

    • IPv6 is designed to address the limitations of IPv4, such as the exhaustion of available IP addresses.
    • It consists of 128 bits, represented as eight groups of four hexadecimal digits.
    • Example: 2001:0db8:85a3:0000:0000:8a2e:0370:7334

While IPv4 is still the most commonly used version, IPv6 adoption is increasing as the number of devices on the internet grows and the pool of IPv4 addresses becomes exhausted.


Classes of IPv4 Addresses

IPv4 addresses are categorized into different classes based on their range, and each class serves different purposes (e.g., public, private, reserved). There are 5 main classes of IPv4 addresses: A, B, C, D, E.

1. Class A (Large Networks)

  • Range: 1.0.0.0 to 127.255.255.255
  • Subnet Mask: 255.0.0.0 (or /8 prefix)
  • First Octet: Starts with 0 to 127
  • Purpose: Class A addresses are typically used for large networks with a very large number of hosts (millions).
  • Private Range: 10.0.0.0 to 10.255.255.255

2. Class B (Medium Networks)

  • Range: 128.0.0.0 to 191.255.255.255
  • Subnet Mask: 255.255.0.0 (or /16 prefix)
  • First Octet: Starts with 128 to 191
  • Purpose: Class B addresses are used for medium-sized networks (e.g., mid-sized businesses, large organizations).
  • Private Range: 172.16.0.0 to 172.31.255.255

3. Class C (Small Networks)

  • Range: 192.0.0.0 to 223.255.255.255
  • Subnet Mask: 255.255.255.0 (or /24 prefix)
  • First Octet: Starts with 192 to 223
  • Purpose: Class C addresses are used for smaller networks (e.g., home or small office networks).
  • Private Range: 192.168.0.0 to 192.168.255.255

4. Class D (Multicast Addresses)

  • Range: 224.0.0.0 to 239.255.255.255
  • Purpose: Class D addresses are used for multicasting, where data is sent to multiple receivers at once, not individual devices.
  • Note: These are not assigned to individual hosts, so they aren’t used for standard device communication.

5. Class E (Reserved for Experimental or Future Use)

  • Range: 240.0.0.0 to 255.255.255.255
  • Purpose: Class E addresses are reserved for experimental or future use. They are not used in public or private networking.

Private IP Address Ranges

Private IP addresses are reserved for use within private networks (LANs) and cannot be routed on the internet. These are commonly used in home and business networks.

Here are the private IP address ranges:

  • Class A Private Range: 10.0.0.0 to 10.255.255.255
  • Class B Private Range: 172.16.0.0 to 172.31.255.255
  • Class C Private Range: 192.168.0.0 to 192.168.255.255

Devices using private IP addresses can access the internet through a Network Address Translation (NAT) service, typically provided by a router.


Special IP Address Ranges

  1. Loopback Address (for testing):

    • Range: 127.0.0.0 to 127.255.255.255
    • This range is reserved for loopback addresses, and the most commonly used loopback address is 127.0.0.1. It is used to test network interfaces locally.
  2. Link-Local Addresses (self-assigned for local communication):

    • Range: 169.254.0.0 to 169.254.255.255
    • These addresses are used by devices to communicate with each other on the same local network segment when they cannot obtain a valid IP address via DHCP.
  3. Broadcast Address (all devices on a network):

    • The broadcast address for any subnet allows a device to send a message to all devices on that network. For example, for a network 192.168.1.0/24, the broadcast address is 192.168.1.255.

IP Address Ranges

1. IPv4 Address Ranges:

Here’s a summary of the range and purpose of each class:

ClassRangeSubnet MaskFirst OctetUse Case
Class A1.0.0.0 – 127.255.255.255255.0.0.01-127Large networks (millions of hosts)
Class B128.0.0.0 – 191.255.255.255255.255.0.0128-191Medium-sized networks
Class C192.0.0.0 – 223.255.255.255255.255.255.0192-223Small networks
Class D224.0.0.0 – 239.255.255.255N/A224-239Multicast addresses
Class E240.0.0.0 – 255.255.255.255N/A240-255Reserved for experimental use

2. IPv6 Address Ranges:

IPv6 addresses are written in hexadecimal format and can be split into several parts (such as Global Unicast, Link-local, and Multicast). The ranges for the most common types are:

  • Global Unicast Address (Public Internet address):
    • Range: 2000::/3
  • Link-Local Address (Used for local network communication):
    • Range: FE80::/10
  • Multicast Address:
    • Range: FF00::/8

Summary of Key Points:

  1. IP addresses are unique identifiers for devices on a network, used for communication.
  2. IPv4 uses 32 bits and is written in decimal format (e.g., 192.168.1.1), while IPv6 uses 128 bits and is written in hexadecimal (e.g., 2001:0db8:85a3::8a2e:0370:7334).
  3. IP Address Classes (A, B, C, D, E) define ranges of addresses, each for different use cases (large, medium, small networks, multicast, experimental).
  4. Private IP Ranges are reserved for internal use within local networks and include ranges like 10.0.0.0/8 (Class A), 172.16.0.0/12 (Class B), and 192.168.0.0/16 (Class C).
  5. Special Ranges include loopback (127.x.x.x), link-local (169.254.x.x), and broadcast addresses.

Understanding IP address classes and ranges is fundamental when designing and configuring networks.