User Tools

Site Tools


networking:ipv6

Differences

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

Link to this comparison view

Next revision
Previous revision
networking:ipv6 [2022/01/15 11:38] – created - external edit 127.0.0.1networking:ipv6 [2022/11/19 10:35] (current) – [Default Route] oscar
Line 1: Line 1:
 ====== IPv6 ====== ====== IPv6 ======
 ===== IPv6 Notation ===== ===== IPv6 Notation =====
-IPv6 addresses are 128 bits long (32 hexadecimal numbers) and consist of eight colon-delimited sections. Each section contains 2 bytes, and each byte is expressed as a hexadecimal number from 0 through FF. An IPv6 address looks like this:+IPv6 addresses are 128 bits long (32 hexadecimal numbers) and consist of eight colon-delimited sections. Each section contains 2 bytes, and each byte is expressed as a hexadecimal number from 0 through FF. An IPv6 address looks like this: **2001:0db8:0000:0000:0000:0800:200c:7334**. By omitting the leading zeroes from each section or substituting contiguous sections that contain zeroes with a double colon, you can write the example address as:**2001:db8::800:200c:7334**.
  
-2001:0db8:0000:0000:0000:0800:200c:7334+===== Subnetting ===== 
 +An IPv6 address can be broken into a network address space and the nodes address space. The prefix length is a decimal value that specifies the **number of the leftmost bits** in the address that make up the prefix. The prefix length follows a forward slash and, identifies the portion of the address owned by an organization. All remaining bits (up to the right-most bit) represent individual nodes or interfaces.  
 +For example, **2001:db8:0000:0000:250:af:34ff:fe26/64** has a prefix length of **64**. The first 64 bits of this address (**2001:db8:0000:0000**) are the prefix. The rest (**250:af:34ff:fe26**) identify the interface. 
  
-By omitting the leading zeroes from each section or substituting contiguous sections that contain zeroes with a double colon, you can write the example address as:+IETF defined /64 to be the standard IPv6 subnet size. It is smallest subnet that can used locally if auto configuration is desired. Typically, an ISP assigns a /64 or smaller subnet to establish service on the WAN. An additional network is routed for LAN use.
  
-2001:db8:0:0:0:800:200c:7334 --> 2001:db8::800:200c:7334+^bits (MSB) ^Purpose^ 
 +|First 48 bits:|Network address| 
 +|Next 16 bits:|Subnet address| 
 +|Last 64 bits:|Device address|
  
-===== IPv6 Prefix ===== +===== Prefix ===== 
-An IPv6 address can be broken into a network address space and the nodes address space. The prefix length is a decimal value that specifies the **number of the leftmost bits** in the address that make up the prefix. The prefix length follows a forward slash and, identifies the portion of the address owned by an organization. All remaining bits (up to the right-most bit) represent individual nodes or interfaces.+The default IPV6 prefix is 64-bit and consists on the network an subnet parts.
  
-For example, 2001:db8:0000:0000:250:af:34ff:fe26/64 has a prefix length of 64.+**//Network+Subnet = Prefix//**
  
-The first 64 bits of this address (2001:db8:0000:0000) are the prefix. The rest (250:af:34ff:fe26identify the interface+The following address **2003:1000:1000:1600:1234::1** would have the network **2003:1000:1000**, the subnet **1600**, so together the prefix **2003:1000:1000:1600**If the ISP provider delegated a part of the prefix to me (e.g. 2003:1000:1000:1600/56then I could use the subnets from 2003:1000:1000:1600 to 2003:1000:1000:16FF for my own purposes (i.e. define 256 subnets in this example)
  
 +Ziggo provides a Prefix Delegated of 56-bits: **2001:1c00:2e16:7200::/56**.This means that Ziggo provides you /56 IPv6 address range. This allows you to create 256 subnets each being /64 large. 
 +
 +===== Scopes =====
 +  * GLOBAL - everything (i.e. the whole internet)
 +  * UNIQUE LOCAL - everything in our LAN (behind the internet gateway)
 +  * LINK LOCAL - (will never be routed, valid in one collision domain, i.e. on the same switch)
 +
 +^range^Purpose^
 +|::1/128 |Loopback address (localhost)|
 +|::/128 |unspecified address|
 +|2000::/3 |GLOBAL unicast (Internet)|
 +|fc00::/ |Unique-local (LAN)|
 +|fe80::/10 |Link-Local Unicast (same switch)|
 +
 +Always use the smallest possible scope for communication
 +A host can have multiple addresses in different scopes
 ===== IPv6 Address Types ===== ===== IPv6 Address Types =====
 ==== Unicast ==== ==== Unicast ====
Line 47: Line 68:
 |2002::/16 | 6to4 | Example: 2002:cb0a:3cdd:1::1 A 6to4 gateway adds its IPv4 address to this 2002::/16, creating a unique /48 prefix. As the IPv4 address of the gateway router is used to compose the IPv6 prefix, it is possible to reverse the process and identify the IPv4 address, which can then be looked up in the relevant RIR’s Whois database. There is no equivalent but 192.88.99.0/24 has been reserved as the 6to4 relay anycast address prefix by the IETF. You can do this on the following webpage: http://www.potaroo.net/cgi-bin/ipv6addr|No equivalent| |2002::/16 | 6to4 | Example: 2002:cb0a:3cdd:1::1 A 6to4 gateway adds its IPv4 address to this 2002::/16, creating a unique /48 prefix. As the IPv4 address of the gateway router is used to compose the IPv6 prefix, it is possible to reverse the process and identify the IPv4 address, which can then be looked up in the relevant RIR’s Whois database. There is no equivalent but 192.88.99.0/24 has been reserved as the 6to4 relay anycast address prefix by the IETF. You can do this on the following webpage: http://www.potaroo.net/cgi-bin/ipv6addr|No equivalent|
  
 +===== Assign IPv6 address =====
 +Ways to assign IPv6 addresses:
 +  - Static - fixed address
 +  - SLAAC - Stateless Address Autoconfiguration (host generates itself)
 +  - DHCPv6 - Dynamic host configuration protocol (assigned by central server)
 +
 +{{ :networking:slaac-dhcpv6.png?400 |}}
 +
 +==== SLAAC ====
 +Stateless Auto Address Configuration (SLAAC) enables hosts to create their own unique IPv6 global unicast address without the services of a DHCPv6 server that maintains network address information to know which IPv6 addresses are being used and which ones are available.
 +  * SLAAC router sends periodic ICMPv6 RA **Router Advertisement** messages (i.e., every 200 seconds) providing addressing and other configuration information for hosts to auto configure their IPv6 address based on the information in the RA.
 +  * SLAAC host configures it address using the **Router Advertisement** (RA) messages send by the router
 +  * A host can also send a **Router Solicitation** (RS) message requesting an RA.
 +  * SLAAC can be deployed as SLAAC only, or SLAAC with DHCPv6 
 +==== DHCPv6 ====
 +Stateful DHCPv6 does not require SLAAC while stateless DHCPv6 does. Regardless, when an RA indicates to use DHCPv6 or stateful DHCPv6:
 +  - The host sends an RS message.
 +  - The router responds with an RA message.
 +  - The host sends a DHCPv6 SOLICIT message.
 +  - The DHCPv6 server responds with an ADVERTISE message.
 +  - The host responds to the DHCPv6 server.
 +  - The DHCPv6 server sends a REPLY message.
 +=== Stateless DHCPv6 Operation ===
 +If an RA indicates the stateless DHCPv6 method:
 +  * the host uses the information in the RA message for addressing and contacts a DHCPv6 server for additional information. 
 +  * Note: The DHCPv6 server only provides configuration parameters for clients and does not maintain a list of IPv6 address bindings (i.e. stateless).
 +=== Statefull DHCPv6 Operation ===
 +If an RA indicates the statefull DHCPv6 method:
 +  * the host contacts a DHCPv6 server for all configuration information.
 +  * Note: The DHCPv6 server is statefull and maintains a list of IPv6 address bindings
 +
 +===== Troubleshooting =====
 +==== Show address ====
 +  ip -6 address show
 +==== Default Route ====
 +  ip -6 route show | grep default 
 +==== Ping the host ====
 +ping6 fe80::ee08:6bff:fe84:2043
 ==== Network Discovery ==== ==== Network Discovery ====
 <code> <code>
Line 69: Line 128:
 ping6 -c3 -n -I <your network interface fda1 ip> ff02::    --> lists all local network addresses ping6 -c3 -n -I <your network interface fda1 ip> ff02::    --> lists all local network addresses
 </code> </code>
 +
 +===== IPv6 addresses in URIs/URLs =====
 +Because IPv6 address notation uses colons to separate hextets, it is necessary to encase the address in square brackets in URIs. For example http://[2a00:1450:4001:82a::2004]. If you want to specify a port, you can do so as normal using a colon: http://[2a00:1450:4001:82a::2004]:80.
  
  
  
  
networking/ipv6.1642246727.txt.gz · Last modified: by 127.0.0.1