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.

656 lines
15 KiB

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