]> git.proxmox.com Git - mirror_frr.git/blob - yang/frr-bgp-common-structure.yang
Merge pull request #8705 from donaldsharp/ospf_sr_topo1_speedup
[mirror_frr.git] / yang / frr-bgp-common-structure.yang
1 submodule frr-bgp-common-structure {
2 yang-version 1.1;
3
4 belongs-to frr-bgp {
5 prefix "bgp";
6 }
7
8 import ietf-inet-types {
9 prefix inet;
10 }
11
12 import frr-route-map {
13 prefix frr-route-map;
14 }
15
16 import frr-interface {
17 prefix frr-interface;
18 }
19
20 import ietf-bgp-types {
21 prefix bt;
22 }
23
24 import frr-bgp-types {
25 prefix frr-bt;
26 }
27
28 organization
29 "FRRouting";
30 contact
31 "FRR Users List: <mailto:frog@lists.frrouting.org> FRR Development
32 List: <mailto:dev@lists.frrouting.org>";
33 description
34 "This submodule contains general data definitions for use in BGP.
35
36 Copyright 2020 FRRouting
37
38 Redistribution and use in source and binary forms, with or without
39 modification, are permitted provided that the following conditions
40 are met:
41
42 1. Redistributions of source code must retain the above copyright notice,
43 this list of conditions and the following disclaimer.
44
45 2. Redistributions in binary form must reproduce the above copyright
46 notice, this list of conditions and the following disclaimer in the
47 documentation and/or other materials provided with the distribution.
48
49 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
50 \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
51 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
52 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
53 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
54 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
55 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
56 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
57 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
58 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
59 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.";
60
61 revision 2019-12-03 {
62 description
63 "Initial revision.";
64 }
65
66 grouping structure-neighbor-group-ebgp-multihop {
67 description
68 "Structural grouping used to include EBGP multi-hop
69 configuration for both BGP neighbors and peer groups.";
70 container ebgp-multihop {
71 description
72 "EBGP multi-hop parameters for the BGP group.";
73 choice hop-count-choice {
74 case default-hop-count {
75 leaf enabled {
76 type boolean;
77 default "false";
78 description
79 "When enabled the referenced group or neighbors are
80 permitted to be indirectly connected - including cases
81 where the TTL can be decremented between the BGP peers.";
82 }
83 }
84
85 case max-hop-count {
86 leaf multihop-ttl {
87 type uint8 {
88 range "1..255";
89 }
90 description
91 "Time-to-live value to use when packets are sent to the
92 referenced group or neighbors and ebgp-multihop is
93 enabled.";
94 }
95 }
96 }
97
98 leaf disable-connected-check {
99 type boolean;
100 default "false";
101 description
102 "When set to 'true' it enforces EBGP neighbors perform multihop.";
103 }
104 }
105 }
106
107 grouping neighbor-local-as-options {
108 container local-as {
109 leaf local-as {
110 type inet:as-number;
111 description
112 "The local autonomous system number that is to be used when
113 establishing sessions with the remote peer or peer group, if
114 this differs from the global BGP router autonomous system
115 number.";
116 }
117
118 leaf no-prepend {
119 type boolean;
120 default "false";
121 description
122 "Do not prepend local-as to updates from EBGP peers. When
123 set to 'true' it will not prepend local-as to updates. When
124 set to 'false' it will prepend local-as to updates.";
125 }
126
127 leaf replace-as {
128 type boolean;
129 default "false";
130 description
131 "Do not prepend local-as to updates from IBGP peers.";
132 }
133 }
134 }
135
136 grouping neighbor-bfd-options {
137 container bfd-options {
138 leaf enable {
139 type boolean;
140 default "false";
141 description
142 "BFD support.";
143 }
144
145 leaf detect-multiplier {
146 when "../enable = 'true'";
147 type uint8 {
148 range "2..255";
149 }
150 default "3";
151 description
152 "Detect multiplier.";
153 }
154
155 leaf required-min-rx {
156 when "../enable = 'true'";
157 type uint16 {
158 range "50..60000";
159 }
160 units "miliseconds";
161 default "300";
162 description
163 "Required min receive interval.";
164 }
165
166 leaf desired-min-tx {
167 when "../enable = 'true'";
168 type uint16 {
169 range "50..60000";
170 }
171 units "miliseconds";
172 default "300";
173 description
174 "Desired min transmit interval.";
175 }
176
177 leaf session-type {
178 when "../enable = 'true'";
179 type frr-bt:bfd-session-type;
180 default "not-configured";
181 description
182 "BFD session type.";
183 }
184
185 leaf check-cp-failure {
186 when "../enable = 'true'";
187 type boolean;
188 default "false";
189 description
190 "Link dataplane status with BGP control plane.";
191 }
192 }
193 }
194
195 grouping neighbor-remote-as {
196 container neighbor-remote-as {
197 leaf remote-as-type {
198 type frr-bt:as-type;
199 description
200 "Remote AS type.";
201 }
202
203 leaf remote-as {
204 when "../remote-as-type = 'as-specified'";
205 type inet:as-number;
206 description
207 "The remote autonomous system number received in
208 the BGP OPEN message.";
209 reference
210 "RFC 4271";
211 }
212 }
213 }
214
215 grouping neighbor-update-source {
216 description
217 "Source of routing updates.";
218 container update-source {
219 description
220 "Source of routing updates config.";
221 choice source {
222 case ip-based {
223 leaf ip {
224 type inet:ip-address;
225 description
226 "IPv4 address/IPv6 address.";
227 }
228 }
229
230 case interface-based {
231 leaf interface {
232 type frr-interface:interface-ref {
233 require-instance false;
234 }
235 description
236 "The local interface.";
237 }
238 }
239 }
240 }
241 }
242
243 grouping structure-neighbor-group-add-paths {
244 description
245 "Structural grouping used to include ADD-PATHs configuration
246 and state for both BGP neighbors and peer groups.";
247 container add-paths {
248 description
249 "Parameters relating to the advertisement and receipt of
250 multiple paths for a single NLRI (add-paths).";
251 reference
252 "RFC 7911: ADD-PATH.";
253 leaf path-type {
254 type frr-bt:add-path-type;
255 default "none";
256 description
257 "Enable ability to receive multiple path advertisements for
258 an NLRI from the neighbor or group.";
259 }
260 }
261 }
262
263 grouping structure-neighbor-group-as-path-options {
264 description
265 "Structural grouping used to include AS_PATH manipulation
266 configuration both BGP neighbors and peer groups.";
267 container as-path-options {
268 description
269 "AS_PATH manipulation parameters for the BGP neighbor or
270 group.";
271 choice allowas-in {
272 case occurence-based {
273 leaf allow-own-as {
274 type uint8 {
275 range "1..10";
276 }
277 description
278 "Specify the number of occurrences of the local BGP
279 speaker's AS that can occur within the AS_PATH before it
280 is rejected.";
281 }
282 }
283
284 case origin-based {
285 leaf allow-own-origin-as {
286 type boolean;
287 default "false";
288 description
289 "When set to 'true' only accept my AS in the as-path
290 if the route was originated in my AS.";
291 }
292 }
293 }
294
295 leaf replace-peer-as {
296 type boolean;
297 default "false";
298 description
299 "Replace occurrences of the peer's AS in the AS_PATH with
300 the local autonomous system number. This is same as override
301 ASN CLI.";
302 }
303 }
304 }
305
306 grouping structure-neighbor-group-capability-options {
307 description
308 "Structural grouping used to include capability
309 configuration for both BGP neighbors and peer groups.";
310 container capability-options {
311 description
312 "Capability manipulation parameters for the BGP neighbor or
313 group.";
314 leaf dynamic-capability {
315 type boolean;
316 default "false";
317 description
318 "When set to 'true' dynamic capability is advertise to this peer.";
319 }
320
321 leaf strict-capability {
322 type boolean;
323 default "false";
324 description
325 "Strict capability negotiation match. When set to 'true'
326 remote and local capabilities are strictly compared
327 if capabilities are different, send Unsupported Capability
328 error then reset connection.";
329 }
330
331 leaf extended-nexthop-capability {
332 type boolean;
333 default "false";
334 description
335 "When set to 'true' extended next-hop capability is advertise
336 to this peer.";
337 }
338
339 leaf capability-negotiate {
340 type boolean;
341 default "true";
342 description
343 "When set to 'true' sending Capability Negotiation in the open
344 message is suppressed to this peer.";
345 }
346
347 leaf override-capability {
348 type boolean;
349 default "false";
350 description
351 "Overrides the result of Capability Negotiation, ignoring remote
352 peer's capability value, when set to 'true'.";
353 }
354 }
355 }
356
357 grouping structure-neighbor-default-originate-options {
358 description
359 "Structural grouping used to include default-originate
360 configuration for both BGP neighbors and peer groups.";
361 container default-originate {
362 description
363 "default originate parameters for the BGP neighbor or
364 group.";
365 leaf originate {
366 type boolean;
367 default "false";
368 description
369 "If set to 'true', send the default-route to the neighbour(s).";
370 }
371
372 leaf route-map {
373 type frr-route-map:route-map-ref;
374 description
375 "Route-map to specify criteria to originate default.";
376 }
377 }
378 }
379
380 grouping structure-neighbor-prefix-limit {
381 container prefix-limit {
382 description
383 "Parameters relating to the prefix limit for the AFI-SAFI.";
384 list direction-list {
385 key "direction";
386 leaf direction {
387 type frr-bt:direction;
388 description
389 "Prefix limit applied on Tx route-updates or Rx route-updates.";
390 }
391
392 leaf max-prefixes {
393 type uint32;
394 mandatory true;
395 description
396 "Maximum number of prefixes that will be accepted from the
397 neighbour.";
398 }
399
400 leaf force-check {
401 type boolean;
402 default false;
403 description
404 "Force check all received routes.";
405 }
406
407 container options {
408 when "../direction = 'in'";
409 choice options {
410 case warning {
411 leaf warning-only {
412 type boolean;
413 default "false";
414 description
415 "When set to 'true' only give warning message when limit
416 is exceeded.";
417 }
418 }
419
420 case restart {
421 leaf restart-timer {
422 type uint16;
423 units "minutes";
424 description
425 "Time interval in seconds after which the BGP session is
426 re-established after being torn down due to exceeding the
427 max-prefix limit.";
428 }
429 }
430
431 case threshold {
432 leaf shutdown-threshold-pct {
433 type bt:percentage;
434 description
435 "Threshold on number of prefixes that can be received from
436 a neighbour before generation of warning messages or log
437 entries. Expressed as a percentage of max-prefixes.";
438 }
439 }
440
441 case threshold-restart {
442 leaf tr-shutdown-threshold-pct {
443 type bt:percentage;
444 description
445 "Threshold on number of prefixes that can be received from
446 a neighbour before generation of warning messages or log
447 entries. Expressed as a percentage of max-prefixes.";
448 }
449
450 leaf tr-restart-timer {
451 type uint16;
452 units "minutes";
453 description
454 "Time interval in seconds after which the BGP session is
455 re-established after being torn down due to exceeding the
456 max-prefix limit.";
457 }
458 }
459
460 case threshold-warning {
461 leaf tw-shutdown-threshold-pct {
462 type bt:percentage;
463 description
464 "Threshold on number of prefixes that can be received from
465 a neighbour before generation of warning messages or log
466 entries. Expressed as a percentage of max-prefixes.";
467 }
468
469 leaf tw-warning-only {
470 type boolean;
471 default "false";
472 description
473 "When set to 'true' only give warning message when limit
474 is exceeded.";
475 }
476 }
477 }
478 }
479 }
480 }
481 }
482
483 grouping structure-neighbor-nexthop-self {
484 container nexthop-self {
485 description
486 "Parameters relating to the nexthop-self for the AFI-SAFI.";
487 leaf next-hop-self {
488 type boolean;
489 default "false";
490 description
491 "When set to 'true', EBGP learned routes are announced with the
492 local speaker's nexthop.";
493 }
494
495 leaf next-hop-self-force {
496 type boolean;
497 default "false";
498 description
499 "When set to 'true', EBGP learned routes are announced with the
500 local speaker's nexthop.";
501 }
502 }
503 }
504
505 grouping structure-neighbor-private-as {
506 container private-as {
507 description
508 "Parameters relating to the private-as for the AFI-SAFI.";
509 leaf remove-private-as-all {
510 type boolean;
511 default "false";
512 description
513 "When set to 'true', private ASNs are removed from outbound updates;
514 applies to all AS numbers.";
515 }
516
517 leaf remove-private-as-all-replace {
518 type boolean;
519 default "false";
520 description
521 "When set to 'true', private ASNs are replaced by the local
522 speaker's ASN in all outbound updates; applies to all AS numbers.";
523 }
524
525 leaf remove-private-as {
526 type boolean;
527 default "false";
528 description
529 "When set to 'true', removes private ASNs in outbound updates;
530 applies to all AS numbers.";
531 }
532
533 leaf remove-private-as-replace {
534 type boolean;
535 default "false";
536 description
537 "When set to 'true', private ASNs are replaced with the local
538 speaker's ASN in all outbound updates; applies to all AS numbers.";
539 }
540 }
541 }
542
543 grouping structure-neighbor-weight {
544 container weight {
545 description
546 "Parameters relating to the weight for the AFI-SAFI.";
547 leaf weight-attribute {
548 type uint16 {
549 range "0..65535";
550 }
551 description
552 "Set default weight for routes from this neighbor.";
553 }
554 }
555 }
556
557 grouping structure-neighbor-route-reflector {
558 container route-reflector {
559 description
560 "Parameters relating to the route-reflector for the AFI-SAFI.";
561 leaf route-reflector-client {
562 type boolean;
563 default "false";
564 description
565 "Configure a neighbor as route reflector client.";
566 }
567 }
568 }
569
570 grouping structure-neighbor-route-server {
571 container route-server {
572 description
573 "Parameters relating to the route-server for the AFI-SAFI.";
574 leaf route-server-client {
575 type boolean;
576 default "false";
577 description
578 "Configure a neighbor as route server client.";
579 }
580 }
581 }
582
583 grouping structure-neighbor-send-community {
584 container send-community {
585 description
586 "Parameters relating to the send-community for the AFI-SAFI.";
587 leaf send-community {
588 type boolean;
589 default "true";
590 description
591 "Send standard community attribute to this neighbor.";
592 }
593
594 leaf send-ext-community {
595 type boolean;
596 default "true";
597 description
598 "Send extended community attribute to this neighbor.";
599 }
600
601 leaf send-large-community {
602 type boolean;
603 default "true";
604 description
605 "Send large community attribute to this neighbor.";
606 }
607 }
608 }
609
610 grouping structure-neighbor-group-admin-shutdown {
611 description
612 "Structural grouping used to include admin-shutdown
613 configuration for both BGP neighbors and peer groups.";
614 container admin-shutdown {
615 description
616 "BGP Administrative Shutdown Communication.";
617 leaf enable {
618 type boolean;
619 description
620 "When set to 'true', BGP shutdown communication is enabled.";
621 }
622
623 leaf message {
624 type string;
625 description
626 "Shutdown message.";
627 reference
628 "draft-ietf-idr-shutdown-06";
629 }
630 }
631 }
632
633 grouping structure-neighbor-group-graceful-restart {
634 description
635 "Structural grouping used to include graceful-restart
636 configuration for both BGP neighbors and peer groups.";
637 container graceful-restart {
638 description
639 "BGP Graceful restart feature.";
640 choice mode {
641 case graceful-restart-mode {
642 leaf enable {
643 type boolean;
644 default "false";
645 description
646 "Enable or disable the graceful-restart capability.
647 Setting this value to 'true' enables the graceful-restart
648 and helper both at peer level. Setting this value to 'false'
649 disables graceful restart and helper mode. The peer will inherit
650 global configuration.";
651 }
652 }
653
654 case graceful-restart-helper-mode {
655 leaf graceful-restart-helper {
656 type boolean;
657 default "false";
658 description
659 "Setting this value to 'true' enables helper mode for the peer
660 Setting this value to 'false' disables the helper mode. The
661 peer will inherit global configuration.";
662 }
663 }
664
665 case graceful-restart-disable-mode {
666 leaf graceful-restart-disable {
667 type boolean;
668 default "false";
669 description
670 "Setting this value to 'true' disables the graceful-restart
671 and helper Mode. Setting this value to 'false' causes the peer
672 to inherit global configuration.";
673 }
674 }
675 }
676 }
677 }
678
679 grouping structure-neighbor-group-soft-reconfiguration {
680 description
681 "Structural grouping used to include soft-reconfiguration
682 configuration for both BGP neighbors and peer groups.";
683 leaf soft-reconfiguration {
684 type boolean;
685 default "false";
686 description
687 "Allow inbound soft reconfiguration for this neighbor.";
688 }
689 }
690
691 grouping structure-neighbor-group-attr-unchanged {
692 description
693 "Structural grouping used to include BGP route propagation
694 rules configuration for both BGP neighbors and peer groups.";
695 container attr-unchanged {
696 description
697 "BGP route propagation rules configuration.";
698 leaf as-path-unchanged {
699 type boolean;
700 default "false";
701 description
702 "When set to 'true' as-path attribute is propagated unchanged.";
703 }
704
705 leaf next-hop-unchanged {
706 type boolean;
707 default "false";
708 description
709 "When set to 'true' next-hop attribute is propagated unchanged.";
710 }
711
712 leaf med-unchanged {
713 type boolean;
714 default "false";
715 description
716 "When set to 'true' med attribute is propagated unchanged.";
717 }
718 }
719 }
720
721 grouping structure-neighbor-group-orf-capability {
722 description
723 "Structural grouping used to include orf
724 configuration for both BGP neighbors and peer groups.";
725 container orf-capability {
726 choice orf-update {
727 case send {
728 leaf orf-send {
729 type boolean;
730 default "false";
731 description
732 "Setting to 'true' advertises the ORF capability.";
733 }
734 }
735
736 case receive {
737 leaf orf-receive {
738 type boolean;
739 default "false";
740 description
741 "When set to 'true' it receives the orf capability.";
742 }
743 }
744
745 case both {
746 leaf orf-both {
747 type boolean;
748 default "false";
749 description
750 "When set to 'true' it advertises/receives the orf capability.";
751 }
752 }
753 }
754 }
755 }
756
757 grouping structure-neighbor-config-timers {
758 description
759 "Structural grouping used to include per neighbor timers
760 configuration for both BGP neighbors and peer groups.";
761 container timers {
762 leaf advertise-interval {
763 type uint16 {
764 range "0..600";
765 }
766 units "seconds";
767 description
768 "Minimum interval between sending BGP routing updates.";
769 }
770
771 leaf connect-time {
772 type uint16 {
773 range "1..65535";
774 }
775 units "seconds";
776 description
777 "BGP connect timer.";
778 }
779
780 uses neighbor-timers;
781 }
782 }
783
784 grouping structure-neighbor-group-filter-config {
785 description
786 "Structural grouping used to include filter
787 configuration for both BGP neighbors and peer groups.";
788 container filter-config {
789 description
790 "BGP Policy configuration for both BGP neighbors and groups.";
791 uses rmap-policy-import;
792
793 uses rmap-policy-export;
794
795 uses plist-policy-import;
796
797 uses plist-policy-export;
798
799 uses access-list-policy-import;
800
801 uses access-list-policy-export;
802
803 uses as-path-filter-list-policy-import;
804
805 uses as-path-filter-list-policy-export;
806
807 uses unsuppress-map-policy-import;
808
809 uses unsuppress-map-policy-export;
810 }
811 }
812 }