forked from DevNetSandbox/sbx_multi_ios
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtopology.virl
604 lines (595 loc) · 15 KB
/
topology.virl
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
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<topology xmlns="http://www.cisco.com/VIRL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" schemaVersion="0.95" xsi:schemaLocation="http://www.cisco.com/VIRL https://raw.github.com/CiscoVIRL/schema/v0.95/virl.xsd">
<extensions>
<entry key="management_network" type="String">flat</entry>
<entry key="management_lxc" type="Boolean">false</entry>
</extensions>
<node name="xr1" type="SIMPLE" subtype="IOS XRv 9000" location="524,184" ipv4="192.168.0.1">
<extensions>
<entry key="config" type="string">! IOS-XR9000v Config generated on 2018-08-14 01:22
! by autonetkit_0.24.1
!
hostname xr1
service timestamps log datetime msec
service timestamps debug datetime msec
telnet vrf default ipv4 server max-servers 10
telnet vrf Mgmt-intf ipv4 server max-servers 10
domain lookup disable
vrf Mgmt-intf
address-family ipv4 unicast
!
address-family ipv6 unicast
!
!
domain name virl.info
ssh server v2
ssh server vrf Mgmt-intf
!
line template vty
timestamp
exec-timeout 720 0
!
line console
exec-timeout 0 0
!
line default
exec-timeout 720 0
!
vty-pool default 0 50
control-plane
management-plane
inband
interface all
allow all
!
!
!
!
username cisco
group root-lr
group cisco-support
password cisco
!
username admin
group root-lr
group cisco-support
password admin
!
username lab
group root-lr
group cisco-support
password lab
!
!
interface Loopback0
description Loopback
ipv4 address 192.168.0.1 255.255.255.255
!
interface GigabitEthernet0/0/0/0
description GigabitEthernet0/0/0/0
no ipv4 address
no shutdown
!
interface GigabitEthernet0/0/0/1
description to metrics
ipv4 address 10.0.0.6 255.255.255.252
no shutdown
!
interface GigabitEthernet0/0/0/2
description to xr2
ipv4 address 10.0.0.9 255.255.255.252
no shutdown
!
interface GigabitEthernet0/0/0/3
description to xr3
ipv4 address 10.0.0.13 255.255.255.252
no shutdown
!
interface MgmtEth0/RP0/CPU0/0
description OOB Management
! Configured on launch
vrf Mgmt-intf
no ipv4 address
no shutdown
!
router static
vrf Mgmt-intf
address-family ipv4 unicast
0.0.0.0/0 {{ gateway }}
!
router ospf 1
log adjacency changes
area 0
interface GigabitEthernet0/0/0/1
cost 1
!
interface GigabitEthernet0/0/0/2
cost 1
!
interface GigabitEthernet0/0/0/3
cost 1
!
interface Loopback0
passive enable
!
!
!
route-policy bgp_in
pass
end-policy
!
route-policy bgp_out
pass
end-policy
!
router bgp 1
bgp router-id 192.168.0.1
address-family ipv4 unicast
network 192.168.0.1/32
!
! iBGP
!
! iBGP peers
!
neighbor 192.168.0.2
description iBGP peer xr2
remote-as 1
update-source Loopback0
address-family ipv4 unicast
!
!
!
neighbor 192.168.0.3
description iBGP peer xr3
remote-as 1
update-source Loopback0
address-family ipv4 unicast
!
!
!
telemetry model-driven
destination-group PIPELINE
address-family ipv4 10.0.0.5 port 5432
encoding self-describing-gpb
protocol tcp
!
!
sensor-group CPU
sensor-path Cisco-IOS-XR-wdsysmon-fd-oper:system-monitoring/cpu-utilization
!
sensor-group OSPF
sensor-path Cisco-IOS-XR-ipv4-ospf-oper:ospf/processes/process/default-vrf/ospf-summary
!
sensor-group BGP
sensor-path Cisco-IOS-XR-ipv4-bgp-oper:bgp/instances/instance/instance-active/default-vrf/process-info
sensor-path Cisco-IOS-XR-ipv4-bgp-oper:bgp/instances/instance/instance-active/default-vrf/afs/af/af-process-info/global
!
sensor-group BGP-RIB
sensor-path Cisco-IOS-XR-ip-rib-ipv4-oper:rib/vrfs/vrf/afs/af/safs/saf/ip-rib-route-table-names/ip-rib-route-table-name/protocol/bgp/as/information
sensor-path Cisco-IOS-XR-ip-rib-ipv4-oper:rib/vrfs/vrf/afs/af/safs/saf/ip-rib-route-table-names/ip-rib-route-table-name/protocol/connected/non-as/information
!
sensor-group INTFS
sensor-path Cisco-IOS-XR-infra-statsd-oper:infra-statistics/interfaces/interface/latest/data-rate
sensor-path Cisco-IOS-XR-infra-statsd-oper:infra-statistics/interfaces/interface/latest/generic-counters
!
sensor-group MEMORY
sensor-path Cisco-IOS-XR-nto-misc-oper:memory-summary/nodes/node/summary
!
sensor-group ROUTING
sensor-path Cisco-IOS-XR-ip-rib-ipv4-oper:rib/rib-table-ids/rib-table-id/summary-protos
!
subscription SUB1
sensor-group-id CPU sample-interval 10000
sensor-group-id OSPF sample-interval 10000
sensor-group-id BGP sample-interval 10000
sensor-group-id BGP-RIB sample-interval 10000
sensor-group-id INTFS sample-interval 10000
sensor-group-id MEMORY sample-interval 10000
sensor-group-id ROUTING sample-interval 10000
destination-id PIPELINE
!
</entry>
<entry key="AutoNetkit.mgmt_ip" type="string"></entry>
</extensions>
<interface id="0" name="GigabitEthernet0/0/0/0"/>
<interface id="1" name="GigabitEthernet0/0/0/1" ipv4="10.0.0.6" netPrefixLenV4="30"/>
<interface id="2" name="GigabitEthernet0/0/0/2" ipv4="10.0.0.9" netPrefixLenV4="30"/>
<interface id="3" name="GigabitEthernet0/0/0/3" ipv4="10.0.0.13" netPrefixLenV4="30"/>
</node>
<node name="xr2" type="SIMPLE" subtype="IOS XRv 9000" location="433,311" ipv4="192.168.0.2">
<extensions>
<entry key="config" type="string">! IOS-XR9000v Config generated on 2018-08-14 01:22
! by autonetkit_0.24.1
!
hostname xr2
service timestamps log datetime msec
service timestamps debug datetime msec
telnet vrf default ipv4 server max-servers 10
telnet vrf Mgmt-intf ipv4 server max-servers 10
domain lookup disable
vrf Mgmt-intf
address-family ipv4 unicast
!
address-family ipv6 unicast
!
!
domain name virl.info
ssh server v2
ssh server vrf Mgmt-intf
!
line template vty
timestamp
exec-timeout 720 0
!
line console
exec-timeout 0 0
!
line default
exec-timeout 720 0
!
vty-pool default 0 50
control-plane
management-plane
inband
interface all
allow all
!
!
!
!
username cisco
group root-lr
group cisco-support
password cisco
!
username admin
group root-lr
group cisco-support
password admin
!
username lab
group root-lr
group cisco-support
password lab
!
!
interface Loopback0
description Loopback
ipv4 address 192.168.0.2 255.255.255.255
!
interface GigabitEthernet0/0/0/0
description to xr1
ipv4 address 10.0.0.10 255.255.255.252
no shutdown
!
interface MgmtEth0/RP0/CPU0/0
description OOB Management
! Configured on launch
vrf Mgmt-intf
no ipv4 address
no shutdown
!
router static
vrf Mgmt-intf
address-family ipv4 unicast
0.0.0.0/0 {{ gateway }}
!
router ospf 1
log adjacency changes
area 0
interface GigabitEthernet0/0/0/0
cost 1
!
interface Loopback0
passive enable
!
!
!
route-policy bgp_in
pass
end-policy
!
route-policy bgp_out
pass
end-policy
!
router bgp 1
bgp router-id 192.168.0.2
address-family ipv4 unicast
network 192.168.0.2/32
!
! iBGP
!
! iBGP peers
!
neighbor 192.168.0.1
description iBGP peer xr1
remote-as 1
update-source Loopback0
address-family ipv4 unicast
!
!
!
neighbor 192.168.0.3
description iBGP peer xr3
remote-as 1
update-source Loopback0
address-family ipv4 unicast
!
!
!
telemetry model-driven
destination-group PIPELINE
address-family ipv4 10.0.0.5 port 5432
encoding self-describing-gpb
protocol tcp
!
!
sensor-group CPU
sensor-path Cisco-IOS-XR-wdsysmon-fd-oper:system-monitoring/cpu-utilization
!
sensor-group OSPF
sensor-path Cisco-IOS-XR-ipv4-ospf-oper:ospf/processes/process/default-vrf/ospf-summary
!
sensor-group BGP
sensor-path Cisco-IOS-XR-ipv4-bgp-oper:bgp/instances/instance/instance-active/default-vrf/process-info
sensor-path Cisco-IOS-XR-ipv4-bgp-oper:bgp/instances/instance/instance-active/default-vrf/afs/af/af-process-info/global
!
sensor-group BGP-RIB
sensor-path Cisco-IOS-XR-ip-rib-ipv4-oper:rib/vrfs/vrf/afs/af/safs/saf/ip-rib-route-table-names/ip-rib-route-table-name/protocol/bgp/as/information
sensor-path Cisco-IOS-XR-ip-rib-ipv4-oper:rib/vrfs/vrf/afs/af/safs/saf/ip-rib-route-table-names/ip-rib-route-table-name/protocol/connected/non-as/information
!
sensor-group INTFS
sensor-path Cisco-IOS-XR-infra-statsd-oper:infra-statistics/interfaces/interface/latest/data-rate
sensor-path Cisco-IOS-XR-infra-statsd-oper:infra-statistics/interfaces/interface/latest/generic-counters
!
sensor-group MEMORY
sensor-path Cisco-IOS-XR-nto-misc-oper:memory-summary/nodes/node/summary
!
sensor-group ROUTING
sensor-path Cisco-IOS-XR-ip-rib-ipv4-oper:rib/rib-table-ids/rib-table-id/summary-protos
!
subscription SUB1
sensor-group-id CPU sample-interval 10000
sensor-group-id OSPF sample-interval 10000
sensor-group-id BGP sample-interval 10000
sensor-group-id BGP-RIB sample-interval 10000
sensor-group-id INTFS sample-interval 10000
sensor-group-id MEMORY sample-interval 10000
sensor-group-id ROUTING sample-interval 10000
destination-id PIPELINE
!
</entry>
<entry key="AutoNetkit.mgmt_ip" type="string"></entry>
</extensions>
<interface id="0" name="GigabitEthernet0/0/0/0" ipv4="10.0.0.10" netPrefixLenV4="30"/>
</node>
<node name="xr3" type="SIMPLE" subtype="IOS XRv 9000" location="648,314" ipv4="192.168.0.3">
<extensions>
<entry key="config" type="string">! IOS-XR9000v Config generated on 2018-08-14 01:22
! by autonetkit_0.24.1
!
hostname xr3
service timestamps log datetime msec
service timestamps debug datetime msec
telnet vrf default ipv4 server max-servers 10
telnet vrf Mgmt-intf ipv4 server max-servers 10
domain lookup disable
vrf Mgmt-intf
address-family ipv4 unicast
!
address-family ipv6 unicast
!
!
domain name virl.info
ssh server v2
ssh server vrf Mgmt-intf
!
line template vty
timestamp
exec-timeout 720 0
!
line console
exec-timeout 0 0
!
line default
exec-timeout 720 0
!
vty-pool default 0 50
control-plane
management-plane
inband
interface all
allow all
!
!
!
!
username cisco
group root-lr
group cisco-support
password cisco
!
username admin
group root-lr
group cisco-support
password admin
!
username lab
group root-lr
group cisco-support
password lab
!
!
interface Loopback0
description Loopback
ipv4 address 192.168.0.3 255.255.255.255
!
interface GigabitEthernet0/0/0/0
description to xr1
ipv4 address 10.0.0.14 255.255.255.252
no shutdown
!
interface MgmtEth0/RP0/CPU0/0
description OOB Management
! Configured on launch
vrf Mgmt-intf
no ipv4 address
no shutdown
!
router static
vrf Mgmt-intf
address-family ipv4 unicast
0.0.0.0/0 {{ gateway }}
!
router ospf 1
log adjacency changes
area 0
interface GigabitEthernet0/0/0/0
cost 1
!
interface Loopback0
passive enable
!
!
!
route-policy bgp_in
pass
end-policy
!
route-policy bgp_out
pass
end-policy
!
router bgp 1
bgp router-id 192.168.0.3
address-family ipv4 unicast
network 192.168.0.3/32
!
! iBGP
!
! iBGP peers
!
neighbor 192.168.0.1
description iBGP peer xr1
remote-as 1
update-source Loopback0
address-family ipv4 unicast
!
!
!
neighbor 192.168.0.2
description iBGP peer xr2
remote-as 1
update-source Loopback0
address-family ipv4 unicast
!
!
!
telemetry model-driven
destination-group PIPELINE
address-family ipv4 10.0.0.5 port 5432
encoding self-describing-gpb
protocol tcp
!
!
sensor-group CPU
sensor-path Cisco-IOS-XR-wdsysmon-fd-oper:system-monitoring/cpu-utilization
!
sensor-group OSPF
sensor-path Cisco-IOS-XR-ipv4-ospf-oper:ospf/processes/process/default-vrf/ospf-summary
!
sensor-group BGP
sensor-path Cisco-IOS-XR-ipv4-bgp-oper:bgp/instances/instance/instance-active/default-vrf/process-info
sensor-path Cisco-IOS-XR-ipv4-bgp-oper:bgp/instances/instance/instance-active/default-vrf/afs/af/af-process-info/global
!
sensor-group BGP-RIB
sensor-path Cisco-IOS-XR-ip-rib-ipv4-oper:rib/vrfs/vrf/afs/af/safs/saf/ip-rib-route-table-names/ip-rib-route-table-name/protocol/bgp/as/information
sensor-path Cisco-IOS-XR-ip-rib-ipv4-oper:rib/vrfs/vrf/afs/af/safs/saf/ip-rib-route-table-names/ip-rib-route-table-name/protocol/connected/non-as/information
!
sensor-group INTFS
sensor-path Cisco-IOS-XR-infra-statsd-oper:infra-statistics/interfaces/interface/latest/data-rate
sensor-path Cisco-IOS-XR-infra-statsd-oper:infra-statistics/interfaces/interface/latest/generic-counters
!
sensor-group MEMORY
sensor-path Cisco-IOS-XR-nto-misc-oper:memory-summary/nodes/node/summary
!
sensor-group ROUTING
sensor-path Cisco-IOS-XR-ip-rib-ipv4-oper:rib/rib-table-ids/rib-table-id/summary-protos
!
subscription SUB1
sensor-group-id CPU sample-interval 10000
sensor-group-id OSPF sample-interval 10000
sensor-group-id BGP sample-interval 10000
sensor-group-id BGP-RIB sample-interval 10000
sensor-group-id INTFS sample-interval 10000
sensor-group-id MEMORY sample-interval 10000
sensor-group-id ROUTING sample-interval 10000
destination-id PIPELINE
!
</entry>
<entry key="AutoNetkit.mgmt_ip" type="string"></entry>
</extensions>
<interface id="0" name="GigabitEthernet0/0/0/0" ipv4="10.0.0.14" netPrefixLenV4="30"/>
</node>
<node name="metrics" type="SIMPLE" subtype="server" location="520,61" vmFlavor="m1.medium">
<extensions>
<entry key="config" type="string">#cloud-config
bootcmd:
- ln -s -t /etc/rc.d /etc/rc.local
hostname: metrics
manage_etc_hosts: true
runcmd:
- systemctl start rc-local
- sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config
- echo "UseDNS no" >> /etc/ssh/sshd_config
- service ssh restart
- service sshd restart
- [git, clone, "http://github.com/kecorbin/pig", "/home/cisco/metrics"]
- /home/cisco/metrics/setup.sh
package_update: true
package_upgrade: false
packages:
- docker
- docker-compose
users:
- default
- gecos: User configured by VIRL Configuration Engine 0.23.12
lock-passwd: false
name: cisco
plain-text-passwd: cisco
shell: /bin/bash
ssh-authorized-keys:
- VIRL-USER-SSH-PUBLIC-KEY
sudo: ALL=(ALL) ALL
write_files:
- path: /etc/systemd/system/[email protected]
content: |
[Unit]
Description=Run dhclient on %i interface
After=network.target
[Service]
Type=oneshot
ExecStart=/sbin/dhclient %i -nw -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease
ExecStart=/sbin/dhclient %i -nw -pf /var/run/dhclient6.%i.pid -6 -S
RemainAfterExit=yes
owner: root:root
permissions: '0644'
- path: /etc/rc.local
owner: root:root
permissions: '0755'
content: |-
#!/bin/sh
ifconfig eth1 up 10.0.0.5 netmask 255.255.255.252
route add -net 10.0.0.0/8 gw 10.0.0.6 dev eth1
route add -net 192.168.0.0/29 gw 10.0.0.6 dev eth1
exit 0
</entry>
</extensions>
<interface id="0" name="eth1" ipv4="10.0.0.5" netPrefixLenV4="30"/>
</node>
<annotations/>
<connection dst="/virl:topology/virl:node[3]/virl:interface[1]" src="/virl:topology/virl:node[1]/virl:interface[4]"/>
<connection dst="/virl:topology/virl:node[2]/virl:interface[1]" src="/virl:topology/virl:node[1]/virl:interface[3]"/>
<connection dst="/virl:topology/virl:node[4]/virl:interface[1]" src="/virl:topology/virl:node[1]/virl:interface[2]"/>
</topology>