3. 操作摘要
3. 操作摘要 (Summary of Operation)
Border Gateway Protocol (BGP) 是一种 inter-Autonomous System routing protocol. 它建立在 EGP (如 [RFC904] 所定义) 以及 NSFNET backbone 中 EGP 使用经验 (如 [RFC1092] 和 [RFC1093] 所述) 之上. 更多 BGP 相关信息见 [RFC1772], [RFC1930], [RFC1997] 和 [RFC2858].
BGP-speaking system 的主要功能是与其他 BGP system 交换 network reachability information. 这些信息包含 reachability information 所穿越的 Autonomous System (AS) 列表. 这些信息足以构造关于该可达性的 AS connectivity graph, 可从中移除 routing loop, 并在 AS level 强制执行某些 policy decision.
在本文档上下文中, 我们假定 BGP speaker 只向其 peer 通告它自身使用的 route (在此上下文中, 当某条 BGP route 是最优选 BGP route 且用于 forwarding 时, 称 BGP speaker "uses" 该 BGP route). 所有其他情况均超出本文档范围.
在本文档上下文中, 术语 "IP address" 指 IP version 4 address [RFC791].
通过 BGP 交换的 routing information 只支持 destination-based forwarding paradigm, 即假定 router 仅基于 packet IP header 中包含的 destination address 转发 packet. 这也反映了使用 BGP 可以 (以及不能) 强制执行的 policy decision 集合. 注意, 某些 policy 无法由 destination-based forwarding paradigm 支持, 因而需要 Source Routing (也称为 Explicit Routing) 等技术来强制执行. 此类 policy 同样不能通过使用 BGP 强制执行. 例如, BGP 不允许某个 AS 将 traffic 发送到相邻 AS, 由其转发到某个 destination (该 destination 经由该相邻 AS 可达但位于其之外), 并意图让该 traffic 走与该相邻 AS 内部发往同一 destination 的 traffic 不同的 route. 另一方面, BGP 可以支持任何符合 destination-based forwarding paradigm 的 policy.
BGP-4 提供一组新机制以支持 Classless Inter-Domain Routing (CIDR) [RFC1518, RFC1519]. 这些机制包括支持将一组 destination 作为 IP prefix 通告, 并在 BGP 中消除 network "class" 概念. BGP-4 还引入允许 route aggregation 的机制, 包括 AS path aggregation.
本文档全篇使用术语 `Autonomous System' (AS). Autonomous System 的经典定义是: 由单一技术管理机构管理的一组 router, 它们使用 Interior Gateway Protocol (IGP) 和 common metric 来确定 packet 如何在 AS 内路由, 并使用 inter-AS routing protocol 来确定 packet 如何路由到其他 AS. 自该经典定义形成以来, 单个 AS 使用多个 IGP, 有时还在一个 AS 内使用多组 metric 已变得常见. 使用 Autonomous System 一词强调这样一个事实: 即使使用多个 IGP 和 metric, 某个 AS 的管理对其他 AS 来说看起来仍像具有单一 coherent internal routing plan, 并呈现其可达 destination 的一致图景.
BGP 使用 TCP [RFC793] 作为其 transport protocol. 这消除了实现显式 update fragmentation, retransmission, acknowledgement 和 sequencing 的必要性. BGP 监听 TCP port 179. BGP 使用的 error notification mechanism 假定 TCP 支持 "graceful" close (即在 connection 关闭前交付所有待处理 data).
两个 system 之间建立 TCP connection. 它们交换 message 以打开并确认 connection parameter.
初始 data flow 是 BGP routing table 中 export policy 允许的部分, 称为 Adj-Ribs-Out (见 3.2). 当 routing table 变化时会发送 incremental update. BGP 不要求周期性刷新 routing table. 为使 local policy change 在不重置 BGP connection 的情况下产生正确效果, BGP speaker SHOULD 要么 (a) 在 connection 持续期间保留所有 peer 向其通告的 route 的当前版本, 要么 (b) 使用 Route Refresh extension [RFC2918].
KEEPALIVE message 可以周期性发送, 以确保 connection 仍处于活动状态. NOTIFICATION message 会响应 error 或特殊条件发送. 如果 connection 遇到 error condition, 会发送 NOTIFICATION message 并关闭 connection.
位于另一个 AS 中的 peer 称为 external peer, 而位于同一 AS 中的 peer 称为 internal peer. Internal BGP 和 External BGP 通常缩写为 IBGP 和 EBGP.
如果某个 AS 有多个 BGP speaker 并为其他 AS 提供 transit service, 必须注意确保 AS 内 routing 的一致视图. AS 内部 route 的一致视图由 AS 中使用的 IGP 提供. 就本文档而言, 假定 AS 外部 route 的一致视图通过 AS 内所有 BGP speaker 彼此维护 IBGP 来提供.
本文档规定 BGP protocol 的基础行为. 此行为可以并将会由 extension specification 修改. 当 protocol 被扩展时, 新行为会完整记录在 extension specification 中.