> For the complete documentation index, see [llms.txt](https://book.bsdcn.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://book.bsdcn.org/man/man8/route6d.8.md).

# route6d.8

`route6d` — RIP6 路由守护进程

## 名称

`route6d`

## 弃用通知

`route6d` 工具已弃用，将在 FreeBSD 16.0 中移除。

## 概要

`route6d [-adDhlnqsS] [-R routelog] [-A prefix/preflen,if1[,if2...]] [-L prefix/preflen,if1[,if2...]] [-N if1[,if2...]] [-O prefix/preflen,if1[,if2...]] [-P number] [-p pidfile] [-Q number] [-T if1[,if2...]] [-t tag]`

## 描述

`route6d` 是一个支持基于 IPv6 的 RIP 协议的路由守护进程。

可用选项如下：

**`-a`** 启用静态定义路由的老化功能。使用此选项时，除非收到相应的更新，否则任何静态定义的路由都将被删除，就像这些路由是在 `route6d` 启动时收到的一样。

**`-R`** `routelog` 此选项让 `route6d` 将路由变更（添加/删除）记录到 `routelog` 文件中。

**`-A`** `prefix/preflen,if1[,if2...]` 此选项用于聚合路由。`prefix/preflen` 指定聚合路由的前缀和前缀长度。在通告路由时，`route6d` 会过滤被聚合覆盖的特定路由，并将聚合后的路由 `prefix/preflen` 通告给逗号分隔的接口列表 `if1[,if2...]` 中指定的接口。接口列表中的字符 `*`、`?` 和 `[` 会被解释为 shell 风格的通配符。`route6d` 工具会在内核路由表中创建一条指向 `prefix/preflen` 的静态路由，并带有 `RTF_REJECT` 标志。

**`-d`** 启用调试信息输出。此选项也会指示 `route6d` 在前台运行（不成为守护进程）。

**`-D`** 启用详细的调试信息输出。此选项也会指示 `route6d` 在前台运行（不成为守护进程）。

**`-h`** 禁用水平分割处理。

**`-l`** 默认情况下，出于安全考虑，`route6d` 不会交换站点本地路由。这是因为站点本地地址空间的语义相当模糊（规范仍在制定中），且没有好的方法来定义站点本地边界。使用 `-l` 选项时，`route6d` 也会交换站点本地路由。此选项不能用于站点边界路由器，因为 `-l` 选项假定所有接口都在同一个站点内。

**`-L`** `prefix/preflen,if1[,if2...]` 从接口 `if1,[if2...]` 过滤传入路由。`route6d` 工具会接受位于 `prefix/preflen` 内的传入路由。如果指定了多个 `-L` 选项，则匹配其中任一选项的路由都会被接受。`::/0` 被特殊对待为默认路由，而不是"任何前缀长度大于或等于 0 的路由"。如果你想接受任何路由，不要指定 `-L` 选项。例如，使用 "`-L` `2001:db8::/16,if1`" 和 "`-L` `::/0,if1`"，`route6d` 会接受默认路由和 6bone 测试地址中的路由，但不接受其他路由。

**`-n`** 不更新内核路由表。

**`-N`** `if1[,if2...]` 不监听也不通告来自/去往 `if1,[if2...]` 指定接口的路由。

**`-O`** `prefix/preflen,if1[,if2...]` 限制向 `if1,[if2...]` 指定接口的路由通告。使用此选项时，`route6d` 只会通告匹配 `prefix/preflen` 的路由。

**`-P`** `number` 指定在计算过期计时器时要忽略的路由。`number` 必须是 `1`、`2` 或 `3`，分别表示 `RTF_PROTO1`、`RTF_PROTO2` 或 `RTF_PROTO3` 路由标志。当指定 `1` 时，带有 `RTF_PROTO1` 的路由永不过期。

**`-p`** `pidfile` 指定存储进程 ID 的替代文件。默认为 **/var/run/route6d.pid**。

**`-Q`** `number` 指定用于 RIP 协议添加的路由的标志。默认为 `2`（`RTF_PROTO2`）。

**`-q`** 使 `route6d` 进入只监听模式。不发送任何通告。

**`-s`** 使 `route6d` 通告在调用 `route6d` 时内核路由表中已存在的静态定义路由。通告遵循常规的水平分割规则。

**`-S`** 此选项与 `-s` 选项相同，但不应用水平分割规则。

**`-T`** `if1[,if2...]` 仅向 `if1,[if2...]` 通告默认路由。

**`-t`** `tag` 将路由标签 `tag` 附加到发起的路由条目。`tag` 可以是十进制数、以 `0` 为前缀的八进制数或以 `0x` 为前缀的十六进制数。

收到 `SIGINT` 或 `SIGUSR1` 信号时，`route6d` 会将当前内部状态转储到 **/var/run/route6d\_dump**。

## 文件

**/var/run/route6d\_dump** 在收到 `SIGINT` 或 `SIGUSR1` 时转储内部状态

## 参见

> G. Malkin, R. Minnear, "RIPng for IPv6", RFC2080, 1997 年 1 月。

## 注意

`route6d` 工具使用 RFC2292 中定义的 IPv6 高级 API，通过链路本地地址与对端通信。

在内部，`route6d` 将接口标识符嵌入到链路本地地址（`fe80::xx` 和 `ff02::xx`）的第 32 到 63 位，这样它们就会在内部状态转储文件（**/var/run/route6d\_dump**）中可见。

路由表操作因 IPv6 实现而异。目前 `route6d` 遵循 WIDE Hydrangea/KAME IPv6 内核，无法在其他平台上运行。

当前的 `route6d` 在连续更新到达时不会降低触发更新的速率。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://book.bsdcn.org/man/man8/route6d.8.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
