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.

421 lines
12 KiB

  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="server-2" type="SIMPLE" subtype="server" location="356,281">
  4. <extensions>
  5. <entry key="config" type="String">#cloud-config
  6. bootcmd:
  7. - ln -s -t /etc/rc.d /etc/rc.local
  8. hostname: server-2
  9. manage_etc_hosts: true
  10. runcmd:
  11. - start ttyS0
  12. - systemctl start getty@ttyS0.service
  13. - systemctl start rc-local
  14. - sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config
  15. - echo "UseDNS no" &gt;&gt; /etc/ssh/sshd_config
  16. - service ssh restart
  17. - service sshd restart
  18. users:
  19. - default
  20. - gecos: User configured by VIRL Configuration Engine 0.20.22
  21. lock-passwd: false
  22. name: cisco
  23. plain-text-passwd: cisco
  24. shell: /bin/bash
  25. ssh-authorized-keys:
  26. - VIRL-USER-SSH-PUBLIC-KEY
  27. sudo: ALL=(ALL) ALL
  28. write_files:
  29. - path: /etc/init/ttyS0.conf
  30. owner: root:root
  31. content: |
  32. # ttyS0 - getty
  33. # This service maintains a getty on ttyS0 from the point the system is
  34. # started until it is shut down again.
  35. start on stopped rc or RUNLEVEL=[12345]
  36. stop on runlevel [!12345]
  37. respawn
  38. exec /sbin/getty -L 115200 ttyS0 vt102
  39. permissions: '0644'
  40. - path: /etc/systemd/system/dhclient@.service
  41. content: |
  42. [Unit]
  43. Description=Run dhclient on %i interface
  44. After=network.target
  45. [Service]
  46. Type=oneshot
  47. ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease
  48. RemainAfterExit=yes
  49. owner: root:root
  50. permissions: '0644'
  51. - path: /etc/rc.local
  52. owner: root:root
  53. permissions: '0755'
  54. content: |-
  55. #!/bin/sh
  56. ifconfig eth1 up 10.0.0.2 netmask 255.255.0.0
  57. route add -net 0.0.0.0 gw 10.0.0.254 dev eth1
  58. exit 0
  59. </entry>
  60. </extensions>
  61. <interface id="0" name="eth1"/>
  62. </node>
  63. <node name="iosv-1" type="SIMPLE" subtype="IOSv" location="310,72">
  64. <extensions>
  65. <entry key="AutoNetkit.mgmt_ip" type="string"></entry>
  66. <entry key="config" type="String">!&#xD;
  67. ! Last configuration change at 12:56:28 UTC Thu Jan 7 2016&#xD;
  68. !&#xD;
  69. version 15.6&#xD;
  70. service timestamps debug datetime msec&#xD;
  71. service timestamps log datetime msec&#xD;
  72. no service password-encryption&#xD;
  73. !&#xD;
  74. hostname iosv-1&#xD;
  75. !&#xD;
  76. boot-start-marker&#xD;
  77. boot-end-marker&#xD;
  78. !&#xD;
  79. !&#xD;
  80. vrf definition Mgmt-intf&#xD;
  81. !&#xD;
  82. address-family ipv4&#xD;
  83. exit-address-family&#xD;
  84. !&#xD;
  85. address-family ipv6&#xD;
  86. exit-address-family&#xD;
  87. !&#xD;
  88. enable password cisco&#xD;
  89. !&#xD;
  90. no aaa new-model&#xD;
  91. ethernet lmi ce&#xD;
  92. !&#xD;
  93. !&#xD;
  94. !&#xD;
  95. mmi polling-interval 60&#xD;
  96. no mmi auto-configure&#xD;
  97. no mmi pvc&#xD;
  98. mmi snmp-timeout 180&#xD;
  99. !&#xD;
  100. !&#xD;
  101. !&#xD;
  102. !&#xD;
  103. !&#xD;
  104. !&#xD;
  105. !&#xD;
  106. !&#xD;
  107. !&#xD;
  108. !&#xD;
  109. !&#xD;
  110. no ip domain lookup&#xD;
  111. ip domain name virl.info&#xD;
  112. ip cef&#xD;
  113. ipv6 unicast-routing&#xD;
  114. ipv6 cef&#xD;
  115. !&#xD;
  116. multilink bundle-name authenticated&#xD;
  117. !&#xD;
  118. !&#xD;
  119. !&#xD;
  120. !&#xD;
  121. username cisco privilege 15 secret 5 $1$gpK0$gsMlKft9BVgHyhPugqzW9.&#xD;
  122. !&#xD;
  123. redundancy&#xD;
  124. !&#xD;
  125. no cdp run&#xD;
  126. !&#xD;
  127. ! &#xD;
  128. !&#xD;
  129. !&#xD;
  130. !&#xD;
  131. !&#xD;
  132. !&#xD;
  133. !&#xD;
  134. !&#xD;
  135. !&#xD;
  136. !&#xD;
  137. !&#xD;
  138. !&#xD;
  139. !&#xD;
  140. interface Loopback0&#xD;
  141. description Loopback&#xD;
  142. ip address 10.10.10.10 255.255.255.255&#xD;
  143. !&#xD;
  144. interface GigabitEthernet0/0&#xD;
  145. description OOB Management&#xD;
  146. vrf forwarding Mgmt-intf&#xD;
  147. ip address 10.255.0.44 255.255.0.0&#xD;
  148. duplex full&#xD;
  149. speed auto&#xD;
  150. media-type rj45&#xD;
  151. !&#xD;
  152. interface GigabitEthernet0/1&#xD;
  153. description to flat-1&#xD;
  154. ip address 172.16.1.111 255.255.255.0&#xD;
  155. ip ospf 1 area 0&#xD;
  156. duplex full&#xD;
  157. speed auto&#xD;
  158. media-type rj45&#xD;
  159. !&#xD;
  160. interface GigabitEthernet0/2&#xD;
  161. description to iosvl2-1&#xD;
  162. ip address 10.0.0.254 255.255.0.0&#xD;
  163. ip ospf cost 1&#xD;
  164. duplex full&#xD;
  165. speed auto&#xD;
  166. media-type rj45&#xD;
  167. !&#xD;
  168. interface GigabitEthernet0/3&#xD;
  169. no ip address&#xD;
  170. shutdown&#xD;
  171. duplex auto&#xD;
  172. speed auto&#xD;
  173. media-type rj45&#xD;
  174. !&#xD;
  175. router ospf 1&#xD;
  176. passive-interface Loopback0&#xD;
  177. network 10.0.0.0 0.0.255.255 area 0&#xD;
  178. !&#xD;
  179. ip forward-protocol nd&#xD;
  180. !&#xD;
  181. !&#xD;
  182. no ip http server&#xD;
  183. no ip http secure-server&#xD;
  184. ip ssh server algorithm authentication password&#xD;
  185. !&#xD;
  186. !&#xD;
  187. !&#xD;
  188. !&#xD;
  189. control-plane&#xD;
  190. !&#xD;
  191. banner exec `&#xD;
  192. **************************************************************************&#xD;
  193. * IOSv is strictly limited to use for evaluation, demonstration and IOS *&#xD;
  194. * education. IOSv is provided as-is and is not supported by Cisco's *&#xD;
  195. * Technical Advisory Center. Any use or disclosure, in whole or in part, *&#xD;
  196. * of the IOSv Software or Documentation to any third party for any *&#xD;
  197. * purposes is expressly prohibited except as otherwise authorized by *&#xD;
  198. * Cisco in writing. *&#xD;
  199. **************************************************************************`&#xD;
  200. banner incoming `&#xD;
  201. **************************************************************************&#xD;
  202. * IOSv is strictly limited to use for evaluation, demonstration and IOS *&#xD;
  203. * education. IOSv is provided as-is and is not supported by Cisco's *&#xD;
  204. * Technical Advisory Center. Any use or disclosure, in whole or in part, *&#xD;
  205. * of the IOSv Software or Documentation to any third party for any *&#xD;
  206. * purposes is expressly prohibited except as otherwise authorized by *&#xD;
  207. * Cisco in writing. *&#xD;
  208. **************************************************************************`&#xD;
  209. banner login `&#xD;
  210. **************************************************************************&#xD;
  211. * IOSv is strictly limited to use for evaluation, demonstration and IOS *&#xD;
  212. * education. IOSv is provided as-is and is not supported by Cisco's *&#xD;
  213. * Technical Advisory Center. Any use or disclosure, in whole or in part, *&#xD;
  214. * of the IOSv Software or Documentation to any third party for any *&#xD;
  215. * purposes is expressly prohibited except as otherwise authorized by *&#xD;
  216. * Cisco in writing. *&#xD;
  217. **************************************************************************`&#xD;
  218. !&#xD;
  219. line con 0&#xD;
  220. password cisco&#xD;
  221. line aux 0&#xD;
  222. line vty 0 4&#xD;
  223. exec-timeout 720 0&#xD;
  224. password cisco&#xD;
  225. login local&#xD;
  226. transport input telnet ssh&#xD;
  227. !&#xD;
  228. no scheduler allocate&#xD;
  229. !&#xD;
  230. end</entry>
  231. </extensions>
  232. <interface id="0" name="GigabitEthernet0/1"/>
  233. <interface id="1" name="GigabitEthernet0/2"/>
  234. <interface id="2" name="GigabitEthernet0/3"/>
  235. </node>
  236. <node name="server-1" type="SIMPLE" subtype="server" location="260,282">
  237. <extensions>
  238. <entry key="config" type="String">#cloud-config
  239. bootcmd:
  240. - ln -s -t /etc/rc.d /etc/rc.local
  241. hostname: server-10
  242. manage_etc_hosts: true
  243. runcmd:
  244. - start ttyS0
  245. - systemctl start getty@ttyS0.service
  246. - systemctl start rc-local
  247. - sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config
  248. - echo "UseDNS no" &gt;&gt; /etc/ssh/sshd_config
  249. - service ssh restart
  250. - service sshd restart
  251. users:
  252. - default
  253. - gecos: User configured by VIRL Configuration Engine 0.20.22
  254. lock-passwd: false
  255. name: cisco
  256. plain-text-passwd: cisco
  257. shell: /bin/bash
  258. ssh-authorized-keys:
  259. - VIRL-USER-SSH-PUBLIC-KEY
  260. sudo: ALL=(ALL) ALL
  261. write_files:
  262. - path: /etc/init/ttyS0.conf
  263. owner: root:root
  264. content: |
  265. # ttyS0 - getty
  266. # This service maintains a getty on ttyS0 from the point the system is
  267. # started until it is shut down again.
  268. start on stopped rc or RUNLEVEL=[12345]
  269. stop on runlevel [!12345]
  270. respawn
  271. exec /sbin/getty -L 115200 ttyS0 vt102
  272. permissions: '0644'
  273. - path: /etc/systemd/system/dhclient@.service
  274. content: |
  275. [Unit]
  276. Description=Run dhclient on %i interface
  277. After=network.target
  278. [Service]
  279. Type=oneshot
  280. ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease
  281. RemainAfterExit=yes
  282. owner: root:root
  283. permissions: '0644'
  284. - path: /etc/rc.local
  285. owner: root:root
  286. permissions: '0755'
  287. content: |-
  288. #!/bin/sh
  289. ifconfig eth1 up 10.0.0.1 netmask 255.255.0.0
  290. route add -net 0.0.0.0 gw 10.0.0.254 dev eth1
  291. exit 0
  292. </entry>
  293. </extensions>
  294. <interface id="0" name="eth1"/>
  295. <interface id="1" name="eth2"/>
  296. </node>
  297. <node name="flat-1" type="ASSET" subtype="FLAT" location="135,75">
  298. <interface id="0" name="link0"/>
  299. </node>
  300. <node name="iosvl2-1" type="SIMPLE" subtype="IOSvL2" location="306,198">
  301. <extensions>
  302. <entry key="config" type="String">!
  303. ! Last configuration change at 12:56:05 UTC Thu Jan 7 2016
  304. !
  305. version 15.2
  306. service timestamps debug datetime msec
  307. service timestamps log datetime msec
  308. no service password-encryption
  309. service compress-config
  310. !
  311. hostname Switch
  312. !
  313. boot-start-marker
  314. boot-end-marker
  315. !
  316. !
  317. !
  318. no aaa new-model
  319. !
  320. !
  321. !
  322. !
  323. !
  324. !
  325. !
  326. !
  327. ip cef
  328. no ipv6 cef
  329. !
  330. !
  331. !
  332. spanning-tree mode rapid-pvst
  333. spanning-tree extend system-id
  334. !
  335. vlan internal allocation policy ascending
  336. !
  337. !
  338. !
  339. !
  340. !
  341. !
  342. !
  343. !
  344. !
  345. !
  346. !
  347. !
  348. !
  349. !
  350. interface GigabitEthernet0/0
  351. media-type rj45
  352. negotiation auto
  353. !
  354. interface GigabitEthernet0/1
  355. media-type rj45
  356. negotiation auto
  357. !
  358. interface GigabitEthernet0/2
  359. media-type rj45
  360. negotiation auto
  361. !
  362. interface GigabitEthernet0/3
  363. media-type rj45
  364. negotiation auto
  365. !
  366. ip forward-protocol nd
  367. !
  368. no ip http server
  369. no ip http secure-server
  370. !
  371. !
  372. !
  373. !
  374. !
  375. !
  376. control-plane
  377. !
  378. banner exec `
  379. **************************************************************************
  380. * IOSv is strictly limited to use for evaluation, demonstration and IOS *
  381. * education. IOSv is provided as-is and is not supported by Cisco's *
  382. * Technical Advisory Center. Any use or disclosure, in whole or in part, *
  383. * of the IOSv Software or Documentation to any third party for any *
  384. * purposes is expressly prohibited except as otherwise authorized by *
  385. * Cisco in writing. *
  386. **************************************************************************`
  387. banner incoming `
  388. **************************************************************************
  389. * IOSv is strictly limited to use for evaluation, demonstration and IOS *
  390. * education. IOSv is provided as-is and is not supported by Cisco's *
  391. * Technical Advisory Center. Any use or disclosure, in whole or in part, *
  392. * of the IOSv Software or Documentation to any third party for any *
  393. * purposes is expressly prohibited except as otherwise authorized by *
  394. * Cisco in writing. *
  395. **************************************************************************`
  396. banner login `
  397. **************************************************************************
  398. * IOSv is strictly limited to use for evaluation, demonstration and IOS *
  399. * education. IOSv is provided as-is and is not supported by Cisco's *
  400. * Technical Advisory Center. Any use or disclosure, in whole or in part, *
  401. * of the IOSv Software or Documentation to any third party for any *
  402. * purposes is expressly prohibited except as otherwise authorized by *
  403. * Cisco in writing. *
  404. **************************************************************************`
  405. !
  406. line con 0
  407. line aux 0
  408. line vty 0 4
  409. !
  410. !
  411. end</entry>
  412. </extensions>
  413. <interface id="0" name="GigabitEthernet0/1"/>
  414. <interface id="1" name="GigabitEthernet0/2"/>
  415. <interface id="2" name="GigabitEthernet0/3"/>
  416. </node>
  417. <connection dst="/virl:topology/virl:node[2]/virl:interface[1]" src="/virl:topology/virl:node[4]/virl:interface[1]"/>
  418. <connection dst="/virl:topology/virl:node[1]/virl:interface[1]" src="/virl:topology/virl:node[5]/virl:interface[1]"/>
  419. <connection dst="/virl:topology/virl:node[5]/virl:interface[2]" src="/virl:topology/virl:node[3]/virl:interface[1]"/>
  420. <connection dst="/virl:topology/virl:node[2]/virl:interface[2]" src="/virl:topology/virl:node[5]/virl:interface[3]"/>
  421. </topology>