forked from DevNetSandbox/sbx_multi_ios
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtopology.virl
444 lines (428 loc) · 10.9 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
<?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 03:40
! by autonetkit_0.24.1
!
hostname xr1
service timestamps log datetime msec
service timestamps debug datetime msec
service timestamps log datetime show-timezone
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
!
!
logging 10.0.0.5 vrf default port 5140
logging source-interface Loopback0
!
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 to nxos1
ipv4 address 10.0.0.10 255.255.255.252
no shutdown
!
interface GigabitEthernet0/0/0/1
description to elk
ipv4 address 10.0.0.6 255.255.255.252
no shutdown
!
interface GigabitEthernet0/0/0/2
description to ios1
ipv4 address 10.0.0.14 255.255.255.252
no shutdown
!
interface GigabitEthernet0/0/0/3
description GigabitEthernet0/0/0/3
no ipv4 address
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 GigabitEthernet0/0/0/1
cost 1
!
interface GigabitEthernet0/0/0/2
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.3
description iBGP peer ios1
remote-as 1
update-source Loopback0
address-family ipv4 unicast
!
!
!
neighbor 192.168.0.2
description iBGP peer nxos1
remote-as 1
update-source Loopback0
address-family ipv4 unicast
!
!
!
</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"/>
<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.14" netPrefixLenV4="30"/>
<interface id="3" name="GigabitEthernet0/0/0/3"/>
</node>
<node name="nxos1" type="SIMPLE" subtype="NX-OSv 9000" location="433,303" ipv4="192.168.0.2">
<extensions>
<entry key="config" type="string">! NX-OSv Config generated on 2018-08-14 03:40
! by autonetkit_0.24.1
!
version 6.2(1)
license grace-period
!
hostname nxos1
vdc nxos1 id 1
limit-resource vlan minimum 16 maximum 4094
limit-resource vrf minimum 2 maximum 4096
limit-resource port-channel minimum 0 maximum 768
limit-resource u4route-mem minimum 96 maximum 96
limit-resource u6route-mem minimum 24 maximum 24
limit-resource m4route-mem minimum 58 maximum 58
limit-resource m6route-mem minimum 8 maximum 8
feature telnet
feature ospf
feature bgp
username adminbackup password 5 ! role network-operator
username admin password 5 $1$KuOSBsvW$Cy0TSD..gEBGBPjzpDgf51 role network-admin
username cisco password 5 $1$Nk7ZkwH0$fyiRmMMfIheqE3BqvcL0C1 role network-operator
username cisco role network-admin
username lab password 5 $1$buoy/oqy$.EXQz8rCn72ii8qtdldj00 role network-admin
no password strength-check
ip domain-lookup
copp profile strict
snmp-server user lab network-admin auth md5 0x5ceb414591539ee35159fca86fdfa101 priv 0x5ceb414591539ee35159fca86fdfa101 localizedkey
snmp-server user admin network-admin auth md5 0x328945d53e05e8e7207f8c20b142f0b7 priv 0x328945d53e05e8e7207f8c20b142f0b7 localizedkey
snmp-server user cisco network-operator auth md5 0x55b3c64a53fb95518e75358ee75e82e9 priv 0x55b3c64a53fb95518e75358ee75e82e9 localizedkey
snmp-server user cisco network-admin
rmon event 1 log trap public description FATAL(1) owner PMON@FATAL
rmon event 2 log trap public description CRITICAL(2) owner PMON@CRITICAL
rmon event 3 log trap public description ERROR(3) owner PMON@ERROR
rmon event 4 log trap public description WARNING(4) owner PMON@WARNING
rmon event 5 log trap public description INFORMATION(5) owner PMON@INFO
logging server 10.0.0.5 port 5140
logging source-interface loopback0
vlan 1
vrf context management
ip route 0.0.0.0 0.0.0.0 {{ gateway }}
hardware forwarding unicast trace
interface Loopback0
description Loopback
ip address 192.168.0.2/32
ip router ospf 1 area 0
interface Ethernet1/1
description to xr1
no switchport
ip address 10.0.0.9/30
ip router ospf 1 area 0
mac-address fa16.3e00.0001
no shutdown
interface mgmt0
description OOB Management
! Configured on launch
no ip address
mac-address fa16.3e00.0002
no shutdown
vrf member management
line console
line vty
router ospf 1
router-id 192.168.0.2
router bgp 1
router-id 192.168.0.2
address-family ipv4 unicast
network 192.168.0.2/32
!
! iBGP
!
! iBGP peers
!
neighbor 192.168.0.3 remote-as 1
description iBGP peer ios1
update-source Loopback0
address-family ipv4 unicast
!
!
!
neighbor 192.168.0.1 remote-as 1
description iBGP peer xr1
update-source Loopback0
address-family ipv4 unicast
!
!
</entry>
<entry key="AutoNetkit.mgmt_ip" type="string"></entry>
</extensions>
<interface id="0" name="Ethernet1/1" ipv4="10.0.0.9" netPrefixLenV4="30"/>
</node>
<node name="ios1" type="SIMPLE" subtype="IOSv" location="541,319" ipv4="192.168.0.3">
<extensions>
<entry key="config" type="string">! IOS Config generated on 2018-08-14 03:40
! by autonetkit_0.24.1
!
hostname ios1
boot-start-marker
boot-end-marker
!
vrf definition Mgmt-intf
!
address-family ipv4
exit-address-family
!
address-family ipv6
exit-address-family
!
!
!
no aaa new-model
!
!
ip cef
ipv6 unicast-routing
ipv6 cef
!
!
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
no service config
enable password cisco
ip classless
ip subnet-zero
no ip domain lookup
ip domain name virl.info
crypto key generate rsa modulus 768
ip ssh server algorithm authentication password
username cisco privilege 15 secret cisco
line vty 0 4
transport input ssh telnet
exec-timeout 720 0
password cisco
login local
line con 0
password cisco
!
no cdp run
!
logging host 10.0.0.5 transport udp port 5140
logging source-interface Loopback0
!
interface Loopback0
description Loopback
ip address 192.168.0.3 255.255.255.255
!
interface GigabitEthernet0/0
description OOB Management
vrf forwarding Mgmt-intf
! Configured on launch
no ip address
duplex full
speed auto
no shutdown
!
interface GigabitEthernet0/1
description to xr1
ip address 10.0.0.13 255.255.255.252
ip ospf cost 1
duplex full
speed auto
no shutdown
!
!
!
router ospf 1
network 192.168.0.3 0.0.0.0 area 0
log-adjacency-changes
passive-interface Loopback0
network 10.0.0.12 0.0.0.3 area 0
!
!
router bgp 1
bgp router-id 192.168.0.3
no synchronization
! ibgp
! ibgp peers
!
neighbor 192.168.0.2 remote-as 1
neighbor 192.168.0.2 description iBGP peer nxos1
neighbor 192.168.0.2 update-source Loopback0
!
neighbor 192.168.0.1 remote-as 1
neighbor 192.168.0.1 description iBGP peer xr1
neighbor 192.168.0.1 update-source Loopback0
!
!
!
address-family ipv4
network 192.168.0.3 mask 255.255.255.255
neighbor 192.168.0.2 activate
neighbor 192.168.0.1 activate
exit-address-family
!
!
ip route vrf Mgmt-intf 0.0.0.0 0.0.0.0 {{ gateway }}
!
end</entry>
<entry key="AutoNetkit.mgmt_ip" type="string"></entry>
</extensions>
<interface id="0" name="GigabitEthernet0/1" ipv4="10.0.0.13" netPrefixLenV4="30"/>
</node>
<node name="elk" 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: elk
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/elknet", "/home/cisco/elknet"]
- /home/cisco/elknet/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 -host 192.168.0.1 gw 10.0.0.6 dev eth1
route add -net 10.0.0.0/8 gw 10.0.0.6 dev eth1
route add -net 192.168.0.2/31 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[4]/virl:interface[1]" src="/virl:topology/virl:node[1]/virl:interface[2]"/>
<connection dst="/virl:topology/virl:node[2]/virl:interface[1]" src="/virl:topology/virl:node[1]/virl:interface[1]"/>
<connection dst="/virl:topology/virl:node[3]/virl:interface[1]" src="/virl:topology/virl:node[1]/virl:interface[3]"/>
</topology>