IPv4 and IPv6 Fundamentals 2.6

IPv4 and IPv6 Protocols

  • IP version 4 (IPv4) is one of the most popular protocols globally and is the primary traditional method for network communication.
  • Internet Protocol (IP) communication requires knowledge of both the current standard, IPv4, and the more recent standard, IPv6.
  • While IPv4 and IPv6 share operational similarities, they feature significant differences in their visual representation and system configuration.

IPv4 Addressing Architecture

  • IPv4 uses a 3232-bit address, meaning it consists of 3232 ones and zeros working together to form a unique identifier.
  • To make it easier for humans to read, IPv4 is represented in decimal form as four separate decimal numbers separated by periods.
  • An example of an IPv4 address is 192.168.1.131192.168.1.131.
  • The address is composed of four sections known as octets.
  • Each octet represents 88 bits, which is also referred to as a byte.
  • The total length is 3232 bits, equivalent to 44 bytes (4×8=324 \times 8 = 32).
  • Each individual octet can consist of any value between 00 and 255255. An octet will never exceed the value of 255255.

Public IP Requirements and Exhaustion

  • Communication across the public internet requires every connected device to have a unique IP address to differentiate itself from others (e.g., device 1.1.1.11.1.1.1 communicating with device 2.2.2.22.2.2.2).
  • The 3232-bit architecture limits the total number of unique IPv4 addresses to approximately 4.294.29 billion combinations (2322^{32}).
  • Currently, there are over 2020 billion devices connected to the internet, and this number is growing rapidly.
  • Because there are only 4.294.29 billion addresses available for 2020 billion devices, specific technologies are required to enable communication for all devices.

Network Address Translation (NAT) and Private Addressing

  • One of the primary solutions to address exhaustion is Network Address Translation (NAT).
  • NAT allows a private network to use a single public IPv4 address to represent hundreds or thousands of internal devices.
  • Public addresses communicate with other public addresses on the internet.
  • Private addresses allow internal communication within a private network but do not count toward the global pool of 4.294.29 billion IPv4 addresses.
  • A company might have a single link to the internet with one public IP, while using thousands of private addresses internally for internal hosts.

RFC 1918 Private Addressing Standards

  • The ranges of private addresses are defined in RFC 1918. RFC stands for Request For Comment, representing the global standard for IPv4 private addressing.
  • There are three specific ranges defined for private network use:
    • Range 1: 10.0.0.010.0.0.0 through 10.255.255.25510.255.255.255. This range provides over 1616 million addresses and is popular for large corporate networks.
    • Range 2: 172.16.0.0172.16.0.0 through 172.31.255.255172.31.255.255. This range provides just over 11 million private addresses.
    • Range 3: 192.168.0.0192.168.0.0 through 192.168.255.255192.168.255.255. This range provides just over 65,00065,000 addresses and is the most common range for home networks.

IPv6 Addressing and Architecture

  • IPv6 was designed to solve the address limitation problem of IPv4 as a major architectural priority.
  • IPv6 addresses are 128128 bits in length, significantly larger than the 3232 bits used in IPv4.
  • The total number of available IPv6 addresses is 340340 undecillion (calculated as 21282^{128}).
  • With a global population of approximately 6.86.8 billion people, this provides a massive number of unique addresses per individual user, effectively removing all current and foreseeable address limitations.
  • IPv6 addresses are written in hexadecimal format rather than decimal to fit the large address into a manageable space.
  • Colons are used to separate the different sections (blocks) of the address instead of periods.
  • A full example of an IPv6 address is: fe80:0000:0000:0000:5d18:0652:cffd:8f52fe80:0000:0000:0000:5d18:0652:cffd:8f52.
  • Each block in the hexadecimal representation contains 1616 bits, meaning each block is equivalent to 22 octets.
  • The entire address consists of 88 blocks, totaling 128128 bits or 1616 bytes.

Management and Subnetting in IPv6

  • The complexity and length of IPv6 addresses make the Domain Name System (DNS) critical, as memorizing 128-bit addresses is difficult for humans. Fully-qualified domain names are used to reference these addresses.
  • Traditional subnetting is less common in IPv6 because the available address space is so vast.
  • In a standard IPv6 configuration, the address is split exactly in half:
    • The first 6464 bits are the network prefix.
    • The last 6464 bits are the host address (host ID).
  • The default subnet mask for most IPv6 implementations is a /64/64.