Reza Farashahi — NZSE
| Feature | IPv4 | IPv6 |
|---|---|---|
| Deployed | 1981 | 1999 |
| Address Size | 32-bit | 128-bit |
| Number of Addresses | ~4.3 billion (232) | ~3.4 × 1038 (2128) |
| Address Format | Dotted decimal (192.168.1.1) | Colon-separated hex (2001:db8::1) |
| Header Size | Variable (20–60 bytes) | Fixed (40 bytes) |
| Addressing | Class-based / CIDR | Classless only |
| Configuration | Manual / DHCP | SLAAC / DHCPv6 / Manual |
| Security | IPSec optional | IPSec required |
| Broadcast | Yes | No — replaced by multicast |
Q1: What is the main reason IPv4 addresses are running out?
Q2: Which of the following is NOT an advantage of IPv6 over IPv4?
Three techniques have extended IPv4's life well beyond expectations:
2001:0DB8:85A3:0000:0000:8A2E:0370:7334
| Decimal (Base 10) | Binary (Base 2) | Hexadecimal (Base 16) |
|---|---|---|
| 0 | 0000 | 0 |
| 1 | 0001 | 1 |
| 2 | 0010 | 2 |
| 3 | 0011 | 3 |
| 4 | 0100 | 4 |
| 5 | 0101 | 5 |
| 6 | 0110 | 6 |
| 7 | 0111 | 7 |
| 8 | 1000 | 8 |
| 9 | 1001 | 9 |
| 10 | 1010 | A |
| 11 | 1011 | B |
| 12 | 1100 | C |
| 13 | 1101 | D |
| 14 | 1110 | E |
| 15 | 1111 | F |
Every IPv6 address is divided into two main portions:
Two rules to shorten IPv6 addresses:
0DB8 → DB80000 → 0::
:0000:0000: → ::2001:0DB8:0000:0000:0000:0000:0000:00012001:DB8:0:0:0:0:0:12001:DB8::1
1. Simplify: FE80:0000:0000:0000:0000:00AA:0030:0001
2. Simplify: 2001:0DB8:0000:0000:0008:0800:200C:417A
3. Simplify: FF02:0000:0000:0000:0000:0000:0000:0001
4. Expand: 2001:DB8::1
5. Expand: FE80::A1:B2
FE80::8A:0:8398:85A3/64Q1: How many bits are in an IPv6 address?
Q2: How many times can you use :: in a single IPv6 address?
FF02::A) — only routers running EIGRP listen and receive it, all other devices ignore itQ1: IPv6 replaced broadcast communication with which type?
Q2: A DNS server address is assigned to multiple routers globally. When a user sends a query, it reaches the geographically closest router. What type of communication is this?
| Type | Prefix | Similar to IPv4 | Routable? |
|---|---|---|---|
| Global Unicast | 2000::/3 | Public IP | Yes — Internet |
| Unique Local | FC00::/7 or FD00::/8 | Private IP | Internal only |
| Link-Local | FE80::/10 | APIPA (169.254.x.x) | Same link only |
FE80)
| Type | Example |
|---|---|
| Public | 203.0.113.5 |
| Private | 192.168.1.10 |
| APIPA | 169.254.1.1 |
| Loopback | 127.0.0.1 |
| Type | Example |
|---|---|
| Global Unicast | 2001:DB8::1 |
| Unique Local | FD00::1 |
| Link-Local | FE80::1 |
| Loopback | ::1 |
127.0.0.1::10000:0000:0000:0000:0000:0000:0000:0001::1
ping ::1ping6 ::1 in Terminal (older macOS versions), or ping -6 ::1Q1: An IPv6 address begins with FE80. What type of address is it?
Q2: Which IPv6 address type is most similar to IPv4 private addresses (e.g. 192.168.x.x)?
Q3: What is the IPv6 loopback address?
Two key transition technologies:
Device runs both IPv4 and IPv6 simultaneously
Encapsulate one protocol inside the other to cross incompatible networks
ipconfig (Windows) or ifconfig / ip a (macOS/Linux).
Tunneling encapsulates one IP version inside the other to cross incompatible networks:
| Protocol | What It Does | NAT Support? |
|---|---|---|
| 4to6 | Encapsulates IPv4 data into an IPv6 tunnel | — |
| 6in4 | Encapsulates IPv6 data into an IPv4 tunnel | Yes |
| Teredo | Microsoft's IPv6 tunneling over IPv4 with NAT | Yes |
| Miredo | Open-source (Linux/Unix) version of Teredo | Yes |
Think of tunneling like putting a letter (IPv6) inside a different envelope (IPv4) to travel through a mail system that doesn't understand the original format.
Source
IPv6 packet wrapped
inside IPv4 header
Destination
NDP replaces IPv4's ARP (Address Resolution Protocol) and performs several functions:
Class B default: /16 → 16 network bits, 16 host bits
We need 4 subnets. How many bits do we borrow?
2x ≥ 4 → 22 = 4 → Borrow 2 bits
11111111.11111111.11000000.00000000We borrowed 2 bits, so 14 host bits remain. How many usable hosts per subnet?
Total addresses per subnet:
Usable hosts per subnet:
The block size tells us the increment between each subnet's network address.
Block Size = 256 − 192 = 64
(256 minus the interesting octet value in the subnet mask)
So the third octet of each subnet increments by 64:
The 2 borrowed bits give us 4 combinations. Each combination is the starting value of a subnet's third octet:
| Subnet | Borrowed Bits | Remaining 6 Bits | Full Octet Binary | Decimal |
|---|---|---|---|---|
| 1 | 0 0 | 000000 | 00000000 | 0 |
| 2 | 0 1 | 000000 | 01000000 | 64 |
| 3 | 1 0 | 000000 | 10000000 | 128 |
| 4 | 1 1 | 000000 | 11000000 | 192 |
11111111.11111111.11000000.00000000
| Subnet | Network Address | Subnet Mask | First Usable | Last Usable | Broadcast | CIDR |
|---|---|---|---|---|---|---|
| 1 — Sales | 172.16.0.0 | 255.255.192.0 | 172.16.0.1 | 172.16.63.254 | 172.16.63.255 | /18 |
| 2 — Engineering | 172.16.64.0 | 255.255.192.0 | 172.16.64.1 | 172.16.127.254 | 172.16.127.255 | /18 |
| 3 — HR | 172.16.128.0 | 255.255.192.0 | 172.16.128.1 | 172.16.191.254 | 172.16.191.255 | /18 |
| 4 — Management | 172.16.192.0 | 255.255.192.0 | 172.16.192.1 | 172.16.255.254 | 172.16.255.255 | /18 |
Given: 172.16.0.0/18 — Subnet 2
Given: 172.16.0.0/18 — Subnet 3
Q1: To create 4 subnets from a Class B network, how many bits must you borrow?
Q2: What is the subnet mask for 172.16.0.0/18?
Q3: The IP address 172.16.100.50/18 belongs to which subnet?
Q1: What does SLAAC stand for, and why is it useful?
Q2: A company uses the address prefix FD00:ABCD:1234::. What type of IPv6 address is this?
Q3: Which protocol replaced ARP in IPv6?
:: once::1