The next-generation Internet protocol IPv6

The next-generation Internet protocol IPv6

First, solutions IP address exhaustion

  • The development of the Internet itself and from the point of view of scale and network transmission rate, IPv4 has now very suitable from the computer.
  • The main problem is the 32-bit IP address is not enough.

In 2019/11/25 UTC + 1 15:35, the message from the European RIPE NCC's been confirmed: the global IPv4 address has been completely exhausted.

  • Measures to solve the problem of IP address depletion:
    • Classless addressing using CIDR, the allocation of IP addresses is more reasonable.
    • Using network address translation NAT method to save the global IP address.
    • The new version has a larger address space of the IP protocol IPv6.

Two basic header, IPv6's

The main changes 2.1.IPv6

  • Larger address space. The IPv6 address of the IPv4 increased from 32 to 128.
  • Extended address hierarchy.
  • Flexible header format.
  • Improved options.
  • Allowing the agreement to continue to expand.
  • Plug and Play (that is similar to DHCP auto-configuration)
  • Support for pre-allocation of resources.

Datagram header 2.2.IPv6

  • The IPv6 header length becomes a fixed 40 bytes, referred to as a basic header (base header).
  • The abolition of unnecessary functions, reducing the number of field header to only eight.
  • Cancel the test and field header, accelerate the speed of the router that handles the datagram.
  • Behind the header portion substantially allows zero or more extension header.
  • All extension headers and data together called a datagram payload (payload), or payload .

The general form of 2.3.IPv6 datagrams

image-20200208155507177

image-20200208155557335

2.4.IPv6 basic header eight field

  • Version (version) - 4 bits. It identifies the version of the protocol, the field is always 6 for IPv6.
  • Traffic class (traffic class) - 8 bits. This is to distinguish between different IPv6 datagram category or priority. Different experiments ongoing traffic class performance.

image-20200208155940772

  • 流标号(flow label)—— 20 位。 “流”是互联网络上从特定源点到特定终点的一系列数据报, “流”所经过的路径上的路由器都保证指明的服务质量。

    所有属于同一个流的数据报都具有同样的流标号。

  • 有效载荷长度(payload length)—— 16 位。它指明 IPv6 数据报除基本首部以外的字节数(所有扩展首部都算在有效载荷之内),其最大值是 64 KB。

image-20200208160048029

  • 下一个首部(next header)—— 8 位。它相当于 IPv4 的协议字段或可选字段。

  • 跳数限制(hop limit)—— 8 位。源站在数据报发出时即设定跳数限制。路由器在转发数据报时将跳数限制字段中的值减1。

    当跳数限制的值为零时,就要将此数据报丢弃。

image-20200208160247133

  • 源地址—— 128 位。是数据报的发送站的 IP 地址。
  • 目的地址—— 128 位。是数据报的接收站的 IP 地址。

image-20200208160543747


三、IPv6 的扩展首部

3.1.扩展首部及下一个首部字段

  • IPv6 把原来 IPv4 首部中选项的功能都放在扩展首部中,并将扩展首部留给路径两端的源站和目的站的主机来处理。
  • 数据报途中经过的路由器都不处理这些扩展首部(只有一个首部例外,即逐跳选项扩展首部)。
  • 这样就大大提高了路由器的处理效率
  • 无扩展首部:

image-20200208164459649

  • 有扩展首部:

image-20200208164519921

六种扩展首部

  • 逐跳选项;
  • 路由选择;
  • 分片;
  • 鉴别;
  • 封装安全有效载荷;
  • 目的站选项 ;

3.2.扩展首部举例:分片首部

  • IPv6 把分片限制交由源站来完成。源站可以采用最小 MTU(1280字节),或者在发送数据前完成路径最大传送单元发现(Path MTU Discovery),以确定沿着该路径到目的站的最小 MTU。
  • 分片扩展首部的格式如下:

image-20200208165239155

  • IPv6 数据报的有效载荷长度为 3000 字节。下层的以太网的最大传送单元 MTU 是 1500 字节。分成三个数据报片,两个 1400 字节长,最后一个是 200 字节长。 数据报分为以下形式。

image-20200208165433583

用隧道技术来传送长数据报

  • 当路径途中的路由器需要对数据报进行分片时,就创建一个全新的数据报,然后将这个新的数据报分片,并在各个数据报片中插入扩展首部和新的基本首部。
  • 路由器将每个数据报片发送给最终的目的站,而在目的站将收到的各个数据报片收集起来,组装成原来的数据报,再从中抽取出数据部分。

四、IPv6 的地址空间

4.1.地址的类型与地址空间

IPv6 数据报的目的地址可以是以下三种基本类型地址之一:

  • 单播(unicast) 单播就是传统的点对点通信。
  • 多播(multicast) 多播是一点对多点的通信。
  • 任播(anycast) 这是 IPv6 增加的一种类型。任播的目的站是一组计算机,但数据报在交付时只交付其中的一个,通常是距离最近的一个。

结点与接口

  • IPv6 将实现 IPv6 的主机和路由器均称为结点
  • IPv6 地址是分配给结点上面的接口。
    • 一个接口可以有多个单播地址。
    • 一个结点接口的单播地址可用来唯一地标志该结点。

冒号十六进制记法

  • IPv6的 128 位地址每 16 位 用一个十六进制值表示,各值之间用冒号分隔,一共有8个十六进制数。

    如:68E6:8C64:FFFF:FFFF:0:1180:960A:FFFF;

    而IPv4则为 32 位的地址每 8 位用一个十六进制值表示,一共有4个十六进制数。

  • 零压缩(zero compression),即一连串连续的零可以为一对冒号所取代。

    如:FF05:0:0:0:0:0:0:B3 可以写成:FF05::B3

点分十进制记法的后缀法

  • 如:0:0:0:0:0:0:128.10.2.1 使用零压缩即可得出: ::128.10.2.1 。

  • CIDR 的斜线表示法仍然可用。

    如:60 位的前缀 12AB00000000CD3 可记为:

    ​ 12AB:0000:0000:CD30:0000:0000:0000:0000/60;

    或 12AB::CD30:0:0:0:0/60;

    或 12AB:0:0:CD30::/60;

4.2.地址空间的分配

IPv6 将 128 位地址空间分为两大部分。

  • 第一部分是可变长度的类型前缀,它定义了地址的目的;
  • 第二部分是地址的其余部分,其长度也是可变的;

image-20200208182240489

4.3.特殊地址

IPv6具有比IPv4更复杂的IP地址结构。 IPv6已经为特殊目的保留了几个地址和地址符号。 参见下表:

IPv6 Address Meaning
::/ 128 Unspecified Address
::/ 0 Default Route
::1 / 128 Loopback Address
  • 未指明地址 :如表所示,地址0:0:0:0:0:0:0:0/128是 16 字节的全 0 地址,不指定任何内容,称为未指定地址。 简化后,所有的0被压缩为:: / 128。
  • 默认路由:在IPv4中,地址0.0.0.0与网络掩码0.0.0.0表示默认路由。 相同的概念也适用于IPv6,地址0:0:0:0:0:0:0:0,网络掩码全0表示默认路由。 应用IPv6规则后,此地址压缩为:: / 0。
  • 环回地址: IPv4中的环回地址由127.0.0.1到127.255.255.255系列表示。 但在IPv6中,只有0:0:0:0:0:0:0:1/128表示环回地址。 环回地址后,可以表示为:: 1/128。
  • 基于 IPv4 的地址 前缀为 0000 0000 保留一小部分地址作为与 IPv4 兼容的。
  • 本地链路单播地址 : 它仅供于在网段,或广播域中的主机相互通信使用。这类主机通常不需要外部互联网服务,仅有主机间相互通讯的需求。IPv4链路本地地址定义在169.254.0.0/16地址块。 IPv6定义在fe80::/10地址块。

前缀为 0000 0000 的地址

  • 前缀为 0000 0000 是保留一小部分地址与 IPv4 兼容的,这是因为必须要考虑到在比较长的时期 IPv 4和 IPv6 将会同时存在,而有的结点不支持 IPv6。
  • 因此数据报在这两类结点之间转发时,就必须进行地址的转换。

image-20200208184816779

4.4.全球单播地址的等级结构

IPv6 扩展了地址的分级概念,使用以下三个等级:

(1) 全球路由选择前缀,占 48 位。

(2) 子网标识符,占16 位。

(3) 接口标识符,占 64 位。

image-20200208193458344


五、从 IPv4 向 IPv6 过渡

5.1.概述

  • 向 IPv6 过渡只能采用逐步演进的办法,同时,还必须使新安装的 IPv6 系统能够向后兼容。
  • IPv6 系统必须能够接收和转发 IPv4 分组,并且能够为 IPv4 分组选择路由。
  • Dual-stack (dual stack) refers to a prior full transition to IPv6, so that part of the host (or router) is provided with two protocol stacks, a IPv4 and a IPv6.

5.2 The use of dual stack transition from IPv4 to IPv6

image-20200208194022681

5.3 Tunneling transition from IPv4 to IPv6

image-20200208194122895

Guess you like

Origin www.cnblogs.com/AhuntSun-blog/p/12333020.html