# vikings wiki

It's better when it's simple

User Tools

Site Tools


howtos:ipv6cheatsheet

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

howtos:ipv6cheatsheet [2024/09/20 15:51] – created thumhowtos:ipv6cheatsheet [2024/09/20 15:53] (current) – fixing headlines thum
Line 1: Line 1:
-IPv6 Cheat Sheet+====== IPv6 Cheat Sheet ====== 
 + 
 + 
 +===== Address Length and Format =====
  
-## Address Length and Format 
  
 The IPv6 address is **128 bits** (i.e. 16 bytes) long and is written in **8 groups of 2 bytes** in hexadecimal numbers, separated by colons: The IPv6 address is **128 bits** (i.e. 16 bytes) long and is written in **8 groups of 2 bytes** in hexadecimal numbers, separated by colons:
Line 23: Line 25:
 According to RFC5952 `ff:0:0:0:1::1` is not correct either because the longest group of concurrent zeroes must be shortened. According to RFC5952 `ff:0:0:0:1::1` is not correct either because the longest group of concurrent zeroes must be shortened.
  
-## Protocols+===== Protocols ===== 
  
 | Number | Protocol  | Purpose                                                                                                 | | Number | Protocol  | Purpose                                                                                                 |
Line 31: Line 34:
 | 58     | IPv6-ICMP | Information, error reporting, diagnostic-based use cases                                              | | 58     | IPv6-ICMP | Information, error reporting, diagnostic-based use cases                                              |
  
-## Methods to Assign IPv6 Addresses+===== Methods to Assign IPv6 Addresses ===== 
  
 **Static** - Fixed Address,   **Static** - Fixed Address,  
Line 37: Line 41:
 **DHCPv6** - Dynamic Host Configuration Protocol (Address assigned by a central DHCP server). **DHCPv6** - Dynamic Host Configuration Protocol (Address assigned by a central DHCP server).
  
-## Scopes and Special Addresses+===== Scopes and Special Addresses ===== 
  
 When working in the world of IPv6, our addresses can vary depending on our scope (i.e. what part of a network):   When working in the world of IPv6, our addresses can vary depending on our scope (i.e. what part of a network):  
Line 55: Line 60:
 A host can have **multiple** addresses in different scopes, even on the same interface. A host can have **multiple** addresses in different scopes, even on the same interface.
  
-## Subnetting+===== Subnetting =====
  
 As in IPv4, IPv6 includes support for network segmentation via Subnetting. In the image below, the first 64 bits are designated as the `Network` portion, while the last 64 bits are for `Host` identification. Within the network portion, the first 48 bits are the `Routing Prefix` - aka the Network Address. The next and final 16 bits of the network notion is the `Subnet ID` or subnet address. As in IPv4, IPv6 includes support for network segmentation via Subnetting. In the image below, the first 64 bits are designated as the `Network` portion, while the last 64 bits are for `Host` identification. Within the network portion, the first 48 bits are the `Routing Prefix` - aka the Network Address. The next and final 16 bits of the network notion is the `Subnet ID` or subnet address.
Line 71: Line 76:
 If my ISP **delegated** part of the prefix to me (e.g. `2003:1000:1000:1600/56`), then I could use the subnets `1600` to `16FF` for my own purposes (giving me 256 available subnets). If my ISP **delegated** part of the prefix to me (e.g. `2003:1000:1000:1600/56`), then I could use the subnets `1600` to `16FF` for my own purposes (giving me 256 available subnets).
  
-## IPv6 Addresses in URIs/URLs+===== IPv6 Addresses in URIs/URLs =====
  
 Because IPv6 address notation uses colons to isolate hextets, it is necessary to encase the address in square brackets in URIs. For example `http://[2a00:1450:4001:82a::2004]`. If you wish to specify a port, you can do so as normal using a colon following the closing square bracket: `http://[2a00:1450:4001:82a::2004]:80`. Because IPv6 address notation uses colons to isolate hextets, it is necessary to encase the address in square brackets in URIs. For example `http://[2a00:1450:4001:82a::2004]`. If you wish to specify a port, you can do so as normal using a colon following the closing square bracket: `http://[2a00:1450:4001:82a::2004]:80`.
  
-## Multicast+===== Multicast =====
  
 Communication from one node to another is called **Unicast**. Communication from one node to many is called **Multicast**. Communication from one node to another is called **Unicast**. Communication from one node to many is called **Multicast**.
Line 93: Line 98:
 You can actually ping these addresses, e.g. `ping ff02::1` You can actually ping these addresses, e.g. `ping ff02::1`
  
-## ICMP Message Types+===== ICMP Message Types =====
  
 ICMP does not use ports in order to communicate, but rather **types**. Critical/important types have numbers ranging from 1-127, while informational types have the numbers 128 and above. Each **type** can have subtypes or rather **codes** that can be used for further specifications.   ICMP does not use ports in order to communicate, but rather **types**. Critical/important types have numbers ranging from 1-127, while informational types have the numbers 128 and above. Each **type** can have subtypes or rather **codes** that can be used for further specifications.  
Line 119: Line 124:
 A full list is maintained by [IANA](https://www.iana.org/assignments/icmpv6-parameters/icmpv6-parameters.xhtml) A full list is maintained by [IANA](https://www.iana.org/assignments/icmpv6-parameters/icmpv6-parameters.xhtml)
  
-## DHCPv6+===== DHCPv6 =====
  
 IPv6 addresses can be distributed using the IPv6 version of the **Dynamic Host Configuration Protocol (DHCPv6)**. If a host wishes to obtain an IPv6 address via DHCPv6, it sends out a **DHCP Solicitation** from UDP port 546 to port 547 on the DHCP multicast address `ff02::1:2`. The DHCP server then replies to the client (from UDP port 547 to UDP port 546) with **DHCP Advertisement**. This handshake can be completed by the client sending out a **DHCP Request** and the server responding with a **DHCP Reply** IPv6 addresses can be distributed using the IPv6 version of the **Dynamic Host Configuration Protocol (DHCPv6)**. If a host wishes to obtain an IPv6 address via DHCPv6, it sends out a **DHCP Solicitation** from UDP port 546 to port 547 on the DHCP multicast address `ff02::1:2`. The DHCP server then replies to the client (from UDP port 547 to UDP port 546) with **DHCP Advertisement**. This handshake can be completed by the client sending out a **DHCP Request** and the server responding with a **DHCP Reply**
Line 125: Line 130:
 The DHCPv6 protocol is explained in more detail in this [Wikipedia Article](https://en.wikipedia.org/wiki/DHCPv6) The DHCPv6 protocol is explained in more detail in this [Wikipedia Article](https://en.wikipedia.org/wiki/DHCPv6)
  
-## DHCPv6 vs. SLAAC+===== DHCPv6 vs. SLAAC =====
  
-Depending on how the router and client are configured, the client can (and will) use both mechanisms (i.e. SLAAC and DHCP) to obtain IPv6 address allocations. The following table shows the possible configuration combinations:+Depending on how the router and client are configured, the client can (and will) use both mechanisms (i.e. SLAAC and DHCP) to obtain IPv6 address allocations. The possible configuration combinations are shown in the following table:
  
  
-## Using WireShark+===== Using WireShark =====
  
 To get a better understanding of IPv6 functionality, you can use the packet sniffing tool WireShark to trace the message flow. Here are some WS filters for IPv6 ICMP, DHCPv6 and Router Solicitation and Advertisements: To get a better understanding of IPv6 functionality, you can use the packet sniffing tool WireShark to trace the message flow. Here are some WS filters for IPv6 ICMP, DHCPv6 and Router Solicitation and Advertisements:
Line 142: Line 147:
 Router Solicit/Advertise and DHCPv6: `dhcpv6 or (icmpv6 and (icmpv6.type==134) or (icmpv6.type==133))` Router Solicit/Advertise and DHCPv6: `dhcpv6 or (icmpv6 and (icmpv6.type==134) or (icmpv6.type==133))`
  
-### Unicast vs. Multicast vs. Broadcast vs. Anycast+==== Unicast vs. Multicast vs. Broadcast vs. Anycast ==== 
  
 Within IPv6, there are a number of message options. All of these message types have a single host transmitting the message and all delivery is handled by the switch or router: Within IPv6, there are a number of message options. All of these message types have a single host transmitting the message and all delivery is handled by the switch or router:
howtos/ipv6cheatsheet.txt · Last modified: 2024/09/20 15:53 by thum