Thomas Vachuska | 8ca75a2 | 2017-08-24 16:12:59 -0700 | [diff] [blame] | 1 | submodule openconfig-bgp-common-multiprotocol { |
| 2 | |
| 3 | belongs-to openconfig-bgp { |
| 4 | prefix "oc-bgp"; |
| 5 | } |
| 6 | |
| 7 | import openconfig-extensions { prefix oc-ext; } |
| 8 | import openconfig-bgp-types { prefix oc-bgp-types; } |
| 9 | import openconfig-routing-policy { prefix oc-rpol; } |
| 10 | import openconfig-types { prefix oc-types; } |
| 11 | |
| 12 | include openconfig-bgp-common; |
| 13 | |
| 14 | // meta |
| 15 | organization |
| 16 | "OpenConfig working group"; |
| 17 | |
| 18 | contact |
| 19 | "OpenConfig working group |
| 20 | netopenconfig@googlegroups.com"; |
| 21 | |
| 22 | description |
| 23 | "This sub-module contains groupings that are related to support |
| 24 | for multiple protocols in BGP. The groupings are common across |
| 25 | multiple contexts."; |
| 26 | |
| 27 | oc-ext:openconfig-version "4.0.1"; |
| 28 | |
| 29 | revision "2017-07-30" { |
| 30 | description |
| 31 | "Clarification of add-paths send-max leaf"; |
| 32 | reference "4.0.1"; |
| 33 | } |
| 34 | |
| 35 | revision "2017-07-10" { |
| 36 | description |
| 37 | "Add error notifications; moved add-paths config; add AS |
| 38 | prepend policy features; removed unneeded config leaves"; |
| 39 | reference "4.0.0"; |
| 40 | } |
| 41 | |
| 42 | revision "2017-02-02" { |
| 43 | description |
| 44 | "Bugfix to remove remaining global-level policy data"; |
| 45 | reference "3.0.1"; |
| 46 | } |
| 47 | |
| 48 | revision "2017-01-26" { |
| 49 | description |
| 50 | "Add dynamic neighbor support, migrate to OpenConfig types"; |
| 51 | reference "3.0.0"; |
| 52 | } |
| 53 | |
| 54 | revision "2016-06-21" { |
| 55 | description |
| 56 | "OpenConfig BGP refactor"; |
| 57 | reference "2.1.1"; |
| 58 | } |
| 59 | |
| 60 | grouping bgp-common-mp-afi-safi-graceful-restart-config { |
| 61 | description |
| 62 | "BGP graceful restart parameters that apply on a per-AFI-SAFI |
| 63 | basis"; |
| 64 | |
| 65 | leaf enabled { |
| 66 | type boolean; |
| 67 | default false; |
| 68 | description |
| 69 | "This leaf indicates whether graceful-restart is enabled for |
| 70 | this AFI-SAFI"; |
| 71 | } |
| 72 | } |
| 73 | |
| 74 | grouping bgp-common-mp-afi-safi-config { |
| 75 | description |
| 76 | "Configuration parameters used for all BGP AFI-SAFIs"; |
| 77 | |
| 78 | leaf afi-safi-name { |
| 79 | type identityref { |
| 80 | base oc-bgp-types:AFI_SAFI_TYPE; |
| 81 | } |
| 82 | description "AFI,SAFI"; |
| 83 | } |
| 84 | |
| 85 | leaf enabled { |
| 86 | type boolean; |
| 87 | default false; |
| 88 | description |
| 89 | "This leaf indicates whether the IPv4 Unicast AFI,SAFI is |
| 90 | enabled for the neighbour or group"; |
| 91 | } |
| 92 | } |
| 93 | |
| 94 | grouping bgp-common-mp-all-afi-safi-list-contents { |
| 95 | description |
| 96 | "A common grouping used for contents of the list that is used |
| 97 | for AFI-SAFI entries"; |
| 98 | |
| 99 | // import and export policy included for the afi/safi |
| 100 | uses oc-rpol:apply-policy-group; |
| 101 | |
| 102 | uses bgp-common-mp-ipv4-unicast-group; |
| 103 | uses bgp-common-mp-ipv6-unicast-group; |
| 104 | uses bgp-common-mp-ipv4-labeled-unicast-group; |
| 105 | uses bgp-common-mp-ipv6-labeled-unicast-group; |
| 106 | uses bgp-common-mp-l3vpn-ipv4-unicast-group; |
| 107 | uses bgp-common-mp-l3vpn-ipv6-unicast-group; |
| 108 | uses bgp-common-mp-l3vpn-ipv4-multicast-group; |
| 109 | uses bgp-common-mp-l3vpn-ipv6-multicast-group; |
| 110 | uses bgp-common-mp-l2vpn-vpls-group; |
| 111 | uses bgp-common-mp-l2vpn-evpn-group; |
| 112 | } |
| 113 | |
| 114 | // Groupings relating to each address family |
| 115 | grouping bgp-common-mp-ipv4-unicast-group { |
| 116 | description |
| 117 | "Group for IPv4 Unicast configuration options"; |
| 118 | |
| 119 | container ipv4-unicast { |
| 120 | when "../afi-safi-name = 'oc-bgp-types:IPV4_UNICAST'" { |
| 121 | description |
| 122 | "Include this container for IPv4 Unicast specific |
| 123 | configuration"; |
| 124 | } |
| 125 | |
| 126 | description "IPv4 unicast configuration options"; |
| 127 | |
| 128 | // include common IPv[46] unicast options |
| 129 | uses bgp-common-mp-ipv4-ipv6-unicast-common; |
| 130 | |
| 131 | // placeholder for IPv4 unicast specific configuration |
| 132 | } |
| 133 | } |
| 134 | |
| 135 | grouping bgp-common-mp-ipv6-unicast-group { |
| 136 | description |
| 137 | "Group for IPv6 Unicast configuration options"; |
| 138 | |
| 139 | container ipv6-unicast { |
| 140 | when "../afi-safi-name = 'oc-bgp-types:IPV6_UNICAST'" { |
| 141 | description |
| 142 | "Include this container for IPv6 Unicast specific |
| 143 | configuration"; |
| 144 | } |
| 145 | |
| 146 | description "IPv6 unicast configuration options"; |
| 147 | |
| 148 | // include common IPv[46] unicast options |
| 149 | uses bgp-common-mp-ipv4-ipv6-unicast-common; |
| 150 | |
| 151 | // placeholder for IPv6 unicast specific configuration |
| 152 | // options |
| 153 | } |
| 154 | } |
| 155 | |
| 156 | grouping bgp-common-mp-ipv4-labeled-unicast-group { |
| 157 | description |
| 158 | "Group for IPv4 Labeled Unicast configuration options"; |
| 159 | |
| 160 | container ipv4-labeled-unicast { |
| 161 | when "../afi-safi-name = 'oc-bgp-types:IPV4_LABELED_UNICAST'" { |
| 162 | description |
| 163 | "Include this container for IPv4 Labeled Unicast specific |
| 164 | configuration"; |
| 165 | } |
| 166 | |
| 167 | description "IPv4 Labeled Unicast configuration options"; |
| 168 | |
| 169 | uses bgp-common-mp-all-afi-safi-common; |
| 170 | |
| 171 | // placeholder for IPv4 Labeled Unicast specific config |
| 172 | // options |
| 173 | } |
| 174 | } |
| 175 | |
| 176 | grouping bgp-common-mp-ipv6-labeled-unicast-group { |
| 177 | description |
| 178 | "Group for IPv6 Labeled Unicast configuration options"; |
| 179 | |
| 180 | container ipv6-labeled-unicast { |
| 181 | when "../afi-safi-name = 'oc-bgp-types:IPV6_LABELED_UNICAST'" { |
| 182 | description |
| 183 | "Include this container for IPv6 Labeled Unicast specific |
| 184 | configuration"; |
| 185 | } |
| 186 | |
| 187 | description "IPv6 Labeled Unicast configuration options"; |
| 188 | |
| 189 | uses bgp-common-mp-all-afi-safi-common; |
| 190 | |
| 191 | // placeholder for IPv6 Labeled Unicast specific config |
| 192 | // options. |
| 193 | } |
| 194 | } |
| 195 | |
| 196 | grouping bgp-common-mp-l3vpn-ipv4-unicast-group { |
| 197 | description |
| 198 | "Group for IPv4 Unicast L3VPN configuration options"; |
| 199 | |
| 200 | container l3vpn-ipv4-unicast { |
| 201 | when "../afi-safi-name = 'oc-bgp-types:L3VPN_IPV4_UNICAST'" { |
| 202 | description |
| 203 | "Include this container for IPv4 Unicast L3VPN specific |
| 204 | configuration"; |
| 205 | } |
| 206 | |
| 207 | description "Unicast IPv4 L3VPN configuration options"; |
| 208 | |
| 209 | // include common L3VPN configuration options |
| 210 | uses bgp-common-mp-l3vpn-ipv4-ipv6-unicast-common; |
| 211 | |
| 212 | // placeholder for IPv4 Unicast L3VPN specific config options. |
| 213 | } |
| 214 | } |
| 215 | |
| 216 | grouping bgp-common-mp-l3vpn-ipv6-unicast-group { |
| 217 | description |
| 218 | "Group for IPv6 Unicast L3VPN configuration options"; |
| 219 | |
| 220 | container l3vpn-ipv6-unicast { |
| 221 | when "../afi-safi-name = 'oc-bgp-types:L3VPN_IPV6_UNICAST'" { |
| 222 | description |
| 223 | "Include this container for unicast IPv6 L3VPN specific |
| 224 | configuration"; |
| 225 | } |
| 226 | |
| 227 | description "Unicast IPv6 L3VPN configuration options"; |
| 228 | |
| 229 | // include common L3VPN configuration options |
| 230 | uses bgp-common-mp-l3vpn-ipv4-ipv6-unicast-common; |
| 231 | |
| 232 | // placeholder for IPv6 Unicast L3VPN specific configuration |
| 233 | // options |
| 234 | } |
| 235 | } |
| 236 | |
| 237 | grouping bgp-common-mp-l3vpn-ipv4-multicast-group { |
| 238 | description |
| 239 | "Group for IPv4 L3VPN multicast configuration options"; |
| 240 | |
| 241 | container l3vpn-ipv4-multicast { |
| 242 | when "../afi-safi-name = 'oc-bgp-types:L3VPN_IPV4_MULTICAST'" { |
| 243 | description |
| 244 | "Include this container for multicast IPv6 L3VPN specific |
| 245 | configuration"; |
| 246 | } |
| 247 | |
| 248 | description "Multicast IPv4 L3VPN configuration options"; |
| 249 | |
| 250 | // include common L3VPN multicast options |
| 251 | uses bgp-common-mp-l3vpn-ipv4-ipv6-multicast-common; |
| 252 | |
| 253 | // placeholder for IPv4 Multicast L3VPN specific configuration |
| 254 | // options |
| 255 | } |
| 256 | } |
| 257 | |
| 258 | grouping bgp-common-mp-l3vpn-ipv6-multicast-group { |
| 259 | description |
| 260 | "Group for IPv6 L3VPN multicast configuration options"; |
| 261 | |
| 262 | container l3vpn-ipv6-multicast { |
| 263 | when "../afi-safi-name = 'oc-bgp-types:L3VPN_IPV6_MULTICAST'" { |
| 264 | description |
| 265 | "Include this container for multicast IPv6 L3VPN specific |
| 266 | configuration"; |
| 267 | } |
| 268 | |
| 269 | description "Multicast IPv6 L3VPN configuration options"; |
| 270 | |
| 271 | // include common L3VPN multicast options |
| 272 | uses bgp-common-mp-l3vpn-ipv4-ipv6-multicast-common; |
| 273 | |
| 274 | // placeholder for IPv6 Multicast L3VPN specific configuration |
| 275 | // options |
| 276 | } |
| 277 | } |
| 278 | |
| 279 | grouping bgp-common-mp-l2vpn-vpls-group { |
| 280 | description |
| 281 | "Group for BGP-signalled VPLS configuration options"; |
| 282 | |
| 283 | container l2vpn-vpls { |
| 284 | when "../afi-safi-name = 'oc-bgp-types:L2VPN_VPLS'" { |
| 285 | description |
| 286 | "Include this container for BGP-signalled VPLS specific |
| 287 | configuration"; |
| 288 | } |
| 289 | |
| 290 | description "BGP-signalled VPLS configuration options"; |
| 291 | |
| 292 | // include common L2VPN options |
| 293 | uses bgp-common-mp-l2vpn-common; |
| 294 | |
| 295 | // placeholder for BGP-signalled VPLS specific configuration |
| 296 | // options |
| 297 | } |
| 298 | } |
| 299 | |
| 300 | grouping bgp-common-mp-l2vpn-evpn-group { |
| 301 | description |
| 302 | "Group for BGP EVPN configuration options"; |
| 303 | |
| 304 | container l2vpn-evpn { |
| 305 | when "../afi-safi-name = 'oc-bgp-types:L2VPN_EVPN'" { |
| 306 | description |
| 307 | "Include this container for BGP EVPN specific |
| 308 | configuration"; |
| 309 | } |
| 310 | |
| 311 | description "BGP EVPN configuration options"; |
| 312 | |
| 313 | // include common L2VPN options |
| 314 | uses bgp-common-mp-l2vpn-common; |
| 315 | |
| 316 | // placeholder for BGP EVPN specific configuration options |
| 317 | } |
| 318 | } |
| 319 | |
| 320 | // Common groupings across multiple AFI,SAFIs |
| 321 | grouping bgp-common-mp-all-afi-safi-common { |
| 322 | description |
| 323 | "Grouping for configuration common to all AFI,SAFI"; |
| 324 | |
| 325 | container prefix-limit { |
| 326 | description |
| 327 | "Configure the maximum number of prefixes that will be |
| 328 | accepted from a peer"; |
| 329 | |
| 330 | container config { |
| 331 | description |
| 332 | "Configuration parameters relating to the prefix |
| 333 | limit for the AFI-SAFI"; |
| 334 | uses bgp-common-mp-all-afi-safi-common-prefix-limit-config; |
| 335 | } |
| 336 | |
| 337 | container state { |
| 338 | config false; |
| 339 | description |
| 340 | "State information relating to the prefix-limit for the |
| 341 | AFI-SAFI"; |
| 342 | uses bgp-common-mp-all-afi-safi-common-prefix-limit-config; |
| 343 | } |
| 344 | } |
| 345 | } |
| 346 | |
| 347 | grouping bgp-common-mp-ipv4-ipv6-unicast-common { |
| 348 | description |
| 349 | "Common configuration that is applicable for IPv4 and IPv6 |
| 350 | unicast"; |
| 351 | |
| 352 | // include common afi-safi options. |
| 353 | uses bgp-common-mp-all-afi-safi-common; |
| 354 | |
| 355 | // configuration options that are specific to IPv[46] unicast |
| 356 | container config { |
| 357 | description |
| 358 | "Configuration parameters for common IPv4 and IPv6 unicast |
| 359 | AFI-SAFI options"; |
| 360 | uses bgp-common-mp-ipv4-ipv6-unicast-common-config; |
| 361 | } |
| 362 | container state { |
| 363 | config false; |
| 364 | description |
| 365 | "State information for common IPv4 and IPv6 unicast |
| 366 | parameters"; |
| 367 | uses bgp-common-mp-ipv4-ipv6-unicast-common-config; |
| 368 | } |
| 369 | } |
| 370 | |
| 371 | grouping bgp-common-mp-l3vpn-ipv4-ipv6-unicast-common { |
| 372 | description |
| 373 | "Common configuration applied across L3VPN for IPv4 |
| 374 | and IPv6"; |
| 375 | |
| 376 | // placeholder -- specific configuration options that are generic |
| 377 | // across IPv[46] unicast address families. |
| 378 | uses bgp-common-mp-all-afi-safi-common; |
| 379 | } |
| 380 | |
| 381 | grouping bgp-common-mp-l3vpn-ipv4-ipv6-multicast-common { |
| 382 | description |
| 383 | "Common configuration applied across L3VPN for IPv4 |
| 384 | and IPv6"; |
| 385 | |
| 386 | // placeholder -- specific configuration options that are |
| 387 | // generic across IPv[46] multicast address families. |
| 388 | uses bgp-common-mp-all-afi-safi-common; |
| 389 | } |
| 390 | |
| 391 | grouping bgp-common-mp-l2vpn-common { |
| 392 | description |
| 393 | "Common configuration applied across L2VPN address |
| 394 | families"; |
| 395 | |
| 396 | // placeholder -- specific configuration options that are |
| 397 | // generic across L2VPN address families |
| 398 | uses bgp-common-mp-all-afi-safi-common; |
| 399 | } |
| 400 | |
| 401 | // Config groupings for common groups |
| 402 | grouping bgp-common-mp-all-afi-safi-common-prefix-limit-config { |
| 403 | description |
| 404 | "Configuration parameters relating to prefix-limits for an |
| 405 | AFI-SAFI"; |
| 406 | |
| 407 | leaf max-prefixes { |
| 408 | type uint32; |
| 409 | description |
| 410 | "Maximum number of prefixes that will be accepted |
| 411 | from the neighbour"; |
| 412 | } |
| 413 | |
| 414 | leaf prevent-teardown { |
| 415 | type boolean; |
| 416 | default false; |
| 417 | description |
| 418 | "Do not tear down the BGP session when the maximum |
| 419 | prefix limit is exceeded, but rather only log a |
| 420 | warning. The default of this leaf is false, such |
| 421 | that when it is not specified, the session is torn |
| 422 | down."; |
| 423 | } |
| 424 | |
| 425 | leaf shutdown-threshold-pct { |
| 426 | type oc-types:percentage; |
| 427 | description |
| 428 | "Threshold on number of prefixes that can be received |
| 429 | from a neighbour before generation of warning messages |
| 430 | or log entries. Expressed as a percentage of |
| 431 | max-prefixes"; |
| 432 | } |
| 433 | |
| 434 | leaf restart-timer { |
| 435 | type decimal64 { |
| 436 | fraction-digits 2; |
| 437 | } |
| 438 | units "seconds"; |
| 439 | description |
| 440 | "Time interval in seconds after which the BGP session |
| 441 | is re-established after being torn down due to exceeding |
| 442 | the max-prefix limit."; |
| 443 | } |
| 444 | } |
| 445 | |
| 446 | grouping bgp-common-mp-ipv4-ipv6-unicast-common-config { |
| 447 | description |
| 448 | "Common configuration parameters for IPv4 and IPv6 Unicast |
| 449 | address families"; |
| 450 | |
| 451 | leaf send-default-route { |
| 452 | type boolean; |
| 453 | default "false"; |
| 454 | description |
| 455 | "If set to true, send the default-route to the neighbour(s)"; |
| 456 | } |
| 457 | } |
| 458 | } |