-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
Cisco-IOS-XR-um-router-bgp-cfg.yang
17853 lines (17838 loc) · 659 KB
/
Cisco-IOS-XR-um-router-bgp-cfg.yang
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
module Cisco-IOS-XR-um-router-bgp-cfg {
namespace "http://cisco.com/ns/yang/Cisco-IOS-XR-um-router-bgp-cfg";
prefix um-router-bgp-cfg;
import Cisco-IOS-XR-types {
prefix xr;
}
import ietf-inet-types {
prefix inet;
}
import Cisco-IOS-XR-um-snmp-server-cfg {
prefix a1;
}
import Cisco-IOS-XR-um-vrf-cfg {
prefix a2;
}
import cisco-semver {
prefix semver;
}
organization
"Cisco Systems, Inc.";
contact
"Cisco Systems, Inc.
Customer Service
Postal: 170 West Tasman Drive
San Jose, CA 95134
Tel: +1 800 553-NETS
E-mail: [email protected]";
description
"This module contains a collection of YANG definitions
for Cisco IOS-XR router-bgp package configuration.
This YANG module augments the
modules with configuration data.
Copyright (c) 2019-2022 by Cisco Systems, Inc.
All rights reserved.";
revision 2022-03-03 {
description
"Added leaf percentage-threshold-high under bandwidth-aware";
semver:module-version "5.0.0";
}
revision 2021-10-19 {
description
"Added leaf flex-algo under container optimal-route-reflection
2021-09-21
Added retention under route-policy
2021-08-27
Increase maximum-paths ebgp range to 1024,
Added preference under rpki/server,
Added datafile under rpki,
Added unique-nexthop-check-disable under maximum-paths,
Added table-version under address-family
2021-08-23
Added epe-bgp/labeled-unicast under advertise and epe/backup/enable
Added deterministic under unequal-cost of maximum-paths
Added container export under address family
Added leaf route-policy under srv6/alloc
Added container bandwidth-aware
Added leaf route-policy under srv6/alloc of vrfs
Added node deterministic under unequal-cost of maximum-paths/address family
2021-07-29
Removed duplicate enforce-first-as-disable which serve same as enforce-first-as/disable";
semver:module-version "4.0.0";
}
revision 2021-05-31 {
description
"Added must statement under list instances router->bgp
2021-03-15
Added sr-policy under router-bgp->bgp->bestpath and
router-bgp->vrf->bgp->bestpath
2021-02-25
Added multipath container under vrf->neighbors->address-family
2021-02-17
Added must constraints in af-group list
2021-02-11
Removed presence statement from match node under eigrp container
2021-02-10
Added labeled-unicast under best-external
2021-02-04
Added sr-policy under nexthop & igp-metric
2021-02-03
Added container option-b-asbr-only
2020-11-16
Added srte-metric and validation under nexthop
2020-11-10
Added mask-length under local-address-subnet as needed
2020-10-22
Added rpki-dropped-only/rpki-tested-only under
soft-reconfiguration/inbound. Updated must statements accordingly
to define proper constraints with new nodes.
2020-09-30
Added multipath under neighbor address-family
2020-08-12
Added route-target container under retain.
Added per-nexthop-received-label under mode.
Added appropriate when statements under retain/mode containers.
Removed per-prefix under vrf as it's not supported.
2020-08-05
Added some must statements as needed
2020-07-30
Added when statement to local-labeled-route under address-family
hierarchy and removed one presence statement as needed";
semver:module-version "3.0.0";
}
revision 2020-07-24 {
description
"Added internal under remove-private-as. Also added must statements
under remove-private-as as appropriate.
2020-06-05
Removed unused nodes from vrf address-family
Added constraint to nodes under as-format
2020-05-17
(1) Added enable/label-mode under as
(2) Added srv6 under encapsulation-type
(3) Added vpnv4/vpnv6/l2vpn nodes under advertise
(4) Added segment-routing node under neighbors/neighbor/address-family
(5) Changed integer range of multipath, message-log-buffer-size, purge-time
(6) Added minimum-ipv6 node under nexthop/resolution/prefix-length
(7) Changed sysdb path of log node and its chilren
(8) Changed sysdb path of suppress node and its children
(9) Added extended-nexthop-encoding node under suppress
(10) Added update node under neighbor-group/address-families/address-family
(11) Added retain-nbr-routes under graceful-restart
2020-04-14
Added rd augment to vrf model
2020-03-13
Added corresponding nodes for peer-set-id, adjacencies,
peer-set and peer-node-sid";
semver:module-version "2.0.0";
}
revision 2019-06-10 {
description
"Establish semantic version baseline.";
semver:module-version "1.0.0";
}
revision 2019-03-30 {
description
"Initial version";
}
typedef Bgp-address-family {
type enumeration {
enum "ipv4-unicast" {
value 0;
description
"IPv4 unicast";
}
enum "ipv4-multicast" {
value 1;
description
"IPv4 multicast";
}
enum "ipv4-labeled-unicast" {
value 2;
description
"IPv4 labeled-unicast";
}
enum "ipv4-tunnel" {
value 3;
description
"IPv4 tunnel";
}
enum "vpnv4-unicast" {
value 4;
description
"VPNv4 unicast";
}
enum "ipv6-unicast" {
value 5;
description
"IPv6 unicast";
}
enum "ipv6-multicast" {
value 6;
description
"IPv6 multicast";
}
enum "ipv6-labeled-unicast" {
value 7;
description
"IPv6 labeled-unicast";
}
enum "vpnv6-unicast" {
value 8;
description
"VPNv6 unicast";
}
enum "ipv4-mdt" {
value 9;
description
"IPv4 MDT";
}
enum "l2vpn-vpls-vpws" {
value 10;
description
"L2VPN VPLS-VPWS";
}
enum "ipv4-rt-filter" {
value 11;
description
"IPv4 rt-filter";
}
enum "ipv4-mvpn" {
value 12;
description
"IPv4 MVPN";
}
enum "ipv6-mvpn" {
value 13;
description
"IPv6 MVPN";
}
enum "l2vpn-evpn" {
value 14;
description
"L2VPN EVPN";
}
enum "link-state-link-state" {
value 15;
description
"Link-state link-state";
}
enum "vpnv4-multicast" {
value 16;
description
"VPNv4 Multicast";
}
enum "vpnv6-multicast" {
value 17;
description
"VPNv6 Multicast";
}
enum "ipv4-flowspec" {
value 18;
description
"IPv4 flowspec";
}
enum "ipv6-flowspec" {
value 19;
description
"IPv6 flowspec";
}
enum "vpnv4-flowspec" {
value 20;
description
"VPNv4 flowspec";
}
enum "vpnv6-flowspec" {
value 21;
description
"VPNv6 flowspec";
}
enum "l2vpn-mspw" {
value 22;
description
"L2VPN MSPW";
}
enum "ipv4-sr-policy" {
value 23;
description
"IPv4 SRPolicy";
}
enum "ipv6-sr-policy" {
value 24;
description
"IPv6 SRPolicy";
}
enum "all-address-family" {
value 25;
description
"All Address Families";
}
}
description
"Bgp address family";
}
typedef Bgp-attribute-code {
type union {
type uint32 {
range "0 | 4..14";
}
type uint32 {
range "6..255";
}
type enumeration {
enum "AGGREGATOR" {
value 7;
description
"Aggregator attribute (7)";
}
enum "AIGP" {
value 26;
description
"AIGP attribute (26)";
}
enum "AS4-AGGREGATOR" {
value 18;
description
"AS4_AGGREGATOR attribute (18)";
}
enum "AS4-PATH" {
value 17;
description
"AS4_PATH attribute (17)";
}
enum "ATOMIC-AGGREGATE" {
value 6;
description
"Atomic aggrgate attribute (6)";
}
enum "ATTRSET" {
value 128;
description
"ATTR_SET attribute (128)";
}
enum "CLUSTER-LIST" {
value 10;
description
"Cluster List attribute (10)";
}
enum "COMMUNITY" {
value 8;
description
"Community attribute (8)";
}
enum "CONNECTOR" {
value 20;
description
"Connector attribute (20)";
}
enum "EXTENDED-COMMUNITIES" {
value 16;
description
"Extended community attribute (16)";
}
enum "LARGE-COMMUNITY" {
value 32;
description
"Large Community attribute (32)";
}
enum "LOCAL-PREF" {
value 5;
description
"Local Preference attribute (5)";
}
enum "LSATTR" {
value 29;
description
"Link-state attribute (29)";
}
enum "MULTI-EXIT-DISC" {
value 4;
description
"MED attribute (4)";
}
enum "ORIGINATOR-ID" {
value 9;
description
"Originator attribute (9)";
}
enum "PMSI-TUNNEL" {
value 22;
description
"PMSI Tunnel attribute (22)";
}
enum "PPMP" {
value 70;
description
"PPMP attribute (70)";
}
enum "PREFIX-SID" {
value 40;
description
"Prefix-SID attribute (40)";
}
enum "SSA" {
value 19;
description
"SAFI specific attribute (19)";
}
enum "TUNNEL-ENCAP" {
value 23;
description
"Tunnel-Encapsulation attribute (23)";
}
}
}
}
grouping VRF-COMMON {
container import {
description
"VRF import";
leaf route-policy {
type xr:Route-policy-name;
description
"Use route-policy for import filtering";
}
container from {
description
"Import routes from a VRF";
container default-vrf {
description
"Import routes from the default VRF";
leaf route-policy {
type xr:Route-policy-name;
description
"Use route-policy for import filtering";
}
container advertise-as-vpn {
must "../route-policy";
presence "Indicates a advertise-as-vpn node is configured.";
description
"Advertise imported routes to PEs";
}
}
container vrf {
description
"VRF import";
container advertise-as-vpn {
presence "Indicates a advertise-as-vpn node is configured.";
description
"Advertise imported routes to PEs";
}
}
container bridge-domain {
description
"VRF import";
container advertise-as-vpn {
presence "Indicates a advertise-as-vpn node is configured.";
description
"Advertise local EVPN imported routes to PEs";
}
}
}
container route-target {
description
"Specify import route target extended communities";
container two-byte-as-rts {
description
"Two Byte AS Number Route Target";
list two-byte-as-rt {
key "as-number index stitching";
description
"Two Byte AS Number Route Target";
leaf as-number {
type uint32 {
range "1..65535";
}
description
"Two Byte AS Number";
}
leaf index {
type uint32 {
range "0..4294967295" {
description
"ASN2:index (hex or decimal format)";
}
}
description
"ASN2:index (hex or decimal format)";
}
leaf stitching {
type boolean;
description
"These are stitching RTs";
}
}
}
container four-byte-as-rts {
description
"Four Byte AS number Route Target";
list four-byte-as-rt {
key "as-number index stitching";
description
"Four Byte AS number Route Target";
leaf as-number {
type uint32 {
range "65536..4294967295";
}
description
"Four Byte AS number";
}
leaf index {
type uint32 {
range "0..65535" {
description
"ASN2:index (hex or decimal format)";
}
}
description
"ASN2:index (hex or decimal format)";
}
leaf stitching {
type boolean;
description
"These are stitching RTs";
}
}
}
container ip-addresse-rts {
description
"IP address Route Target";
list ip-address-rt {
key "ip-address index stitching";
description
"IP address";
leaf ip-address {
type inet:ipv4-address-no-zone;
description
"IP address";
}
leaf index {
type uint32 {
range "0..65535" {
description
"IPv4Address:index (hex or decimal format)";
}
}
description
"IPv4Address:index (hex or decimal format)";
}
leaf stitching {
type boolean;
description
"These are stitching RTs";
}
}
}
}
}
container export {
description
"VRF export";
leaf route-policy {
type xr:Route-policy-name;
description
"Use route-policy for export";
}
container to {
description
"Export routes to a VRF";
container default-vrf {
description
"Export routes to the default VRF";
leaf route-policy {
type xr:Route-policy-name;
description
"Use route-policy for export";
}
container allow-imported-vpn {
presence "Indicates a allow-imported-vpn node is configured.";
description
"Allow export of imported VPN routes to default VRF";
}
}
container vrf {
description
"VRF export";
container allow-imported-vpn {
presence "Indicates a allow-imported-vpn node is configured.";
description
"Allow export of imported VPN routes to non-default VRF";
container disable-adv-source-vrf-vni {
presence "Indicates a disable-adv-source-vrf-vni node is configured.";
description
"Disable advertisement of source vrf vni for leaked route";
}
}
}
}
container route-target {
description
"Specify export route target extended communities";
container two-byte-as-rts {
description
"Two Byte AS Number Route Target";
list two-byte-as-rt {
key "as-number index stitching";
description
"Two Byte AS Number Route Target";
leaf as-number {
type uint32 {
range "1..65535";
}
description
"Two Byte AS Number";
}
leaf index {
type uint32 {
range "0..4294967295" {
description
"ASN2:index (hex or decimal format)";
}
}
description
"ASN2:index (hex or decimal format)";
}
leaf stitching {
type boolean;
description
"These are stitching RTs";
}
}
}
container four-byte-as-rts {
description
"Four Byte AS number Route Target";
list four-byte-as-rt {
key "as-number index stitching";
description
"Four Byte AS number Route Target";
leaf as-number {
type uint32 {
range "65536..4294967295";
}
description
"Four Byte AS number";
}
leaf index {
type uint32 {
range "0..65535" {
description
"ASN2:index (hex or decimal format)";
}
}
description
"ASN2:index (hex or decimal format)";
}
leaf stitching {
type boolean;
description
"These are stitching RTs";
}
}
}
container ip-addresse-rts {
description
"IP address Route Target";
list ip-address-rt {
key "ip-address index stitching";
description
"IP address";
leaf ip-address {
type inet:ipv4-address-no-zone;
description
"IP address";
}
leaf index {
type uint32 {
range "0..65535" {
description
"IPv4Address:index (hex or decimal format)";
}
}
description
"IPv4Address:index (hex or decimal format)";
}
leaf stitching {
type boolean;
description
"These are stitching RTs";
}
}
}
}
}
}
grouping VRF-RD {
container rd {
description
"route distinguisher";
container two-byte-as {
must "not(../four-byte-as or ../ip-address)";
presence "Indicates a two-byte-as node is configured.";
leaf as-number {
type xr:Bgp-as-number;
mandatory true;
description
"bgp as-number";
}
leaf index {
type uint32 {
range "0..4294967295" {
description
"ASN2:index (hex or decimal format)";
}
}
mandatory true;
description
"ASN2:index (hex or decimal format)";
}
}
container four-byte-as {
must "not(../two-byte-as or ../ip-address)";
presence "Indicates a four-byte-as node is configured.";
leaf as-number {
type xr:Bgp-as-number;
mandatory true;
description
"4-byte AS number";
}
leaf index {
type uint32 {
range "0..4294967295" {
description
"ASN2:index (hex or decimal format)";
}
}
mandatory true;
description
"ASN2:index (hex or decimal format)";
}
}
container ip-address {
must "not(../two-byte-as or ../four-byte-as)";
presence "Indicates a ip-address node is configured.";
description
"configure this node";
leaf ipv4-address {
type inet:ipv4-address-no-zone;
mandatory true;
description
"configure this node";
}
leaf index {
type uint32 {
range "0..65535" {
description
"IPv4Address:index (hex or decimal format)";
}
}
mandatory true;
description
"IPv4Address:index (hex or decimal format)";
}
}
}
}
grouping AS-COMMON {
container rpki {
description
"Configure RPKI";
container servers {
description
"Configure RPKI cache-servers";
list server {
key "server-id";
description
"Configure RPKI cache-servers";
leaf server-id {
type xr:Cisco-ios-xr-string {
length "1..1024" {
description
"Hostname or IP address";
}
}
description
"Configure RPKI cache-servers";
}
container bind-source {
description
"Specify a bind source for RPKI cache-server";
container interface {
description
"Specify a source interface to bind the cache-server transport";
leaf interface-name {
type xr:Interface-name;
description
"Interface Name";
}
}
}
leaf preference {
type uint32 {
range "1..10" {
description
"(Deprecated from 7.4.1) RPKI cache-server preference value (lower is better)";
}
}
description
"(Deprecated from 7.4.1) Specify a preference value for the RPKI cache";
}
container refresh-time {
description
"Time between sending serial-queries for the RPKI cache-server";
leaf refresh-time-value {
type uint32 {
range "15..3600" {
description
"Refresh time (in seconds)";
}
}
description
"Refresh time (in seconds)";
}
container off {
presence "Indicates a off node is configured.";
description
"Do not send serial-queries periodically";
}
}
container response-time {
description
"Time to wait for a response from the RPKI cache-server";
leaf response-time-value {
type uint32 {
range "15..3600" {
description
"Response time (in seconds)";
}
}
description
"Response time (in seconds)";
}
container off {
presence "Indicates a off node is configured.";
description
"Wait indefinitely for a response";
}
}
leaf purge-time {
type uint32 {
range "30..65535" {
description
"Purge time (in seconds)";
}
}
description
"Purge time (in seconds)";
}
leaf username {
type string {
length "1..1024" {
description
"RPKI cache (SSH) username";
}
}
description
"Specify a (SSH) username for the RPKI cache-server";
}
leaf password {
type string {
length "1..1024" {
description
"RPKI cache (SSH) password";
}
}
description
"Specify a (SSH) password for the RPKI cache-server";
}
container transport {
description
"Specify a transport method for the RPKI cache-server";
container tcp {
description
"Connect to the RPKI cache-server using TCP (unencrypted)";
leaf port {
type uint32 {
range "1..65535" {
description
"Specify a port number for the RPKI cache-server transport";
}
}
must "not(../../ssh/port)";
description
"Specify a port number for the RPKI cache-server transport";
}
}
container ssh {
description
"Connect to the RPKI cache-server using SSH";
leaf port {
type uint32 {
range "1..65535" {
description
"Specify a port number for the RPKI cache-server transport";
}
}
must "not(../../tcp/port)";
description
"Specify a port number for the RPKI cache-server transport";
}
}
}
container shutdown {
presence "Indicates a shutdown node is configured.";
description
"Shutdown the RPKI cache-server";
}
}
}
container routes {
description
"Configure an RPKI route";
list route {
key "address minimum-prefix-length maximum-prefix-length origin-as-number";
description
"Configure an RPKI route";
leaf address {
type inet:ip-address-no-zone;
description
"Configure an RPKI route";
}
leaf minimum-prefix-length {
type union {
type uint32 {
range "0..32" {
description
"Minimum prefix length for ipv4 address";
}
}
type uint32 {
range "0..128" {
description
"Minimum prefix length for ipv6 address";
}
}
}
description
"Minimum prefix length";
}
leaf maximum-prefix-length {
type union {
type uint32 {
range "1..32" {
description
"Maximum prefix length for ipv4 address";
}
}
type uint32 {
range "1..128" {
description
"Maximum prefix length for ipv6 addess";
}
}
}
description
"Maximum prefix length (Default 32/128 for IPv4/IPv6)";
}
leaf origin-as-number {
type uint32 {
range "1..4294967295" {
description
"Origin Autonomous System number (in asplain format)";
}
}
description
"Origin Autonomous System number";
}
}
}
leaf datafile {
type xr:Cisco-ios-xr-string {
length "1..800" {
description
"(Deprecated from 7.4.1) File name containing RPKI data entries";
}
}
description
"(Deprecated from 7.4.1) Configure an RPKI data file";
}
}
container address-families {
description
"Enter Address Family command mode";
list address-family {
key "af-name";
description
"Enter Address Family command mode";
leaf af-name {
type Bgp-address-family;
description
"Enter Address Family command mode";
}
container vrf {
when "../af-name = 'vpnv4-unicast' or ../af-name = 'vpnv6-unicast'";
description
"Specify configurations to be inherited to all vrfs";
container all {
presence "Indicates a all node is configured.";
description
"Specify configurations to be inherited to all vrfs";
container source {
description
"Source import route-targets from import-policy";
container rt {
description
"Source import route-targets from import-policy";
container import-policy {