You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

714 lines
19 KiB

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
  1. <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  2. <topology xmlns="http://www.cisco.com/VIRL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" schemaVersion="0.9" xsi:schemaLocation="http://www.cisco.com/VIRL https://raw.github.com/CiscoVIRL/schema/v0.9/virl.xsd">
  3. <node name="flat-1" type="ASSET" subtype="FLAT" location="288,78">
  4. <interface id="0" name="link0"/>
  5. </node>
  6. <node name="iosv-1" type="SIMPLE" subtype="IOSv" location="397,74" ipv4="192.168.0.1">
  7. <extensions>
  8. <entry key="config" type="string">!
  9. ! Last configuration change at 19:06:54 UTC Fri Jul 10 2015
  10. !
  11. version 15.5
  12. service timestamps debug datetime msec
  13. service timestamps log datetime msec
  14. no service password-encryption
  15. !
  16. hostname iosv-1
  17. !
  18. boot-start-marker
  19. boot-end-marker
  20. !
  21. !
  22. enable password cisco
  23. !
  24. no aaa new-model
  25. ethernet lmi ce
  26. !
  27. !
  28. !
  29. bsd-client server url https://cloudsso.cisco.com/as/token.oauth2
  30. mmi polling-interval 60
  31. no mmi auto-configure
  32. no mmi pvc
  33. mmi snmp-timeout 180
  34. !
  35. !
  36. !
  37. !
  38. !
  39. !
  40. !
  41. !
  42. !
  43. !
  44. !
  45. no ip domain lookup
  46. ip cef
  47. ipv6 unicast-routing
  48. ipv6 cef
  49. !
  50. multilink bundle-name authenticated
  51. !
  52. !
  53. cts logging verbose
  54. !
  55. !
  56. !
  57. redundancy
  58. !
  59. no cdp run
  60. !
  61. !
  62. !
  63. !
  64. !
  65. !
  66. !
  67. !
  68. !
  69. !
  70. !
  71. !
  72. !
  73. !
  74. interface Loopback0
  75. description Loopback
  76. ip address 192.168.0.1 255.255.255.255
  77. !
  78. interface GigabitEthernet0/0
  79. description OOB Management
  80. ip address 10.255.1.73 255.255.0.0
  81. duplex auto
  82. speed auto
  83. media-type rj45
  84. !
  85. interface GigabitEthernet0/1
  86. description to iosvl2-3
  87. ip address 10.0.0.1 255.255.0.0
  88. ip nat inside
  89. ip virtual-reassembly in
  90. ip ospf cost 1
  91. duplex auto
  92. speed auto
  93. media-type rj45
  94. !
  95. interface GigabitEthernet0/2
  96. description to flat-1
  97. ip address 172.16.1.170 255.255.255.0
  98. ip nat outside
  99. ip nat enable
  100. ip virtual-reassembly in
  101. duplex auto
  102. speed auto
  103. media-type rj45
  104. !
  105. router ospf 1
  106. passive-interface Loopback0
  107. network 10.0.0.0 0.0.255.255 area 0
  108. network 192.168.0.1 0.0.0.0 area 0
  109. !
  110. ip forward-protocol nd
  111. !
  112. !
  113. no ip http server
  114. no ip http secure-server
  115. ip nat inside source list 1 interface GigabitEthernet0/2 overload
  116. ip default-network 172.16.1.0
  117. ip route 0.0.0.0 0.0.0.0 172.16.1.254
  118. !
  119. !
  120. !
  121. access-list 1 permit 10.0.0.0 0.0.255.255
  122. !
  123. control-plane
  124. !
  125. banner exec `
  126. **************************************************************************
  127. * IOSv is strictly limited to use for evaluation, demonstration and IOS *
  128. * education. IOSv is provided as-is and is not supported by Cisco's *
  129. * Technical Advisory Center. Any use or disclosure, in whole or in part, *
  130. * of the IOSv Software or Documentation to any third party for any *
  131. * purposes is expressly prohibited except as otherwise authorized by *
  132. * Cisco in writing. *
  133. **************************************************************************`
  134. banner incoming `
  135. **************************************************************************
  136. * IOSv is strictly limited to use for evaluation, demonstration and IOS *
  137. * education. IOSv is provided as-is and is not supported by Cisco's *
  138. * Technical Advisory Center. Any use or disclosure, in whole or in part, *
  139. * of the IOSv Software or Documentation to any third party for any *
  140. * purposes is expressly prohibited except as otherwise authorized by *
  141. * Cisco in writing. *
  142. **************************************************************************`
  143. banner login `
  144. **************************************************************************
  145. * IOSv is strictly limited to use for evaluation, demonstration and IOS *
  146. * education. IOSv is provided as-is and is not supported by Cisco's *
  147. * Technical Advisory Center. Any use or disclosure, in whole or in part, *
  148. * of the IOSv Software or Documentation to any third party for any *
  149. * purposes is expressly prohibited except as otherwise authorized by *
  150. * Cisco in writing. *
  151. **************************************************************************`
  152. !
  153. line con 0
  154. password cisco
  155. line aux 0
  156. line vty 0 4
  157. exec-timeout 720 0
  158. password cisco
  159. login
  160. transport input telnet ssh
  161. !
  162. no scheduler allocate
  163. !
  164. end</entry>
  165. <entry key="AutoNetkit.mgmt_ip" type="string"></entry>
  166. </extensions>
  167. <interface id="0" name="GigabitEthernet0/1" ipv4="10.0.0.1" netPrefixLenV4="16"/>
  168. <interface id="1" name="GigabitEthernet0/2"/>
  169. </node>
  170. <node name="iosvl2-1" type="SIMPLE" subtype="IOSvL2" location="251,242">
  171. <extensions>
  172. <entry key="config" type="string">!
  173. ! Last configuration change at 19:03:15 UTC Fri Jul 10 2015
  174. !
  175. version 15.2
  176. service timestamps debug datetime msec
  177. service timestamps log datetime msec
  178. no service password-encryption
  179. service compress-config
  180. !
  181. hostname iosvl2-1
  182. !
  183. boot-start-marker
  184. boot-end-marker
  185. !
  186. !
  187. enable password cisco
  188. !
  189. no aaa new-model
  190. !
  191. !
  192. !
  193. !
  194. !
  195. !
  196. !
  197. !
  198. no ip domain-lookup
  199. ip cef
  200. no ipv6 cef
  201. !
  202. !
  203. spanning-tree mode pvst
  204. spanning-tree extend system-id
  205. !
  206. vlan internal allocation policy ascending
  207. !
  208. !
  209. !
  210. !
  211. !
  212. !
  213. !
  214. !
  215. !
  216. !
  217. !
  218. !
  219. !
  220. interface Loopback0
  221. description Loopback
  222. no ip address
  223. !
  224. interface GigabitEthernet0/0
  225. description Mapped to Vlan1 for management
  226. switchport mode access
  227. media-type rj45
  228. negotiation auto
  229. !
  230. interface GigabitEthernet0/1
  231. description to iosvl2-3
  232. switchport trunk encapsulation dot1q
  233. switchport mode trunk
  234. media-type rj45
  235. negotiation auto
  236. !
  237. interface GigabitEthernet0/2
  238. description to server-1
  239. switchport access vlan 2
  240. switchport mode access
  241. media-type rj45
  242. negotiation auto
  243. !
  244. interface Vlan1
  245. description OOB Management
  246. ip address 10.255.1.74 255.255.0.0
  247. !
  248. ip forward-protocol nd
  249. !
  250. no ip http server
  251. no ip http secure-server
  252. !
  253. !
  254. !
  255. !
  256. !
  257. !
  258. control-plane
  259. !
  260. banner exec `
  261. **************************************************************************
  262. * IOSv is strictly limited to use for evaluation, demonstration and IOS *
  263. * education. IOSv is provided as-is and is not supported by Cisco's *
  264. * Technical Advisory Center. Any use or disclosure, in whole or in part, *
  265. * of the IOSv Software or Documentation to any third party for any *
  266. * purposes is expressly prohibited except as otherwise authorized by *
  267. * Cisco in writing. *
  268. **************************************************************************`
  269. banner incoming `
  270. **************************************************************************
  271. * IOSv is strictly limited to use for evaluation, demonstration and IOS *
  272. * education. IOSv is provided as-is and is not supported by Cisco's *
  273. * Technical Advisory Center. Any use or disclosure, in whole or in part, *
  274. * of the IOSv Software or Documentation to any third party for any *
  275. * purposes is expressly prohibited except as otherwise authorized by *
  276. * Cisco in writing. *
  277. **************************************************************************`
  278. banner login `
  279. **************************************************************************
  280. * IOSv is strictly limited to use for evaluation, demonstration and IOS *
  281. * education. IOSv is provided as-is and is not supported by Cisco's *
  282. * Technical Advisory Center. Any use or disclosure, in whole or in part, *
  283. * of the IOSv Software or Documentation to any third party for any *
  284. * purposes is expressly prohibited except as otherwise authorized by *
  285. * Cisco in writing. *
  286. **************************************************************************`
  287. !
  288. line con 0
  289. password cisco
  290. line aux 0
  291. line vty 0 4
  292. exec-timeout 720 0
  293. password cisco
  294. login
  295. transport input telnet ssh
  296. !
  297. !
  298. end</entry>
  299. <entry key="AutoNetkit.mgmt_ip" type="string"></entry>
  300. </extensions>
  301. <interface id="0" name="GigabitEthernet0/1"/>
  302. <interface id="1" name="GigabitEthernet0/2"/>
  303. </node>
  304. <node name="iosvl2-2" type="SIMPLE" subtype="IOSvL2" location="517,242">
  305. <extensions>
  306. <entry key="config" type="string">!
  307. ! Last configuration change at 19:03:17 UTC Fri Jul 10 2015
  308. !
  309. version 15.2
  310. service timestamps debug datetime msec
  311. service timestamps log datetime msec
  312. no service password-encryption
  313. service compress-config
  314. !
  315. hostname iosvl2-2
  316. !
  317. boot-start-marker
  318. boot-end-marker
  319. !
  320. !
  321. enable password cisco
  322. !
  323. no aaa new-model
  324. !
  325. !
  326. !
  327. !
  328. !
  329. !
  330. !
  331. !
  332. no ip domain-lookup
  333. ip cef
  334. no ipv6 cef
  335. !
  336. !
  337. spanning-tree mode pvst
  338. spanning-tree extend system-id
  339. !
  340. vlan internal allocation policy ascending
  341. !
  342. !
  343. !
  344. !
  345. !
  346. !
  347. !
  348. !
  349. !
  350. !
  351. !
  352. !
  353. !
  354. interface Loopback0
  355. description Loopback
  356. no ip address
  357. !
  358. interface GigabitEthernet0/0
  359. description Mapped to Vlan1 for management
  360. switchport mode access
  361. media-type rj45
  362. negotiation auto
  363. !
  364. interface GigabitEthernet0/1
  365. description to iosvl2-3
  366. switchport trunk encapsulation dot1q
  367. switchport mode trunk
  368. media-type rj45
  369. negotiation auto
  370. !
  371. interface GigabitEthernet0/2
  372. description to server-2
  373. switchport access vlan 2
  374. switchport mode access
  375. media-type rj45
  376. negotiation auto
  377. !
  378. interface Vlan1
  379. description OOB Management
  380. ip address 10.255.1.75 255.255.0.0
  381. !
  382. ip forward-protocol nd
  383. !
  384. no ip http server
  385. no ip http secure-server
  386. !
  387. !
  388. !
  389. !
  390. !
  391. !
  392. control-plane
  393. !
  394. banner exec `
  395. **************************************************************************
  396. * IOSv is strictly limited to use for evaluation, demonstration and IOS *
  397. * education. IOSv is provided as-is and is not supported by Cisco's *
  398. * Technical Advisory Center. Any use or disclosure, in whole or in part, *
  399. * of the IOSv Software or Documentation to any third party for any *
  400. * purposes is expressly prohibited except as otherwise authorized by *
  401. * Cisco in writing. *
  402. **************************************************************************`
  403. banner incoming `
  404. **************************************************************************
  405. * IOSv is strictly limited to use for evaluation, demonstration and IOS *
  406. * education. IOSv is provided as-is and is not supported by Cisco's *
  407. * Technical Advisory Center. Any use or disclosure, in whole or in part, *
  408. * of the IOSv Software or Documentation to any third party for any *
  409. * purposes is expressly prohibited except as otherwise authorized by *
  410. * Cisco in writing. *
  411. **************************************************************************`
  412. banner login `
  413. **************************************************************************
  414. * IOSv is strictly limited to use for evaluation, demonstration and IOS *
  415. * education. IOSv is provided as-is and is not supported by Cisco's *
  416. * Technical Advisory Center. Any use or disclosure, in whole or in part, *
  417. * of the IOSv Software or Documentation to any third party for any *
  418. * purposes is expressly prohibited except as otherwise authorized by *
  419. * Cisco in writing. *
  420. **************************************************************************`
  421. !
  422. line con 0
  423. password cisco
  424. line aux 0
  425. line vty 0 4
  426. exec-timeout 720 0
  427. password cisco
  428. login
  429. transport input telnet ssh
  430. !
  431. !
  432. end</entry>
  433. <entry key="AutoNetkit.mgmt_ip" type="string"></entry>
  434. </extensions>
  435. <interface id="0" name="GigabitEthernet0/1"/>
  436. <interface id="1" name="GigabitEthernet0/2"/>
  437. </node>
  438. <node name="iosvl2-3" type="SIMPLE" subtype="IOSvL2" location="391,172">
  439. <extensions>
  440. <entry key="config" type="string">!
  441. ! Last configuration change at 19:03:21 UTC Fri Jul 10 2015
  442. !
  443. version 15.2
  444. service timestamps debug datetime msec
  445. service timestamps log datetime msec
  446. no service password-encryption
  447. service compress-config
  448. !
  449. hostname iosvl2-3
  450. !
  451. boot-start-marker
  452. boot-end-marker
  453. !
  454. !
  455. enable password cisco
  456. !
  457. no aaa new-model
  458. !
  459. !
  460. !
  461. !
  462. !
  463. !
  464. !
  465. !
  466. no ip domain-lookup
  467. ip cef
  468. no ipv6 cef
  469. !
  470. !
  471. spanning-tree mode pvst
  472. spanning-tree extend system-id
  473. !
  474. vlan internal allocation policy ascending
  475. !
  476. !
  477. !
  478. !
  479. !
  480. !
  481. !
  482. !
  483. !
  484. !
  485. !
  486. !
  487. !
  488. interface Loopback0
  489. description Loopback
  490. no ip address
  491. !
  492. interface GigabitEthernet0/0
  493. description Mapped to Vlan1 for management
  494. switchport mode access
  495. media-type rj45
  496. negotiation auto
  497. !
  498. interface GigabitEthernet0/1
  499. description to iosvl2-2
  500. switchport trunk encapsulation dot1q
  501. switchport mode trunk
  502. media-type rj45
  503. negotiation auto
  504. !
  505. interface GigabitEthernet0/2
  506. description to iosvl2-1
  507. switchport trunk encapsulation dot1q
  508. switchport mode trunk
  509. media-type rj45
  510. negotiation auto
  511. !
  512. interface GigabitEthernet0/3
  513. description to iosv-1
  514. switchport access vlan 2
  515. switchport mode access
  516. media-type rj45
  517. negotiation auto
  518. !
  519. interface Vlan1
  520. description OOB Management
  521. ip address 10.255.1.76 255.255.0.0
  522. !
  523. ip forward-protocol nd
  524. !
  525. no ip http server
  526. no ip http secure-server
  527. !
  528. !
  529. !
  530. !
  531. !
  532. !
  533. control-plane
  534. !
  535. banner exec `
  536. **************************************************************************
  537. * IOSv is strictly limited to use for evaluation, demonstration and IOS *
  538. * education. IOSv is provided as-is and is not supported by Cisco's *
  539. * Technical Advisory Center. Any use or disclosure, in whole or in part, *
  540. * of the IOSv Software or Documentation to any third party for any *
  541. * purposes is expressly prohibited except as otherwise authorized by *
  542. * Cisco in writing. *
  543. **************************************************************************`
  544. banner incoming `
  545. **************************************************************************
  546. * IOSv is strictly limited to use for evaluation, demonstration and IOS *
  547. * education. IOSv is provided as-is and is not supported by Cisco's *
  548. * Technical Advisory Center. Any use or disclosure, in whole or in part, *
  549. * of the IOSv Software or Documentation to any third party for any *
  550. * purposes is expressly prohibited except as otherwise authorized by *
  551. * Cisco in writing. *
  552. **************************************************************************`
  553. banner login `
  554. **************************************************************************
  555. * IOSv is strictly limited to use for evaluation, demonstration and IOS *
  556. * education. IOSv is provided as-is and is not supported by Cisco's *
  557. * Technical Advisory Center. Any use or disclosure, in whole or in part, *
  558. * of the IOSv Software or Documentation to any third party for any *
  559. * purposes is expressly prohibited except as otherwise authorized by *
  560. * Cisco in writing. *
  561. **************************************************************************`
  562. !
  563. line con 0
  564. password cisco
  565. line aux 0
  566. line vty 0 4
  567. exec-timeout 720 0
  568. password cisco
  569. login
  570. transport input telnet ssh
  571. !
  572. !
  573. end</entry>
  574. <entry key="AutoNetkit.mgmt_ip" type="string"></entry>
  575. </extensions>
  576. <interface id="0" name="GigabitEthernet0/1"/>
  577. <interface id="1" name="GigabitEthernet0/2"/>
  578. <interface id="2" name="GigabitEthernet0/3"/>
  579. </node>
  580. <node name="server-1" type="SIMPLE" subtype="server" location="251,336">
  581. <extensions>
  582. <entry key="config" type="String">#cloud-config
  583. bootcmd:
  584. - ln -s -t /etc/rc.d /etc/rc.local
  585. hostname: server-1
  586. manage_etc_hosts: true
  587. runcmd:
  588. - start ttyS0
  589. - systemctl start getty@ttyS0.service
  590. - systemctl start rc-local
  591. - sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config
  592. - echo "UseDNS no" &gt;&gt; /etc/ssh/sshd_config
  593. - service ssh restart
  594. - service sshd restart
  595. users:
  596. - default
  597. - gecos: User configured by VIRL Configuration Engine 0.15.8
  598. lock-passwd: false
  599. name: cisco
  600. plain-text-passwd: cisco
  601. shell: /bin/bash
  602. ssh-authorized-keys:
  603. - VIRL-USER-SSH-PUBLIC-KEY
  604. sudo: ALL=(ALL) ALL
  605. write_files:
  606. - path: /etc/init/ttyS0.conf
  607. owner: root:root
  608. content: |
  609. # ttyS0 - getty
  610. # This service maintains a getty on ttyS0 from the point the system is
  611. # started until it is shut down again.
  612. start on stopped rc or RUNLEVEL=[12345]
  613. stop on runlevel [!12345]
  614. respawn
  615. exec /sbin/getty -L 115200 ttyS0 vt102
  616. permissions: '0644'
  617. - path: /etc/systemd/system/dhclient@.service
  618. content: |
  619. [Unit]
  620. Description=Run dhclient on %i interface
  621. After=network.target
  622. [Service]
  623. Type=oneshot
  624. ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease
  625. RemainAfterExit=yes
  626. owner: root:root
  627. permissions: '0644'
  628. - path: /etc/rc.local
  629. owner: root:root
  630. permissions: '0755'
  631. content: |-
  632. #!/bin/sh -e
  633. ifconfig eth1 up 10.0.0.2 netmask 255.255.0.0
  634. route add -net 10.0.0.0/16 gw 10.0.0.1 dev eth1
  635. route add -net 192.168.0.0/29 gw 10.0.0.1 dev eth1
  636. route del default
  637. route add default gw 10.0.0.1
  638. route del -net 10.0.0.0 netmask 255.255.0.0 gw 10.0.0.1
  639. exit 0
  640. </entry>
  641. </extensions>
  642. <interface id="0" name="eth1" ipv4="10.0.0.2" netPrefixLenV4="16"/>
  643. </node>
  644. <node name="server-2" type="SIMPLE" subtype="server" location="517,336">
  645. <extensions>
  646. <entry key="config" type="String">#cloud-config
  647. bootcmd:
  648. - ln -s -t /etc/rc.d /etc/rc.local
  649. hostname: server-2
  650. manage_etc_hosts: true
  651. runcmd:
  652. - start ttyS0
  653. - systemctl start getty@ttyS0.service
  654. - systemctl start rc-local
  655. - sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config
  656. - echo "UseDNS no" &gt;&gt; /etc/ssh/sshd_config
  657. - service ssh restart
  658. - service sshd restart
  659. users:
  660. - default
  661. - gecos: User configured by VIRL Configuration Engine 0.15.8
  662. lock-passwd: false
  663. name: cisco
  664. plain-text-passwd: cisco
  665. shell: /bin/bash
  666. ssh-authorized-keys:
  667. - VIRL-USER-SSH-PUBLIC-KEY
  668. sudo: ALL=(ALL) ALL
  669. write_files:
  670. - path: /etc/init/ttyS0.conf
  671. owner: root:root
  672. content: |
  673. # ttyS0 - getty
  674. # This service maintains a getty on ttyS0 from the point the system is
  675. # started until it is shut down again.
  676. start on stopped rc or RUNLEVEL=[12345]
  677. stop on runlevel [!12345]
  678. respawn
  679. exec /sbin/getty -L 115200 ttyS0 vt102
  680. permissions: '0644'
  681. - path: /etc/systemd/system/dhclient@.service
  682. content: |
  683. [Unit]
  684. Description=Run dhclient on %i interface
  685. After=network.target
  686. [Service]
  687. Type=oneshot
  688. ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease
  689. RemainAfterExit=yes
  690. owner: root:root
  691. permissions: '0644'
  692. - path: /etc/rc.local
  693. owner: root:root
  694. permissions: '0755'
  695. content: |-
  696. #!/bin/sh -e
  697. ifconfig eth1 up 10.0.0.3 netmask 255.255.0.0
  698. route add -net 10.0.0.0/16 gw 10.0.0.1 dev eth1
  699. route add -net 192.168.0.0/29 gw 10.0.0.1 dev eth1
  700. route del default
  701. route add default gw 10.0.0.1
  702. route del -net 10.0.0.0 netmask 255.255.0.0 gw 10.0.0.1
  703. exit 0
  704. </entry>
  705. </extensions>
  706. <interface id="0" name="eth1" ipv4="10.0.0.3" netPrefixLenV4="16"/>
  707. </node>
  708. <connection dst="/virl:topology/virl:node[5]/virl:interface[1]" src="/virl:topology/virl:node[4]/virl:interface[1]"/>
  709. <connection dst="/virl:topology/virl:node[3]/virl:interface[1]" src="/virl:topology/virl:node[5]/virl:interface[2]"/>
  710. <connection dst="/virl:topology/virl:node[2]/virl:interface[1]" src="/virl:topology/virl:node[5]/virl:interface[3]"/>
  711. <connection dst="/virl:topology/virl:node[1]/virl:interface[1]" src="/virl:topology/virl:node[2]/virl:interface[2]"/>
  712. <connection dst="/virl:topology/virl:node[3]/virl:interface[2]" src="/virl:topology/virl:node[6]/virl:interface[1]"/>
  713. <connection dst="/virl:topology/virl:node[7]/virl:interface[1]" src="/virl:topology/virl:node[4]/virl:interface[2]"/>
  714. </topology>