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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
|
module frr-bgp-route-map {
yang-version 1.1;
namespace "http://frrouting.org/yang/bgp-route-map";
prefix frr-bgp-route-map;
import ietf-inet-types {
prefix inet;
}
import frr-route-map {
prefix frr-route-map;
}
import frr-filter {
prefix filter;
}
import frr-bgp-filter {
prefix bgp-filter;
}
import ietf-routing-types {
prefix rt-types;
}
import frr-route-types {
prefix frr-route-types;
}
organization
"Free Range Routing";
contact
"FRR Users List: <mailto:frog@lists.frrouting.org>
FRR Development List: <mailto:dev@lists.frrouting.org>";
description
"This module defines bgp route map settings";
revision 2020-01-02 {
description
"Initial revision";
}
identity match-alias {
base frr-route-map:rmap-match-type;
description
"Match BGP community alias name";
}
identity match-local-preference {
base frr-route-map:rmap-match-type;
description
"Match local-preference of routes";
}
identity match-script {
base frr-route-map:rmap-match-type;
description
"Match script of routes";
}
identity match-origin {
base frr-route-map:rmap-match-type;
description
"Match BGP route origin code";
}
identity rpki {
base frr-route-map:rmap-match-type;
description
"Control rpki specific settings";
}
identity rpki-extcommunity {
base frr-route-map:rmap-match-type;
description
"Control rpki specific settings derived from extended community";
}
identity probability {
base frr-route-map:rmap-match-type;
description
"Match portion of routes defined by percentage value";
}
identity source-vrf {
base frr-route-map:rmap-match-type;
description
"Match source vrf of routes";
}
identity peer {
base frr-route-map:rmap-match-type;
description
"Match peer address";
}
identity mac-address-list {
base frr-route-map:rmap-match-type;
description
"Match MAC address access-list";
}
identity ip-route-source {
base frr-route-map:rmap-match-type;
description
"Match advertising source address of route";
}
identity ip-route-source-prefix-list {
base frr-route-map:rmap-match-type;
description
"Match advertising source address of route";
}
identity evpn-route-type {
base frr-route-map:rmap-match-type;
description
"Match EVPN route type";
}
identity evpn-default-route {
base frr-route-map:rmap-match-type;
description
"Match EVPN default Type-5 route";
}
identity evpn-vni {
base frr-route-map:rmap-match-type;
description
"Match EVPN VNI";
}
identity evpn-rd {
base frr-route-map:rmap-match-type;
description
"Match EVPN route distinguisher";
}
identity match-community {
base frr-route-map:rmap-match-type;
description
"Match BGP community list";
}
identity match-large-community {
base frr-route-map:rmap-match-type;
description
"Match BGP large-community list";
}
identity match-extcommunity {
base frr-route-map:rmap-match-type;
description
"Match BGP extcommunity list";
}
identity as-path-list {
base frr-route-map:rmap-match-type;
description
"Match BGP AS path list";
}
identity ipv4-nexthop {
base frr-route-map:rmap-match-type;
description
"Match IPv4 next hop address";
}
identity ipv6-nexthop {
base frr-route-map:rmap-match-type;
description
"Match IPv6 next hop address";
}
identity source-protocol {
base frr-route-map:rmap-match-type;
description
"Match protocol via which the route was learnt";
}
identity distance {
base frr-route-map:rmap-set-type;
description
"Set BGP administrative distance to use";
}
identity set-extcommunity-none {
base frr-route-map:rmap-set-type;
description
"Set BGP extended community attribute";
}
identity set-extcommunity-rt {
base frr-route-map:rmap-set-type;
description
"Set BGP extended community attribute";
}
identity set-extcommunity-nt {
base frr-route-map:rmap-set-type;
description
"Set BGP extended community attribute";
}
identity set-extcommunity-soo {
base frr-route-map:rmap-set-type;
description
"Set BGP extended community attribute";
}
identity set-extcommunity-lb {
base frr-route-map:rmap-set-type;
description
"Set BGP extended community attribute";
}
identity set-extcommunity-color {
base frr-route-map:rmap-set-type;
description
"Set BGP extended community attribute";
}
identity set-ipv4-nexthop {
base frr-route-map:rmap-set-type;
description
"Set the IPv4 next-hop to peer-address/unchanged";
}
identity ipv4-vpn-address {
base frr-route-map:rmap-set-type;
description
"Set IPv4 VPN next-hop address";
}
identity ipv6-nexthop-global {
base frr-route-map:rmap-set-type;
description
"Set IPv6 next-hop global address";
}
identity ipv6-prefer-global {
base frr-route-map:rmap-set-type;
description
"Set IPv6 next-hop to prefer global address";
}
identity ipv6-peer-address {
base frr-route-map:rmap-set-type;
description
"Set IPv6 next-hop peer address";
}
identity ipv6-vpn-address {
base frr-route-map:rmap-set-type;
description
"Set IPv6 VPN next-hop address";
}
identity label-index {
base frr-route-map:rmap-set-type;
description
"Set the label index to associate with the prefixs";
}
identity set-local-preference {
base frr-route-map:rmap-set-type;
description
"Set the BGP local preference path attribute";
}
identity set-origin {
base frr-route-map:rmap-set-type;
description
"Set BGP route origin code";
}
identity weight {
base frr-route-map:rmap-set-type;
description
"Set the BGP weight attribute";
}
identity originator-id {
base frr-route-map:rmap-set-type;
description
"Set the BGP originator ID attribute";
}
identity table {
base frr-route-map:rmap-set-type;
description
"Export route to non-main kernel table";
}
identity atomic-aggregate {
base frr-route-map:rmap-set-type;
description
"Set BGP atomic-aggregate attribute";
}
identity aigp-metric {
base frr-route-map:rmap-set-type;
description
"Set BGP AIGP attribute (AIGP TLV Metric)";
}
identity as-path-prepend {
base frr-route-map:rmap-set-type;
description
"Set the BGP AS-path attribute";
}
identity as-path-exclude {
base frr-route-map:rmap-set-type;
description
"Set the BGP AS-path attribute";
}
identity as-path-replace {
base frr-route-map:rmap-set-type;
description
"Replace ASNs to local AS number";
}
identity set-community {
base frr-route-map:rmap-set-type;
description
"Set the BGP community attribute";
}
identity set-large-community {
base frr-route-map:rmap-set-type;
description
"Set the BGP large-community attribute";
}
identity aggregator {
base frr-route-map:rmap-set-type;
description
"Set the BGP aggregator attribute";
}
identity comm-list-delete {
base frr-route-map:rmap-set-type;
description
"Set BGP community list (for deletion)";
}
identity large-comm-list-delete {
base frr-route-map:rmap-set-type;
description
"Set BGP large community list (for deletion)";
}
identity extended-comm-list-delete {
base frr-route-map:rmap-set-type;
description
"Set BGP extended community list (for deletion)";
}
identity set-evpn-gateway-ip-ipv4 {
base frr-route-map:rmap-set-type;
description
"Set EVPN gateway IP overlay index IPv4";
}
identity set-evpn-gateway-ip-ipv6 {
base frr-route-map:rmap-set-type;
description
"Set EVPN gateway IP overlay index IPv6";
}
identity set-l3vpn-nexthop-encapsulation {
base frr-route-map:rmap-set-type;
description
"Accept L3VPN traffic over other than LSP encapsulation";
}
grouping extcommunity-non-transitive-types {
leaf two-octet-as-specific {
type boolean;
description
"Non-Transitive Two-Octet AS-Specific Extended Community";
}
}
typedef route-distinguisher {
type string {
pattern
'(0:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|'
+ '6[0-4][0-9]{3}|'
+ '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0):(429496729[0-5]|'
+ '42949672[0-8][0-9]|'
+ '4294967[01][0-9]{2}|429496[0-6][0-9]{3}|'
+ '42949[0-5][0-9]{4}|'
+ '4294[0-8][0-9]{5}|429[0-3][0-9]{6}|'
+ '42[0-8][0-9]{7}|4[01][0-9]{8}|'
+ '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0))|'
+ '(1:((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|'
+ '25[0-5])\.){3}([0-9]|[1-9][0-9]|'
+ '1[0-9]{2}|2[0-4][0-9]|25[0-5])):(6553[0-5]|'
+ '655[0-2][0-9]|'
+ '65[0-4][0-9]{2}|6[0-4][0-9]{3}|'
+ '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|'
+ '(2:(429496729[0-5]|42949672[0-8][0-9]|'
+ '4294967[01][0-9]{2}|'
+ '429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|'
+ '4294[0-8][0-9]{5}|'
+ '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[01][0-9]{8}|'
+ '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0):'
+ '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|'
+ '6[0-4][0-9]{3}|'
+ '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|'
+ '(6(:[a-fA-F0-9]{2}){6})|'
+ '(([3-57-9a-fA-F]|[1-9a-fA-F][0-9a-fA-F]{1,3}):'
+ '[0-9a-fA-F]{1,12})|'
+ '((6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|'
+ '6[0-4][0-9]{3}|'
+ '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0):(429496729[0-5]|'
+ '42949672[0-8][0-9]|'
+ '4294967[01][0-9]{2}|429496[0-6][0-9]{3}|'
+ '42949[0-5][0-9]{4}|'
+ '4294[0-8][0-9]{5}|429[0-3][0-9]{6}|'
+ '42[0-8][0-9]{7}|4[01][0-9]{8}|'
+ '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0)|'
+ '((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|'
+ '25[0-5])\.){3}([0-9]|[1-9][0-9]|'
+ '1[0-9]{2}|2[0-4][0-9]|25[0-5])):(6553[0-5]|'
+ '655[0-2][0-9]|'
+ '65[0-4][0-9]{2}|6[0-4][0-9]{3}|'
+ '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|'
+ '((429496729[0-5]|42949672[0-8][0-9]|'
+ '4294967[01][0-9]{2}|'
+ '429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|'
+ '4294[0-8][0-9]{5}|'
+ '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[01][0-9]{8}|'
+ '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0):'
+ '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|'
+ '6[0-4][0-9]{3}|'
+ '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|'
+ '((6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|'
+ '6[0-4][0-9]{3}|'
+ '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0).'
+ '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|'
+ '6[0-4][0-9]{3}|'
+ '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0):'
+ '(429496729[0-5]|42949672[0-8][0-9]|'
+ '4294967[01][0-9]{2}|'
+ '429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|'
+ '4294[0-8][0-9]{5}|'
+ '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[01][0-9]{8}|'
+ '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0))';
}
description
"A Route Distinguisher is an 8-octet value used to
distinguish routes from different BGP VPNs (RFC 4364).
A Route Distinguisher will have the same format as a
Route Target as per RFC 4360 and will consist of
two or three fields: a 2-octet Type field, an administrator
field, and, optionally, an assigned number field.
According to the data formats for types 0, 1, 2, and 6 as
defined in RFC 4360, RFC 5668, and RFC 7432, the encoding
pattern is defined as:
0:2-octet-asn:4-octet-number
1:4-octet-ipv4addr:2-octet-number
2:4-octet-asn:2-octet-number
6:6-octet-mac-address
Additionally, a generic pattern is defined for future
route discriminator types:
2-octet-other-hex-number:6-octet-hex-number
Some valid examples are 0:100:100, 1:1.1.1.1:100,
2:1234567890:203, and 6:26:00:08:92:78:00.
The following route distinguisher with two fields are also
accepted : 10000:44 1.2.3.4:44.";
reference
"RFC 4360: BGP Extended Communities Attribute.
RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs).
RFC 5668: 4-Octet AS Specific BGP Extended Community.
RFC 7432: BGP MPLS-Based Ethernet VPN.";
}
typedef extcommunity-lb-type {
type enumeration {
enum "explicit-bandwidth" {
value 0;
description
"Bandwidth value in Mbps";
}
enum "cumulative-bandwidth" {
value 1;
description
"Cumulative bandwidth of all multipaths (outbound-only)";
}
enum "computed-bandwidth" {
value 2;
description
"Internally computed bandwidth based on number of multipaths (outbound-only)";
}
}
description
"ext-community link bandwidth types.";
}
typedef asn-type {
type union {
type uint32 {
range "1..4294967295";
}
type string {
pattern '(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|'
+ '6[0-4][0-9]{3}|65[0-4][0-9]{2}|'
+ '655[0-2][0-9]|6553[0-5])\.'
+ '(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|'
+ '65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])' {
error-message "AS dot should be in the form [0..65535].[0..65535].";
}
pattern '^0\.0$' {
modifier "invert-match";
error-message "AS dot can't be equal to 0.0.";
}
}
}
}
typedef color-list {
type string {
pattern '((429496729[0-5]|42949672[0-8][0-9]|'
+ '4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|'
+ '42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|'
+ '429[0-3][0-9]{6}|42[0-8][0-9]{7}|'
+ '4[0-1][0-9]{8}|[1-3][0-9]{9}|'
+ '[1-9][0-9]{0,8})(\s*))+';
}
description
"The color-list type represent a set of colors of value (1..4294967295)
values are separated by white spaces";
reference
"RFC 9012 - The BGP Tunnel Encapsulation Attribute";
}
augment "/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:rmap-match-condition/frr-route-map:match-condition" {
case local-preference {
when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:match-local-preference')";
leaf local-preference {
type uint32 {
range "0..4294967295";
}
}
}
case alias {
when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:match-alias')";
leaf alias {
type string;
}
}
case script {
when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:match-script')";
leaf script {
type string;
}
}
case origin {
when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:match-origin')";
leaf origin {
type enumeration {
enum "egp" {
value 0;
description
"Remote EGP";
}
enum "igp" {
value 1;
description
"Local IGP";
}
enum "incomplete" {
value 2;
description
"Unknown heritage";
}
}
}
}
case rpki {
when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:rpki')";
leaf rpki {
type enumeration {
enum "invalid" {
value 0;
description
"Invalid prefix";
}
enum "notfound" {
value 1;
description
"Prefix not found";
}
enum "valid" {
value 2;
description
"Valid prefix";
}
}
}
}
case rpki-extcommunity {
when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:rpki-extcommunity')";
leaf rpki-extcommunity {
type enumeration {
enum "valid" {
value 0;
description
"Valid prefix";
}
enum "notfound" {
value 1;
description
"Prefix not found";
}
enum "invalid" {
value 2;
description
"Invalid prefix";
}
}
}
}
case probability {
when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:probability')";
leaf probability {
type uint8 {
range "0..100";
}
}
}
case source-vrf {
when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:source-vrf')";
leaf source-vrf {
type string;
}
}
case peer {
when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:peer')";
choice peer {
description
"Value of the peer";
case peer-ipv4-address {
description
"IP address of peer";
leaf peer-ipv4-address {
type inet:ipv4-address;
}
}
case peer-interface {
description
"Interface name of peer";
leaf peer-interface {
type string;
}
}
case peer-ipv6-address {
description
"IPv6 address of peer";
leaf peer-ipv6-address {
type inet:ipv6-address;
}
}
case peer-local {
description
"Static or Redistributed routes";
leaf peer-local {
type boolean;
}
}
}
}
case access-list-name {
when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:mac-address-list') or "
+ "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:as-path-list') or "
+ "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:ip-route-source') or "
+ "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:ip-route-source-prefix-list')";
description
"Access-list name";
leaf list-name {
type filter:access-list-name;
}
}
case evpn-default-route {
when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:evpn-default-route')";
description
"Match default EVPN type-5 route";
leaf evpn-default-route {
type empty;
}
}
case evpn-vni {
when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:evpn-vni')";
description
"Match eVPN VNI";
leaf evpn-vni {
type uint32 {
range "1..16777215";
}
}
}
case evpn-route-type {
when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:evpn-route-type')";
description
"Match eVPN route-type";
leaf evpn-route-type {
type enumeration {
enum "macip" {
value 0;
description
"Mac-IP route";
}
enum "multicast" {
value 1;
description
"IMET route";
}
enum "prefix" {
value 2;
description
"Prefix route";
}
enum "ead" {
value 3;
description
"Ethernet Auto-Discovery route";
}
enum "es" {
value 4;
description
"Ethernet Segment route";
}
}
}
}
case evpn-rd {
when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:evpn-rd')";
description
"Match eVPN route-distinguisher";
leaf route-distinguisher {
type route-distinguisher;
}
}
case comm-list-name {
when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:match-community') or "
+ "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:match-large-community') or "
+ "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:match-extcommunity')";
container comm-list {
leaf comm-list-name {
type bgp-filter:bgp-list-name;
}
leaf comm-list-name-exact-match {
type boolean;
description
"Do exact matching of communities";
}
leaf comm-list-name-any {
type boolean;
description
"Do matching of any community";
}
}
}
case ipv4-address {
when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:ipv4-nexthop')";
leaf ipv4-address {
type inet:ipv4-address;
description
"IPv4 address";
}
}
case ipv6-address {
when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:ipv6-nexthop')";
leaf ipv6-address {
type inet:ipv6-address;
description
"IPv6 address";
}
}
case source-protocol {
when "derived-from-or-self(../frr-route-map:condition, 'frr-bgp-route-map:source-protocol')";
leaf source-protocol {
type frr-route-types:frr-route-types;
}
}
}
augment "/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:rmap-set-action/frr-route-map:set-action" {
case distance {
when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:distance')";
leaf distance {
type uint8 {
range "1..255";
}
}
}
case extcommunity-none {
when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:set-extcommunity-none')";
description
"Value of the BGP extended community attribute";
leaf extcommunity-none {
type boolean;
description "No extended community attribute";
}
}
case extcommunity-rt {
when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:set-extcommunity-rt')";
description
"Value of the ext-community";
leaf extcommunity-rt {
type string;
description
"Set BGP ext-community route-target attribute";
}
}
case extcommunity-nt {
when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:set-extcommunity-nt')";
description
"Value of the ext-community";
leaf extcommunity-nt {
type string;
description
"Set BGP ext-community node-target attribute";
}
}
case extcommunity-soo {
when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:set-extcommunity-soo')";
description
"Value of the ext-community";
leaf extcommunity-soo {
type string;
description
"Set BGP ext-community site-of-origin attribute";
}
}
case extcommunity-lb {
when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:set-extcommunity-lb')";
container extcommunity-lb {
description
"Value of the ext-community.";
leaf lb-type {
type frr-bgp-route-map:extcommunity-lb-type;
}
leaf bandwidth {
when "../lb-type = 'explicit-bandwidth'";
type uint16 {
range "1..25600";
}
description
"Bandwidth value in Mbps";
}
uses extcommunity-non-transitive-types;
}
}
case extcommunity-color {
when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:set-extcommunity-color')";
description
"Value of the ext-community";
leaf extcommunity-color {
type color-list;
description
"Set BGP ext-community color attribute with a list of colors";
reference
"RFC9012";
}
}
case ipv4-address {
when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:ipv4-vpn-address')";
description
"Set the IPv4 address";
leaf ipv4-address {
type inet:ipv4-address;
}
}
case ipv4-nexthop {
when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:set-ipv4-nexthop')";
leaf ipv4-nexthop {
type string;
}
}
case ipv6-address {
when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:ipv6-nexthop-global') or "
+ "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:ipv6-vpn-address')";
description
"Set the IPv6 address";
leaf ipv6-address {
type inet:ipv6-address;
}
}
case preference {
when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:ipv6-prefer-global') or "
+ "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:ipv6-peer-address')";
leaf preference {
type boolean;
}
}
case label-index {
when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:label-index')";
leaf label-index {
type uint32 {
range "0..1048560";
}
}
}
case local-pref {
when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:set-local-preference')";
leaf local-pref {
type string;
}
}
case weight {
when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:weight')";
leaf weight {
type uint32 {
range "0..4294967295";
}
}
}
case origin {
when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:set-origin')";
leaf origin {
type enumeration {
enum "egp" {
value 0;
description
"Remote EGP";
}
enum "igp" {
value 1;
description
"Local IGP";
}
enum "incomplete" {
value 2;
description
"Unknown heritage";
}
}
}
}
case originator-id {
when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:originator-id')";
leaf originator-id {
type inet:ipv4-address;
}
}
case table {
when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:table')";
leaf table {
type uint32 {
range "1..4294967295";
}
}
}
case atomic-aggregate {
when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:atomic-aggregate')";
leaf atomic-aggregate {
type empty;
}
}
case aigp-metric {
when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:aigp-metric')";
leaf aigp-metric {
type string;
description
"Set BGP AIGP attribute (AIGP Metric TLV)";
}
}
case as-path-prepend {
when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:as-path-prepend')";
choice as-path-prepend {
description
"Value of the BGP AS-path attribute";
case prepend-as {
description
"Prepend the mentioned AS-path";
leaf prepend-as-path {
type string;
}
}
case last-as {
description
"Prepend the last ASN in the AS-path";
leaf last-as {
type uint8 {
range "1..10";
}
}
}
}
}
case as-path-exclude {
when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:as-path-exclude')";
leaf exclude-as-path {
type string;
description
"Exclude the mentioned AS-path";
}
}
case as-path-replace {
when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:as-path-replace')";
leaf replace-as-path {
type string;
description
"Replace ASNs to local AS number";
}
}
case community {
when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:set-community')";
choice community {
description
"Value of the BGP community attribute";
case none {
description
"No community attribute";
leaf community-none {
type boolean;
}
}
case community-string {
description
"Community string";
leaf community-string {
type string;
}
}
}
}
case large-community {
when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:set-large-community')";
choice large-community {
description
"Value of the BGP large-community attribute";
case none {
description
"No large-community attribute";
leaf large-community-none {
type boolean;
}
}
case large-community-string {
description
"Large-Community string";
leaf large-community-string {
type string;
}
}
}
}
case aggregator {
when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:aggregator')";
container aggregator {
leaf aggregator-asn {
type asn-type;
description
"ASN of the aggregator";
}
leaf aggregator-address {
type inet:ipv4-address;
description
"IPv4 address of the aggregator";
}
}
}
case comm-list-name {
when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:comm-list-delete') or "
+ "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:large-comm-list-delete') or "
+ "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action,
'frr-bgp-route-map:extended-comm-list-delete')";
leaf comm-list-name {
type bgp-filter:bgp-list-name;
}
}
case evpn-gateway-ip-ipv4 {
when
"derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action,
'frr-bgp-route-map:set-evpn-gateway-ip-ipv4')";
description
"Set EVPN gateway IP overlay index IPv4";
leaf evpn-gateway-ip-ipv4 {
type inet:ipv4-address;
}
}
case evpn-gateway-ip-ipv6 {
when
"derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action,
'frr-bgp-route-map:set-evpn-gateway-ip-ipv6')";
description
"Set EVPN gateway IP overlay index IPv6";
leaf evpn-gateway-ip-ipv6 {
type inet:ipv6-address;
}
}
case l3vpn-nexthop-encapsulation {
when
"derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action,
'frr-bgp-route-map:set-l3vpn-nexthop-encapsulation')";
description
"Accept L3VPN traffic over other than LSP encapsulation";
leaf l3vpn-nexthop-encapsulation {
type enumeration {
enum "gre" {
value 0;
description
"GRE protocol";
}
}
}
}
}
}
|