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.

290 lines
10 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. <extensions>
  4. <entry key="management_network" type="String">exclusive</entry>
  5. </extensions>
  6. <node name="client" type="SIMPLE" subtype="server" location="387,214" ipv4="10.10.20.10">
  7. <extensions>
  8. <entry key="config" type="String">#cloud-config&#xD;
  9. bootcmd:&#xD;
  10. - ln -s -t /etc/rc.d /etc/rc.local&#xD;
  11. hostname: client&#xD;
  12. manage_etc_hosts: true&#xD;
  13. runcmd:&#xD;
  14. - start ttyS0&#xD;
  15. - systemctl start getty@ttyS0.service&#xD;
  16. - systemctl start rc-local&#xD;
  17. - sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config&#xD;
  18. - echo "UseDNS no" &gt;&gt; /etc/ssh/sshd_config&#xD;
  19. - service ssh restart&#xD;
  20. - service sshd restart&#xD;
  21. users:&#xD;
  22. - default&#xD;
  23. - gecos: User configured by VIRL Configuration Engine 0.15.8&#xD;
  24. lock-passwd: false&#xD;
  25. name: cisco&#xD;
  26. plain-text-passwd: cisco&#xD;
  27. shell: /bin/bash&#xD;
  28. ssh-authorized-keys:&#xD;
  29. - VIRL-USER-SSH-PUBLIC-KEY&#xD;
  30. sudo: ALL=(ALL) ALL&#xD;
  31. packages:&#xD;
  32. - joe&#xD;
  33. - iperf&#xD;
  34. write_files:&#xD;
  35. - path: /etc/init/ttyS0.conf&#xD;
  36. owner: root:root&#xD;
  37. content: |&#xD;
  38. # ttyS0 - getty&#xD;
  39. # This service maintains a getty on ttyS0 from the point the system is&#xD;
  40. # started until it is shut down again.&#xD;
  41. start on stopped rc or RUNLEVEL=[12345]&#xD;
  42. stop on runlevel [!12345]&#xD;
  43. respawn&#xD;
  44. exec /sbin/getty -L 115200 ttyS0 vt102&#xD;
  45. permissions: '0644'&#xD;
  46. - path: /etc/systemd/system/dhclient@.service&#xD;
  47. content: |&#xD;
  48. [Unit]&#xD;
  49. Description=Run dhclient on %i interface&#xD;
  50. After=network.target&#xD;
  51. [Service]&#xD;
  52. Type=oneshot&#xD;
  53. ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease&#xD;
  54. RemainAfterExit=yes&#xD;
  55. owner: root:root&#xD;
  56. permissions: '0644'&#xD;
  57. - path: /etc/rc.local&#xD;
  58. owner: root:root&#xD;
  59. permissions: '0755'&#xD;
  60. content: |-&#xD;
  61. #!/bin/sh -e&#xD;
  62. ifconfig eth1 up 10.10.20.10 netmask 255.255.255.0&#xD;
  63. exit 0&#xD;
  64. </entry>
  65. </extensions>
  66. <interface id="0" name="eth1" ipv4="10.0.0.9" netPrefixLenV4="30"/>
  67. </node>
  68. <node name="server" type="SIMPLE" subtype="server" location="673,214" ipv4="10.10.20.20">
  69. <extensions>
  70. <entry key="config" type="String">#cloud-config&#xD;
  71. bootcmd:&#xD;
  72. - ln -s -t /etc/rc.d /etc/rc.local&#xD;
  73. hostname: server&#xD;
  74. manage_etc_hosts: true&#xD;
  75. runcmd:&#xD;
  76. - start ttyS0&#xD;
  77. - systemctl start getty@ttyS0.service&#xD;
  78. - systemctl start rc-local&#xD;
  79. - sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config&#xD;
  80. - echo "UseDNS no" &gt;&gt; /etc/ssh/sshd_config&#xD;
  81. - service ssh restart&#xD;
  82. - service sshd restart&#xD;
  83. users:&#xD;
  84. - default&#xD;
  85. - gecos: User configured by VIRL Configuration Engine 0.15.8&#xD;
  86. lock-passwd: false&#xD;
  87. name: cisco&#xD;
  88. plain-text-passwd: cisco&#xD;
  89. shell: /bin/bash&#xD;
  90. ssh-authorized-keys:&#xD;
  91. - VIRL-USER-SSH-PUBLIC-KEY&#xD;
  92. sudo: ALL=(ALL) ALL&#xD;
  93. packages:&#xD;
  94. - joe&#xD;
  95. - iperf&#xD;
  96. - apache2&#xD;
  97. write_files:&#xD;
  98. - path: /etc/init/ttyS0.conf&#xD;
  99. owner: root:root&#xD;
  100. content: |&#xD;
  101. # ttyS0 - getty&#xD;
  102. # This service maintains a getty on ttyS0 from the point the system is&#xD;
  103. # started until it is shut down again.&#xD;
  104. start on stopped rc or RUNLEVEL=[12345]&#xD;
  105. stop on runlevel [!12345]&#xD;
  106. respawn&#xD;
  107. exec /sbin/getty -L 115200 ttyS0 vt102&#xD;
  108. permissions: '0644'&#xD;
  109. - path: /etc/systemd/system/dhclient@.service&#xD;
  110. content: |&#xD;
  111. [Unit]&#xD;
  112. Description=Run dhclient on %i interface&#xD;
  113. After=network.target&#xD;
  114. [Service]&#xD;
  115. Type=oneshot&#xD;
  116. ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease&#xD;
  117. RemainAfterExit=yes&#xD;
  118. owner: root:root&#xD;
  119. permissions: '0644'&#xD;
  120. - path: /etc/rc.local&#xD;
  121. owner: root:root&#xD;
  122. permissions: '0755'&#xD;
  123. content: |-&#xD;
  124. #!/bin/sh -e&#xD;
  125. ifconfig eth1 up 10.10.20.20 netmask 255.255.255.0&#xD;
  126. exit 0&#xD;
  127. </entry>
  128. </extensions>
  129. <interface id="0" name="eth1" ipv4="10.0.0.5" netPrefixLenV4="30"/>
  130. </node>
  131. <node name="controller" type="SIMPLE" subtype="server" location="506,54" vmFlavor="server-medium [9094074e-b640-4fd7-b296-efa4ddaca4c5]" ipv4="10.10.10.254">
  132. <extensions>
  133. <entry key="config" type="String">#cloud-config&#xD;
  134. bootcmd:&#xD;
  135. - ln -s -t /etc/rc.d /etc/rc.local&#xD;
  136. hostname: controller&#xD;
  137. manage_etc_hosts: true&#xD;
  138. runcmd:&#xD;
  139. - start ttyS0&#xD;
  140. - systemctl start getty@ttyS0.service&#xD;
  141. - systemctl start rc-local&#xD;
  142. - sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config&#xD;
  143. - echo "UseDNS no" &gt;&gt; /etc/ssh/sshd_config&#xD;
  144. - service ssh restart&#xD;
  145. - service sshd restart&#xD;
  146. - /tmp/install-odl&#xD;
  147. users:&#xD;
  148. - default&#xD;
  149. - gecos: User configured by VIRL Configuration Engine 0.15.8&#xD;
  150. lock-passwd: false&#xD;
  151. name: cisco&#xD;
  152. plain-text-passwd: cisco&#xD;
  153. shell: /bin/bash&#xD;
  154. ssh-authorized-keys:&#xD;
  155. - VIRL-USER-SSH-PUBLIC-KEY&#xD;
  156. sudo: ALL=(ALL) ALL&#xD;
  157. packages:&#xD;
  158. - joe&#xD;
  159. - iperf&#xD;
  160. - unzip&#xD;
  161. - openjdk-7-jre-headless&#xD;
  162. write_files:&#xD;
  163. - path: /etc/init/ttyS0.conf&#xD;
  164. owner: root:root&#xD;
  165. content: |&#xD;
  166. # ttyS0 - getty&#xD;
  167. # This service maintains a getty on ttyS0 from the point the system is&#xD;
  168. # started until it is shut down again.&#xD;
  169. start on stopped rc or RUNLEVEL=[12345]&#xD;
  170. stop on runlevel [!12345]&#xD;
  171. respawn&#xD;
  172. exec /sbin/getty -L 115200 ttyS0 vt102&#xD;
  173. permissions: '0644'&#xD;
  174. - path: /etc/systemd/system/dhclient@.service&#xD;
  175. content: |&#xD;
  176. [Unit]&#xD;
  177. Description=Run dhclient on %i interface&#xD;
  178. After=network.target&#xD;
  179. [Service]&#xD;
  180. Type=oneshot&#xD;
  181. ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease&#xD;
  182. RemainAfterExit=yes&#xD;
  183. owner: root:root&#xD;
  184. permissions: '0644'&#xD;
  185. - path: /etc/rc.local&#xD;
  186. owner: root:root&#xD;
  187. permissions: '0755'&#xD;
  188. content: |-&#xD;
  189. #!/bin/sh -e&#xD;
  190. ifconfig eth1 up 10.10.10.254 netmask 255.255.255.0&#xD;
  191. ifconfig eth2 up&#xD;
  192. dhclient eth2&#xD;
  193. # set default gateway to VIRL host in flat1 &#xD;
  194. route del -net default&#xD;
  195. route add -net default gw 172.16.1.254&#xD;
  196. # enable routing and NAT for 10.10.0.0/16&#xD;
  197. sysctl -w net.ipv4.ip_forward=1&#xD;
  198. iptables -A POSTROUTING -t nat -s 10.10.0.0/16 -o eth2 -j MASQUERADE&#xD;
  199. exit 0&#xD;
  200. - path: /tmp/install-odl&#xD;
  201. owner: root:root&#xD;
  202. permissions: '0755'&#xD;
  203. content: |-&#xD;
  204. #!/bin/sh -e&#xD;
  205. export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/jre/&#xD;
  206. echo "export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/jre/" &gt;/etc/profile.d/Z99-java-home.sh&#xD;
  207. # setup opendaylight controller&#xD;
  208. #################&#xD;
  209. # Hydrogen&#xD;
  210. #################&#xD;
  211. cd /tmp&#xD;
  212. wget http://mmnet.informatik.hs-fulda.de/distributions-base-0.1.1-osgipackage.zip&#xD;
  213. unzip distributions-base-0.1.1-osgipackage.zip&#xD;
  214. #################&#xD;
  215. # Lithium&#xD;
  216. #################&#xD;
  217. #wget http://mmnet.informatik.hs-fulda.de/distribution-karaf-0.3.0-Lithium.tar.gz&#xD;
  218. #tar zxf distribution-karaf-0.3.0-Lithium.tar.gz&#xD;
  219. #echo -e "feature:install odl-restconf odl-l2switch-switch odl-mdsal-apidocs odl-dlux-core odl-dlux-node odl-dlux-yangui\nlogout" | ./distribution-karaf-0.3.0-Lithium/bin/karaf&#xD;
  220. #./distribution-karaf-0.3.0-Lithium/bin/start&#xD;
  221. #&#xD;
  222. #################&#xD;
  223. # LXDE&#xD;
  224. #################&#xD;
  225. # apt-get -y install midori lxde wireshark&#xD;
  226. exit 0</entry>
  227. </extensions>
  228. <interface id="0" name="eth1" ipv4="10.0.0.13" netPrefixLenV4="30"/>
  229. <interface id="1" name="eth2"/>
  230. </node>
  231. <node name="veos-1" type="SIMPLE" subtype="vEOS" location="514,148" ipv4="10.10.10.253">
  232. <extensions>
  233. <entry key="Auto-generate config" type="Boolean">false</entry>
  234. <entry key="config" type="String">! Command: show running-config&#xD;
  235. ! device: vEOS-1 (vEOS, EOS-4.14.2F)&#xD;
  236. !&#xD;
  237. ! boot system flash:/vEOS.swi&#xD;
  238. !&#xD;
  239. ! AdvCompNet Lab 2 SDN&#xD;
  240. !&#xD;
  241. transceiver qsfp default-mode 4x10G&#xD;
  242. !&#xD;
  243. hostname veos-1&#xD;
  244. !&#xD;
  245. openflow&#xD;
  246. description SDN-OpenFlow-Lab&#xD;
  247. controller tcp:10.10.10.254:6633&#xD;
  248. bind interface Ethernet1&#xD;
  249. bind interface Ethernet2&#xD;
  250. !&#xD;
  251. spanning-tree mode mstp&#xD;
  252. !&#xD;
  253. no aaa root&#xD;
  254. !&#xD;
  255. username admin privilege 15 role network-admin secret 5 $1$S4W0XejC$69vFakMKc/k9N.nrrTiIY/&#xD;
  256. username cisco privilege 15 role network-admin secret 5 $1$rQS0W9wP$ZUzVG2XoGCCZCJopFp1aV/&#xD;
  257. !&#xD;
  258. vlan 10&#xD;
  259. !&#xD;
  260. interface Ethernet1&#xD;
  261. !&#xD;
  262. interface Ethernet2&#xD;
  263. !&#xD;
  264. interface Ethernet3&#xD;
  265. switchport access vlan 10&#xD;
  266. !&#xD;
  267. interface Management1&#xD;
  268. ! ip of ma1 configured on launch&#xD;
  269. !&#xD;
  270. interface Vlan10&#xD;
  271. ip address 10.10.10.253/24&#xD;
  272. !&#xD;
  273. no ip routing&#xD;
  274. ip route 0.0.0.0 0.0.0.0 10.10.10.254&#xD;
  275. !&#xD;
  276. !&#xD;
  277. end</entry>
  278. </extensions>
  279. <interface id="0" name="Ethernet1" ipv4="10.0.0.10" netPrefixLenV4="30"/>
  280. <interface id="1" name="Ethernet2" ipv4="10.0.0.6" netPrefixLenV4="30"/>
  281. <interface id="2" name="Ethernet3" ipv4="10.0.0.14" netPrefixLenV4="30"/>
  282. </node>
  283. <node name="flat-1" type="ASSET" subtype="FLAT" location="411,38">
  284. <interface id="0" name="link0"/>
  285. </node>
  286. <connection dst="/virl:topology/virl:node[1]/virl:interface[1]" src="/virl:topology/virl:node[4]/virl:interface[1]"/>
  287. <connection dst="/virl:topology/virl:node[2]/virl:interface[1]" src="/virl:topology/virl:node[4]/virl:interface[2]"/>
  288. <connection dst="/virl:topology/virl:node[3]/virl:interface[1]" src="/virl:topology/virl:node[4]/virl:interface[3]"/>
  289. <connection dst="/virl:topology/virl:node[5]/virl:interface[1]" src="/virl:topology/virl:node[3]/virl:interface[2]"/>
  290. </topology>