-
Notifications
You must be signed in to change notification settings - Fork 0
/
frr-user-conf.yaml
757 lines (748 loc) · 14.1 KB
/
frr-user-conf.yaml
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
## topologie du réseau:
#routeur gC1
# * 0/0 -> gB2: 0/0
# * eth1 -> gC3: eth1
# * eth2 -> gC8: eth2
#routeur gC2
# * eth2 -> gC3: eth2
# * eth1 -> gC4: eth1
# * eth3 -> gC8: eth3
#routeur gC3
# * eth2 -> gC2: eth2
# * eth3 -> gC6: eth3
# * eth1 -> gC1: eth1
#routeur gC4
# * eth1 -> gC2: eth1
# * eth2 -> gC5: eth2
#routeur gC5
# * eth2 -> gC4: eth2
# * eth1 -> gC6: eth1
# * eth7 -> gB1: eth7
#routeur gC6
# * eth1 -> gC5: eth1
# * eth2 -> gC7: eth2
# * eth3 -> gC3: eth3
#routeur gC7
# * eth2 -> gC6: eth2
# * eth1 -> gC8: eth1
#routeur gC8
# * eth1 -> gC7: eth1
# * eth3 -> gC2: eth3
# * eth2 -> gC1: eth2
#routeur sfrB1
# * eth1 -> gB1: eth1
# * eth7 -> sfrC1: eth7
#routeur gB1
# * eth1 -> sfrB1: eth1
# * eth7 -> gC5: eth7
#routeur sfrC1
# * eth1 -> sfrC4: eth1
# * eth2 -> sfrC2: eth2
# * eth7 -> sfrB1: eth7
#routeur sfrC2
# * eth1 -> sfrC3: eth1
# * eth2 -> sfrC1: eth2
#routeur sfrC3
# * eth2 -> sfrC4: eth2
# * eth1 -> sfrC2: eth1
#routeur sfrC4
# * eth1 -> sfrC1: eth1
# * eth2 -> sfrC3: eth2
# * eth7 -> sfrE1: eth7
#routeur sfrE1
# * eth7 -> sfrC4: eth7
# * eth0 -> client:
#routeur gB2
# * eth1 -> fB1: eth0
# * 0/0 -> gC1: 0/0
#routeur fB1
# * eth7 -> fC1: eth7
# * eth0 -> gB2: eth1
#routeur fC1
# * eth7 -> fB1: eth7
# * eth1 -> fC2: eth1
# * eth2 -> fC3: eth2
#routeur fC2
# * eth1 -> fC1: eth1
# * eth2 -> fC4: eth2
# * eth3 -> fC5: eth2
#routeur fC3
# * eth2 -> fC1: eth2
# * eth3 -> fC5: eth3
#routeur fC4
# * eth2 -> fC2: eth2
# * eth1 -> fE1: eth1
#routeur fC5
# * eth3 -> fC3: eth3
# * eth2 -> fC2: eth3
#routeur fE1
# * eth1 -> fC4: eth1
# * eth0 -> client:
# * eth2 -> client:
---
templates:
router: |-
ipv6 forwarding
router-id {{router.router_id}}
{% for interface in router.interfaces %}
{{Template(interface.template).render(Template=Template,interface=interface,router=router)}}
{%endfor%}
{% for classe in router.resolved_classes %}
# classe {{classe.name}}
{{Template(classe.template).render(Template=Template,classe=classe,router=router)}}
#--
# fin classe {{classe.name}}
!
{% endfor %}
interface: |-
int {{interface.name}}
ipv6 address {{interface.ipv6_network}}::{{interface.ip_end}}/64
{% for classe in interface.resolved_classes %}
# classe {{classe.name}}
{{Template(classe.template).render(interface=interface,router=router)}}
# fin classe {{classe.name}}
{% endfor %}
{{interface.interface_template}}
exit
default_router_classes: []
default_interface_classes: []
classes:
- name: ospf6-router
type: router
template: |-
router ospf6
ospf6 router-id {{router.router_id}}
redistribute connected
exit
values:
ospf6_process: 1
ospf6_area: 0
- name: ospf6-interface
type: interface
template: |-
router ospf6
interface {{interface.name}} area {{router.ospf6_area}}
int {{interface.name}}
- name: bgp-router
type: router
template: |-
debug bgp updates
ipv6 prefix-list hide-core seq 5 deny 2001:10::/48 ge 48
ipv6 prefix-list hide-core seq 10 permit any
!
router bgp {{router.Rasn}}
bgp router-id {{router.router_id}}
no bgp ebgp-requires-policy
address-family ipv6 unicast
exit
- name: bgp-interface
type: interface
template: |-
router bgp {{router.Rasn}}
neighbor {{interface.peer.ipv6}} remote-as {{interface.peer_as}}
address-family ipv6 unicast
neighbor {{interface.peer.ipv6}} activate
{% if interface.peer_as != router.Rasn and router.hide_core %}
neighbor {{interface.peer.ipv6}} prefix-list hide-core out
{% endif %}
exit-address-family
int {{interface.name}}
#values:
#peer_as: 2
- name: core
type: router
classes: [ospf6-router]
interface_classes: [ospf6-interface]
template: ''
- name: border
type: router
template: |-
router bgp {{router.Rasn}}
address-family ipv6 unicast
redistribute ospf
router ospf6
redistribute bgp
values:
hide_core: true
- name: geant-border
type: router
classes: [bgp-router, ospf6-router, border]
interface_classes: []
values:
Rasn: 1
- name: geant-core
type: router
classes: [core]
- name: sfr
type: router
values:
Rasn: 2
- name: sfr-core
type: router
classes: [core, sfr]
- name: sfr-border
type: router
classes: [bgp-router,ospf6-router,sfr, border]
- name: sfr-edge
type: router
classes: [ospf6-router]
- name: free
type: router
values:
Rasn: 3
- name: free-core
type: router
classes: [core, free]
- name: free-border
type: router
classes: [bgp-router,ospf6-router,free,border]
- name: free-edge
type: router
classes: [ospf6-router]
links:
- name: gC3<-->gC2
interface_classes: []
router_classes: []
template: ''
interface_values: {}
- name: gC2<-->gC4
interface_classes: []
router_classes: []
template: ''
interface_values: {}
- name: gC4<-->gC5
interface_classes: []
router_classes: []
template: ''
interface_values: {}
- name: gC5<-->gC6
interface_classes: []
router_classes: []
template: ''
interface_values: {}
- name: gC6<-->gC7
interface_classes: []
router_classes: []
template: ''
interface_values: {}
- name: gC8<-->gC7
interface_classes: []
router_classes: []
template: ''
interface_values: {}
- name: gC8<-->gC2
interface_classes: []
router_classes: []
template: ''
interface_values: {}
- name: gC3<-->gC6
interface_classes: []
router_classes: []
template: ''
interface_values: {}
- name: gB1<-->sfrB1
interface_classes: []
router_classes: []
template: ''
interface_values: {}
- name: gC5<-->gB1
interface_classes: []
router_classes: []
template: ''
interface_values: {}
- name: sfrC1<-->sfrC4
interface_classes: []
router_classes: []
template: ''
interface_values: {}
- name: sfrC4<-->sfrC3
interface_classes: []
router_classes: []
template: ''
interface_values: {}
- name: sfrC3<-->sfrC2
interface_classes: []
router_classes: []
template: ''
interface_values: {}
- name: sfrC2<-->sfrC1
interface_classes: []
router_classes: []
template: ''
interface_values: {}
- name: sfrB1<-->sfrC1
interface_classes: []
router_classes: []
template: ''
interface_values: {}
- name: sfrC4<-->sfrE1
interface_classes: []
router_classes: []
template: ''
interface_values: {}
- name: fB1<-->fC1
interface_classes: []
router_classes: []
template: ''
interface_values: {}
- name: fC1<-->fC2
interface_classes: []
router_classes: []
template: ''
interface_values: {}
- name: fC2<-->fC4
interface_classes: []
router_classes: []
template: ''
interface_values: {}
- name: fC1<-->fC3
interface_classes: []
router_classes: []
template: ''
interface_values: {}
- name: fC5<-->fC3
interface_classes: []
router_classes: []
template: ''
interface_values: {}
- name: fC5<-->fC2
interface_classes: []
router_classes: []
template: ''
interface_values: {}
- name: gB2<-->fB1
interface_classes: []
router_classes: []
template: ''
interface_values: {}
- name: fC4<-->fE1
interface_classes: []
router_classes: []
template: ''
interface_values: {}
- name: gB2<-->gC1
interface_classes: []
router_classes: []
template: ''
interface_values: {}
- name: gC1<-->gC3
interface_classes: []
router_classes: []
template: ''
interface_values: {}
- name: gC8<-->gC1
interface_classes: []
router_classes: []
template: ''
interface_values: {}
routers:
- name: gC1
disable: false
classes: [geant-core]
template: ''
interfaces:
- name: 0/0
template: ''
classes: []
values:
name: eth0
- name: eth1
template: ''
classes: []
values: {}
- name: eth2
template: ''
classes: []
values: {}
values: {}
- name: gC2
disable: false
classes: [geant-core]
template: ''
interfaces:
- name: eth2
template: ''
classes: []
values: {}
- name: eth1
template: ''
classes: []
values: {}
- name: eth3
template: ''
classes: []
values: {}
values: {}
- name: gC3
disable: false
classes: [geant-core]
template: ''
interfaces:
- name: eth2
template: ''
classes: []
values: {}
- name: eth3
template: ''
classes: []
values: {}
- name: eth1
template: ''
classes: []
values: {}
values: {}
- name: gC4
disable: false
classes: [geant-core]
template: ''
interfaces:
- name: eth1
template: ''
classes: []
values: {}
- name: eth2
template: ''
classes: []
values: {}
values: {}
- name: gC5
disable: false
classes: [geant-core]
template: ''
interfaces:
- name: eth2
template: ''
classes: []
values: {}
- name: eth1
template: ''
classes: []
values: {}
- name: eth7
template: ''
classes: []
values: {}
values: {}
- name: gC6
disable: false
classes: [geant-core]
template: ''
interfaces:
- name: eth1
template: ''
classes: []
values: {}
- name: eth2
template: ''
classes: []
values: {}
- name: eth3
template: ''
classes: []
values: {}
values: {}
- name: gC7
disable: false
classes: [geant-core]
template: ''
interfaces:
- name: eth2
template: ''
classes: []
values: {}
- name: eth1
template: ''
classes: []
values: {}
values: {}
- name: gC8
disable: false
classes: [geant-core]
template: ''
interfaces:
- name: eth1
template: ''
classes: []
values: {}
- name: eth3
template: ''
classes: []
values: {}
- name: eth2
template: ''
classes: []
values: {}
values: {}
- name: sfrB1
disable: false
classes: [sfr-border]
template: ''
interfaces:
- name: eth1
template: ''
classes: [bgp-interface]
values:
peer_as: 1
- name: eth7
template: ''
classes: [ospf6-interface]
values: {}
values: {}
- name: gB1
disable: false
classes: [geant-border]
template: ''
interfaces:
- name: eth1
template: ''
classes: [bgp-interface]
values:
peer_as: 2
- name: eth7
template: ''
classes: [ospf6-interface]
values: {}
values:
bgp_adv_nets: ['2001:1:f4ee:1::/64']
- name: sfrC1
disable: false
classes: [sfr-core]
template: ''
interfaces:
- name: eth1
template: ''
classes: []
values: {}
- name: eth2
template: ''
classes: []
values: {}
- name: eth7
template: ''
classes: []
values: {}
values: {}
- name: sfrC2
disable: false
classes: [sfr-core]
template: ''
interfaces:
- name: eth1
template: ''
classes: []
values: {}
- name: eth2
template: ''
classes: []
values: {}
values: {}
- name: sfrC3
disable: false
classes: [sfr-core]
template: ''
interfaces:
- name: eth2
template: ''
classes: []
values: {}
- name: eth1
template: ''
classes: []
values: {}
values: {}
- name: sfrC4
disable: false
classes: [sfr-core]
template: ''
interfaces:
- name: eth1
template: ''
classes: []
values: {}
- name: eth2
template: ''
classes: []
values: {}
- name: eth7
template: ''
classes: []
values: {}
values: {}
- name: sfrE1
disable: false
classes: [sfr-edge]
template: ''
interfaces:
- name: eth7
template: ''
classes: [ospf6-interface]
values: {}
- name: eth0
template: 'no ipv6 nd suppress-ra'
classes: []
values:
ipv6_network: 2001:1:2f4:1
ip_end: 1
values: {}
- name: gB2
disable: false
classes: [geant-border]
template: ''
interfaces:
- name: eth1
template: ''
classes: [bgp-interface]
values:
peer_as: 3
- name: 0/0
template: ''
classes: [ospf6-interface]
values:
name: eth0
values:
bgp_adv_nets: ['2001:1:2f4:1::/64']
- name: fB1
disable: false
classes: [free-border]
template: ''
interfaces:
- name: eth7
template: ''
classes: [ospf6-interface]
values: {}
- name: eth0
template: ''
classes: [bgp-interface]
values:
peer_as: 1
values: {}
- name: fC1
disable: false
classes: [free-core]
template: ''
interfaces:
- name: eth7
template: ''
classes: []
values: {}
- name: eth1
template: ''
classes: []
values: {}
- name: eth2
template: ''
classes: []
values: {}
values: {}
- name: fC2
disable: false
classes: [free-core]
template: ''
interfaces:
- name: eth1
template: ''
classes: []
values: {}
- name: eth2
template: ''
classes: []
values: {}
- name: eth3
template: ''
classes: []
values: {}
values: {}
- name: fC3
disable: false
classes: [free-core]
template: ''
interfaces:
- name: eth2
template: ''
classes: []
values: {}
- name: eth3
template: ''
classes: []
values: {}
values: {}
- name: fC4
disable: false
classes: [free-core]
template: ''
interfaces:
- name: eth2
template: ''
classes: []
values: {}
- name: eth1
template: ''
classes: []
values: {}
values: {}
- name: fC5
disable: false
classes: [free-core]
template: ''
interfaces:
- name: eth3
template: ''
classes: []
values: {}
- name: eth2
template: ''
classes: []
values: {}
values: {}
- name: fE1
disable: false
classes: [free-edge]
template: ''
interfaces:
- name: eth1
template: ''
classes: [ospf6-interface]
values: {}
- name: eth0
template: 'no ipv6 nd suppress-ra'
classes: [edge-int]
values:
ipv6_network: 2001:1:f4ee:1
ip_end: 1
- name: eth2
template: 'no ipv6 nd suppress-ra'
classes: [ edge-int ]
values:
ipv6_network: 2001:1:f4ee:2
ip_end: 1
values: {}
- name: gB3
disable: false
classes: [ geant-border]
template: ''
interfaces:
- name: eth0
template: ''
classes: [bgp-interface ]
values:
peer_as: 2
- name: eth3
template: ''
classes: [ ospf6-interface]
values: { }
values: { }
- name: sB2
disable: false
classes: [ sfr-border]
template: ''
interfaces:
- name: eth0
template: ''
classes: [bgp-interface ] #
values:
peer_as: 1
- name: eth3
template: ''
classes: [ ospf6-interface]
values: { }
values: { }