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.

244 lines
8.4 KiB

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="client" type="SIMPLE" subtype="server" location="387,214" ipv4="10.10.20.10">
  4. <extensions>
  5. <entry key="config" type="String">#cloud-config&#xD;
  6. bootcmd:&#xD;
  7. - ln -s -t /etc/rc.d /etc/rc.local&#xD;
  8. hostname: client&#xD;
  9. manage_etc_hosts: true&#xD;
  10. runcmd:&#xD;
  11. - start ttyS0&#xD;
  12. - systemctl start getty@ttyS0.service&#xD;
  13. - systemctl start rc-local&#xD;
  14. - sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config&#xD;
  15. - echo "UseDNS no" &gt;&gt; /etc/ssh/sshd_config&#xD;
  16. - service ssh restart&#xD;
  17. - service sshd restart&#xD;
  18. users:&#xD;
  19. - default&#xD;
  20. - gecos: User configured by VIRL Configuration Engine 0.15.8&#xD;
  21. lock-passwd: false&#xD;
  22. name: cisco&#xD;
  23. plain-text-passwd: cisco&#xD;
  24. shell: /bin/bash&#xD;
  25. ssh-authorized-keys:&#xD;
  26. - VIRL-USER-SSH-PUBLIC-KEY&#xD;
  27. sudo: ALL=(ALL) ALL&#xD;
  28. write_files:&#xD;
  29. - path: /etc/init/ttyS0.conf&#xD;
  30. owner: root:root&#xD;
  31. content: |&#xD;
  32. # ttyS0 - getty&#xD;
  33. # This service maintains a getty on ttyS0 from the point the system is&#xD;
  34. # started until it is shut down again.&#xD;
  35. start on stopped rc or RUNLEVEL=[12345]&#xD;
  36. stop on runlevel [!12345]&#xD;
  37. respawn&#xD;
  38. exec /sbin/getty -L 115200 ttyS0 vt102&#xD;
  39. permissions: '0644'&#xD;
  40. - path: /etc/systemd/system/dhclient@.service&#xD;
  41. content: |&#xD;
  42. [Unit]&#xD;
  43. Description=Run dhclient on %i interface&#xD;
  44. After=network.target&#xD;
  45. [Service]&#xD;
  46. Type=oneshot&#xD;
  47. ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease&#xD;
  48. RemainAfterExit=yes&#xD;
  49. owner: root:root&#xD;
  50. permissions: '0644'&#xD;
  51. - path: /etc/rc.local&#xD;
  52. owner: root:root&#xD;
  53. permissions: '0755'&#xD;
  54. content: |-&#xD;
  55. #!/bin/sh -e&#xD;
  56. ifconfig eth1 up 10.10.20.10 netmask 255.255.255.0&#xD;
  57. exit 0&#xD;
  58. </entry>
  59. </extensions>
  60. <interface id="0" name="eth1" ipv4="10.0.0.9" netPrefixLenV4="30"/>
  61. </node>
  62. <node name="server" type="SIMPLE" subtype="server" location="673,214" ipv4="10.10.20.20">
  63. <extensions>
  64. <entry key="config" type="String">#cloud-config&#xD;
  65. bootcmd:&#xD;
  66. - ln -s -t /etc/rc.d /etc/rc.local&#xD;
  67. hostname: server&#xD;
  68. manage_etc_hosts: true&#xD;
  69. runcmd:&#xD;
  70. - start ttyS0&#xD;
  71. - systemctl start getty@ttyS0.service&#xD;
  72. - systemctl start rc-local&#xD;
  73. - sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config&#xD;
  74. - echo "UseDNS no" &gt;&gt; /etc/ssh/sshd_config&#xD;
  75. - service ssh restart&#xD;
  76. - service sshd restart&#xD;
  77. users:&#xD;
  78. - default&#xD;
  79. - gecos: User configured by VIRL Configuration Engine 0.15.8&#xD;
  80. lock-passwd: false&#xD;
  81. name: cisco&#xD;
  82. plain-text-passwd: cisco&#xD;
  83. shell: /bin/bash&#xD;
  84. ssh-authorized-keys:&#xD;
  85. - VIRL-USER-SSH-PUBLIC-KEY&#xD;
  86. sudo: ALL=(ALL) ALL&#xD;
  87. write_files:&#xD;
  88. - path: /etc/init/ttyS0.conf&#xD;
  89. owner: root:root&#xD;
  90. content: |&#xD;
  91. # ttyS0 - getty&#xD;
  92. # This service maintains a getty on ttyS0 from the point the system is&#xD;
  93. # started until it is shut down again.&#xD;
  94. start on stopped rc or RUNLEVEL=[12345]&#xD;
  95. stop on runlevel [!12345]&#xD;
  96. respawn&#xD;
  97. exec /sbin/getty -L 115200 ttyS0 vt102&#xD;
  98. permissions: '0644'&#xD;
  99. - path: /etc/systemd/system/dhclient@.service&#xD;
  100. content: |&#xD;
  101. [Unit]&#xD;
  102. Description=Run dhclient on %i interface&#xD;
  103. After=network.target&#xD;
  104. [Service]&#xD;
  105. Type=oneshot&#xD;
  106. ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease&#xD;
  107. RemainAfterExit=yes&#xD;
  108. owner: root:root&#xD;
  109. permissions: '0644'&#xD;
  110. - path: /etc/rc.local&#xD;
  111. owner: root:root&#xD;
  112. permissions: '0755'&#xD;
  113. content: |-&#xD;
  114. #!/bin/sh -e&#xD;
  115. ifconfig eth1 up 10.10.20.20 netmask 255.255.255.0&#xD;
  116. exit 0&#xD;
  117. </entry>
  118. </extensions>
  119. <interface id="0" name="eth1" ipv4="10.0.0.5" netPrefixLenV4="30"/>
  120. </node>
  121. <node name="controller" type="SIMPLE" subtype="server" location="506,54" ipv4="10.10.10.254">
  122. <extensions>
  123. <entry key="config" type="String">#cloud-config&#xD;
  124. bootcmd:&#xD;
  125. - ln -s -t /etc/rc.d /etc/rc.local&#xD;
  126. hostname: controller&#xD;
  127. manage_etc_hosts: true&#xD;
  128. runcmd:&#xD;
  129. - start ttyS0&#xD;
  130. - systemctl start getty@ttyS0.service&#xD;
  131. - systemctl start rc-local&#xD;
  132. - sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config&#xD;
  133. - echo "UseDNS no" &gt;&gt; /etc/ssh/sshd_config&#xD;
  134. - service ssh restart&#xD;
  135. - service sshd restart&#xD;
  136. users:&#xD;
  137. - default&#xD;
  138. - gecos: User configured by VIRL Configuration Engine 0.15.8&#xD;
  139. lock-passwd: false&#xD;
  140. name: cisco&#xD;
  141. plain-text-passwd: cisco&#xD;
  142. shell: /bin/bash&#xD;
  143. ssh-authorized-keys:&#xD;
  144. - VIRL-USER-SSH-PUBLIC-KEY&#xD;
  145. sudo: ALL=(ALL) ALL&#xD;
  146. write_files:&#xD;
  147. - path: /etc/init/ttyS0.conf&#xD;
  148. owner: root:root&#xD;
  149. content: |&#xD;
  150. # ttyS0 - getty&#xD;
  151. # This service maintains a getty on ttyS0 from the point the system is&#xD;
  152. # started until it is shut down again.&#xD;
  153. start on stopped rc or RUNLEVEL=[12345]&#xD;
  154. stop on runlevel [!12345]&#xD;
  155. respawn&#xD;
  156. exec /sbin/getty -L 115200 ttyS0 vt102&#xD;
  157. permissions: '0644'&#xD;
  158. - path: /etc/systemd/system/dhclient@.service&#xD;
  159. content: |&#xD;
  160. [Unit]&#xD;
  161. Description=Run dhclient on %i interface&#xD;
  162. After=network.target&#xD;
  163. [Service]&#xD;
  164. Type=oneshot&#xD;
  165. ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease&#xD;
  166. RemainAfterExit=yes&#xD;
  167. owner: root:root&#xD;
  168. permissions: '0644'&#xD;
  169. - path: /etc/rc.local&#xD;
  170. owner: root:root&#xD;
  171. permissions: '0755'&#xD;
  172. content: |-&#xD;
  173. #!/bin/sh -e&#xD;
  174. ifconfig eth1 up 10.10.10.254 netmask 255.255.255.0&#xD;
  175. ifconfig eth2 up&#xD;
  176. dhclient -nw eth2&#xD;
  177. systemctl start dhclient@eth2.service&#xD;
  178. route del -net default&#xD;
  179. route add -net default gw 172.16.1.254&#xD;
  180. exit 0&#xD;
  181. </entry>
  182. </extensions>
  183. <interface id="0" name="eth1" ipv4="10.0.0.13" netPrefixLenV4="30"/>
  184. <interface id="1" name="eth2"/>
  185. </node>
  186. <node name="veos-1" type="SIMPLE" subtype="vEOS" location="514,148">
  187. <extensions>
  188. <entry key="Auto-generate config" type="Boolean">false</entry>
  189. <entry key="config" type="String">! Command: show running-config&#xD;
  190. ! device: vEOS-1 (vEOS, EOS-4.14.2F)&#xD;
  191. !&#xD;
  192. ! boot system flash:/vEOS.swi&#xD;
  193. !&#xD;
  194. ! AdvCompNet Lab 2 SDN&#xD;
  195. !&#xD;
  196. transceiver qsfp default-mode 4x10G&#xD;
  197. !&#xD;
  198. hostname vEOS-1&#xD;
  199. !&#xD;
  200. openflow&#xD;
  201. description SDN-OpenFlow-Lab&#xD;
  202. controller tcp:10.10.10.254:6633&#xD;
  203. bind interface Ethernet1&#xD;
  204. bind interface Ethernet2&#xD;
  205. !&#xD;
  206. spanning-tree mode mstp&#xD;
  207. !&#xD;
  208. no aaa root&#xD;
  209. !&#xD;
  210. username admin privilege 15 role network-admin secret 5 $1$S4W0XejC$69vFakMKc/k9N.nrrTiIY/&#xD;
  211. username cisco privilege 15 role network-admin secret 5 $1$rQS0W9wP$ZUzVG2XoGCCZCJopFp1aV/&#xD;
  212. !&#xD;
  213. vlan 10&#xD;
  214. !&#xD;
  215. interface Ethernet1&#xD;
  216. !&#xD;
  217. interface Ethernet2&#xD;
  218. !&#xD;
  219. interface Ethernet3&#xD;
  220. switchport access vlan 10&#xD;
  221. !&#xD;
  222. interface Management1&#xD;
  223. ! ip of ma1 configured on launch&#xD;
  224. !&#xD;
  225. interface Vlan10&#xD;
  226. ip address 10.10.10.253/24&#xD;
  227. !&#xD;
  228. no ip routing&#xD;
  229. !&#xD;
  230. !&#xD;
  231. end</entry>
  232. </extensions>
  233. <interface id="0" name="Ethernet1" ipv4="10.0.0.10" netPrefixLenV4="30"/>
  234. <interface id="1" name="Ethernet2" ipv4="10.0.0.6" netPrefixLenV4="30"/>
  235. <interface id="2" name="Ethernet3" ipv4="10.0.0.14" netPrefixLenV4="30"/>
  236. </node>
  237. <node name="flat-1" type="ASSET" subtype="FLAT" location="411,38">
  238. <interface id="0" name="link0"/>
  239. </node>
  240. <connection dst="/virl:topology/virl:node[1]/virl:interface[1]" src="/virl:topology/virl:node[4]/virl:interface[1]"/>
  241. <connection dst="/virl:topology/virl:node[2]/virl:interface[1]" src="/virl:topology/virl:node[4]/virl:interface[2]"/>
  242. <connection dst="/virl:topology/virl:node[3]/virl:interface[1]" src="/virl:topology/virl:node[4]/virl:interface[3]"/>
  243. <connection dst="/virl:topology/virl:node[5]/virl:interface[1]" src="/virl:topology/virl:node[3]/virl:interface[2]"/>
  244. </topology>