Skip to content

Internet Protocol (IP) and IP Addresses

Internet Protocol (IP)

The Internet Protocol (IP) is a set of rules for routing and addressing packets of data so they can travel across networks and arrive at the correct destination.

IP defines the rules and structure for how data should be packaged, addressed, transmitted, and routed between devices.

It is the principal communications protocol in the Internet protocol suite for relaying datagrams across network boundaries. It operates at the network layer (Layer 3) of the OSI model.

IP Address

An IP address is a logical, numerical label assigned to each device on a network. It serves two primary functions:

  1. Network Identification (NID): It identifies the network the device is on.

  2. Host Identification (HID): It identifies the specific device on that network.

IP addresses are essential for proper communication between devices on both local and wide area networks (LANs and WANs).

IP Address Versions

  • IPv1–IPv3: Early, experimental versions that were never widely deployed.

  • IPv4: The first major version, using a 32-bit address scheme. It is still widely used but has largely run out of available addresses.

  • IPv5: An experimental protocol for streaming video and voice, which was never publicly adopted.

  • IPv6: The current standard, using a 128-bit address scheme to provide a virtually limitless number of unique addresses.

  • IPv7–IPv15: These versions are either reserved for future use or were experimental.

IPv4 Address Classes

IPv4 addresses are divided into classes, which historically determined the size of the network by allocating a certain number of bits for the network portion and the host portion of the address.

  • An IPv4 address is a 32-bit number, often shown as four decimal numbers (octets) separated by dots (e.g., 192.168.1.1).

  • Binary notation (e.g., 11000000.10101000.00000001.00000001)

  • This provides a total of 2³² (about 4.3 billion) unique addresses.

IPv4 addresses are categorized into five different classes based on their starting bits and address ranges. This classification helps in defining the size of networks and how many hosts (devices) they can support.

Class A : 0 = 0 Class B : 0+128 = 128 Class C : 128+64 = 192 Class D : 192+32 = 224 Class E : 224+16 = 240 240+16 = 256


Class A

  • Leading Bits: 0

  • Range: 1.0.0.0 to 126.255.255.255

  • Default Subnet Mask: 255.0.0.0

  • Total Networks: 126 (The 0.x.x.x range is reserved, and the 127.x.x.x range is for loopback and diagnostic purposes).

  • Hosts per Network: 16 million, 16,777,214 (2²⁴ − 2). The two subtracted addresses are the network address (all host bits are 0) and the broadcast address (all host bits are 1).

  • Use Case: Designed for very large, enterprise-level networks, such as those used by multinational corporations and governments.


Class B

  • Leading Bits: 10

  • Range: 128.0.0.0 to 191.255.255.255

  • Default Subnet Mask: 255.255.0.0

  • Total Networks: 16,384 (2¹⁴)

  • Hosts per Network: 65,534 (2¹⁶ − 2)

  • Use Case: Suited for medium to large-sized networks, like those for universities and large companies.


Class C

  • Leading Bits: 110

  • Range: 192.0.0.0 to 223.255.255.255

  • Default Subnet Mask: 255.255.255.0

  • Total Networks: 2,097,152 (2²¹)

  • Hosts per Network: 254 (2⁸ − 2)

  • Use Case: Intended for small networks, commonly used by small businesses and for home networks.


Class D

  • Leading Bits: 1110

  • Range: 224.0.0.0 to 239.255.255.255

  • Use Case: Reserved for multicasting. This is used for applications that send data to multiple recipients simultaneously, such as video conferencing and online gaming. It doesn't have the traditional network/host structure.


Class E

  • Leading Bits: 1111

  • Range: 240.0.0.0 to 254.255.255.255

  • Use Case: Reserved for experimental and research purposes. These addresses are not used on the public internet and are not allocated for general use.

Private IP Addresses

A private IP address is an address used for devices within a local, private network (like a home or office). These addresses are not routable on the public internet and are used to conserve the limited number of public IPv4 addresses. To access the internet, a device with a private IP address must go through a router that uses NAT (Network Address Translation), which allows multiple devices to share a single public IP address.

The IANA (Internet Assigned Numbers Authority) has reserved the following ranges for private networks:

ClassRange
A10.0.0.010.255.255.255
B172.16.0.0172.31.255.255
C192.168.0.0192.168.255.255

Made with ❤️ for students, by a fellow learner.