5) IP Addressing

Overview of IPv4

  • IPv4 (Internet Protocol version 44) is the fourth version of the Internet Protocol.

  • It utilize a 32-bit32\text{-bit} address scheme to provide approximately 4.3×1094.3 \times 10^9 (or 4.34.3 billion) unique addresses.

  • Due to the exponential growth of the internet, IPv4 has largely exhausted its available address space.

  • IPv4 was established in the early 1980s1980\text{s} and remains a fundamental system for addressing devices on a network.

IPv4 Unicast Address Types and Ranges

  • Public IP Addresses

    • These addresses are globally unique and designated for use on the public Internet.

    • Public addresses ensure that each device can be uniquely identified and communicated with by any other device globally.

    • Class A Range: 1.0.0.0−126.255.255.2551.0.0.0 - 126.255.255.255

    • Class B Range: 128.0.0.0−191.255.255.255128.0.0.0 - 191.255.255.255

    • Class C Range: 192.0.0.0−223.255.255.255192.0.0.0 - 223.255.255.255

  • Private IP Addresses

    • Private IP addresses are designated for use within Local Area Networks (LANs).

    • They are not routable on the public internet.

    • Their primary function is to allow multiple devices within a private network to communicate with one another and with the internet through a translating device (Network Address Translation) without requiring a unique public IP for every single device.

    • Class A Range: 10.0.0.0−10.255.255.25510.0.0.0 - 10.255.255.255

    • Class B Range: 172.16.0.0−172.31.255.255172.16.0.0 - 172.31.255.255

    • Class C Range: 192.168.0.0−192.168.255.255192.168.0.0 - 192.168.255.255

Specialized IPv4 Addresses: Multicast, Broadcast, and Loopback

  • Multicast Address

    • Range: 224.0.0.0−224.255.255.255224.0.0.0 - 224.255.255.255

    • Provides service-based group messaging.

    • Utilized for one-to-many communications.

  • Broadcast Address

    • Layer 3 Broadcast Address: 255.255.255.255255.255.255.255

    • Provides communication to all hosts at the network layer.

    • Layer 2 Broadcast Address: FF:FF:FF:FF:FF:FFFF:FF:FF:FF:FF:FF

    • Provides communication to all hosts at the datalink layer.

  • Loopback Address

    • Range: 127.0.0.0−127.255.255.255127.0.0.0 - 127.255.255.255

    • Allows a host to communicate with itself.

    • Primary use is for testing a network interface.

Automatic Private IP Addressing (APIPA)

  • APIPA is a feature of Windows operating systems.

  • It automatically assigns a unique IP address when a host fails to obtain an IP address from a DHCP (Dynamic Host Configuration Protocol) server.

  • Address Range: 169.254.0.0−169.254.255.255169.254.0.0 - 169.254.255.255 (specifically 169.254.0.1169.254.0.1 to 169.254.255.254169.254.255.254).

  • APIPA allows for automatic, ad hoc network communication within a single subnet when a DHCP server is unavailable.

  • This mechanism ensures local communication in the absence of manual or DHCP-based configuration, though it does not provide internet access.

IPv4 Subnetting and Allocation Methods

  • IPv4 Subnetting

    • Subnetting is the practice of dividing a network into two or more smaller network segments, or subnets.

    • It is used to improve efficiency, security, and management of IP address allocations.

    • Segmentation is based on requirements for a specific number of hosts or to isolate network traffic to enhance performance.

    • It allows for more efficient use of an organization's allocated address space within a physical infrastructure.

  • Classful Networking

    • An early method of IP allocation that divides address space into fixed-length groups (Classes A, B, C, D, and E).

    • Each class has a default subnet mask and a predetermined number of networks and hosts.

    • While it simplified routing, the rigid structure was inefficient and led to address waste.

  • Classless Inter-Domain Routing (CIDR) and VLSM

    • VLSM (Variable-Length Subnet Mask): Allows subnets to have different sizes based on specific needs, reducing the waste of IP addresses.

    • CIDR Notation: A method for specifying IP addresses and their associated routing prefix (e.g., 192.168.1.0/24192.168.1.0/24).

    • The slash ("/") followed by a number indicates how many bits are dedicated to the network portion of the address.

    • CIDR replaced classful networking to allow for more flexible and efficient IP address allocation across the internet.

Introduction to IPv6 and Key Advancements

  • IPv6 (Internet Protocol version 66) is the standard designated to replace IPv4.

  • It employs 128-bit128\text{-bit} addresses, resulting in a vastly expanded address space of approximately 3.4×10383.4 \times 10^{38} addresses.

  • Enhanced Security: IPSec (Internet Protocol Security) is built-in as a standard feature, leading to improved security practices.

  • Improved Performance: IPv6 eliminates broadcast traffic and replaces it with Anycast.

  • Efficient Communications: IPv6 is multicast-based, making it less wasteful when communicating with multiple devices.

  • Simplified Configuration and Management:

    • Designed for "plug and play" local communication via Link-Local addresses.

    • Supports autoconfiguration, where a host can use its MAC address as part of its IPv6 address.

IPv6 Address Structure and Shortening Rules

  • Address Breakdown:

    • Total Length: 128 bits128\text{ bits}.

    • Prefix (64 bits64\text{ bits}): Identifies an anycast network. It consists of a 48-bit48\text{-bit} global routing prefix and a 16-bit16\text{-bit} Subnet-ID.

    • Interface-ID (64 bits64\text{ bits}): Identifies a specific host.

    • Example Address: 2001:0db8:3c4d:0012:0000:0000:1234:56ab2001:0db8:3c4d:0012:0000:0000:1234:56ab

  • Shortened Expression Rules:

    • Drop Leading Zeros: Leading zeros in any field can be removed (e.g., converting 0db80db8 to db8db8 and 00120012 to 1212).

    • Zero Compression: A group of four zeros can be noted as a single zero (00).

    • Double Colon ("::"): Contiguous fields containing only zeros can be replaced by a double colon. This rule can only be applied once in an address to avoid ambiguity.

    • Final Shortened Example: 2001:db8:3c4d:12::1234:56ab2001:db8:3c4d:12::1234:56ab

Specialized IPv6 Address Types

  • Multicast Address

    • Range: FF00/8FF00/8

    • Provides service-based group messaging and one-to-many communications.

  • Loopback Address

    • Address: ::1::1

    • Allows a host to communicate with itself; used for testing the network interface.

  • Anycast Address

    • Range: N/A (determined by structure).

    • Identifies an anycast network.

    • Used for one-to-nearest communications.

    • Replaces the broadcast function found in IPv4.

  • Unspecified Address

    • Address: ::::

    • Identified as the default route within a routing table.

    • Identified as "any" IP address in filter lists.