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.

760 lines
23 KiB

7 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.95" xsi:schemaLocation="http://www.cisco.com/VIRL https://raw.github.com/CiscoVIRL/schema/v0.95/virl.xsd">
  3. <node name="Router-A" type="SIMPLE" subtype="IOSv" location="236,245">
  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&#xD;
  9. ! by autonetkit_0.18.1&#xD;
  10. !&#xD;
  11. hostname Router-A&#xD;
  12. boot-start-marker&#xD;
  13. boot-end-marker&#xD;
  14. !&#xD;
  15. vrf definition Mgmt-intf&#xD;
  16. !&#xD;
  17. address-family ipv4&#xD;
  18. exit-address-family&#xD;
  19. !&#xD;
  20. address-family ipv6&#xD;
  21. exit-address-family&#xD;
  22. !&#xD;
  23. !&#xD;
  24. !&#xD;
  25. no aaa new-model&#xD;
  26. !&#xD;
  27. !&#xD;
  28. ip cef&#xD;
  29. ipv6 unicast-routing&#xD;
  30. ipv6 cef&#xD;
  31. !&#xD;
  32. !&#xD;
  33. service timestamps debug datetime msec&#xD;
  34. service timestamps log datetime msec&#xD;
  35. no service password-encryption&#xD;
  36. no service config&#xD;
  37. enable password cisco&#xD;
  38. ip classless&#xD;
  39. ip subnet-zero&#xD;
  40. no ip domain lookup&#xD;
  41. line vty 0 4&#xD;
  42. transport input ssh telnet&#xD;
  43. exec-timeout 720 0&#xD;
  44. password cisco&#xD;
  45. login&#xD;
  46. line con 0&#xD;
  47. password cisco&#xD;
  48. !&#xD;
  49. no cdp run&#xD;
  50. !&#xD;
  51. !&#xD;
  52. interface Loopback0&#xD;
  53. description Loopback&#xD;
  54. ip address 192.168.0.2 255.255.255.255&#xD;
  55. !&#xD;
  56. interface GigabitEthernet0/0&#xD;
  57. description OOB Management&#xD;
  58. vrf forwarding Mgmt-intf&#xD;
  59. ! Configured on launch&#xD;
  60. no ip address&#xD;
  61. duplex full&#xD;
  62. speed auto&#xD;
  63. no shutdown&#xD;
  64. !&#xD;
  65. interface GigabitEthernet0/1&#xD;
  66. description to ISP&#xD;
  67. ip address 192.168.101.2 255.255.255.252&#xD;
  68. duplex full&#xD;
  69. speed auto&#xD;
  70. no shutdown&#xD;
  71. !&#xD;
  72. interface GigabitEthernet0/2&#xD;
  73. description to Rechnungswesen&#xD;
  74. ip address 192.168.100.1 255.255.255.218&#xD;
  75. duplex full&#xD;
  76. speed auto&#xD;
  77. no shutdown&#xD;
  78. !&#xD;
  79. !&#xD;
  80. !&#xD;
  81. &#xD;
  82. !&#xD;
  83. ip route 0.0.0.0 0.0.0.0 192.168.101.1&#xD;
  84. !&#xD;
  85. end&#xD;
  86. </entry>
  87. </extensions>
  88. <interface id="0" name="GigabitEthernet0/1" ipv4="192.168.101.2" netPrefixLenV4="24"/>
  89. <interface id="1" name="GigabitEthernet0/2" ipv4="192.168.1.1" netPrefixLenV4="24"/>
  90. <interface id="2" name="GigabitEthernet0/3"/>
  91. <interface id="3" name="GigabitEthernet0/4"/>
  92. </node>
  93. <node name="Router-B" type="SIMPLE" subtype="IOSv" location="463,232">
  94. <extensions>
  95. <entry key="AutoNetkit.mgmt_ip" type="string"></entry>
  96. <entry key="Auto-generate config" type="Boolean">false</entry>
  97. <entry key="config" type="String">! IOS Config generated on 2015-09-06 21:22&#xD;
  98. ! by autonetkit_0.18.1&#xD;
  99. !&#xD;
  100. hostname Router-B&#xD;
  101. boot-start-marker&#xD;
  102. boot-end-marker&#xD;
  103. !&#xD;
  104. vrf definition Mgmt-intf&#xD;
  105. !&#xD;
  106. address-family ipv4&#xD;
  107. exit-address-family&#xD;
  108. !&#xD;
  109. address-family ipv6&#xD;
  110. exit-address-family&#xD;
  111. !&#xD;
  112. !&#xD;
  113. !&#xD;
  114. no aaa new-model&#xD;
  115. !&#xD;
  116. !&#xD;
  117. ip cef&#xD;
  118. ipv6 unicast-routing&#xD;
  119. ipv6 cef&#xD;
  120. !&#xD;
  121. !&#xD;
  122. service timestamps debug datetime msec&#xD;
  123. service timestamps log datetime msec&#xD;
  124. no service password-encryption&#xD;
  125. no service config&#xD;
  126. enable password cisco&#xD;
  127. ip classless&#xD;
  128. ip subnet-zero&#xD;
  129. no ip domain lookup&#xD;
  130. line vty 0 4&#xD;
  131. transport input ssh telnet&#xD;
  132. exec-timeout 720 0&#xD;
  133. password cisco&#xD;
  134. login&#xD;
  135. line con 0&#xD;
  136. password cisco&#xD;
  137. !&#xD;
  138. no cdp run&#xD;
  139. !&#xD;
  140. !&#xD;
  141. interface Loopback0&#xD;
  142. description Loopback&#xD;
  143. ip address 192.168.0.3 255.255.255.255&#xD;
  144. !&#xD;
  145. interface GigabitEthernet0/0&#xD;
  146. description OOB Management&#xD;
  147. vrf forwarding Mgmt-intf&#xD;
  148. ! Configured on launch&#xD;
  149. no ip address&#xD;
  150. duplex full&#xD;
  151. speed auto&#xD;
  152. no shutdown&#xD;
  153. !&#xD;
  154. interface GigabitEthernet0/1&#xD;
  155. description to ISP&#xD;
  156. ip address 192.168.102.2 255.255.255.252&#xD;
  157. ip ospf cost 1&#xD;
  158. duplex full&#xD;
  159. speed auto&#xD;
  160. no shutdown&#xD;
  161. !&#xD;
  162. interface GigabitEthernet0/2&#xD;
  163. description to ServerLAN&#xD;
  164. ip address 192.168.32.1 255.255.255.0&#xD;
  165. ip ospf cost 1&#xD;
  166. duplex full&#xD;
  167. speed auto&#xD;
  168. no shutdown&#xD;
  169. !&#xD;
  170. !&#xD;
  171. !&#xD;
  172. ip route 0.0.0.0 0.0.0.0 192.168.102.1&#xD;
  173. !&#xD;
  174. end&#xD;
  175. </entry>
  176. </extensions>
  177. <interface id="0" name="GigabitEthernet0/1"/>
  178. <interface id="1" name="GigabitEthernet0/2" netPrefixLenV4="24"/>
  179. </node>
  180. <node name="Internet&#xD;&#xA;" type="ASSET" subtype="FLAT" location="391,42">
  181. <extensions>
  182. <entry key="host_network" type="String">flat</entry>
  183. </extensions>
  184. <interface id="0" name="link0"/>
  185. </node>
  186. <node name="Switch-A" type="SIMPLE" subtype="IOSvL2" location="552,358">
  187. <extensions>
  188. <entry key="AutoNetkit.mgmt_ip" type="string"></entry>
  189. <entry key="Auto-generate config" type="Boolean">false</entry>
  190. <entry key="config" type="String">! IOSvL2 Config generated on 2015-12-11 21:04&#xD;
  191. ! by autonetkit_0.18.1&#xD;
  192. !&#xD;
  193. version 15.2&#xD;
  194. service timestamps debug datetime msec&#xD;
  195. service timestamps log datetime msec&#xD;
  196. no service password-encryption&#xD;
  197. service compress-config&#xD;
  198. no service config&#xD;
  199. enable password cisco&#xD;
  200. ip classless&#xD;
  201. ip subnet-zero&#xD;
  202. no ip domain lookup&#xD;
  203. !&#xD;
  204. line vty 0 4&#xD;
  205. transport input ssh telnet&#xD;
  206. exec-timeout 720 0&#xD;
  207. password cisco&#xD;
  208. login&#xD;
  209. !&#xD;
  210. line con 0&#xD;
  211. password cisco&#xD;
  212. !&#xD;
  213. hostname Switch-A&#xD;
  214. !&#xD;
  215. boot-start-marker&#xD;
  216. boot-end-marker&#xD;
  217. !&#xD;
  218. !&#xD;
  219. !&#xD;
  220. no aaa new-model&#xD;
  221. !&#xD;
  222. !&#xD;
  223. !&#xD;
  224. !&#xD;
  225. !&#xD;
  226. !&#xD;
  227. !&#xD;
  228. !&#xD;
  229. ip cef&#xD;
  230. no ipv6 cef&#xD;
  231. !&#xD;
  232. !&#xD;
  233. spanning-tree mode pvst&#xD;
  234. spanning-tree extend system-id&#xD;
  235. !&#xD;
  236. vlan internal allocation policy ascending&#xD;
  237. !&#xD;
  238. !&#xD;
  239. !&#xD;
  240. !&#xD;
  241. vrf definition Mgmt-intf&#xD;
  242. !&#xD;
  243. address-family ipv4&#xD;
  244. exit-address-family&#xD;
  245. !&#xD;
  246. address-family ipv6&#xD;
  247. exit-address-family&#xD;
  248. !&#xD;
  249. !&#xD;
  250. !&#xD;
  251. !&#xD;
  252. !&#xD;
  253. interface Loopback0&#xD;
  254. description Loopback&#xD;
  255. !&#xD;
  256. interface GigabitEthernet0/0&#xD;
  257. description OOB management&#xD;
  258. ! Configured on launch&#xD;
  259. no switchport&#xD;
  260. no ip address&#xD;
  261. no shutdown&#xD;
  262. !&#xD;
  263. interface GigabitEthernet0/1&#xD;
  264. description to Router-B&#xD;
  265. switchport access vlan 2&#xD;
  266. switchport mode access&#xD;
  267. no shutdown&#xD;
  268. !&#xD;
  269. interface GigabitEthernet0/2&#xD;
  270. description to Server-A&#xD;
  271. switchport access vlan 2&#xD;
  272. switchport mode access&#xD;
  273. no shutdown&#xD;
  274. !&#xD;
  275. interface GigabitEthernet0/3&#xD;
  276. description to Server-B&#xD;
  277. switchport access vlan 2&#xD;
  278. switchport mode access&#xD;
  279. no shutdown&#xD;
  280. !&#xD;
  281. !&#xD;
  282. ip forward-protocol nd&#xD;
  283. !&#xD;
  284. no ip http server&#xD;
  285. no ip http secure-server&#xD;
  286. !&#xD;
  287. !&#xD;
  288. !&#xD;
  289. !&#xD;
  290. !&#xD;
  291. !&#xD;
  292. control-plane&#xD;
  293. !&#xD;
  294. !&#xD;
  295. !&#xD;
  296. end&#xD;
  297. </entry>
  298. </extensions>
  299. <interface id="0" name="GigabitEthernet0/1"/>
  300. <interface id="1" name="GigabitEthernet0/2"/>
  301. <interface id="2" name="GigabitEthernet0/3"/>
  302. </node>
  303. <node name="ISP" type="SIMPLE" subtype="lxc" location="343,149">
  304. <extensions>
  305. <entry key="Auto-generate config" type="Boolean">false</entry>
  306. <entry key="config" type="String">#cloud-config&#xD;
  307. bootcmd:&#xD;
  308. - ln -s -t /etc/rc.d /etc/rc.local&#xD;
  309. hostname: ISP&#xD;
  310. manage_etc_hosts: true&#xD;
  311. runcmd:&#xD;
  312. - start ttyS0&#xD;
  313. - systemctl start getty@ttyS0.service&#xD;
  314. - systemctl start rc-local&#xD;
  315. - sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config&#xD;
  316. - echo "UseDNS no" &gt;&gt; /etc/ssh/sshd_config&#xD;
  317. - service ssh restart&#xD;
  318. - service sshd restart&#xD;
  319. users:&#xD;
  320. - default&#xD;
  321. - gecos: User configured by VIRL Configuration Engine 0.23.9&#xD;
  322. lock-passwd: false&#xD;
  323. name: cisco&#xD;
  324. plain-text-passwd: cisco&#xD;
  325. shell: /bin/bash&#xD;
  326. ssh-authorized-keys:&#xD;
  327. - VIRL-USER-SSH-PUBLIC-KEY&#xD;
  328. sudo: ALL=(ALL) ALL&#xD;
  329. write_files:&#xD;
  330. - path: /etc/init/ttyS0.conf&#xD;
  331. owner: root:root&#xD;
  332. content: |&#xD;
  333. # ttyS0 - getty&#xD;
  334. # This service maintains a getty on ttyS0 from the point the system is&#xD;
  335. # started until it is shut down again.&#xD;
  336. start on stopped rc or RUNLEVEL=[12345]&#xD;
  337. stop on runlevel [!12345]&#xD;
  338. respawn&#xD;
  339. exec /sbin/getty -L 115200 ttyS0 vt102&#xD;
  340. permissions: '0644'&#xD;
  341. - path: /etc/systemd/system/dhclient@.service&#xD;
  342. content: |&#xD;
  343. [Unit]&#xD;
  344. Description=Run dhclient on %i interface&#xD;
  345. After=network.target&#xD;
  346. [Service]&#xD;
  347. Type=oneshot&#xD;
  348. ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease&#xD;
  349. RemainAfterExit=yes&#xD;
  350. owner: root:root&#xD;
  351. permissions: '0644'&#xD;
  352. - path: /etc/rc.local&#xD;
  353. owner: root:root&#xD;
  354. permissions: '0755'&#xD;
  355. content: |-&#xD;
  356. #!/bin/sh&#xD;
  357. ifconfig eth1 up 192.168.101.1 netmask 255.255.255.252&#xD;
  358. ifconfig eth2 up 192.168.102.1 netmask 255.255.255.252&#xD;
  359. &#xD;
  360. dhclient eth0&#xD;
  361. dhclient eth3&#xD;
  362. &#xD;
  363. echo 1 &gt; /proc/sys/net/ipv4/ip_forward&#xD;
  364. &#xD;
  365. route add default gw 172.16.1.1 eth3&#xD;
  366. &#xD;
  367. route add -net 192.168.101.0/30 gw 192.168.101.2 dev eth1&#xD;
  368. route add -net 192.168.102.0/30 gw 192.168.102.2 dev eth2&#xD;
  369. &#xD;
  370. route add -net 192.168.100.0/24 gw 192.168.101.2 dev eth1&#xD;
  371. route add -net 192.168.32.0/20 gw 192.168.102.2 dev eth2&#xD;
  372. &#xD;
  373. iptables -t nat -A POSTROUTING -o eth3 -j MASQUERADE&#xD;
  374. iptables -P FORWARD ACCEPT&#xD;
  375. iptables -F FORWARD&#xD;
  376. &#xD;
  377. iptables -t nat -A PREROUTING -i eth3 -p tcp -m tcp --dport 80 -j DNAT --to-destination 192.168.2.100:80&#xD;
  378. iptables -t nat -A PREROUTING -i eth3 -p tcp -m tcp --dport 22 -j DNAT --to-destination 192.168.2.100:22&#xD;
  379. &#xD;
  380. /sbin/tc qdisc add dev eth2 root handle 1:1 netem delay 100ms loss 5%&#xD;
  381. echo "alias unbug='sudo tc qdisc del dev eth2 root'" &gt;&gt;/home/cisco/.bashrc&#xD;
  382. &#xD;
  383. service ssh start&#xD;
  384. &#xD;
  385. hostname ISP&#xD;
  386. &#xD;
  387. exit 0&#xD;
  388. &#xD;
  389. </entry>
  390. </extensions>
  391. <interface id="0" name="eth1"/>
  392. <interface id="1" name="eth2"/>
  393. <interface id="2" name="eth3"/>
  394. </node>
  395. <node name="Server-B" type="SIMPLE" subtype="lxc" location="393,364">
  396. <extensions>
  397. <entry key="Auto-generate config" type="Boolean">false</entry>
  398. <entry key="config" type="String">#cloud-config&#xD;
  399. bootcmd:&#xD;
  400. - ln -s -t /etc/rc.d /etc/rc.local&#xD;
  401. hostname: Server-B&#xD;
  402. manage_etc_hosts: true&#xD;
  403. &#xD;
  404. runcmd:&#xD;
  405. - start ttyS0&#xD;
  406. - systemctl start getty@ttyS0.service&#xD;
  407. - systemctl start rc-local&#xD;
  408. - systemctl start install-webserver&#xD;
  409. - sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config&#xD;
  410. - echo "UseDNS no" &gt;&gt; /etc/ssh/sshd_config&#xD;
  411. - service ssh restart&#xD;
  412. - service sshd restart&#xD;
  413. users:&#xD;
  414. - default&#xD;
  415. - gecos: User configured by VIRL Configuration Engine 0.18.9&#xD;
  416. lock-passwd: false&#xD;
  417. name: cisco&#xD;
  418. plain-text-passwd: cisco&#xD;
  419. shell: /bin/bash&#xD;
  420. ssh-authorized-keys:&#xD;
  421. - VIRL-USER-SSH-PUBLIC-KEY&#xD;
  422. sudo: ALL=(ALL) ALL&#xD;
  423. write_files:&#xD;
  424. - path: /etc/init/ttyS0.conf&#xD;
  425. owner: root:root&#xD;
  426. content: |&#xD;
  427. # ttyS0 - getty&#xD;
  428. # This service maintains a getty on ttyS0 from the point the system is&#xD;
  429. # started until it is shut down again.&#xD;
  430. start on stopped rc or RUNLEVEL=[12345]&#xD;
  431. stop on runlevel [!12345]&#xD;
  432. respawn&#xD;
  433. exec /sbin/getty -L 115200 ttyS0 vt102&#xD;
  434. permissions: '0644'&#xD;
  435. - path: /etc/systemd/system/dhclient@.service&#xD;
  436. content: |&#xD;
  437. [Unit]&#xD;
  438. Description=Run dhclient on %i interface&#xD;
  439. After=network.target&#xD;
  440. [Service]&#xD;
  441. Type=oneshot&#xD;
  442. ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease&#xD;
  443. RemainAfterExit=yes&#xD;
  444. owner: root:root&#xD;
  445. permissions: '0644'&#xD;
  446. - path: /etc/rc.local&#xD;
  447. owner: root:root&#xD;
  448. permissions: '0755'&#xD;
  449. content: |-&#xD;
  450. #!/bin/sh -e&#xD;
  451. echo "nameserver 8.8.8.8" &gt;/etc/resolv.conf&#xD;
  452. screen -dmS install-webserver /tmp/install-webserver &amp;&#xD;
  453. exit 0&#xD;
  454. - path: /tmp/install-webserver&#xD;
  455. owner: root:root&#xD;
  456. permissions: '0755'&#xD;
  457. content: |-&#xD;
  458. #!/bin/bash&#xD;
  459. echo "Waiting for internet connectivity"&#xD;
  460. until echo -n "." &amp;&amp; ping -c1 archive.ubuntu.com &amp;&gt;/dev/null; do :; done&#xD;
  461. apt-get -y update&#xD;
  462. apt-get -y install apache2&#xD;
  463. echo "&lt;h1&gt;Willkommen auf Server-B!&lt;/h1&gt;" &gt;/var/www/html/index.html&#xD;
  464. read -p "Press any key..."&#xD;
  465. exit 0&#xD;
  466. </entry>
  467. </extensions>
  468. <interface id="0" name="eth1"/>
  469. </node>
  470. <node name="Server-A" type="SIMPLE" subtype="lxc" location="639,256">
  471. <extensions>
  472. <entry key="Auto-generate config" type="Boolean">false</entry>
  473. <entry key="config" type="String">#cloud-config&#xD;
  474. bootcmd:&#xD;
  475. - ln -s -t /etc/rc.d /etc/rc.local&#xD;
  476. hostname: Server-A&#xD;
  477. manage_etc_hosts: true&#xD;
  478. runcmd:&#xD;
  479. - start ttyS0&#xD;
  480. - systemctl start getty@ttyS0.service&#xD;
  481. - systemctl start rc-local&#xD;
  482. - sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config&#xD;
  483. - echo "UseDNS no" &gt;&gt; /etc/ssh/sshd_config&#xD;
  484. - service ssh restart&#xD;
  485. - service sshd restart&#xD;
  486. users:&#xD;
  487. - default&#xD;
  488. - gecos: User configured by VIRL Configuration Engine 0.18.9&#xD;
  489. lock-passwd: false&#xD;
  490. name: cisco&#xD;
  491. plain-text-passwd: cisco&#xD;
  492. shell: /bin/bash&#xD;
  493. ssh-authorized-keys:&#xD;
  494. - VIRL-USER-SSH-PUBLIC-KEY&#xD;
  495. sudo: ALL=(ALL) ALL&#xD;
  496. write_files:&#xD;
  497. - path: /etc/init/ttyS0.conf&#xD;
  498. owner: root:root&#xD;
  499. content: |&#xD;
  500. # ttyS0 - getty&#xD;
  501. # This service maintains a getty on ttyS0 from the point the system is&#xD;
  502. # started until it is shut down again.&#xD;
  503. start on stopped rc or RUNLEVEL=[12345]&#xD;
  504. stop on runlevel [!12345]&#xD;
  505. respawn&#xD;
  506. exec /sbin/getty -L 115200 ttyS0 vt102&#xD;
  507. permissions: '0644'&#xD;
  508. - path: /etc/systemd/system/dhclient@.service&#xD;
  509. content: |&#xD;
  510. [Unit]&#xD;
  511. Description=Run dhclient on %i interface&#xD;
  512. After=network.target&#xD;
  513. [Service]&#xD;
  514. Type=oneshot&#xD;
  515. ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease&#xD;
  516. RemainAfterExit=yes&#xD;
  517. owner: root:root&#xD;
  518. permissions: '0644'&#xD;
  519. - path: /etc/rc.local&#xD;
  520. owner: root:root&#xD;
  521. permissions: '0755'&#xD;
  522. content: |-&#xD;
  523. #!/bin/sh -e&#xD;
  524. ifconfig eth1 up 192.168.32.100 netmask 255.255.254.0&#xD;
  525. route del default&#xD;
  526. route add default gw 192.168.32.1&#xD;
  527. exit 0&#xD;
  528. &#xD;
  529. - path: /etc/resolv.conf&#xD;
  530. owner: root:root&#xD;
  531. permissions: '0644'&#xD;
  532. content: |&#xD;
  533. # ttyS0 - getty&#xD;
  534. # This service maintains a getty on ttyS0 from the point the system is&#xD;
  535. # started until it is shut down again.&#xD;
  536. nameserver 8.8.8.8</entry>
  537. </extensions>
  538. <interface id="0" name="eth1"/>
  539. </node>
  540. <node name="Management-Client" type="SIMPLE" subtype="lxc" location="146,372">
  541. <extensions>
  542. <entry key="Auto-generate config" type="Boolean">false</entry>
  543. <entry key="config" type="String">#cloud-config&#xD;
  544. bootcmd:&#xD;
  545. - ln -s -t /etc/rc.d /etc/rc.local&#xD;
  546. hostname: Client&#xD;
  547. manage_etc_hosts: true&#xD;
  548. runcmd:&#xD;
  549. - start ttyS0&#xD;
  550. - systemctl start getty@ttyS0.service&#xD;
  551. - systemctl start rc-local&#xD;
  552. - sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config&#xD;
  553. - echo "UseDNS no" &gt;&gt; /etc/ssh/sshd_config&#xD;
  554. - service ssh restart&#xD;
  555. - service sshd restart&#xD;
  556. users:&#xD;
  557. - default&#xD;
  558. - gecos: User configured by VIRL Configuration Engine 0.18.9&#xD;
  559. lock-passwd: false&#xD;
  560. name: cisco&#xD;
  561. plain-text-passwd: cisco&#xD;
  562. shell: /bin/bash&#xD;
  563. ssh-authorized-keys:&#xD;
  564. - VIRL-USER-SSH-PUBLIC-KEY&#xD;
  565. sudo: ALL=(ALL) ALL&#xD;
  566. write_files:&#xD;
  567. - path: /etc/init/ttyS0.conf&#xD;
  568. owner: root:root&#xD;
  569. content: |&#xD;
  570. # ttyS0 - getty&#xD;
  571. # This service maintains a getty on ttyS0 from the point the system is&#xD;
  572. # started until it is shut down again.&#xD;
  573. start on stopped rc or RUNLEVEL=[12345]&#xD;
  574. stop on runlevel [!12345]&#xD;
  575. respawn&#xD;
  576. exec /sbin/getty -L 115200 ttyS0 vt102&#xD;
  577. permissions: '0644'&#xD;
  578. - path: /etc/systemd/system/dhclient@.service&#xD;
  579. content: |&#xD;
  580. [Unit]&#xD;
  581. Description=Run dhclient on %i interface&#xD;
  582. After=network.target&#xD;
  583. [Service]&#xD;
  584. Type=oneshot&#xD;
  585. ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease&#xD;
  586. RemainAfterExit=yes&#xD;
  587. owner: root:root&#xD;
  588. permissions: '0644'&#xD;
  589. - path: /etc/rc.local&#xD;
  590. owner: root:root&#xD;
  591. permissions: '0755'&#xD;
  592. content: |-&#xD;
  593. !/bin/sh -e&#xD;
  594. ifconfig eth1 up 192.168.1.100 netmask 255.255.255.0&#xD;
  595. route del default&#xD;
  596. route add default gw 192.168.1.1&#xD;
  597. arp -i eth1 -s 192.168.1.1 aa:aa:aa:aa:aa:aa&#xD;
  598. echo "alias unbug='sudo arp -d 192.168.1.1'" &gt;&gt;/home/cisco/.bashrc&#xD;
  599. exit 0&#xD;
  600. &#xD;
  601. - path: /etc/resolv.conf&#xD;
  602. owner: root:root&#xD;
  603. permissions: '0644'&#xD;
  604. content: |&#xD;
  605. #by Patrick.&#xD;
  606. nameserver 8.8.8.8&#xD;
  607. </entry>
  608. </extensions>
  609. <interface id="0" name="eth1"/>
  610. </node>
  611. <node name="Administration-Client" type="SIMPLE" subtype="lxc" location="234,437">
  612. <extensions>
  613. <entry key="Auto-generate config" type="Boolean">false</entry>
  614. <entry key="config" type="String">#cloud-config&#xD;
  615. bootcmd:&#xD;
  616. - ln -s -t /etc/rc.d /etc/rc.local&#xD;
  617. hostname: Client&#xD;
  618. manage_etc_hosts: true&#xD;
  619. runcmd:&#xD;
  620. - start ttyS0&#xD;
  621. - systemctl start getty@ttyS0.service&#xD;
  622. - systemctl start rc-local&#xD;
  623. - sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config&#xD;
  624. - echo "UseDNS no" &gt;&gt; /etc/ssh/sshd_config&#xD;
  625. - service ssh restart&#xD;
  626. - service sshd restart&#xD;
  627. users:&#xD;
  628. - default&#xD;
  629. - gecos: User configured by VIRL Configuration Engine 0.18.9&#xD;
  630. lock-passwd: false&#xD;
  631. name: cisco&#xD;
  632. plain-text-passwd: cisco&#xD;
  633. shell: /bin/bash&#xD;
  634. ssh-authorized-keys:&#xD;
  635. - VIRL-USER-SSH-PUBLIC-KEY&#xD;
  636. sudo: ALL=(ALL) ALL&#xD;
  637. write_files:&#xD;
  638. - path: /etc/init/ttyS0.conf&#xD;
  639. owner: root:root&#xD;
  640. content: |&#xD;
  641. # ttyS0 - getty&#xD;
  642. # This service maintains a getty on ttyS0 from the point the system is&#xD;
  643. # started until it is shut down again.&#xD;
  644. start on stopped rc or RUNLEVEL=[12345]&#xD;
  645. stop on runlevel [!12345]&#xD;
  646. respawn&#xD;
  647. exec /sbin/getty -L 115200 ttyS0 vt102&#xD;
  648. permissions: '0644'&#xD;
  649. - path: /etc/systemd/system/dhclient@.service&#xD;
  650. content: |&#xD;
  651. [Unit]&#xD;
  652. Description=Run dhclient on %i interface&#xD;
  653. After=network.target&#xD;
  654. [Service]&#xD;
  655. Type=oneshot&#xD;
  656. ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease&#xD;
  657. RemainAfterExit=yes&#xD;
  658. owner: root:root&#xD;
  659. permissions: '0644'&#xD;
  660. - path: /etc/rc.local&#xD;
  661. owner: root:root&#xD;
  662. permissions: '0755'&#xD;
  663. content: |-&#xD;
  664. !/bin/sh -e&#xD;
  665. ifconfig eth1 up 192.168.1.100 netmask 255.255.255.0&#xD;
  666. route del default&#xD;
  667. route add default gw 192.168.1.1&#xD;
  668. arp -i eth1 -s 192.168.1.1 aa:aa:aa:aa:aa:aa&#xD;
  669. echo "alias unbug='sudo arp -d 192.168.1.1'" &gt;&gt;/home/cisco/.bashrc&#xD;
  670. exit 0&#xD;
  671. &#xD;
  672. - path: /etc/resolv.conf&#xD;
  673. owner: root:root&#xD;
  674. permissions: '0644'&#xD;
  675. content: |&#xD;
  676. #by Patrick.&#xD;
  677. nameserver 8.8.8.8&#xD;
  678. </entry>
  679. </extensions>
  680. <interface id="0" name="eth1"/>
  681. </node>
  682. <node name="Rechnungswesen-Client" type="SIMPLE" subtype="lxc" location="61,296">
  683. <extensions>
  684. <entry key="Auto-generate config" type="Boolean">false</entry>
  685. <entry key="config" type="String">#cloud-config&#xD;
  686. bootcmd:&#xD;
  687. - ln -s -t /etc/rc.d /etc/rc.local&#xD;
  688. hostname: Client&#xD;
  689. manage_etc_hosts: true&#xD;
  690. runcmd:&#xD;
  691. - start ttyS0&#xD;
  692. - systemctl start getty@ttyS0.service&#xD;
  693. - systemctl start rc-local&#xD;
  694. - sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config&#xD;
  695. - echo "UseDNS no" &gt;&gt; /etc/ssh/sshd_config&#xD;
  696. - service ssh restart&#xD;
  697. - service sshd restart&#xD;
  698. users:&#xD;
  699. - default&#xD;
  700. - gecos: User configured by VIRL Configuration Engine 0.18.9&#xD;
  701. lock-passwd: false&#xD;
  702. name: cisco&#xD;
  703. plain-text-passwd: cisco&#xD;
  704. shell: /bin/bash&#xD;
  705. ssh-authorized-keys:&#xD;
  706. - VIRL-USER-SSH-PUBLIC-KEY&#xD;
  707. sudo: ALL=(ALL) ALL&#xD;
  708. write_files:&#xD;
  709. - path: /etc/init/ttyS0.conf&#xD;
  710. owner: root:root&#xD;
  711. content: |&#xD;
  712. # ttyS0 - getty&#xD;
  713. # This service maintains a getty on ttyS0 from the point the system is&#xD;
  714. # started until it is shut down again.&#xD;
  715. start on stopped rc or RUNLEVEL=[12345]&#xD;
  716. stop on runlevel [!12345]&#xD;
  717. respawn&#xD;
  718. exec /sbin/getty -L 115200 ttyS0 vt102&#xD;
  719. permissions: '0644'&#xD;
  720. - path: /etc/systemd/system/dhclient@.service&#xD;
  721. content: |&#xD;
  722. [Unit]&#xD;
  723. Description=Run dhclient on %i interface&#xD;
  724. After=network.target&#xD;
  725. [Service]&#xD;
  726. Type=oneshot&#xD;
  727. ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease&#xD;
  728. RemainAfterExit=yes&#xD;
  729. owner: root:root&#xD;
  730. permissions: '0644'&#xD;
  731. - path: /etc/rc.local&#xD;
  732. owner: root:root&#xD;
  733. permissions: '0755'&#xD;
  734. content: |-&#xD;
  735. !/bin/sh -e&#xD;
  736. ifconfig eth1 up 192.168.100.100 netmask 255.255.255.128&#xD;
  737. route add default gw 192.168.100.1&#xD;
  738. exit 0&#xD;
  739. &#xD;
  740. - path: /etc/resolv.conf&#xD;
  741. owner: root:root&#xD;
  742. permissions: '0644'&#xD;
  743. content: |&#xD;
  744. #by Patrick.&#xD;
  745. nameserver 8.8.8.8&#xD;
  746. </entry>
  747. </extensions>
  748. <interface id="0" name="eth1"/>
  749. </node>
  750. <annotations/>
  751. <connection dst="/virl:topology/virl:node[4]/virl:interface[1]" src="/virl:topology/virl:node[2]/virl:interface[2]"/>
  752. <connection dst="/virl:topology/virl:node[5]/virl:interface[1]" src="/virl:topology/virl:node[1]/virl:interface[1]"/>
  753. <connection dst="/virl:topology/virl:node[2]/virl:interface[1]" src="/virl:topology/virl:node[5]/virl:interface[2]"/>
  754. <connection dst="/virl:topology/virl:node[5]/virl:interface[3]" src="/virl:topology/virl:node[3]/virl:interface[1]"/>
  755. <connection dst="/virl:topology/virl:node[4]/virl:interface[3]" src="/virl:topology/virl:node[6]/virl:interface[1]"/>
  756. <connection dst="/virl:topology/virl:node[4]/virl:interface[2]" src="/virl:topology/virl:node[7]/virl:interface[1]"/>
  757. <connection dst="/virl:topology/virl:node[1]/virl:interface[2]" src="/virl:topology/virl:node[10]/virl:interface[1]"/>
  758. <connection dst="/virl:topology/virl:node[1]/virl:interface[3]" src="/virl:topology/virl:node[8]/virl:interface[1]"/>
  759. <connection dst="/virl:topology/virl:node[1]/virl:interface[4]" src="/virl:topology/virl:node[9]/virl:interface[1]"/>
  760. </topology>