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.

717 lines
21 KiB

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