目录

简介

本文档介绍IPv6跟踪路由在6PE或6VPE网络中返回的内容。

这些示例取自运行6PE的网络。对于运行6VPE的网络,结果相同。在6PE和6VPE网络的情况下,P路由器在标签堆栈中接收带有两个MPLS标签的traceroute数据包。如果P路由器生成Internet控制消息协议(ICMP)错误消息,指出生存时间(TTL)已过期,则它使用原始traceroute数据包的标签栈,并将ICMP错误消息转发到出口提供商边缘(PE)路由器。此时,ICMP错误消息会转发回traceroute的发起方。

注意:本文仅适用于运行Cisco IOS®的P路由器

例 1

  • P路由器支持IPv6。
  • P路由器已启用IPv6单播路由和IPv6 CEF。
  • P路由器没有IPv6地址。
CE1#trace                              
Protocol [ip]: ipv6
Target IPv6 address:  2001:10:100:1::7
Source address: 2001:10:100:1::5
Insert source routing header? [no]:
Numeric display? [no]:
Timeout in seconds [3]:
Probe count [3]:
Minimum Time to Live [1]:
Maximum Time to Live [30]:
Priority [0]:
Port Number [0]:
Type escape sequence to abort.
Tracing the route to 2001:10:100:1::7

  1 2001:10:1:5::1 1 msec 1 msec 0 msec
  2 ::FFFF:10.1.2.4 [MPLS: Labels 17/23 Exp 0] 2 msec 2 msec 1 msec
  3 2001:10:1:7::2 [AS 1] [MPLS: Label 23 Exp 0] 2 msec 1 msec 1 msec
  4 2001:10:1:7::7 [AS 1] 2 msec 1 msec 2 msec
  • P路由器使用IPv4映射的IPv6地址进行应答:::FFFF:10.1.2.4。
  • 10.1.2.4是P路由器上传入接口的IPv4地址。

案例 2

  • P路由器支持IPv6。
  • P路由器已启用IPv6单播路由和IPv6 CEF。
  • P路由器确实有IPv6地址。

CE1#trace
Protocol [ip]: ipv6
Target IPv6 address: 2001:10:100:1::7
Source address: 2001:10:100:1::5  
Insert source routing header? [no]:
Numeric display? [no]:
Timeout in seconds [3]:
Probe count [3]:
Minimum Time to Live [1]:
Maximum Time to Live [30]:
Priority [0]:
Port Number [0]:
Type escape sequence to abort.
Tracing the route to 2001:10:100:1::7

  1 2001:10:1:5::1 1 msec 1 msec 0 msec
  2 2001:2001::1 [MPLS: Labels 17/23 Exp 0] 2 msec 1 msec 1 msec
  3 2001:10:1:7::2 [AS 1] [MPLS: Label 23 Exp 0] 1 msec 1 msec 1 msec
  4 2001:10:1:7::7 [AS 1] 2 msec 2 msec 1 msec
  • P路由器在传入接口上回复IPv6地址。
  • 如果该接口上没有IPv6地址,它会尝试从另一个接口查找IPv6地址。

但是,在较新的代码中,P路由器使用IPv4映射的IPv6地址进行应答。

CE1#trace             
Protocol [ip]: ipv6              
Target IPv6 address:  2001:10:100:1::7
Source address: 2001:10:100:1::5  
Insert source routing header? [no]:
Numeric display? [no]:
Timeout in seconds [3]:
Probe count [3]:
Minimum Time to Live [1]:
Maximum Time to Live [30]:
Priority [0]:
Port Number [0]:
Type escape sequence to abort.
Tracing the route to 2001:10:100:1::7

  1 2001:10:1:5::1 1 msec 0 msec 1 msec
  2 ::FFFF:10.1.2.4 [MPLS: Labels 17/23 Exp 0] 2 msec 1 msec 2 msec
  3 2001:10:1:7::2 [AS 1] [MPLS: Label 23 Exp 0] 1 msec 2 msec 2 msec
  4 2001:10:1:7::7 [AS 1] 2 msec 2 msec 2 msec
  • P路由器使用IPv4映射的IPv6地址进行应答:::FFFF:10.1.2.4。
  • 10.1.2.4是P路由器上传入接口的IPv4地址。

案例 3

  • P路由器支持IPv6。
  • P路由器未启用IPv6单播路由和IPv6 CEF。
  • P路由器没有IPv6地址。
CE1#trace             
Protocol [ip]: ipv6              
Target IPv6 address:  2001:10:100:1::7
Source address: 2001:10:100:1::5  
Insert source routing header? [no]:
Numeric display? [no]:
Timeout in seconds [3]:
Probe count [3]:
Minimum Time to Live [1]:
Maximum Time to Live [30]:
Priority [0]:
Port Number [0]:
Type escape sequence to abort.
Tracing the route to 2001:10:100:1::7

  1 2001:10:1:5::1 1 msec 1 msec 1 msec
  2 ::FFFF:10.1.2.4 [MPLS: Labels 17/23 Exp 0] 2 msec 2 msec 2 msec
  3 2001:10:1:7::2 [AS 1] [MPLS: Label 23 Exp 0] 2 msec 1 msec 1 msec
  4 2001:10:1:7::7 [AS 1] 2 msec 1 msec 2 msec
  • P路由器使用IPv4映射的IPv6地址进行应答:::FFFF:10.1.2.4。
  • 10.1.2.4是P路由器上传入接口的IPv4地址。

案例 4

P路由器不支持IPv6。

CE1#trace             
Protocol [ip]: ipv6              
Target IPv6 address:  2001:10:100:1::7
Source address: 2001:10:100:1::5  
Insert source routing header? [no]:
Numeric display? [no]:
Timeout in seconds [3]:
Probe count [3]:
Minimum Time to Live [1]:
Maximum Time to Live [30]:
Priority [0]:
Port Number [0]:
Type escape sequence to abort.
Tracing the route to 2001:10:100:1::7

  1 2001:10:1:5::1 1 msec 0 msec 1 msec
  2  *  *  *
  3 2001:10:1:7::2 [AS 1] [MPLS: Label 23 Exp 0] 2 msec 1 msec 1 msec
  4 2001:10:1:7::7 [AS 1] 1 msec 2 msec 1 msec
  • P路由器不会应答(您在traceroute输出中看到“* * *”)。
  • P路由器无法生成ICMPv6错误消息。

案例 5

  • P路由器是MFI前代码(Cisco IOS)。
  • P路由器支持IPv6。
CE1#trace             
Protocol [ip]: ipv6              
Target IPv6 address:  2001:10:100:1::7
Source address: 2001:10:100:1::5  
Insert source routing header? [no]:
Numeric display? [no]:
Timeout in seconds [3]:
Probe count [3]:
Minimum Time to Live [1]:
Maximum Time to Live [30]:
Priority [0]:
Port Number [0]:
Type escape sequence to abort.
Tracing the route to 2001:10:100:1::7

  1 2001:10:1:5::1 1 msec 0 msec 1 msec
  2  *  *  *
  3 2001:10:1:7::2 [AS 1] [MPLS: Label 23 Exp 0] 2 msec 1 msec 1 msec
  4 2001:10:1:7::7 [AS 1] 1 msec 2 msec 1 msec
  • P路由器不会应答(您在traceroute输出中看到“* * *”)。
  • 运行MFI前代码(Cisco IOS)的P路由器不检查IPv6是否遵循标签栈。

结论

  • 如果P路由器不支持IPv6,它将不会回复。
  • 如果P路由器支持IPv6,但P路由器具有MFI之前的代码(Cisco IOS),则它不会回复。
  • 如果P路由器支持IPv6,并且没有IPv6地址,则它将使用IPv4映射的IPv6地址进行应答,其中IPv4地址是traceroute数据包传入接口上的地址。
  • 如果P路由器支持IPv6并具有IPv6地址,它将使用IPv4映射的IPv6地址(其中IPv4地址是traceroute数据包传入接口上的地址)进行应答,或者使用路由器上配置的IPv6地址进行应答。