Internet Protocol Version 6 (IPv6) Basics cheat sheet – 20130711 IPv6 Addresses by Jens Roesen – email – www - twitter
IPv6 quick facts
successor of IPv4 • 128-bit long addresses • that's 296 times the IPv4 address space • that's 2128 or 3.4x1038 or over 340 undecillion IPs overall • a customer usually gets a /64 subnet, which yields 4 billion times the IPs available by IPv4 • no need for network address translation (NAT) any more • no broadcasts any more • no ARP • stateless address configuration without DHCP • improved multicast • easy IP renumbering • minimum MTU size 1280 • mobile IPv6 • mandatory IPsec support • extension headers • jumbograms up to 4 GiB IPv6 & ICMPv6 Headers
source IPv6 address
destination IPv6 address
global routing prefix
subnet prefix /64
IPv6 addresses are written in hexadecimal and divided into eight pairs of two byte blocks, each containing four hex digits. Addresses can be shortened by skipping leading zeros in each block. This would shorten our example address to 2001:db8:f61:a1ff:0:0:0:80.
00 03 ba 24 a9 6c
Additionally, once per IPv6 IP, we can replace
consecutive blocks of zeros with a double colon:
The 64-bit interface ID can/should be in modified EUI-64 EUI-64 02 03 ba ff fe 24 a9 6c format. A 48-bit MAC can be transformed to an 64-bit
interface ID by inverting the 7th (universal) bit and inserting a ff and fe byte after the 3rd byte. So the MAC 00:03:ba:24:a9:c6 becomes 0203:baff:fe24:a9c6. See RFC 4291 Appendix A and RFC 4941. IPv6 Address Scopes
Version (4 bits): IP version. Always 6.
Traffic class (8 bits): Used for QoS. Like the TOS field in IPv4. RFC 2474. Flow label (20 bits): Used for packet labelling, End-to-end QoS. RFC 6437. Payload length (16 bits): Length of the payload following the header in bytes. Limits packet size to 64 KB. Next header (8 bits): Code for the following extension header or UL protocol. Like protocol type field in IPv4. Hop limit (8 bits): Number of hops until the packet gets discarded. TTL in IPv4. Source address (128 bit): IPv6 source address.
Destination address (128 bits): IPv6 destination address.
/64 – lan segment, 18,446,744,073,709,551,616 v6 IPs
/48 – subscriber site, 65536 /64 lan segments
/32 – minimum allocation size, 65536 /48 subscriber sites, allocated to ISPs
ICMP type (8 bits): Error messages have a 0 high-order-bit (types 0 to 127), info messages have a 1 highorder-bit (types 128 to 255). ICMP code (8 bits): Further specifies the kind of message along with the type. F.i. type 1 code 4 is “destination port unreachable”.
ICMP checksum (16 bits): Checksum to prevent data corruption. Because of the IPv6 header simplification and fixed size of 40 bytes (compared to the IPv4 header with more fields and options and 20 to 60 bytes in size) additional IP options were moved from the main IPv6 header into additional headers. These extension headers (EH) will be appended to the main header as needed. The first 8 bit of each EH identify the next header (another EH or upper layer protocol) following. Only the hop-by-hop header must be examined by every node on the path and, if present, it must be the first header following the main IPv6 header. Every EH must only occur once, only the destination options EH may occur twice - before a routing EH and before the upper layer header.
order suggested in RFC 2460
IPv6 Extension Headers (RFC 2460 and it's updates)
Hop-by-Hop Options (0)
Destination Options (60)
Authentication Header (51)
ESP Header (50)
Destination Options (60)
TCP Header (6)
Please join StudyMode to read the full document