> 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/4.3-bsd-unix-cao-zuo-xi-tong-she-ji-yu-shi-xian/di-si-bu-fen-jin-cheng-jian-tong-xin/12.9.-arpanet-zhu-ji-jie-kou.md).

# 12.9 ARPANET 主机接口

至此描述的协议都为以 ARPANET 为中心的网际环境而设计。ARPANET（及类似网络，包括 Milnet）是分组交换网络，由 56 Kbit/s 干线互连的小型计算机组成。主机和网关接到交换节点上；节点从主机收分组，必要时经若干中间节点转发，投递给目的主机或网关。分组交换节点（Packet Switch Node，PSN，旧称接口报文处理机 IMP）\[Heart et al., 1970] 提供主机接口和分组交换功能，支持带流控的可靠消息交付。消息带一个头部呈交给接收方 PSN，头部含目的主机（PSN 号加该主机在 PSN 上的编号）。PSN 用动态路由协议确定到目的 PSN 的路由 \[McQuillan et al., 1980]。消息可以拆成至多 128 个八位组的子网分组，由目的 PSN 重组。PSN 使用的端到端协议管理缓冲分配、消息交付和确认。消息一旦被源 PSN 接受，源主机将在规定时间（30 秒）内收到确认或失败报文。流控靠主机之间至多八条未决消息的限制实现：一条消息的确认允许发送下一条，这一确认称为就绪接收下一报文（RFNM）。

当前使用的 PSN 主机连接有两大类型。最初的主机到 IMP 接口按其消息协议与电气信号规格报告的编号称为 1822 接口 \[BBN, 1978]。另一类现用于连接 PSN 的接口是 X.25，稍后描述。

ARPANET 主机访问协议（ARPANET Host Access Protocol，AHIP）是 1822 主机协议的新名字。该协议由内核源码 **netimp** 目录中的公共例程实现。若干类型的硬件接口用 1822 协议提供到 PSN 的连接；分组的格式化与解释以及逐主机流控由公共层完成，驱动只负责收发消息。AHIP 协议用简单头部，含消息类型、目的 IMP 和主机号、链路类型。某些消息与本地 PSN 交换，例如初始化消息。链路类型用于数据消息中标识将要接收消息的协议，与以太网头的类型字段相当。控制信息有几种消息类型，包括 RFNM 报文、失败报文（**未完成报文**），以及指示目的主机宕掉或不可达的报文。

IMP 接口软件为正在通信的主机维护一个表项列表。主机表项含有已发往该主机、尚未收到 RFNM（或未完成报文）的消息计数。发往同一主机的分组超出限度时，至多八个附加分组在该主机表项中排队，等收到 RFNM 再发。超出这一限度的消息被丢弃，返回表明缓冲空间耗尽的错误。网关上这一错误导致为始发主机生成 ICMP 源熄灭报文。收到 **主机失效** 或 **主机不可达** 报文、表明目的地宕掉时，主机表项标记此信息并设置定时器；定时器到期前，向该目的地发送的尝试将产生相应类型的错误，分组不做发送尝试直接丢弃。网关因此能向试图向不可达目的地发包的主机发送适当的 ICMP 错误报文。

另一类可用于连接 PSN 的主机接口是 X.25 \[CCITT, 1980]，与连接公共分组交换数据网类似。到 Milnet（国防数据网 DDN）的 X.25 接口可用来把主机接到 PSN 供 Internet 协议使用。这一模式下，X.25 接口用来创建到本地 PSN 的虚电路与其他主机通信，而不是建立终止于目的主机的 X.25 虚电路。X.25 连接的主机可以与 1822 连接的主机通信：PSN 把两种访问协议都映射到内部端到端协议，各主机使用与其访问方式相配的流控机制。4.3BSD 不含使用 X.25 接口连接 PSN 的硬件驱动，尽管这种驱动是有的。


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://book.bsdcn.org/4.3-bsd-unix-cao-zuo-xi-tong-she-ji-yu-shi-xian/di-si-bu-fen-jin-cheng-jian-tong-xin/12.9.-arpanet-zhu-ji-jie-kou.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
