Introduction to IPv4 and IPv6
- Network communication relies on IP (Internet Protocol) versions, primarily IPv4 and IPv6.
- Understanding both protocols is essential for the A+ exam and real-world system configuration.
- While IPv4 and IPv6 share operational similarities, they differ significantly in structure, configuration, and addressing.
IPv4 Addressing
- IPv4 uses a 32-bit address format, represented as four decimal numbers separated by periods (e.g.,
192.168.1.131).
- Each decimal number is called an octet (8 bits), allowing values from
0 to 255.
- Total IPv4 address combinations: 4.29 billion (232).
- IPv4 addresses are divided into:
- Network portion: Identifies the network.
- Host portion: Identifies the specific device.
- Limitations:
- Insufficient addresses for the growing number of internet-connected devices (over 20 billion).
- Solution: Private IP addresses and Network Address Translation (NAT).
Private IPv4 Address Ranges (RFC 1918)
- Private IP addresses are reserved for internal networks and are not routable on the public internet.
- Defined in RFC 1918, these ranges include:
10.0.0.0 to 10.255.255.255 (16+ million addresses, common in large networks).
172.16.0.0 to 172.31.255.255 (1+ million addresses, mid-sized networks).
192.168.0.0 to 192.168.255.255 (65,000+ addresses, common in home networks).
- NAT (Network Address Translation) allows multiple devices with private IPs to share a single public IP for internet access.
IPv6 Addressing
- Designed to overcome IPv4 limitations, IPv6 uses a 128-bit address format.
- Total IPv6 address combinations: 340 undecillion (2128), eliminating address scarcity.
- Structure:
- Represented in hexadecimal (e.g.,
FE80::5D18:652:CFFD:8F52).
- Divided into 8 groups of 16 bits (hextets), separated by colons.
- Leading zeros in a hextet can be omitted (e.g.,
0000 becomes 0).
- Consecutive groups of zeros can be replaced with
:: (e.g., FE80:0000:0000:0000 becomes FE80::).
- IPv6 addresses are divided into:
- Network prefix (first 64 bits): Identifies the network.
- Interface ID (last 64 bits): Identifies the device (often derived from MAC address).
- Advantages:
- No need for NAT due to vast address space.
- Simplified subnetting (default subnet mask is
/64).
- Built-in support for autoconfiguration (e.g., SLAAC).
- DNS is critical for IPv6 due to the complexity of memorizing hexadecimal addresses.
Key Differences Between IPv4 and IPv6
- Address Length:
- IPv4: 32 bits (4 bytes).
- IPv6: 128 bits (16 bytes).
- Address Format:
- IPv4: Decimal (e.g.,
192.168.1.1).
- IPv6: Hexadecimal (e.g.,
2001:0DB8::1).
- Address Space:
- IPv4: 4.29 billion addresses.
- IPv6: 340 undecillion addresses.
- Configuration:
- IPv4: Manual or DHCP.
- IPv6: Supports autoconfiguration (SLAAC) and DHCPv6.
- NAT Usage:
- IPv4: Relies on NAT for private-to-public translation.
- IPv6: NAT is unnecessary due to large address space.
Exam Tips
- Memorize the private IPv4 ranges (RFC 1918) and their use cases.
- Understand the structure of IPv4 and IPv6 addresses, including octets, hextets, and notation.
- Know the purpose of NAT and why it is used with IPv4.
- Recognize the advantages of IPv6, such as larger address space and simplified subnetting.
- Be familiar with IPv6 address compression (omitting leading zeros and using
::).