RS (ICMPv6.Type=133)
Frame 29: 70 bytes on wire (560 bits), 70 bytes captured (560 bits) on interface -, id 0 Ethernet II, Src: HuaweiTe_60:33:15 (00:e0:fc:60:33:15), Dst: IPv6mcast_01 (33:33:00:00:00:01) Internet Protocol Version 6, Src: fe80::2e0:fcff:fe60:3315, Dst: ff02::1 Internet Control Message Protocol v6 Type: Router Solicitation (133) Code: 0 Checksum: 0x1a83 [correct] [Checksum Status: Good] Reserved: 00000000 ICMPv6 Option (Source link-layer address : 00:e0:fc:60:33:15) Type: Source link-layer address (1) Length: 1 (8 bytes) Link-layer address: HuaweiTe_60:33:15 (00:e0:fc:60:33:15)
RA (ICMPv6.Type=134)
Frame 3: 110 bytes on wire (880 bits), 110 bytes captured (880 bits) on interface -, id 0 Ethernet II, Src: HuaweiTe_64:0e:23 (00:e0:fc:64:0e:23), Dst: IPv6mcast_01 (33:33:00:00:00:01) Internet Protocol Version 6, Src: fe80::2e0:fcff:fe64:e23, Dst: ff02::1 Internet Control Message Protocol v6 Type: Router Advertisement (134) Code: 0 Checksum: 0xf0b7 [correct] [Checksum Status: Good] Cur hop limit: 64 Flags: 0x00, Prf (Default Router Preference): Medium 0... .... = Managed address configuration: Not set .0.. .... = Other configuration: Not set ..0. .... = Home Agent: Not set ...0 0... = Prf (Default Router Preference): Medium (0) .... .0.. = Proxy: Not set .... ..0. = Reserved: 0 Router lifetime (s): 1800 Reachable time (ms): 0 Retrans timer (ms): 0 ICMPv6 Option (Source link-layer address : 00:e0:fc:64:0e:23) Type: Source link-layer address (1) Length: 1 (8 bytes) Link-layer address: HuaweiTe_64:0e:23 (00:e0:fc:64:0e:23) ICMPv6 Option (Prefix information : 2002::/64) Type: Prefix information (3) Length: 4 (32 bytes) Prefix Length: 64 Flag: 0xc0, On-link flag(L), Autonomous address-configuration flag(A) 1... .... = On-link flag(L): Set .1.. .... = Autonomous address-configuration flag(A): Set ..0. .... = Router address flag(R): Not set ...0 0000 = Reserved: 0 Valid Lifetime: 2592000 Preferred Lifetime: 604800 Reserved Prefix: 2002::
Managed address configuration,或 Not Managed,或 M-bit,管理地址配置标识:
1)M-bit=0,默认值,此时收到该 RA 的终端将使用 RA 中包含的 IPv6 Prefix 来构造单播地址,即采用无状态地址自动配置。
2)M-bit=1,收到该 RA 的终端将使用 DHCPv6 来获取地址及其他信息。
—- 当 M-bit=1 时,终端可以忽略 O-bit,即终端将使用 DHCPv6 来获取地址及其他信息(如DNS等)。
3)在华为设备中,将 M-bit 设置为 1 的命令:ipv6 nd autoconfig managed-address-flag
Other configuration,或 Not Other,或 O-bit,其它有状态配置标识:
1)O-bit=0,默认值,此时收到该 RA 的终端进行无状态其他参数自动配置,
—- 即路由设备通过 RA 报文向终端发布除 IPv6 地址外的其他配置信息(目前,多数设备还未实现这些功能);
2)O-bit=1,收到该 RA 的终端将使用 DHCPv6 来获取除地址之外的其他参数。
3)在华为设备中,将 O-bit 设置为 1 的命令:ipv6 nd autoconfig other-flag
Autonomous address-configuration flag(A),或 A-bit,终端设备是否能使用 Prefix 进行无状态地址自动配置:
1)A-bit=0,此时终端不能使用在报文中的 Prefix 进行无状态地址自动配置。
2)A-bit=1,终端可以使用在报文中的 Prefix 进行无状态自动配置。
3)在华为设备中,将 A-bit 设置为 1 的命令: ipv6 nd ra prefix 2001:DB8:: 64 2592000 604800 no-autoconfig
—- 当接口配置多个 IPv6 地址后,我们能够通过该字段来限制某些地址前缀不要用于配置地址,否则客户端将生成两个地址;
—- 在华为设备中,要通过命令同时指定需要 no-autoconfig 和 autoconfig 的前缀,而不能单纯的限制 no-autoconfig 前缀;
Valid Lifetime,Preferred Lifetime,生存周期:
1)当终端获取到前缀并生成 IPv6 单播地址后,首先进入 Tentative 状态,在通过 DAD 后,该地址将进入 Preferred 状态;
2)在 Preferred 状态,终端正常收发报文。当 Preferred lifetime 后,地址进入 Deprecated 状态;
3)在 Deprecated 状态,该地址仍然有效,现有的连接可以继续使用该地址,但是无法使用该地址建立新的连接;
4)当 Valid lifetime 超时后,地址 Deprecated ⇒ Invalid 状态,表示该地址无法继续使用。