Network Working Group                                          R. Draves
Request for Comments: 4191                                     D. Thaler
Category: Standards Track                                      Microsoft
                                                           November 2005
        
Network Working Group                                          R. Draves
Request for Comments: 4191                                     D. Thaler
Category: Standards Track                                      Microsoft
                                                           November 2005
        

Default Router Preferences and More-Specific Routes

默认路由器首选项和更具体的路由

Status of This Memo

关于下段备忘

This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the "Internet Official Protocol Standards" (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited.

本文件规定了互联网社区的互联网标准跟踪协议,并要求进行讨论和提出改进建议。有关本协议的标准化状态和状态,请参考当前版本的“互联网官方协议标准”(STD 1)。本备忘录的分发不受限制。

Copyright Notice

版权公告

Copyright (C) The Internet Society (2005).

版权所有(C)互联网协会(2005年)。

Abstract

摘要

This document describes an optional extension to Router Advertisement messages for communicating default router preferences and more-specific routes from routers to hosts. This improves the ability of hosts to pick an appropriate router, especially when the host is multi-homed and the routers are on different links. The preference values and specific routes advertised to hosts require administrative configuration; they are not automatically derived from routing tables.

本文档描述了路由器广告消息的可选扩展,用于传送默认路由器首选项和从路由器到主机的更具体路由。这提高了主机选择适当路由器的能力,特别是当主机是多主机且路由器位于不同链路上时。向主机公布的首选项值和特定路由需要管理配置;它们不是自动从路由表派生的。

1. Introduction
1. 介绍

Neighbor Discovery [RFC2461] specifies a conceptual model for hosts that includes a Default Router List and a Prefix List. Hosts send Router Solicitation messages and receive Router Advertisement messages from routers. Hosts populate their Default Router List and Prefix List based on information in the Router Advertisement messages. A conceptual sending algorithm uses the Prefix List to determine if a destination address is on-link and uses the Default Router List to select a router for off-link destinations.

邻居发现[RFC2461]为主机指定一个概念模型,其中包括一个默认路由器列表和一个前缀列表。主机发送路由器请求消息并从路由器接收路由器广告消息。主机根据路由器广告消息中的信息填充其默认路由器列表和前缀列表。概念发送算法使用前缀列表确定目的地地址是否在链路上,并使用默认路由器列表为断开链路的目的地选择路由器。

In some network topologies where the host has multiple routers on its Default Router List, the choice of router for an off-link destination is important. In some situations, one router may provide much better performance than another for a destination. In other situations, choosing the wrong router may result in a failure to communicate. (Section 5 gives specific examples of these scenarios.)

在某些网络拓扑中,主机在其默认路由器列表上有多个路由器,为断开链路的目的地选择路由器很重要。在某些情况下,对于目的地,一个路由器可能比另一个路由器提供更好的性能。在其他情况下,选择错误的路由器可能导致通信失败。(第5节给出了这些场景的具体示例。)

This document describes an optional extension to Neighbor Discovery Router Advertisement messages for communicating default router preferences and more-specific routes from routers to hosts. This improves the ability of hosts to pick an appropriate router for an off-link destination.

本文档描述了邻居发现路由器广告消息的可选扩展,用于传送默认路由器首选项和从路由器到主机的更具体路由。这提高了主机为断开链接的目的地选择适当路由器的能力。

Note that since these procedures are applicable to hosts only, the forwarding algorithm used by the routers (including hosts with enabled IP forwarding) is not affected.

请注意,由于这些过程仅适用于主机,因此路由器(包括启用IP转发的主机)使用的转发算法不受影响。

Neighbor Discovery provides a Redirect message that routers can use to correct a host's choice of router. A router can send a Redirect message to a host, telling it to use a different router for a specific destination. However, the Redirect functionality is limited to a single link. A router on one link cannot redirect a host to a router on another link. Hence, Redirect messages do not help multi-homed (through multiple interfaces) hosts select an appropriate router.

邻居发现提供了一条重定向消息,路由器可以使用该消息来纠正主机对路由器的选择。路由器可以向主机发送重定向消息,告诉它为特定目的地使用不同的路由器。但是,重定向功能仅限于单个链接。一条链路上的路由器无法将主机重定向到另一条链路上的路由器。因此,重定向消息不能帮助多宿主(通过多个接口)主机选择适当的路由器。

Multi-homed hosts are an increasingly important scenario, especially with IPv6. In addition to a wired network connection, like Ethernet, hosts may have one or more wireless connections, like 802.11 or Bluetooth. In addition to physical network connections, hosts may have virtual or tunnel network connections. For example, in addition to a direct connection to the public Internet, a host may have a tunnel into a private corporate network. Some IPv6 transition scenarios can add additional tunnels. For example, hosts may have 6to4 [RFC3056] or configured tunnel [RFC2893] network connections.

多宿主主机是一个越来越重要的场景,尤其是在IPv6中。除了有线网络连接(如以太网)外,主机还可以有一个或多个无线连接(如802.11或蓝牙)。除了物理网络连接之外,主机还可以具有虚拟或隧道网络连接。例如,除了直接连接到公共互联网之外,主机还可以有一个进入私有公司网络的隧道。某些IPv6转换场景可以添加其他隧道。例如,主机可能有6to4[RFC3056]或配置的隧道[RFC2893]网络连接。

This document requires that the preference values and specific routes advertised to hosts require explicit administrative configuration. They are not automatically derived from routing tables. In particular, the preference values are not routing metrics and it is not recommended that routers "dump out" their entire routing tables to hosts.

本文档要求向主机公布的首选项值和特定路由需要明确的管理配置。它们不是自动从路由表派生的。特别是,首选项值不是路由度量,不建议路由器将其整个路由表“转储”到主机。

We use Router Advertisement messages, instead of some other protocol like RIP [RFC2080], because Router Advertisements are an existing standard, stable protocol for router-to-host communication. Piggybacking this information on existing message traffic from routers to hosts reduces network overhead. Neighbor Discovery shares with Multicast Listener Discovery the property that they both define host-to-router interactions, while shielding the host from having to participate in more general router-to-router interactions. In addition, RIP is unsuitable because it does not carry route lifetimes so it requires frequent message traffic with greater processing overheads.

我们使用路由器广告消息,而不是像RIP[RFC2080]这样的其他协议,因为路由器广告是路由器到主机通信的现有标准、稳定的协议。将这些信息携带到从路由器到主机的现有消息流量上可以减少网络开销。邻居发现与多播侦听器发现共享一个属性,即它们都定义主机到路由器的交互,同时保护主机不必参与更一般的路由器到路由器的交互。此外,RIP是不合适的,因为它不承载路由生命周期,所以它需要频繁的消息通信,并带来更大的处理开销。

The mechanisms specified here are backwards-compatible, so that hosts that do not implement them continue to function as well as they did previously.

此处指定的机制是向后兼容的,因此未实现这些机制的主机仍能像以前一样正常工作。

1.1. Conventions Used in This Document
1.1. 本文件中使用的公约

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119].

本文件中的关键词“必须”、“不得”、“必需”、“应”、“不应”、“应”、“不应”、“建议”、“可”和“可选”应按照[RFC2119]中所述进行解释。

2. Message Formats
2. 消息格式
2.1. Preference Values
2.1. 偏好值

Default router preferences and preferences for more-specific routes are encoded the same way.

默认路由器首选项和更具体路由的首选项编码方式相同。

Preference values are encoded as a two-bit signed integer, as follows:

首选项值编码为两位有符号整数,如下所示:

01 High 00 Medium (default) 11 Low 10 Reserved - MUST NOT be sent

01高00中(默认)11低10保留-不得发送

Note that implementations can treat the value as a two-bit signed integer.

请注意,实现可以将该值视为两位有符号整数。

Having just three values reinforces that they are not metrics and more values do not appear to be necessary for reasonable scenarios.

只有三个值,这就强化了它们不是度量,对于合理的场景来说,似乎不需要更多的值。

2.2. Changes to Router Advertisement Message Format
2.2. 路由器广告消息格式的更改

The changes from Neighbor Discovery [RFC2461] Section 4.2 and [RFC3775] Section 7.1 are as follows:

邻居发现[RFC2461]第4.2节和[RFC3775]第7.1节的变化如下:

       0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |     Type      |     Code      |          Checksum             |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      | Cur Hop Limit |M|O|H|Prf|Resvd|       Router Lifetime         |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Reachable Time                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                          Retrans Timer                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |   Options ...
      +-+-+-+-+-+-+-+-+-+-+-+-
        
       0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |     Type      |     Code      |          Checksum             |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      | Cur Hop Limit |M|O|H|Prf|Resvd|       Router Lifetime         |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Reachable Time                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                          Retrans Timer                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |   Options ...
      +-+-+-+-+-+-+-+-+-+-+-+-
        

Fields:

领域:

Prf (Default Router Preference) 2-bit signed integer. Indicates whether to prefer this router over other default routers. If the Router Lifetime is zero, the preference value MUST be set to (00) by the sender and MUST be ignored by the receiver. If the Reserved (10) value is received, the receiver MUST treat the value as if it were (00).

Prf(默认路由器首选项)2位有符号整数。指示是否首选此路由器而不是其他默认路由器。如果路由器生存期为零,发送方必须将首选项值设置为(00),接收方必须忽略该值。如果收到保留(10)值,则接收方必须将该值视为(00)。

Resvd (Reserved) A 3-bit unused field. It MUST be initialized to zero by the sender and MUST be ignored by the receiver.

Resvd(保留)一个3位未使用字段。发送方必须将其初始化为零,接收方必须忽略它。

Possible Options:

可能的选择:

Route Information These options specify prefixes that are reachable via the router.

路由信息这些选项指定可通过路由器访问的前缀。

Discussion:

讨论:

Note that in addition to the preference value in the message header, a Router Advertisement can also contain a Route Information Option for ::/0, with a preference value and lifetime. Encoding a preference value in the Router Advertisement header has some advantages:

请注意,除了消息头中的首选项值外,路由器播发还可以包含路由信息选项::/0,带有首选项值和生存期。在路由器广告报头中编码偏好值具有一些优点:

1. It allows for a distinction between the "best router for the default route" and the "router least likely to redirect common traffic", as described below in Section 5.1.

1. 它允许区分“默认路由的最佳路由器”和“最不可能重定向公共流量的路由器”,如下文第5.1节所述。

2. When the best router for the default route is also the router least likely to redirect common traffic (which will be a common case), encoding the preference value in the message header is more efficient than sending a separate option.

2. 当默认路由的最佳路由器也是最不可能重定向公共流量的路由器(这将是常见情况)时,在消息头中编码首选项值比发送单独的选项更有效。

2.3. Route Information Option
2.3. 路线信息选项
      0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |     Type      |    Length     | Prefix Length |Resvd|Prf|Resvd|
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                        Route Lifetime                         |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                   Prefix (Variable Length)                    |
      .                                                               .
      .                                                               .
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
      0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |     Type      |    Length     | Prefix Length |Resvd|Prf|Resvd|
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                        Route Lifetime                         |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                   Prefix (Variable Length)                    |
      .                                                               .
      .                                                               .
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

Fields:

领域:

Type 24

类型24

Length 8-bit unsigned integer. The length of the option (including the Type and Length fields) in units of 8 octets. The Length field is 1, 2, or 3 depending on the Prefix Length. If Prefix Length is greater than 64, then Length must be 3. If Prefix Length is greater than 0, then Length must be 2 or 3. If Prefix Length is zero, then Length must be 1, 2, or 3.

长度为8位无符号整数。选项的长度(包括类型和长度字段),以8个八位字节为单位。长度字段为1、2或3,具体取决于前缀长度。如果前缀长度大于64,则长度必须为3。如果前缀长度大于0,则长度必须为2或3。如果前缀长度为零,则长度必须为1、2或3。

Prefix Length 8-bit unsigned integer. The number of leading bits in the Prefix that are valid. The value ranges from 0 to 128. The Prefix field is 0, 8, or 16 octets depending on Length.

前缀长度为8位无符号整数。前缀中有效的前导位数。该值的范围为0到128。前缀字段是0、8或16个八位字节,具体取决于长度。

Prf (Route Preference) 2-bit signed integer. The Route Preference indicates whether to prefer the router associated with this prefix over others, when multiple identical prefixes (for different routers) have been received. If the Reserved (10) value is received, the Route Information Option MUST be ignored.

Prf(路由首选项)2位有符号整数。路由首选项指示当接收到多个相同的前缀(针对不同的路由器)时,是否优先选择与此前缀关联的路由器。如果收到保留(10)值,则必须忽略路由信息选项。

Resvd (Reserved) Two 3-bit unused fields. They MUST be initialized to zero by the sender and MUST be ignored by the receiver.

Resvd(保留)两个3位未使用字段。发送方必须将它们初始化为零,接收方必须忽略它们。

Route Lifetime 32-bit unsigned integer. The length of time in seconds (relative to the time the packet is sent) that the prefix is valid for route determination. A value of all one bits (0xffffffff) represents infinity.

路由生存期32位无符号整数。前缀对路由确定有效的时间长度(相对于发送数据包的时间),以秒为单位。所有一位的值(0xFFFFFF)表示无穷大。

Prefix Variable-length field containing an IP address or a prefix of an IP address. The Prefix Length field contains the number of valid leading bits in the prefix. The bits in the prefix after the prefix length (if any) are reserved and MUST be initialized to zero by the sender and ignored by the receiver.

包含IP地址或IP地址前缀的前缀可变长度字段。前缀长度字段包含前缀中的有效前导位数。前缀长度(如果有)之后的前缀中的位是保留的,发送方必须将其初始化为零,接收方则忽略。

Routers MUST NOT include two Route Information Options with the same Prefix and Prefix Length in the same Router Advertisement.

路由器不得在同一路由器公告中包含两个具有相同前缀和前缀长度的路由信息选项。

Discussion:

讨论:

There are several reasons for using a new Route Information Option instead of using flag bits to overload the existing Prefix Information Option:

使用新路由信息选项而不是使用标志位来重载现有前缀信息选项有几个原因:

1. Prefixes will typically only show up in one option, not both, so a new option does not introduce duplication.

1. 前缀通常只出现在一个选项中,而不是同时出现在两个选项中,因此新选项不会引入重复。

2. The Route Information Option is typically 16 octets while the Prefix Information Option is 32 octets.

2. 路由信息选项通常为16个八位字节,而前缀信息选项为32个八位字节。

3. Using a new option may improve backwards-compatibility with some host implementations.

3. 使用新选项可以提高与某些主机实现的向后兼容性。

3. Conceptual Model of a Host
3. 主机的概念模型

There are three possible conceptual models for a host implementation of default router preferences and more-specific routes, corresponding to different levels of support. We refer to these as type A, type B, and type C.

主机实现默认路由器首选项和更具体的路由有三种可能的概念模型,对应于不同的支持级别。我们将其称为A型、B型和C型。

3.1. Conceptual Data Structures for Hosts
3.1. 主机的概念数据结构

Type A hosts ignore default router preferences and more-specific routes. They use the conceptual data structures described in Neighbor Discovery [RFC2461].

类型A主机忽略默认路由器首选项和更具体的路由。它们使用邻居发现[RFC2461]中描述的概念数据结构。

Type B hosts use a Default Router List augmented with preference values, but ignore all Route Information Options. They use the Default Router Preference value in the Router Advertisement header. They ignore Route Information Options.

类型B主机使用默认路由器列表,并添加了首选项值,但忽略所有路由信息选项。它们使用路由器广告头中的默认路由器首选项值。它们忽略了路线信息选项。

Type C hosts use a Routing Table instead of a Default Router List. (The Routing Table may also subsume the Prefix List, but that is beyond the scope of this document.) Entries in the Routing Table have a prefix, prefix length, preference value, lifetime, and next-hop router. Type C hosts use both the Default Router Preference value in the Router Advertisement header and Route Information Options.

C型主机使用路由表而不是默认路由器列表。(路由表也可以包含前缀列表,但这超出了本文档的范围。)路由表中的条目具有前缀、前缀长度、首选项值、生存期和下一跳路由器。类型C主机使用路由器播发标头中的默认路由器首选项值和路由信息选项。

When a type C host receives a Router Advertisement, it modifies its Routing Table as follows. When processing a Router Advertisement, a type C host first updates a ::/0 route based on the Router Lifetime and Default Router Preference in the Router Advertisement message header. Then as the host processes Route Information Options in the Router Advertisement message body, it updates its routing table for each such option. The Router Preference and Lifetime values in a ::/0 Route Information Option override the preference and lifetime values in the Router Advertisement header. Updating each route is done as follows. A route is located in the Routing Table based on the prefix, prefix length, and next-hop router. If the received route's lifetime is zero, the route is removed from the Routing Table if present. If a route's lifetime is non-zero, the route is added to the Routing Table if not present and the route's lifetime and preference is updated if the route is already present.

当C型主机收到路由器播发时,它将修改其路由表,如下所示。处理路由器播发时,C型主机首先根据路由器播发消息头中的路由器生存期和默认路由器首选项更新::/0路由。然后,当主机处理路由器广告消息体中的路由信息选项时,它会为每个这样的选项更新其路由表。::/0路由信息选项中的路由器首选项和生存期值覆盖路由器播发标头中的首选项和生存期值。更新每个路由的操作如下所示。路由根据前缀、前缀长度和下一跳路由器位于路由表中。如果收到的路由的生存期为零,则该路由将从路由表中删除(如果存在)。如果路由的生存期非零,则如果路由不存在,则将该路由添加到路由表中,如果路由已存在,则更新路由的生存期和首选项。

For example, suppose hosts receive a Router Advertisement from router X with a Router Lifetime of 100 seconds and a Default Router Preference of Medium. The body of the Router Advertisement contains a Route Information Option for ::/0 with a Route Lifetime of 200 seconds and a Route Preference of Low. After processing the Router Advertisement, a type A host will have an entry for router X in its Default Router List with a lifetime of 100 seconds. If a type B host receives the same Router Advertisement, it will have an entry for router X in its Default Router List with a Medium preference and a lifetime of 100 seconds. A type C host will have an entry in its Routing Table for ::/0 -> router X, with a Low preference and a lifetime of 200 seconds. During processing of the Router Advertisement, a type C host MAY have a transient state, in which it has an entry in its Routing Table for ::/0 -> router X with a Medium preference and a lifetime of 100 seconds.

例如,假设主机从路由器X接收到路由器广告,路由器寿命为100秒,默认路由器首选项为Medium。路由器播发的正文包含路由信息选项::/0,路由生存期为200秒,路由首选项为低。在处理路由器公告后,a类主机将在其默认路由器列表中有一个路由器X条目,其生存期为100秒。如果类型B主机接收到相同的路由器播发,它将在其默认路由器列表中有一个路由器X条目,该条目具有中等首选项和100秒的生存期。C型主机在其路由表中将有一个条目,用于::/0->router X,首选项较低,生存期为200秒。在路由器播发的处理过程中,C型主机可能有一个瞬态,在该瞬态中,它的路由表中有一个条目::/0->Router X,具有中等首选项和100秒的生存期。

3.2. Conceptual Sending Algorithm for Hosts
3.2. 主机的概念发送算法

Type A hosts use the conceptual sending algorithm described in Neighbor Discovery [RFC2461].

A类主机使用邻居发现[RFC2461]中描述的概念发送算法。

When a type B host does next-hop determination and consults its Default Router List, it primarily prefers reachable routers over non-reachable routers and secondarily uses the router preference values. If the host has no information about the router's reachability, then the host assumes the router is reachable.

当类型B主机执行下一跳确定并参考其默认路由器列表时,它主要优先选择可到达路由器而不是不可到达路由器,其次使用路由器优先值。如果主机没有关于路由器可访问性的信息,则主机假定路由器是可访问的。

When a type C host does next-hop determination and consults its Routing Table for an off-link destination, it searches its routing table to find the route with the longest prefix that matches the destination, using route preference values as a tie-breaker if multiple matching routes have the same prefix length. If the best route points to a non-reachable router, this router is remembered for the algorithm described in Section 3.5 below, and the next best route is consulted. This check is repeated until a matching route is found that points to a reachable router, or no matching routes remain. Again, if the host has no information about the router's reachability, then the host assumes the router is reachable.

当类型C主机进行下一跳确定并参考其路由表查找断开链路的目的地时,它会搜索其路由表以查找具有与目的地匹配的最长前缀的路由,如果多个匹配路由具有相同的前缀长度,则使用路由首选项值作为连接断路器。如果最佳路由指向一个不可到达的路由器,该路由器将根据下面第3.5节所述的算法被记住,并参考下一个最佳路由。重复此检查,直到找到指向可访问路由器的匹配路由,或者没有匹配路由保留。同样,如果主机没有关于路由器可访问性的信息,那么主机假定路由器是可访问的。

If there are no routes matching the destination (i.e., no default routes and no more-specific routes), then a type C host SHOULD discard the packet and report a Destination Unreachable/No Route To Destination error to the upper layer.

如果没有与目的地匹配的路由(即,没有默认路由和更多特定路由),则C型主机应丢弃该数据包,并向上层报告目的地不可到达/没有路由到目的地错误。

3.3. Destination Cache Management
3.3. 目标缓存管理

When a type C host processes a Router Advertisement and updates its conceptual Routing Table, it MUST invalidate or remove Destination Cache Entries and redo next-hop determination for destinations affected by the Routing Table changes.

当C型主机处理路由器播发并更新其概念路由表时,它必须使目标缓存项无效或删除,并重新确定受路由表更改影响的目标的下一跳。

3.4. Client Configurability
3.4. 客户端可配置性

Type B and C hosts MAY be configurable with preference values that override the values in Router Advertisements received. This is especially useful for dealing with routers that may not support preferences.

类型B和C主机可以配置为具有优先权值,优先权值覆盖接收到的路由器广告中的值。这对于处理可能不支持首选项的路由器特别有用。

3.5. Router Reachability Probing
3.5. 路由器可达性探测

When a host avoids using any non-reachable router X and instead sends a data packet to another router Y, and the host would have used router X if router X were reachable, then the host SHOULD probe each such router X's reachability by sending a single Neighbor

当主机避免使用任何不可到达的路由器X,而是向另一个路由器Y发送数据包,并且如果路由器X是可到达的,主机将使用路由器X,那么主机应该通过发送单个邻居来探测每个这样的路由器X的可到达性

Solicitation to that router's address. A host MUST NOT probe a router's reachability in the absence of useful traffic that the host would have sent to the router if it were reachable. In any case, these probes MUST be rate-limited to no more than one per minute per router.

请求到那个路由器的地址。如果没有可用的通信量,主机就不能探测路由器的可访问性,如果路由器是可访问的,主机将发送给路由器。在任何情况下,这些探测器的速率必须限制为每个路由器每分钟不超过一个。

This requirement allows the host to discover when router X becomes reachable and to start using router X at that time. Otherwise, the host might not notice router X's reachability and continue to use the less-desirable router Y until the next Router Advertisement is sent by X. Note that the router may have been unreachable for reasons other than being down (e.g., a switch in the middle being down), so it may be up to 30 minutes (the maximum advertisement period) before the next Router Advertisement would be sent.

此要求允许主机发现何时可以访问路由器X,并在此时开始使用路由器X。否则,主机可能不会注意到路由器X的可达性,并继续使用不太需要的路由器Y,直到下一个路由器广告由X. Note发送,路由器可能由于以下原因而无法到达(例如,中间的开关),因此它可能长达30分钟(最大广告周期)。在发送下一个路由器广告之前。

For a type A host (following the algorithm in [RFC2461]), no probing is needed since all routers are equally preferable. A type B or C host, on the other hand, explicitly probes unreachable, preferable routers to notice when they become reachable again.

对于a类主机(遵循[RFC2461]中的算法),不需要探测,因为所有路由器都是同样可取的。另一方面,B型或C型主机显式探测不可访问的、更可取的路由器,以便在它们再次可访问时注意它们。

3.6. Example
3.6. 实例

Suppose a type C host has four entries in its Routing Table:

假设C型主机的路由表中有四个条目:

      ::/0 -> router W with a Medium preference
      2002::/16 -> router X with a Medium preference
      2001:db8::/32-> router Y with a High preference
      2001:db8::/32-> router Z with a Low preference
        
      ::/0 -> router W with a Medium preference
      2002::/16 -> router X with a Medium preference
      2001:db8::/32-> router Y with a High preference
      2001:db8::/32-> router Z with a Low preference
        

and the host is sending to 2001:db8::1, an off-link destination. If all routers are reachable, then the host will choose router Y. If router Y is not reachable, then router Z will be chosen and the reachability of router Y will be probed. If routers Y and Z are not reachable, then router W will be chosen and the reachability of routers Y and Z will be probed. If routers W, Y, and Z are all not reachable, then the host should use Y while probing the reachability of W and Z. Router X will never be chosen because its prefix does not match the destination.

主机将发送到2001:db8::1,这是一个断开链接的目的地。如果所有路由器都可访问,则主机将选择路由器Y。如果路由器Y不可访问,则将选择路由器Z并探测路由器Y的可访问性。如果路由器Y和Z是不可到达的,那么将选择路由器W并探测路由器Y和Z的可到达性。如果路由器W、Y和Z都不可访问,则主机在探测W和Z的可访问性时应使用Y。路由器X将永远不会被选择,因为其前缀与目标不匹配。

4. Router Configuration
4. 路由协议配置模式

Routers SHOULD NOT advertise preferences or routes by default. In particular, they SHOULD NOT "dump out" their entire routing table to hosts.

默认情况下,路由器不应公布首选项或路由。特别是,它们不应该将整个路由表“转储”到主机。

Routers MAY have a configuration mode in which an announcement of a specific prefix is dependent on a specific condition, such as operational status of a link or presence of the same or another

路由器可以具有配置模式,其中特定前缀的通告取决于特定条件,例如链路的操作状态或相同或另一前缀的存在

prefix in the routing table installed by another source, such as a dynamic routing protocol. If done, router implementations SHOULD make sure that announcement of prefixes to hosts is decoupled from the routing table dynamics to prevent an excessive load on hosts during periods of routing instability. In particular, unstable routes SHOULD NOT be announced to hosts until their stability has improved.

由其他源(如动态路由协议)安装的路由表中的前缀。如果这样做,路由器实现应该确保向主机发送前缀的通知与路由表动态分离,以防止在路由不稳定期间主机负载过大。特别是,在不稳定路由的稳定性得到改善之前,不应向主机宣布不稳定路由。

Routers SHOULD NOT send more than 17 Route Information Options in Router Advertisements per link. This arbitrary bound is meant to reinforce that relatively few and carefully selected routes should be advertised to hosts.

路由器在每个链路的路由器广告中发送的路由信息选项不应超过17个。这种任意的界限是为了强调应该向主机通告相对较少且经过仔细选择的路由。

The preference values (both Default Router Preferences and Route Preferences) SHOULD NOT be routing metrics or automatically derived from metrics: the preference values SHOULD be configured.

首选项值(默认路由器首选项和路由首选项)不应是路由度量或自动从度量派生:应配置首选项值。

The information contained in Router Advertisements may change through the actions of system management. For instance, the lifetime or preference of advertised routes may change, or new routes could be added. In such cases, the router MAY transmit up to MAX_INITIAL_RTR_ADVERTISEMENTS unsolicited advertisements, using the same rules as in [RFC2461]. When ceasing to be an advertising interface and sending Router Advertisements with a Router Lifetime of zero, the Router Advertisement SHOULD also set the Route Lifetime to zero in all Route Information Options.

路由器广告中包含的信息可能会通过系统管理的操作而改变。例如,广告路由的生存期或首选项可能会改变,或者可能会添加新路由。在这种情况下,路由器可以使用与[RFC2461]中相同的规则发送最多MAX_INITIAL_RTR_广告。当不再是广告接口并发送路由器广告时,路由器广告的路由器寿命为零,路由器广告还应在所有路由信息选项中将路由寿命设置为零。

4.1. Guidance to Administrators
4.1. 对管理员的指导

The High and Low (non-default) preference values should only be used when someone with knowledge of both routers and the network topology configures them explicitly. For example, it could be a common network administrator, or it could be a customer request to different administrators managing the routers.

仅当了解路由器和网络拓扑结构的人员明确配置它们时,才应使用高和低(非默认)首选项值。例如,它可以是普通网络管理员,也可以是客户向管理路由器的不同管理员发出的请求。

As one exception to this general rule, the administrator of a router that does not have a connection to the Internet, or is connected through a firewall that blocks general traffic, should configure the router to advertise a Low Default Router Preference.

作为此一般规则的一个例外,未连接到Internet或通过防火墙连接的路由器的管理员应将路由器配置为公布较低的默认路由器首选项。

In addition, the administrator of a router should configure the router to advertise a specific route for the site prefix of the network(s) to which the router belongs. The administrator may also configure the router to advertise specific routes for directly connected subnets and any shorter prefixes for networks to which the router belongs.

此外,路由器的管理员应将路由器配置为公布路由器所属网络的站点前缀的特定路由。管理员还可以将路由器配置为通告直接连接的子网的特定路由以及路由器所属网络的任何较短前缀。

For example, if a home user sets up a tunnel into a firewalled corporate network, the access router on the corporate network end of the tunnel should advertise itself as a default router, but with a Low preference. Furthermore, the corporate router should advertise a specific route for the corporate site prefix. The net result is that destinations in the corporate network will be reached via the tunnel, and general Internet destinations will be reached via the home ISP. Without these mechanisms, the home machine might choose to send Internet traffic into the corporate network or corporate traffic into the Internet, leading to communication failure because of the firewall.

例如,如果家庭用户设置了进入防火墙公司网络的隧道,则隧道公司网络端的接入路由器应将自己作为默认路由器进行宣传,但首选项较低。此外,公司路由器应为公司站点前缀公布特定路由。最终结果是,公司网络中的目的地将通过隧道到达,而一般互联网目的地将通过家庭ISP到达。如果没有这些机制,家庭计算机可能会选择将Internet流量发送到公司网络或将公司流量发送到Internet,从而由于防火墙而导致通信失败。

It is worth noting that the network administrator setting up preferences and/or more specific routes in Routing Advertisements typically does not know which kind of nodes (Type A, B, and/or C) will be connected to its links. This requires that the administrator configure the settings that will work in an optimal fashion regardless of which kinds of nodes will be attached. Two examples of how to do so follow.

值得注意的是,在路由公告中设置首选项和/或更具体路由的网络管理员通常不知道哪种类型的节点(类型A、B和/或C)将连接到其链路。这要求管理员配置将以最佳方式工作的设置,而不管将连接哪种类型的节点。下面是两个如何做到这一点的例子。

5. Examples
5. 例子
5.1. Best Router for ::/0 vs Router Least Likely to Redirect
5.1. 最佳路由器::/0与最不可能重定向的路由器

The best router for the default route is the router with the best route toward the wider Internet. The router least likely to redirect traffic depends on the actual traffic usage. The two concepts can be different when the majority of communication actually needs to go through some other router.

默认路由的最佳路由器是具有通向更广泛互联网的最佳路由的路由器。路由器最不可能重定向流量取决于实际流量使用情况。当大多数通信实际上需要通过其他路由器时,这两个概念可能会有所不同。

For example, consider a situation in which you have a link with two routers, X and Y. Router X is the best for 2002::/16. (It's your 6to4 site gateway.) Router Y is the best for ::/0. (It connects to the native IPv6 Internet.) Router X forwards native IPv6 traffic to router Y; router Y forwards 6to4 traffic to router X. If most traffic from this site is sent to 2002:/16 destinations, then router X is the one least likely to redirect.

例如,考虑一种情况下,你有两个路由器,X和Y的链接。路由器X是最好的2002::/ 16。(这是您的6to4站点网关。)路由器Y最适合::/0。(它连接到本机IPv6 Internet。)路由器X将本机IPv6流量转发给路由器Y;路由器Y将6to4流量转发给路由器X。如果此站点的大部分流量发送到2002:/16目的地,则路由器X是最不可能重定向的。

To make type A hosts work well, both routers should advertise themselves as default routers. In particular, if router Y goes down, type A hosts should send traffic to router X to maintain 6to4 connectivity, so router X and router Y need to be default routers.

为了使A型主机正常工作,两个路由器都应该将自己作为默认路由器进行宣传。特别是,如果路由器Y停机,类型A主机应该向路由器X发送通信量以保持6to4连接,因此路由器X和路由器Y需要是默认路由器。

To make type B hosts work well, router X should advertise itself with a High default router preference. This will cause type B hosts to prefer router X, minimizing the number of redirects.

为了使B型主机正常工作,路由器X应该使用高默认路由器首选项来宣传自己。这将导致B型主机更喜欢路由器X,从而最小化重定向的数量。

To make type C hosts work well, router X should in addition advertise the ::/0 route with a Low preference and the 2002::/16 route with a Medium preference. A type C host will end up with three routes in its routing table: ::/0 -> router X (Low), ::/0 -> router Y (Medium), 2002::/16 -> router X (Medium). It will send 6to4 traffic to router X and other traffic to router Y. Type C hosts will not cause any redirects.

为了使C型主机正常工作,路由器X还应以低首选项宣传::/0路由,以中等首选项宣传2002::/16路由。C型主机在其路由表中将有三条路由::/0->router X(低),::/0->router Y(中),2002::/16->router X(中)。它将向路由器X发送6to4流量,并向路由器Y发送其他流量。C型主机不会导致任何重定向。

Note that when type C hosts process the Router Advertisement from router X, the Low preference for ::/0 overrides the High default router preference. If the ::/0 specific route were not present, then a type C host would apply the High default router preference to its ::/0 route to router X.

请注意,当类型C主机处理来自路由器X的路由器播发时,:/0的低首选项将覆盖高默认路由器首选项。如果::/0特定路由不存在,则C型主机将对其::/0到路由器X的路由应用高默认路由器首选项。

5.2. Multi-Homed Host and Isolated Network
5.2. 多宿主机和隔离网络

In another scenario, a multi-homed host is connected to the Internet via router X on one link and to an isolated network via router Y on another link. The multi-homed host might have a tunnel into a firewalled corporate network, or it might be directly connected to an isolated test network.

在另一种情况下,多宿主机通过一条链路上的路由器X连接到Internet,并通过另一条链路上的路由器Y连接到隔离网络。多宿主主机可能有一个到防火墙公司网络的隧道,或者它可能直接连接到一个隔离的测试网络。

In this situation, a type A multi-homed host (which has no default router preferences or more-specific routes) will have no way to intelligently choose between routers X and Y on its Default Router List. Users of the host will see unpredictable connectivity failures, depending on the destination address and the choice of router.

在这种情况下,a型多宿主主机(没有默认路由器首选项或更具体的路由)将无法在其默认路由器列表上智能地选择路由器X和Y。主机用户将看到不可预测的连接故障,这取决于目标地址和路由器的选择。

If the routers are configured appropriately, a multi-homed type B host in this same situation would have stable Internet connectivity, but would have no connectivity to the isolated test network.

如果路由器配置适当,在相同情况下,多宿B型主机将具有稳定的Internet连接,但不会连接到隔离的测试网络。

If the routers are configured appropriately, a multi-homed type C host in this same situation can correctly choose between routers X and Y. For example, router Y on the isolated network should advertise a Route Information Option for the isolated network prefix. It might not advertise itself as a default router at all (zero Router Lifetime), or it might advertise itself as a default router with a Low preference. Router X should advertise itself as a default router with a Medium preference.

如果路由器配置适当,在相同情况下,多宿C型主机可以在路由器X和Y之间正确选择。例如,隔离网络上的路由器Y应为隔离网络前缀播发路由信息选项。它可能根本不会将自己作为默认路由器进行宣传(零路由器生存期),也可能将自己作为首选项较低的默认路由器进行宣传。路由器X应该将自己作为具有中等首选项的默认路由器进行宣传。

6. Security Considerations
6. 安全考虑

A malicious node could send Router Advertisement messages, specifying a High Default Router Preference or carrying specific routes, with the effect of pulling traffic away from legitimate routers. However, a malicious node could easily achieve this same effect in other ways.

恶意节点可以发送路由器广告消息,指定高默认路由器首选项或承载特定路由,从而将流量从合法路由器中拉离。但是,恶意节点可以通过其他方式轻松实现同样的效果。

For example, it could fabricate Router Advertisement messages with a zero Router Lifetime from the other routers, causing hosts to stop using the other routes. By advertising a specific prefix, this attack could be carried out in a less noticeable way. However, this attack has no significant incremental impact on Internet infrastructure security.

例如,它可以从其他路由器制造路由器广告消息,路由器寿命为零,从而导致主机停止使用其他路由。通过宣传特定前缀,这种攻击可以以不太明显的方式进行。但是,此攻击对Internet基础设施安全没有显著的增量影响。

A malicious node could also include an infinite lifetime in a Route Information Option causing the route to linger indefinitely. A similar attack already exists with Prefix Information Options in RFC 2461, where a malicious node causes a prefix to appear as on-link indefinitely, resulting in a lack of connectivity if it is not. In contrast, an infinite lifetime in a Route Information Option will cause router reachability probing to continue indefinitely, but will not result in a lack of connectivity.

恶意节点还可能在路由信息选项中包含无限生存期,从而导致路由无限期地逗留。RFC 2461中的前缀信息选项已经存在类似的攻击,其中恶意节点会导致前缀无限期地显示在链路上,否则会导致缺乏连接。相反,路由信息选项中的无限生存期将导致路由器可达性探测无限期地继续,但不会导致连通性不足。

Similarly, a malicious node could also try to overload hosts with a large number of routes in Route Information Options, or with very frequent Route Advertisements. Again, this same attack already exists with Prefix Information Options.

类似地,恶意节点还可能尝试使用路由信息选项中的大量路由或非常频繁的路由播发使主机过载。同样,使用前缀信息选项已经存在相同的攻击。

[RFC3756] provides more details on the trust models, and there is work in progress in the SEND WG on securing router discovery messages that will address these problems.

[RFC3756]提供了有关信任模型的更多详细信息,SEND WG正在努力保护路由器发现消息,以解决这些问题。

7. IANA Considerations
7. IANA考虑

Section 2.3 defines a new Neighbor Discovery [RFC2461] option, the Route Information Option, which has been assigned the value 24 within the numbering space for IPv6 Neighbor Discovery Option Formats.

第2.3节定义了一个新的邻居发现[RFC2461]选项,即路由信息选项,该选项已在IPv6邻居发现选项格式的编号空间内分配了值24。

8. Acknowledgements
8. 致谢

The authors would like to acknowledge the contributions of Balash Akbari, Steve Deering, Robert Elz, Tony Hain, Bob Hinden, Christian Huitema, JINMEI Tatuya, Erik Nordmark, Pekka Savola, Kresimir Segaric, and Brian Zill. The packet diagrams are derived from Neighbor Discovery [RFC2461].

作者要感谢巴拉什·阿克巴里、史蒂夫·迪林、罗伯特·埃尔兹、托尼·海恩、鲍勃·欣登、克里斯蒂安·惠特马、金美·塔图亚、埃里克·诺德马克、佩卡·萨沃拉、克雷西米尔·塞加里和布赖恩·齐尔的贡献。数据包图源自邻居发现[RFC2461]。

9. Normative References
9. 规范性引用文件

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.

[RFC2119]Bradner,S.,“RFC中用于表示需求水平的关键词”,BCP 14,RFC 2119,1997年3月。

[RFC2461] Narten, T., Nordmark, E., and W. Simpson, "Neighbor Discovery for IP Version 6 (IPv6)", RFC 2461, December 1998.

[RFC2461]Narten,T.,Nordmark,E.,和W.Simpson,“IP版本6(IPv6)的邻居发现”,RFC2461,1998年12月。

[RFC3775] Johnson, D., Perkins, C., and J. Arkko, "Mobility Support in IPv6", RFC 3775, June 2004.

[RFC3775]Johnson,D.,Perkins,C.,和J.Arkko,“IPv6中的移动支持”,RFC 37752004年6月。

10. Informative References
10. 资料性引用

[RFC2080] Malkin, G. and R. Minnear, "RIPng for IPv6", RFC 2080, January 1997.

[RFC2080]Malkin,G.和R.Minnear,“IPv6的RIPng”,RFC20801997年1月。

[RFC2893] Gilligan, R. and E. Nordmark, "Transition Mechanisms for IPv6 Hosts and Routers", RFC 2893, August 2000.

[RFC2893]Gilligan,R.和E.Nordmark,“IPv6主机和路由器的过渡机制”,RFC 2893,2000年8月。

[RFC3056] Carpenter, B. and K. Moore, "Connection of IPv6 Domains via IPv4 Clouds", RFC 3056, February 2001.

[RFC3056]Carpenter,B.和K.Moore,“通过IPv4云连接IPv6域”,RFC 3056,2001年2月。

[RFC3756] Nikander, P., Kempf, J., and E. Nordmark, "IPv6 Neighbor Discovery (ND) Trust Models and Threats", RFC 3756, May 2004.

[RFC3756]Nikander,P.,Kempf,J.,和E.Nordmark,“IPv6邻居发现(ND)信任模型和威胁”,RFC 37562004年5月。

Authors' Addresses

作者地址

Richard Draves Microsoft Research One Microsoft Way Redmond, WA 98052

Richard在华盛顿州雷德蒙市微软研究中心一号撰写微软研究报告,邮编:98052

   Phone: +1 425 706 2268
   EMail: richdr@microsoft.com
        
   Phone: +1 425 706 2268
   EMail: richdr@microsoft.com
        

Dave Thaler Microsoft One Microsoft Way Redmond, WA 98052

Dave Thaler Microsoft One Microsoft Way Redmond,WA 98052

   Phone: +1 425 703 8835
   EMail: dthaler@microsoft.com
        
   Phone: +1 425 703 8835
   EMail: dthaler@microsoft.com
        

Full Copyright Statement

完整版权声明

Copyright (C) The Internet Society (2005).

版权所有(C)互联网协会(2005年)。

This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights.

本文件受BCP 78中包含的权利、许可和限制的约束,除其中规定外,作者保留其所有权利。

This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

本文件及其包含的信息是按“原样”提供的,贡献者、他/她所代表或赞助的组织(如有)、互联网协会和互联网工程任务组不承担任何明示或暗示的担保,包括但不限于任何保证,即使用本文中的信息不会侵犯任何权利,或对适销性或特定用途适用性的任何默示保证。

Intellectual Property

知识产权

The IETF takes no position regarding the validity or scope of any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; nor does it represent that it has made any independent effort to identify any such rights. Information on the procedures with respect to rights in RFC documents can be found in BCP 78 and BCP 79.

IETF对可能声称与本文件所述技术的实施或使用有关的任何知识产权或其他权利的有效性或范围,或此类权利下的任何许可可能或可能不可用的程度,不采取任何立场;它也不表示它已作出任何独立努力来确定任何此类权利。有关RFC文件中权利的程序信息,请参见BCP 78和BCP 79。

Copies of IPR disclosures made to the IETF Secretariat and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification can be obtained from the IETF on-line IPR repository at http://www.ietf.org/ipr.

向IETF秘书处披露的知识产权副本和任何许可证保证,或本规范实施者或用户试图获得使用此类专有权利的一般许可证或许可的结果,可从IETF在线知识产权存储库获取,网址为http://www.ietf.org/ipr.

The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology that may be required to implement this standard. Please address the information to the IETF at ietf-ipr@ietf.org.

IETF邀请任何相关方提请其注意任何版权、专利或专利申请,或其他可能涵盖实施本标准所需技术的专有权利。请将信息发送至IETF的IETF-ipr@ietf.org.

Acknowledgement

确认

Funding for the RFC Editor function is currently provided by the Internet Society.

RFC编辑功能的资金目前由互联网协会提供。