收藏 分销(赏)

YD∕T 3901-2021 用于BGP协议的YANG数据模型技术要求(通信).pdf

上传人:曲**** 文档编号:74017 上传时间:2022-05-24 格式:PDF 页数:86 大小:604.10KB
下载 相关 举报
YD∕T 3901-2021 用于BGP协议的YANG数据模型技术要求(通信).pdf_第1页
第1页 / 共86页
YD∕T 3901-2021 用于BGP协议的YANG数据模型技术要求(通信).pdf_第2页
第2页 / 共86页
YD∕T 3901-2021 用于BGP协议的YANG数据模型技术要求(通信).pdf_第3页
第3页 / 共86页
YD∕T 3901-2021 用于BGP协议的YANG数据模型技术要求(通信).pdf_第4页
第4页 / 共86页
YD∕T 3901-2021 用于BGP协议的YANG数据模型技术要求(通信).pdf_第5页
第5页 / 共86页
点击查看更多>>
资源描述

1、ICS33.040.40 M 13 YD 中华人民共和国通信行业标准 XX/T XXXXXXXXX 用于 BGP 协议的 YANG 数据模型技术要求 Technical requirements of Yang Data Model for BGP Protocol (报批稿) XXXX - XX - XX 发布 XXXX - XX - XX 实施 中 华 人 民 共 和 国 工 业 和 信 息 化 部发 布 XX/T XXXXXXXXXI目次 前言 .II 1 范围 .1 2 规范性引用文件 .1 3 术语、定义和缩略语 .1 3.1 术语 .1 3.2 缩略语 .1 4 模型概述 .2 4

2、.1 BGP 模型的总体描述 .2 4.2 BGP 协议的配置 .2 4.3 策略配置概述 .4 4.4 操作状态概述 .4 5 BGP 模型 .4 5.1 BGP 模型与其他模型之间的关系 .5 5.2 BGP 模型的主要模块和子模块介绍 .5 5.3 BGP 模型的主要模块和子模块结构 .5 5.4 BGP 模型的通用类型定义 .52 5.5 BGP 策略配置模型结构 .60 参考文献 .82 II前言 本标准按照GB/T 1.1-2009给出的规则起草。 请注意本文件的某些内容可能涉及专利,本文件的发布机构不承担识别这些专利的责任。 本标准使用重新起草法参考IETF Internet-D

3、raft,2016BGP Model for Service Provider Networks 制定而成。 本标准由中国通信标准化协会归口。 本标准起草单位:中国信息通信研究院、深圳信息通信研究院 本标准起草人:穆琙博、王哲、黄秋钦、柴瑶琳、吴冲 XX/T XXXXXXXXX1用于 BGP 协议的 YANG 数据模型技术要求 1范围 本标准定义了用于管理和配置BGP协议的YANG数据模型,具体包括BGP协议、BGP策略和BGP操作等方面内容。 本标准适用于使用BGP协议的数据中心网络、运营商网络和内容服务商网络等场景。 2规范性引用文件 下列文件对于本文件的应用是必不可少的。 凡是注日期的引

4、用文件, 仅所注日期的版本适用于本文件。凡是不注日期的引用文件,其最新版本(包括所有的修改单)适用于本文件。 IETF RFC1997 BGP团体属性(BGP Communities Attribute) IETF RFC2439 BGP的路由抖动抑制(BGP Route Flap Damping) IETF RFC3065 BGP的自治联邦(Autonomous System Confederations for BGP) IETF RFC4271 边界网关协议-4 (A Border Gateway Protocol 4(BGP-4)) IETF RFC4456 BGP路由反射:另一种全连

5、接的内部BGP(BGP Route Reflection:An Alternative to Full Mesh Internal BGP(IBGP) IETF RFC4724 BGP的平滑重启机制(Graceful Restart Mechanism for BGP) IETF RFC4760 BGP-4的多协议扩展(Multiprotocol Extensions for BGP-4) IETF RFC6020 YANG一种用于网络配置协议的数据建模语言(YANG A Data Modeling Language for the Network Configuration Protocol

6、(NETCONF)) IETF RFC6241 网络配置协议(Network Configuration Protocol (NETCONF)) IETF RFC6811 BGP前缀来源验证(BGP Prefix Origin Validation) 3术语、定义和缩略语 3.1术语和定义 下列术语和定义适用于本文件。 3.1.1 YANG YANG是一种用来为NETCONF、NETCONF RPC以及NETCONF通告进行配置、状态数据建模的数据建模语言。 3.2缩略语 下列缩略语适用于本文件: 2 AFI-SAFI Address Family Information Sub-Addres

7、s Family Information BGP地址族-子地址族 BGP Border Gateway Protocol 边界网关协议 NETCONF Network Configuration Protocol 网络配置协议 VRF Virtual Routing Forwarding 虚拟路由转发 4模型概述 4.1BGP 模型的总体描述 本标准通过定义 YANG 模型的模块和子模块来实现 BGP 协议。整体上看,本标准将 BGP 协议的内容定义为六个基本元素: 基线协议配置 在模型的不同层级下,与 BGP 协议相关操作的配置内容 多协议配置 遵循 RFC 4760 的规范要求,与地址族相

8、关的配置内容 邻居配置 与 BGP 邻居相关的配置内容 邻居多协议配置 与 BGP 邻居地址族相关的配置内容 策略配置 与 BGP 路由收发处理规则相关的策略特征 操作状态 用于监控和管理 BGP 操作的变量 4.2BGP 协议的配置 BGP 协议配置模型类似于大多数路由器的实现方法描述使用层次化的方式将配置条目组织形成多级结构,具体的配置结构: +-rw bgp! +-rw global | +- (global-configuration-options) +-rw neighbors | +-rw neighbor* neighbor-address | +- (neighbor-con

9、figuration-options) +-rw peer-groups +-rw peer-group* peer-group-name +- (neighbor-configuration-options) XX/T XXXXXXXXX3用户可以从 BGP 协议模型的全局视角出发,自顶向下实例化模型对象;也可以聚焦于模型的配置分支,通过重载配置条目的方式来修改模型结构。从模型的结构来看,BGP 邻居行为的配置条目描述了 BGP 模型最底层的细节信息,其次是 BGP 对等体组配置条目,最后是全局配置条目。全局配置条目抽取 BGP 邻居配置条目信息和 BGP 对等体配置条目信息的共性部分,形成

10、可用于所有 BGP 实例的公共配置信息。 BGP 模型对 BGP 协议体系进行了通用化处理。模型中定义的模块和子模块大多数可以在不同的BGP 协议实现细则中进行复用,只有很少的模块定义必须指定到协议体系的特定部分,比如,命名以“group-name”为特征的模块,只能定义在 BGP 对等组级别的配置条目部分。这里需要注意,存在的例外情况:一些配置条目的子地址族信息只能在给定的 AFI-SAFI 组合中发挥作用。 为了保证 BGP 模型提供的通用配置条目可以适配于邻居组, 在 BGP 对等组内所有的邻居配置选项必须全部激活使用,而通过定义对等组 leaf 节点结构,BGP 模型把 BGP 邻居与

11、特定的对等组关联在一起。 在 BGP 模型的多个节点上可以实例化地址族的配置条目。 这里的节点主要是指全局化的 Container,可以对 BGP 实例级别的参数进行设定,比如,全局协议参数、BGP 最优路由选项或者与地址族相关的全局参数,或者是对 BGP 邻居对或者 BGP 邻居组的参数进行设定,比如,激活或者关闭地址族,以及实例化与父实体相关联的策略要求。 在 BGP AFI-SAFI 组合的 Container 域内,可应用到所有地址族的通用配置(比如,是否激活AFI-SAFI 选项)将被置于最高级别,其他具体实现地址族的 Container 将借助 AFI-SAFI Container

12、 来决定参数的选择问题。BGP 模型支持的地址族结构如下所示: +-rw bgp! +-rw global +-rw afi-safis +-rw afi-safi* afi-safi-name +-rw afi-safi-name - ./config/afi-safi-name | +-rw ipv4-unicast | . +-rw ipv6-unicast | . +-rw ipv4-labelled-unicast | . +-rw ipv6-labelled-unicast | . +-rw l3vpn-ipv4-unicast | . +-rw l3vpn-ipv6-unicas

13、t | . +-rw l3vpn-ipv4-multicast | . +-rw l3vpn-ipv6-multicast | . +-rw l2vpn-vpls 4 | . +-rw l2vpn-evpn | . 4.3策略配置 本标准定义的 BGP 策略配置模型参考了 IETF draft-ietf-rtgwg-policy-model-01 定义的通用路由策略 YANG 模型。该草案定义了一种 BGP 路由协议需要遵守的条件执行的策略框架。 本标准定义的 BGP 模型在通用策略框架的基础上增加了 BGP 实现的条件要求(比如,要求匹配BGP 团体参数)和执行要求(比如,设置本地有限期)。

14、 路由策略模型定义的策略可以在模型的多个分支进行定义: 在全局化实例的域内,可以对所有的 BGP 对等体的所有地址族实例化策略 在全局化的 AFI-SAFI 域内,可以对所有 BGP 对等体的特定地址族实例化策略 在 BGP 邻居对或者 BGP 邻居组的域内, 可以对特定 BGP 组或者 BGP 邻居的所有地址族实例化策略 在 BGP 邻居或者邻居对组的上下文描述的 AFI-SAFI 域内,可以对特定 BGP 组或者 BGP 邻居的AFI-SAFI 信息实例化策略 +-rw bgp +-rw global | +-rw afi-safi | | +-rw afi-safi* afi-safi-

15、name | | +-rw apply-policy | +-rw apply-policy +-rw neighbors | +-rw neighbor* neighbor-address | +-rw afi-safi | | +-rw afi-safi* afi-safi-name | | +-rw apply-policy | +-rw apply-policy +-rw peer-groups +-rw peer-group* peer-group-name +-rw afi-safi | +-rw afi-safi* afi-safi-name | +-rw apply-polic

16、y +-rw apply-policy 4.4操作状态 按照 draft-openconfig-netmod-opstate-01 描述的分类方法, BGP 操作模型涵盖了不同 BGP 路由器的状态数信息据,具体包括操作数据和统计数据。本规范定义的 BGP 操作模型继承了以-state结尾的Groupings,同时在 BGP 模型的核心模块中定义了包含state标签的 Containers。在一些具体的场景下,操作数据信息可能会与特定的实例相关,比如,接收、广播、加载的 BGP 前缀信息只与特定的邻居关系相关,与其他信息,如 BGP 邻居组是没有关系的,因此,具体的 Grouping 的定义与

17、特定的操作状态数据需要一一对应。 5BGP 模型 XX/T XXXXXXXXX55.1BGP 模型与其他模型之间的关系 本规范定义的BGP模型隶属于网络实例模型 (由draft-openconfig-rtgwg-network-instance-01草案定义)的子分支。 IETF在网络实例模型中设计描述了一个复杂的VRF模型, 详细介绍了与VRF相关联的路由协议、多协议实例以及协议间和实例间的路由策略。当前版本的VRF模型在YANG分支结构/network-instances/network-instance/protocols/protocol/bgp/下引入了本规范定义的BGP模型。 5.

18、2BGP 模型的主要模块和子模块介绍 BGP配置模型和BGP操作模型的模块定义细节在5.3节-5.5节有具体的描述。 BGP模型的主体模块定义命名为ietf-bgp.yang,具体包括以下子模块内容: ietf-bgp-common 子模块定义了 BGP 邻居信息、BGP 组信息和 BGP 全局信息之间共用的基础信息内容。 ietf-bgp-common-multiprotocol 子模块定义了 BGP 邻居信息、BGP 组信息和 BGP 全局信息之间共用的 BGP 协议内容。 ietf-bgp-common-structure 子模块定义了 BGP 邻居信息、BGP 组信息和 BGP 全局信

19、息用于创建结构化元素的通用结构。 ietf-bgp-global 子模块定义了 BGP 全局信息的数据模型。 ietf-bgp-peer-group 子模块定义了 BGP 对等组信息的数据模型。 ietf-bgp-peer-neighbor 子模块定义了 BGP 邻居信息的数据模型。 除上述五个子模块外,BGP 模型还定义了两个模块: ietf-bgp-types 模块定义了 BGP 模型使用的通用类型和标识。 ietf-bgp-policy 模块复用了 draft-ietf-rtgwg-policy-model-01 描述的 BGP 策略数据定义模型。 5.3BGP 模型的主要模块和子模块结

20、构 5.3.1主模块 ietf-bgp.yang 定义的 YANG 模型 module ietf-bgp yang-version 1; / namespace 6 namespace urn:ietf:params:xml:ns:yang:ietf-bgp; prefix bgp; / import some basic inet types import openconfig-extensions prefix oc-ext; import ietf-routing-policy prefix rpol; / Include the OpenConfig BGP submodules /

21、Common: defines the groupings that are common across more than / one context (where contexts are neighbor, group, global) include ietf-bgp-common; / Multiprotocol: defines the groupings that are common across more / than one context, and relate to Multiprotocol include ietf-bgp-common-multiprotocol;

22、 / Structure: defines groupings that are shared but are solely used for / structural reasons. include ietf-bgp-common-structure; / Include peer-group/neighbor/global - these define the groupings / that are specific to one context include ietf-bgp-peer-group; include ietf-bgp-neighbor; include ietf-b

23、gp-global; / meta organization OpenConfig working group; contact OpenConfig working group ; description This module describes a YANG model for BGP protocol configuration.It is a limited subset of all of the configuration parameters available in the variety of vendor implementations, hence it is expe

24、cted that it would be augmented with vendorspecific configuration data as needed. Additional modules or submodules to handle other aspects of BGP configuration, including policy, VRFs, VPNs, and additional address families are also expected. This model supports the following BGP configuration level

25、hierarchy: BGP | +- global BGP configuration +- AFI / SAFI global +- peer group +- peer group config +- AFI / SAFI per-AFI overrides +- neighbor +- neighbor config +- optional pointer to peer-group XX/T XXXXXXXXX7+- AFI / SAFI per-AFI overrides ; oc-ext:openconfig-version 2.1.1; revision 2016-06-21

26、description OpenConfig BGP refactor; reference 2.1.1; revision 2016-06-06 description OpenConfig public release; reference 2.1.0; revision 2016-03-31 description OpenConfig public release; reference 2.0.1; grouping bgp-top description Top-level grouping for the BGP model data; container bgp descript

27、ion Top-level configuration and state for the BGP router; container global description Global configuration for the BGP router; uses bgp-global-base; uses rpol:apply-policy-group; container neighbors description Configuration for BGP neighbors; uses bgp-neighbor-list; container peer-groups descripti

28、on Configuration for BGP peer-groups; uses bgp-peer-group-list; uses bgp-top; 8 5.3.2子模块 ietf-bgp-common.yang 定义的 YANG 模型 submodule ietf-bgp-common belongs-to ietf-bgp prefix bgp; import openconfig-extensions prefix oc-ext; import ietf-bgp-types prefix oc-bgp-types; import ietf-routing-policy prefix

29、 rpol; import ietf-inet-types prefix inet; / meta organization OpenConfig working group; contact OpenConfig working group ; description This sub-module contains common groupings that are common across multiple contexts within the BGP module. That is to say that they may be application to a subset of

30、 global, peer-group or neighbor contexts.; oc-ext:openconfig-version 2.1.1; revision 2016-06-21 description OpenConfig BGP refactor; reference 2.1.1; grouping bgp-common-neighbor-group-timers-config description Config parameters related to timers associated with the BGP peer; leaf connect-retry type

31、 decimal64 fraction-digits 2; default 30; description Time interval in seconds between attempts to establish a session with the peer.; leaf hold-time type decimal64 fraction-digits 2; default 90; XX/T XXXXXXXXX9description Time interval in seconds that a BGP session will be considered active in the

32、absence of keepalive or other messages from the peer. The hold-time is typically set to 3x the keepalive-interval.; reference RFC 4271 - A Border Gateway Protocol 4, Sec. 10; leaf keepalive-interval type decimal64 fraction-digits 2; default 30; description Time interval in seconds between transmissi

33、on of keepalive messages to the neighbor. Typically set to 1/3 the hold-time.; leaf minimum-advertisement-interval type decimal64 fraction-digits 2; default 30; description Minimum time which must elapse between subsequent UPDATE messages relating to a common set of NLRI being transmitted to a peer.

34、 This timer is referred to as MinRouteAdvertisementIntervalTimer by RFC 4721 and serves to reduce the number of UPDATE messages transmitted when a particular set of NLRI exhibit instability.; reference RFC 4271 - A Border Gateway Protocol 4, Sec 9.2.1.1; grouping bgp-common-neighbor-group-config des

35、cription Neighbor level configuration items.; leaf peer-as type inet:as-number; description AS number of the peer.; leaf local-as 10 type inet:as-number; description The local autonomous system number that is to be used when establishing sessions with the remote peer or peer group, if this differs f

36、rom the global BGP router autonomous system number.; leaf peer-type type oc-bgp-types:peer-type; description Explicitly designate the peer or peer group as internal (iBGP) or external (eBGP).; leaf auth-password type string; description Configures an MD5 authentication password for use with neighbor

37、ing devices.; leaf remove-private-as / could also make this a container with a flag to enable / remove-private and separate option. here, option implies / remove-private is enabled. type oc-bgp-types:remove-private-as-option; description Remove private AS numbers from updates sent to peers - when th

38、is leaf is not specified, the AS_PATH attribute should be sent to the peer unchanged; leaf route-flap-damping type boolean; default false; description Enable route flap damping.; leaf send-community type oc-bgp-types:community-type; default NONE; description Specify which types of community should b

39、e sent to the neighbor or group. The default is to not send the community attribute; leaf description type string; description XX/T XXXXXXXXX11An optional textual description (intended primarily for use with a peer or group; grouping bgp-common-neighbor-group-transport-config description Configurati

40、on parameters relating to the transport protocol used by the BGP session to the peer; leaf tcp-mss type uint16; description Sets the max segment size for BGP TCP sessions.; leaf mtu-discovery type boolean; default false; description Turns path mtu discovery for BGP TCP sessions on (true) or off (fal

41、se); leaf passive-mode type boolean; default false; description Wait for peers to issue requests to open a BGP session, rather than initiating sessions from the local router.; leaf local-address type union type inet:ip-address; type string; /TODO: the string should be converted to a leafref type /to

42、 point to an interface when YANG 1.1 is available with /leafrefs in union types. description Set the local IP (either IPv4 or IPv6) address to use for the session when sending BGP update messages. This may be expressed as either an IP address or reference to the name of an interface.; 12 grouping bg

43、p-common-neighbor-group-error-handling-config description Configuration parameters relating to enhanced error handling behaviours for BGP; leaf treat-as-withdraw type boolean; default false; description Specify whether erroneous UPDATE messages for which the NLRI can be extracted are reated as thoug

44、h the NLRI is withdrawn - avoiding session reset; reference draft-ietf-idr-error-handling-16; grouping bgp-common-neighbor-group-logging-options-config description Configuration parameters specifying the logging behaviour for BGP sessions to the peer; leaf log-neighbor-state-changes type boolean; de

45、fault true; description Configure logging of peer state changes. Default is to enable logging of peer state changes.; grouping bgp-common-neighbor-group-multihop-config description Configuration parameters specifying the multihop behaviour for BGP sessions to the peer; leaf enabled type boolean; def

46、ault false; description When enabled the referenced group or neighbors are permitted to be indirectly connected - including cases where the TTL can be decremented between the BGP peers; leaf multihop-ttl type uint8; description Time-to-live value to use when packets are sent to the referenced group

47、or neighbors and ebgp-multihop is enabled; grouping bgp-common-neighbor-group-route-reflector-config description XX/T XXXXXXXXX13Configuration parameters determining whether the behaviour of the local system when acting as a route-reflector; leaf route-reflector-cluster-id type oc-bgp-types:rr-clust

48、er-id-type; description route-reflector cluster id to use when local router is configured as a route reflector. Commonly set at the group level, but allows a different cluster id to be set for each neighbor.; leaf route-reflector-client type boolean; default false; description Configure the neighbor

49、 as a route reflector client.; grouping bgp-common-neighbor-group-as-path-options-config description Configuration parameters allowing manipulation of the AS_PATH attribute; leaf allow-own-as type uint8; default 0; description Specify the number of occurrences of the local BGP speakers AS that can o

50、ccur within the AS_PATH before it is rejected.; leaf replace-peer-as type boolean; default false; description Replace occurrences of the peers AS in the AS_PATH with the local autonomous system number; grouping bgp-common-neighbor-group-add-paths-config description Configuration parameters specfying

展开阅读全文
相似文档                                   自信AI助手自信AI助手
猜你喜欢                                   自信AI导航自信AI导航
搜索标签

当前位置:首页 > 环境建筑 > 图纸/模型

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        获赠5币

©2010-2024 宁波自信网络信息技术有限公司  版权所有

客服电话:4008-655-100  投诉/维权电话:4009-655-100

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :gzh.png    weibo.png    LOFTER.png 

客服