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.

541 lines
14 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
  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="Router-A" type="SIMPLE" subtype="IOSv" location="220,198">
  4. <extensions>
  5. <entry key="AutoNetkit.mgmt_ip" type="string"></entry>
  6. <entry key="AutoNetkit.IGP" type="String">eigrp</entry>
  7. <entry key="Auto-generate config" type="Boolean">false</entry>
  8. <entry key="config" type="String">! IOS Config generated on 2015-09-06 21:22
  9. ! by autonetkit_0.18.1
  10. !
  11. hostname iosv-1
  12. boot-start-marker
  13. boot-end-marker
  14. !
  15. vrf definition Mgmt-intf
  16. !
  17. address-family ipv4
  18. exit-address-family
  19. !
  20. address-family ipv6
  21. exit-address-family
  22. !
  23. !
  24. !
  25. no aaa new-model
  26. !
  27. !
  28. ip cef
  29. ipv6 unicast-routing
  30. ipv6 cef
  31. !
  32. !
  33. service timestamps debug datetime msec
  34. service timestamps log datetime msec
  35. no service password-encryption
  36. no service config
  37. enable password cisco
  38. ip classless
  39. ip subnet-zero
  40. no ip domain lookup
  41. line vty 0 4
  42. transport input ssh telnet
  43. exec-timeout 720 0
  44. password cisco
  45. login
  46. line con 0
  47. password cisco
  48. !
  49. no cdp run
  50. !
  51. !
  52. interface Loopback0
  53. description Loopback
  54. ip address 192.168.0.2 255.255.255.255
  55. !
  56. interface GigabitEthernet0/0
  57. description OOB Management
  58. vrf forwarding Mgmt-intf
  59. ! Configured on launch
  60. no ip address
  61. duplex full
  62. speed auto
  63. no shutdown
  64. !
  65. interface GigabitEthernet0/1
  66. description to wanEM
  67. ip address 192.168.101.2 255.255.255.252
  68. duplex full
  69. speed auto
  70. no shutdown
  71. !
  72. interface GigabitEthernet0/2
  73. description to server-1
  74. ip address 192.168.1.1 255.255.255.0
  75. duplex full
  76. speed auto
  77. no shutdown
  78. !
  79. !
  80. !
  81. !
  82. ip route 0.0.0.0 0.0.0.0 192.168.101.1
  83. !
  84. end
  85. </entry>
  86. </extensions>
  87. <interface id="0" name="GigabitEthernet0/1" ipv4="192.168.101.2" netPrefixLenV4="24"/>
  88. <interface id="1" name="GigabitEthernet0/2" ipv4="192.168.1.1" netPrefixLenV4="24"/>
  89. <interface id="2" name="GigabitEthernet0/3"/>
  90. <interface id="3" name="GigabitEthernet0/4"/>
  91. </node>
  92. <node name="Client" type="SIMPLE" subtype="server" location="158,285">
  93. <extensions>
  94. <entry key="Auto-generate config" type="Boolean">false</entry>
  95. <entry key="config" type="String">#cloud-config
  96. bootcmd:
  97. - ln -s -t /etc/rc.d /etc/rc.local
  98. hostname: server-1
  99. manage_etc_hosts: true
  100. runcmd:
  101. - start ttyS0
  102. - systemctl start getty@ttyS0.service
  103. - systemctl start rc-local
  104. - sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config
  105. - echo "UseDNS no" &gt;&gt; /etc/ssh/sshd_config
  106. - service ssh restart
  107. - service sshd restart
  108. users:
  109. - default
  110. - gecos: User configured by VIRL Configuration Engine 0.18.9
  111. lock-passwd: false
  112. name: cisco
  113. plain-text-passwd: cisco
  114. shell: /bin/bash
  115. ssh-authorized-keys:
  116. - VIRL-USER-SSH-PUBLIC-KEY
  117. sudo: ALL=(ALL) ALL
  118. write_files:
  119. - path: /etc/init/ttyS0.conf
  120. owner: root:root
  121. content: |
  122. # ttyS0 - getty
  123. # This service maintains a getty on ttyS0 from the point the system is
  124. # started until it is shut down again.
  125. start on stopped rc or RUNLEVEL=[12345]
  126. stop on runlevel [!12345]
  127. respawn
  128. exec /sbin/getty -L 115200 ttyS0 vt102
  129. permissions: '0644'
  130. - path: /etc/systemd/system/dhclient@.service
  131. content: |
  132. [Unit]
  133. Description=Run dhclient on %i interface
  134. After=network.target
  135. [Service]
  136. Type=oneshot
  137. ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease
  138. RemainAfterExit=yes
  139. owner: root:root
  140. permissions: '0644'
  141. - path: /etc/rc.local
  142. owner: root:root
  143. permissions: '0755'
  144. content: |-
  145. !/bin/sh -e
  146. ifconfig eth1 up 192.168.1.100 netmask 255.255.255.0
  147. route del default
  148. route add default gw 192.168.1.1
  149. arp -i eth1 -s 192.168.1.1 aa:aa:aa:aa:aa:aa
  150. exit 0
  151. - path: /etc/resolv.conf
  152. owner: root:root
  153. permissions: '0644'
  154. content: |
  155. #by Patrick.
  156. nameserver 8.8.8.8
  157. </entry>
  158. </extensions>
  159. <interface id="0" name="eth1" ipv4="192.168.1.100" netPrefixLenV4="24"/>
  160. </node>
  161. <node name="ISP" type="SIMPLE" subtype="wanEM" location="340,139" vmImage="wanEM-bash-init-aktuell [d38b887a-e92a-41ad-9f86-f6d81d7afeb8]" vmFlavor="m1.small [2]">
  162. <extensions>
  163. <entry key="Auto-generate config" type="Boolean">false</entry>
  164. <entry key="config" type="String"> ifconfig eth1 up 192.168.101.1 netmask 255.255.255.252
  165. ifconfig eth2 up 192.168.102.1 netmask 255.255.255.252
  166. dhclient eth0
  167. dhclient eth3
  168. route add default gw 172.16.1.254 eth3
  169. route add -net 192.168.101.0/30 gw 192.168.101.2 dev eth1
  170. route add -net 192.168.1.0/24 gw 192.168.101.2 dev eth1
  171. route add -net 192.168.102.0/30 gw 192.168.102.2 dev eth2
  172. route add -net 192.168.2.0/24 gw 192.168.102.2 dev eth2
  173. iptables -t nat -A POSTROUTING -o eth3 -j MASQUERADE
  174. iptables -A FORWARD -i eth2 -j ACCEPT
  175. iptables -A FORWARD -i eth1 -j ACCEPT
  176. /sbin/tc qdisc add dev eth3 root handle 1:1 netem delay 100ms
  177. service ssh start
  178. exit 0
  179. </entry>
  180. </extensions>
  181. <interface id="0" name="Ethernet1" ipv4="192.168.101.1" netPrefixLenV4="24"/>
  182. <interface id="1" name="Ethernet2" ipv4="192.168.102.1" netPrefixLenV4="24"/>
  183. <interface id="2" name="Ethernet3"/>
  184. </node>
  185. <node name="Router-B" type="SIMPLE" subtype="IOSv" location="442,185">
  186. <extensions>
  187. <entry key="AutoNetkit.mgmt_ip" type="string"></entry>
  188. <entry key="Auto-generate config" type="Boolean">false</entry>
  189. <entry key="config" type="String">! IOS Config generated on 2015-09-06 21:22
  190. ! by autonetkit_0.18.1
  191. !
  192. hostname iosv-2
  193. boot-start-marker
  194. boot-end-marker
  195. !
  196. vrf definition Mgmt-intf
  197. !
  198. address-family ipv4
  199. exit-address-family
  200. !
  201. address-family ipv6
  202. exit-address-family
  203. !
  204. !
  205. !
  206. no aaa new-model
  207. !
  208. !
  209. ip cef
  210. ipv6 unicast-routing
  211. ipv6 cef
  212. !
  213. !
  214. service timestamps debug datetime msec
  215. service timestamps log datetime msec
  216. no service password-encryption
  217. no service config
  218. enable password cisco
  219. ip classless
  220. ip subnet-zero
  221. no ip domain lookup
  222. line vty 0 4
  223. transport input ssh telnet
  224. exec-timeout 720 0
  225. password cisco
  226. login
  227. line con 0
  228. password cisco
  229. !
  230. no cdp run
  231. !
  232. !
  233. interface Loopback0
  234. description Loopback
  235. ip address 192.168.0.3 255.255.255.255
  236. !
  237. interface GigabitEthernet0/0
  238. description OOB Management
  239. vrf forwarding Mgmt-intf
  240. ! Configured on launch
  241. no ip address
  242. duplex full
  243. speed auto
  244. no shutdown
  245. !
  246. interface GigabitEthernet0/1
  247. description to wanEM
  248. ip address 192.168.102.2 255.255.255.252
  249. ip ospf cost 1
  250. duplex full
  251. speed auto
  252. no shutdown
  253. !
  254. interface GigabitEthernet0/2
  255. description to server-2
  256. ip address 192.168.2.1 255.255.255.0
  257. ip ospf cost 1
  258. duplex full
  259. speed auto
  260. no shutdown
  261. !
  262. !
  263. !
  264. ip route 0.0.0.0 0.0.0.0 192.168.102.1
  265. !
  266. end
  267. </entry>
  268. </extensions>
  269. <interface id="0" name="GigabitEthernet0/1"/>
  270. <interface id="1" name="GigabitEthernet0/2" netPrefixLenV4="24"/>
  271. </node>
  272. <node name="Server-B" type="SIMPLE" subtype="server" location="405,302" vmImage="uwmadmin-server-Server-B [f1cd9a29-e4f8-4f71-9fa6-5f5c57f8f4dd]">
  273. <extensions>
  274. <entry key="Auto-generate config" type="Boolean">false</entry>
  275. <entry key="config" type="String">#cloud-config&#xD;
  276. bootcmd:&#xD;
  277. - ln -s -t /etc/rc.d /etc/rc.local&#xD;
  278. hostname: Server-B&#xD;
  279. manage_etc_hosts: true&#xD;
  280. &#xD;
  281. runcmd:&#xD;
  282. - start ttyS0&#xD;
  283. - systemctl start getty@ttyS0.service&#xD;
  284. - systemctl start rc-local&#xD;
  285. - sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config&#xD;
  286. - echo "UseDNS no" &gt;&gt; /etc/ssh/sshd_config&#xD;
  287. - service ssh restart&#xD;
  288. - service sshd restart&#xD;
  289. users:&#xD;
  290. - default&#xD;
  291. - gecos: User configured by VIRL Configuration Engine 0.18.9&#xD;
  292. lock-passwd: false&#xD;
  293. name: cisco&#xD;
  294. plain-text-passwd: cisco&#xD;
  295. shell: /bin/bash&#xD;
  296. ssh-authorized-keys:&#xD;
  297. - VIRL-USER-SSH-PUBLIC-KEY&#xD;
  298. sudo: ALL=(ALL) ALL&#xD;
  299. write_files:&#xD;
  300. - path: /etc/init/ttyS0.conf&#xD;
  301. owner: root:root&#xD;
  302. content: |&#xD;
  303. # ttyS0 - getty&#xD;
  304. # This service maintains a getty on ttyS0 from the point the system is&#xD;
  305. # started until it is shut down again.&#xD;
  306. start on stopped rc or RUNLEVEL=[12345]&#xD;
  307. stop on runlevel [!12345]&#xD;
  308. respawn&#xD;
  309. exec /sbin/getty -L 115200 ttyS0 vt102&#xD;
  310. permissions: '0644'&#xD;
  311. - path: /etc/systemd/system/dhclient@.service&#xD;
  312. content: |&#xD;
  313. [Unit]&#xD;
  314. Description=Run dhclient on %i interface&#xD;
  315. After=network.target&#xD;
  316. [Service]&#xD;
  317. Type=oneshot&#xD;
  318. ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease&#xD;
  319. RemainAfterExit=yes&#xD;
  320. owner: root:root&#xD;
  321. permissions: '0644'&#xD;
  322. - path: /etc/rc.local&#xD;
  323. owner: root:root&#xD;
  324. permissions: '0755'&#xD;
  325. content: |-&#xD;
  326. #!/bin/sh -e&#xD;
  327. ifconfig eth1 up 192.168.2.100 netmask 255.255.255.0&#xD;
  328. route del default&#xD;
  329. route add default gw 192.168.2.1&#xD;
  330. echo "nameserver 8.8.8.8" &gt;/etc/resolv.conf&#xD;
  331. exit 0&#xD;
  332. </entry>
  333. </extensions>
  334. <interface id="0" name="eth1" ipv4="192.168.2.100" netPrefixLenV4="24"/>
  335. </node>
  336. <node name="flat-1" type="ASSET" subtype="FLAT" location="358,16">
  337. <interface id="0" name="link0"/>
  338. </node>
  339. <node name="Server-A" type="SIMPLE" subtype="server" location="650,215">
  340. <extensions>
  341. <entry key="Auto-generate config" type="Boolean">false</entry>
  342. <entry key="config" type="String">#cloud-config
  343. bootcmd:
  344. - ln -s -t /etc/rc.d /etc/rc.local
  345. hostname: Server-B
  346. manage_etc_hosts: true
  347. runcmd:
  348. - start ttyS0
  349. - systemctl start getty@ttyS0.service
  350. - systemctl start rc-local
  351. - sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config
  352. - echo "UseDNS no" &gt;&gt; /etc/ssh/sshd_config
  353. - service ssh restart
  354. - service sshd restart
  355. users:
  356. - default
  357. - gecos: User configured by VIRL Configuration Engine 0.18.9
  358. lock-passwd: false
  359. name: cisco
  360. plain-text-passwd: cisco
  361. shell: /bin/bash
  362. ssh-authorized-keys:
  363. - VIRL-USER-SSH-PUBLIC-KEY
  364. sudo: ALL=(ALL) ALL
  365. write_files:
  366. - path: /etc/init/ttyS0.conf
  367. owner: root:root
  368. content: |
  369. # ttyS0 - getty
  370. # This service maintains a getty on ttyS0 from the point the system is
  371. # started until it is shut down again.
  372. start on stopped rc or RUNLEVEL=[12345]
  373. stop on runlevel [!12345]
  374. respawn
  375. exec /sbin/getty -L 115200 ttyS0 vt102
  376. permissions: '0644'
  377. - path: /etc/systemd/system/dhclient@.service
  378. content: |
  379. [Unit]
  380. Description=Run dhclient on %i interface
  381. After=network.target
  382. [Service]
  383. Type=oneshot
  384. ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease
  385. RemainAfterExit=yes
  386. owner: root:root
  387. permissions: '0644'
  388. - path: /etc/rc.local
  389. owner: root:root
  390. permissions: '0755'
  391. content: |-
  392. #!/bin/sh -e
  393. ifconfig eth1 up 192.168.2.200 netmask 255.255.255.0
  394. route del default
  395. route add default gw 192.168.2.1
  396. exit 0
  397. - path: /etc/resolv.conf
  398. owner: root:root
  399. permissions: '0644'
  400. content: |
  401. # ttyS0 - getty
  402. # This service maintains a getty on ttyS0 from the point the system is
  403. # started until it is shut down again.
  404. nameserver 8.8.8.8</entry>
  405. </extensions>
  406. <interface id="0" name="eth1" ipv4="10.0.0.14" netPrefixLenV4="30"/>
  407. </node>
  408. <node name="iosvl2-1" type="SIMPLE" subtype="IOSvL2" location="578,316">
  409. <extensions>
  410. <entry key="AutoNetkit.mgmt_ip" type="string"></entry>
  411. <entry key="config" type="String">! IOSvL2 Config generated on 2015-12-11 11:07&#xD;
  412. ! by autonetkit_0.18.1&#xD;
  413. !&#xD;
  414. version 15.2&#xD;
  415. service timestamps debug datetime msec&#xD;
  416. service timestamps log datetime msec&#xD;
  417. no service password-encryption&#xD;
  418. service compress-config&#xD;
  419. no service config&#xD;
  420. enable password cisco&#xD;
  421. ip classless&#xD;
  422. ip subnet-zero&#xD;
  423. no ip domain lookup&#xD;
  424. !&#xD;
  425. line vty 0 4&#xD;
  426. transport input ssh telnet&#xD;
  427. exec-timeout 720 0&#xD;
  428. password cisco&#xD;
  429. login&#xD;
  430. !&#xD;
  431. line con 0&#xD;
  432. password cisco&#xD;
  433. !&#xD;
  434. hostname iosvl2-1&#xD;
  435. !&#xD;
  436. boot-start-marker&#xD;
  437. boot-end-marker&#xD;
  438. !&#xD;
  439. !&#xD;
  440. !&#xD;
  441. no aaa new-model&#xD;
  442. !&#xD;
  443. !&#xD;
  444. !&#xD;
  445. !&#xD;
  446. !&#xD;
  447. !&#xD;
  448. !&#xD;
  449. !&#xD;
  450. ip cef&#xD;
  451. no ipv6 cef&#xD;
  452. !&#xD;
  453. !&#xD;
  454. spanning-tree mode pvst&#xD;
  455. spanning-tree extend system-id&#xD;
  456. !&#xD;
  457. vlan internal allocation policy ascending&#xD;
  458. !&#xD;
  459. !&#xD;
  460. !&#xD;
  461. !&#xD;
  462. vrf definition Mgmt-intf&#xD;
  463. !&#xD;
  464. address-family ipv4&#xD;
  465. exit-address-family&#xD;
  466. !&#xD;
  467. address-family ipv6&#xD;
  468. exit-address-family&#xD;
  469. !&#xD;
  470. !&#xD;
  471. !&#xD;
  472. !&#xD;
  473. !&#xD;
  474. interface Loopback0&#xD;
  475. description Loopback&#xD;
  476. !&#xD;
  477. interface GigabitEthernet0/0&#xD;
  478. description OOB management&#xD;
  479. ! Configured on launch&#xD;
  480. no switchport&#xD;
  481. no ip address&#xD;
  482. no shutdown&#xD;
  483. !&#xD;
  484. interface GigabitEthernet0/1&#xD;
  485. description to Router-B&#xD;
  486. switchport access vlan 2&#xD;
  487. switchport mode access&#xD;
  488. no shutdown&#xD;
  489. !&#xD;
  490. interface GigabitEthernet0/2&#xD;
  491. description to Server-A&#xD;
  492. switchport access vlan 2&#xD;
  493. switchport mode access&#xD;
  494. shutdown&#xD;
  495. !&#xD;
  496. interface GigabitEthernet0/3&#xD;
  497. description to Server-B&#xD;
  498. switchport access vlan 2&#xD;
  499. switchport mode access&#xD;
  500. no shutdown&#xD;
  501. !&#xD;
  502. !&#xD;
  503. ip forward-protocol nd&#xD;
  504. !&#xD;
  505. no ip http server&#xD;
  506. no ip http secure-server&#xD;
  507. !&#xD;
  508. !&#xD;
  509. !&#xD;
  510. !&#xD;
  511. !&#xD;
  512. !&#xD;
  513. control-plane&#xD;
  514. !&#xD;
  515. !&#xD;
  516. !&#xD;
  517. end&#xD;
  518. </entry>
  519. </extensions>
  520. <interface id="0" name="GigabitEthernet0/1"/>
  521. <interface id="1" name="GigabitEthernet0/2"/>
  522. <interface id="2" name="GigabitEthernet0/3"/>
  523. </node>
  524. <connection dst="/virl:topology/virl:node[3]/virl:interface[1]" src="/virl:topology/virl:node[1]/virl:interface[1]"/>
  525. <connection dst="/virl:topology/virl:node[4]/virl:interface[1]" src="/virl:topology/virl:node[3]/virl:interface[2]"/>
  526. <connection dst="/virl:topology/virl:node[3]/virl:interface[3]" src="/virl:topology/virl:node[6]/virl:interface[1]"/>
  527. <connection dst="/virl:topology/virl:node[2]/virl:interface[1]" src="/virl:topology/virl:node[1]/virl:interface[2]"/>
  528. <connection dst="/virl:topology/virl:node[8]/virl:interface[1]" src="/virl:topology/virl:node[4]/virl:interface[2]"/>
  529. <connection dst="/virl:topology/virl:node[8]/virl:interface[2]" src="/virl:topology/virl:node[7]/virl:interface[1]"/>
  530. <connection dst="/virl:topology/virl:node[8]/virl:interface[3]" src="/virl:topology/virl:node[5]/virl:interface[1]"/>
  531. </topology>