diff --git a/2021-05-17-ipv6/ipv6.txt b/2021-05-17-ipv6/ipv6.txt new file mode 100644 index 0000000..7bcf635 --- /dev/null +++ b/2021-05-17-ipv6/ipv6.txt @@ -0,0 +1,80 @@ +IPv6 + +1. Network layers and IP +2. Routing and subnets +3. Problems with IPv4 +4. Solutions of IPv6 +5. SLAAC +6. IPv4 in IPv6 + +Under: +Link-layer, MAC (Ethernet, Wi-Fi) +Intra-network communication + +Upper: +Transport-layer, TCP / UDP +Data communication + +Middle: +Internet layer, IPv4/6 +Inter-network communication + +2. Routing and subnets + +CIDR notation: +192.168.0.0/24 - 192.168.0.XX + +2a0d:d9c0:1234:abcd:5678:cdef:1234:4567/64 +2a0d:d9c0:1234:abcd:xxxx:xxxx:xxxx:xxxx + +192.168.0.0/24 to 192.168.1.0/24 +2a0d:d9c0::/64 to 2a0d:d9c1::/64 + +3. Problems with IPv4 + +Not enough (public) addresses! + +Private subnets allow extension through NAT + +192.168.0.0/16 behind 45.134.135.1 + +Problems: state, complexity... +And *still* not enough addresses! + +4. Solutions of IPv6 + +Many, many, *many* more addresses +Every device has an address, no NAT +Enough for everyone. + +(security: NAT does not provide security. +Proper firewalling does.) + +Otherwise, nothing basic really changes +Devices have an IPv6, talk to others over link-layer +Same difference! + +5. SLAAC +StateLess Address AutoConfiguration + +Usually, in IPv4, DHCP +Requires manual configuration + +In IPv6, equivalent is SLAAC +* MAC addresses to autoconfigure address in a subnet +* Device Address Duplication built-in checks +* More work for the routers + +Router Advertisements, Router Solicitation +Neighbor Advertisements, Neighbor Solicitation + +2a0d:d9c0:1234:5678::/64 + MAC address => +2a0d:d9c0:1234:5678:224:81ff:fe7d:da46 + +6. IPv4 in IPv6 + +Same technique as SLAAC: encode IPv4 in IPv6 /64 +2a0d:d9c0:1234:5678:192.168.42.42 + +We can use a translation service to provide IPv4 connectivity to IPv6 hosts. +NAT-like: IPv6 can initiate to IPv4, not the other way around.