Notes11:1IPv6 - echadbourne/NET-330 GitHub Wiki

{400B68C6-193D-42FB-9A2F-DB4D5D529DA4}

IPv6 and IPv4

What's the same?

  • Still connectionless
  • packets still self destruct after crossing a certain number of routers

What's new?

  • Address Size: IPv4 uses 32 bits, IPv6 uses 128 bits
  • Header Format: Almost every field in the header has been changes from v4 to v6
    • Rather than include fields in the standard header to handle any specific issues that might occur, IPv6 uses a standard header and deals with any optional data via extension headers

The standard IPv6 header is 40 bytes long

  • Constand format, fixed size
  • Twice as large as the standard IPv4 header, but it has fewer fields

Consistent size designed to reduce processing time at the destination and on intervening routers

  • Ipv4 headers are all different sizes

{5E572FC5-863A-48EC-A654-E68EC791D7FD}

IPv6 Fields

  • Version (6)
  • Traffic Class (used to classify packets to provide QoS for different traffic types
  • Flow Label (To associate a packet with a particular path)
  • Payload length (Size of payload + Extension headers)
  • Hop limit (TTL replacement)
  • Next Header:

{C4232ADE-D0B3-4A08-BC26-04E5204BE671}

{1CB26D34-2EF4-4C0F-981D-3A6A31AF7FD2}

{1CE08CBC-053B-41C6-A4C8-410D105B9BBA}

IPv6 defines a set of special addresses that differ from IPv4 special addresses

  • IPv6 does not include a special address for broadcasting on a given remote network

{87FD97B1-C1D7-41A1-BE39-30EE5D3AAA83}

IPv6 Colon Hexadecimal Notation

So how do we write a 128-bit IP address

  • Dotted decimal not helpful: 105.220.136.100.255.255.255.255.0.0.18.128.140.10.255.255
  • Instead we use colon hexadecimal notation: 69DC : 8864 : FFFF : FFFF : 0000 : 1280 : 8C0A : FFFF
    • Each group of 16 bits is written in hexadecimal, with a colon separating each group

IPv6 Shortening Options

  • Leading zeros can be omitted from each group

    • Old: 3ffe:1900:4545:0003:0200:f8ff:fe21:67cf
    • New: 3ffe:1900:4545:3:200:f8ff:fe21:67cf
  • A double colon (::) can be used once in an address to replace multiple fields of zeros. This is known as zero compression

    • Old: fe80:0:0:0:200:f8ff:fe21:67cf
    • New: fe80::200:f8ff:fe21:67cf

IPv6 Subnetting

Typically, they are composed of two logical parts:

  • A 64-bit network prefix used for routing (network ID)
    • 48 bits for the assigned "routing prefix," 16 bits for subnetting
  • A 64-bit interface identifier used to identify a host (Host ID)

For subnet masks, CIDR is the preferred representation

  • fe80::200:f8ff:fe21:67cf/24 > 24 bits for network address, 104 for host

{57A45C96-B9D9-449E-8AEF-55C9231F9094}

Ipv6 addresses use 128 bits to represent an address which includes bits to be used for subnetting. The second half of the address (least significant 64 bits) is always used for hosts only. Therefore, there is no compromise if we subnet the network

{F061A8F4-8929-4982-A711-5874DCDD265D}

16 bits of subnet is equivalent for IPv4's class B network. Using these subnet bits, an organization can have another 65 thousands of subnets which is by far more than enough

Can further subnet the network beyond 16 bits of subnet ID, by borrowing host bits; but it is recommended that 64 bits should always be used for hosts addresses because auto-configuration requires 64 bits

IPv6 subnetting works on the same concept as Variable Length Subnet Masking in IPv4

Example Network

Champlain College is assigned the prefix:

  • 2620:34:c000/48

So we can create subnets, where green is subnet and blue is host

{9D8A0DFD-9576-484A-8A8E-0EB62E23F4A4}

Address format and allocations

IPv6

  • Requires each single interface within each device to have its own unique interface identifier (typically the second 64 bits)
  • Specifies that interface identifiers can use the "Modifies EUI-64 format" - Essentially the host sets its own "interface identifier"
  • These can be created using different methods, such as:
    • Use of 48 bit MAC address in the 64-bit ID (SLAAC)
    • Use of the existing IPv4 address in the 64-bit ID
    • Link-Local: Equivalent to Windows default IP addressing fe80::/10 usually implemented as fe80::/64 (random number)

Stateless address autoconfiguration

  • IPv6 does not use DHCP
  • Instead, we can build our own IPv6 address:
    • Get the network ID from the router
    • Generate our own host ID (usually via our MAC address)
  • But MAC addresses are only 48 bits
    • So we add FFFE between the OUI and the unique identifier to create our 64-bit host ID
    • The seventh bit in the OUI is becomes 1

{333C5E45-0653-4E9F-B903-680927C65ADD}

IPv6 address mapped from IPv4

  • 80 0s
  • Last 32 bits are the IPv4 address
  • 16 bits in middle either all 0s (IPv4 compatible) or all 1's (IPv4 mapped)
    • IPv4 compatible: used for device compatible with both v4 and v6
    • IPv4 Mapped: Used for devices that are not v6 compatible
  • Compatible are used to tunnel routers

{193E4C12-E1BA-4823-A244-3BA77B68E690}

Link Local addresses

An address that is assigned to an interface when it has not received an address any other way

Used more frequently in IPv6

  • Router solicitation
  • Neighbor Discovery

IPv4 169.254.0.0/16

IPv6 fe80::/10

IPv6 associated protocols

ICMPv6

ARP > NDP

DHCPv6

ICMP functions much the same in IPv6 as it does in IPv4. Recall that ICMP has much broader functionality than simply pinging between devices

ICMPv6

{47068330-61C7-4685-878B-8ECD3799390F}

Types

  • A total of 256 different possible message types can be defined for each of ICMPv4 and ICMPv6. The type field that appears in the header of each message specifies the kind of ICMP message
  • In ICMPv4 there is no relationship between type value and message type; in ICMPv6 error messages have a type value of 0 to 127, information messages 128 to 255

Codes

  • Provide a a bit more information about the ICMP type, but are not used at all for many types

Useful Link: http://www.tcpipguide.com/free/t_ICMPMessageClassesTypesandCodes-3.htm

{0FF14999-BA79-40C1-9762-F8A9D64C3382}

Neighbor discovery protocol (NDP)

  • An umbrella that defines these mechanisms:
    • Substitute of ARP, which has been removed in IPv6. The new mechanism uses a combination of ICMPv6 messages and multicast addresses
    • Stateless auto-configuration allows notes on the local link to configure their IPv6 addresses by themselves by using a mix is ICMPv6 messages and multicast addresses
    • router redirection - the router sends ICMPv6 messages to an IPv6 note toinform it of the presence of a better router address on the same local link to reach a designation network

Implemented as ICMPv6 with options

{EFCA16E0-CDF1-4CCD-AFC5-7B44BE092510}

{58588A90-53DE-4BE8-916C-392E585A2C54}

Neighbor solicitations are sent to a "solicited-node multicast address"

  • Each machine on a network is required to join such a group for each of its IPv6 addresses
  • Neighbor advertisements are to neighbor
  • ICMPv6 type values

DHCP v6

Similarities

  • Both protocols use the concepts of a DHCP client, DHCP relay and DHCP server
  • Both use the concepts of scopes and leases
  • Both use a 4-message stateful exchange between client and server
    • IPV4: DORA
    • IPv6: Solicit/Advertise/Request/Reply(SARR)

{52077EE3-7AD3-480E-A0C3-6E4B23F2D306}