Review: Hexadecimal

Before diving into IPv6, let’s review hexadecimal (hex) and its conversion to binary.

Hexadecimal to Binary Conversion

Hexadecimal is a base-16 numbering system, using digits 0-9 and letters A-F.

  • Each hex digit corresponds to a 4-bit binary number.

Example:

  • Hex A is Binary 1010
  • Hex F is Binary 1111

Binary to Hexadecimal Conversion

What about converting binary back to hex?

  • Group the binary digits into sets of 4 bits (starting from the right).
  • Convert each group to its corresponding hex value.

Example:

  • Binary 1010 1100 becomes Hex AC


Why IPv6?

The primary reason for IPv6 is the exhaustion of IPv4 addresses.

  • IPv4 Address Space: 2^32 addresses (4,294,967,296 total)
  • IPv4 was designed over 30 years ago, without anticipating today’s global internet scale.

To manage the scarcity, techniques like VLSM, private IPv4 addresses, and NAT have been used, but these are short-term solutions.

Long-Term Solution: IPv6

IPv6 provides a much larger address space, with 2^128 possible addresses.

IPv4 Exhaustion Timeline

  • September 24, 2015: ARIN exhausted its IPv4 address pool.
  • August 21, 2020: LACNIC announced its final IPv4 allocation.


Basics of IPv6

  • IPv6 Address Length: 128 bits (16 bytes)

  • Address Notation: IPv6 uses a hexadecimal notation and a prefix length (e.g., 2001:0db8:85a3::8a2e:0370:7334/64).

Shortening (Abbreviating) IPv6 Addresses

IPv6 addresses can be quite long, so they can be abbreviated by:

  1. Removing Leading Zeros:

    • 2001:0db8:0000:0042:0000:8a2e:0370:7334 can be shortened to 2001:db8:0:42:0:8a2e:370:7334.
  2. Using Double Colons (::) for Continuous Zeros:

    • 2001:0db8:0000:0000:0000:0000:1428:57ab becomes 2001:db8::1428:57ab.

    Important: You can only use :: once in an address.


Expanding IPv6 Addresses

To expand an abbreviated IPv6 address, simply reverse the shortening process:

  • Replace :: with the appropriate number of zeros.
  • Add back any leading zeros.


Finding the IPv6 Prefix (Global Unicast Addresses)

When an enterprise requests IPv6 addresses from their ISP, they typically receive a /48 block.

  • Typical Subnet Prefix Length: /64
  • Subnetting: The enterprise can use the remaining 16 bits to create subnets, with the last 64 bits used for host addresses.

  • Important: Remember that you can only remove leading zeros.

Example:

  • Address: 2001:0DB8:8B00:0001:FB89:017B:0020:0011/93

    • The /93 prefix means we need to convert the last digit to binary and adjust the prefix accordingly.


Configuring IPv6 Addresses

Enabling IPv6 Routing on a Router

To enable IPv6 routing:

R1(config)# ipv6 unicast-routing

Configuring an Interface with an IPv6 Address

To configure an IPv6 address on an interface:

R1(config)# int g0/0
R1(config-if)# ipv6 address 2001:db8:0:0::1/64
R1(config-if)# no shutdown
  • Note: You can type out the full address if necessary.

  • Link-Local Addresses: These are automatically generated when configuring an IPv6 address on an interface. More on this in the next lecture.