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.

293 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. write_files:&#xD;
  158. - path: /etc/init/ttyS0.conf&#xD;
  159. owner: root:root&#xD;
  160. content: |&#xD;
  161. # ttyS0 - getty&#xD;
  162. # This service maintains a getty on ttyS0 from the point the system is&#xD;
  163. # started until it is shut down again.&#xD;
  164. start on stopped rc or RUNLEVEL=[12345]&#xD;
  165. stop on runlevel [!12345]&#xD;
  166. respawn&#xD;
  167. exec /sbin/getty -L 115200 ttyS0 vt102&#xD;
  168. permissions: '0644'&#xD;
  169. - path: /etc/systemd/system/dhclient@.service&#xD;
  170. content: |&#xD;
  171. [Unit]&#xD;
  172. Description=Run dhclient on %i interface&#xD;
  173. After=network.target&#xD;
  174. [Service]&#xD;
  175. Type=oneshot&#xD;
  176. ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease&#xD;
  177. RemainAfterExit=yes&#xD;
  178. owner: root:root&#xD;
  179. permissions: '0644'&#xD;
  180. - path: /etc/rc.local&#xD;
  181. owner: root:root&#xD;
  182. permissions: '0755'&#xD;
  183. content: |-&#xD;
  184. #!/bin/sh -e&#xD;
  185. ifconfig eth1 up 10.10.10.254 netmask 255.255.255.0&#xD;
  186. ifconfig eth2 up&#xD;
  187. dhclient eth2&#xD;
  188. # set default gateway to VIRL host in flat1 &#xD;
  189. route del -net default&#xD;
  190. route add -net default gw 172.16.1.254&#xD;
  191. # enable routing and NAT for 10.10.0.0/16&#xD;
  192. sysctl -w net.ipv4.ip_forward=1&#xD;
  193. iptables -A POSTROUTING -t nat -s 10.10.0.0/16 -o eth2 -j MASQUERADE&#xD;
  194. exit 0&#xD;
  195. - path: /tmp/install-odl&#xD;
  196. owner: root:root&#xD;
  197. permissions: '0755'&#xD;
  198. content: |-&#xD;
  199. #!/bin/sh -e&#xD;
  200. apt-get update&#xD;
  201. apt-get install -y joe iperf unzip openjdk-7-jre-headless&#xD;
  202. #mkdir /tmp/d&#xD;ebs&#xD;
  203. #cd /tmp/debs&#xD;
  204. #wget http://mmnet.informatik.hs-fulda.de/opendaylight-dep-debs.tar.gz&#xD;
  205. #tar zxvf opendaylight-dep-debs.tar.gz&#xD;
  206. #dpkg -i *.deb&#xD;
  207. export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/jre/&#xD;
  208. echo "export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/jre/" &gt;/etc/profile.d/Z99-java-home.sh&#xD;
  209. # setup opendaylight controller&#xD;
  210. #################&#xD;
  211. # Hydrogen&#xD;
  212. #################&#xD;
  213. cd /tmp&#xD;
  214. wget http://mmnet.informatik.hs-fulda.de/distributions-base-0.1.1-osgipackage.zip&#xD;
  215. unzip distributions-base-0.1.1-osgipackage.zip&#xD;
  216. #################&#xD;
  217. # Lithium&#xD;
  218. #################&#xD;
  219. #wget http://mmnet.informatik.hs-fulda.de/distribution-karaf-0.3.0-Lithium.tar.gz&#xD;
  220. #tar zxf distribution-karaf-0.3.0-Lithium.tar.gz&#xD;
  221. #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;
  222. #./distribution-karaf-0.3.0-Lithium/bin/start&#xD;
  223. #&#xD;
  224. #################&#xD;
  225. # LXDE&#xD;
  226. #################&#xD;
  227. # apt-get -y install midori lxde wireshark&#xD;
  228. exit 0</entry>
  229. </extensions>
  230. <interface id="0" name="eth1" ipv4="10.0.0.13" netPrefixLenV4="30"/>
  231. <interface id="1" name="eth2"/>
  232. </node>
  233. <node name="veos-1" type="SIMPLE" subtype="vEOS" location="514,148" ipv4="10.10.10.253">
  234. <extensions>
  235. <entry key="Auto-generate config" type="Boolean">false</entry>
  236. <entry key="config" type="String">! Command: show running-config&#xD;
  237. ! device: vEOS-1 (vEOS, EOS-4.14.2F)&#xD;
  238. !&#xD;
  239. ! boot system flash:/vEOS.swi&#xD;
  240. !&#xD;
  241. ! AdvCompNet Lab 2 SDN&#xD;
  242. !&#xD;
  243. transceiver qsfp default-mode 4x10G&#xD;
  244. !&#xD;
  245. hostname veos-1&#xD;
  246. !&#xD;
  247. openflow&#xD;
  248. description SDN-OpenFlow-Lab&#xD;
  249. controller tcp:10.10.10.254:6633&#xD;
  250. bind interface Ethernet1&#xD;
  251. bind interface Ethernet2&#xD;
  252. !&#xD;
  253. spanning-tree mode mstp&#xD;
  254. !&#xD;
  255. no aaa root&#xD;
  256. !&#xD;
  257. username admin privilege 15 role network-admin secret 5 $1$S4W0XejC$69vFakMKc/k9N.nrrTiIY/&#xD;
  258. username cisco privilege 15 role network-admin secret 5 $1$rQS0W9wP$ZUzVG2XoGCCZCJopFp1aV/&#xD;
  259. !&#xD;
  260. vlan 10&#xD;
  261. !&#xD;
  262. interface Ethernet1&#xD;
  263. !&#xD;
  264. interface Ethernet2&#xD;
  265. !&#xD;
  266. interface Ethernet3&#xD;
  267. switchport access vlan 10&#xD;
  268. !&#xD;
  269. interface Management1&#xD;
  270. ! ip of ma1 configured on launch&#xD;
  271. !&#xD;
  272. interface Vlan10&#xD;
  273. ip address 10.10.10.253/24&#xD;
  274. !&#xD;
  275. no ip routing&#xD;
  276. ip route 0.0.0.0 0.0.0.0 10.10.10.254&#xD;
  277. !&#xD;
  278. !&#xD;
  279. end</entry>
  280. </extensions>
  281. <interface id="0" name="Ethernet1" ipv4="10.0.0.10" netPrefixLenV4="30"/>
  282. <interface id="1" name="Ethernet2" ipv4="10.0.0.6" netPrefixLenV4="30"/>
  283. <interface id="2" name="Ethernet3" ipv4="10.0.0.14" netPrefixLenV4="30"/>
  284. </node>
  285. <node name="flat-1" type="ASSET" subtype="FLAT" location="411,38">
  286. <interface id="0" name="link0"/>
  287. </node>
  288. <connection dst="/virl:topology/virl:node[1]/virl:interface[1]" src="/virl:topology/virl:node[4]/virl:interface[1]"/>
  289. <connection dst="/virl:topology/virl:node[2]/virl:interface[1]" src="/virl:topology/virl:node[4]/virl:interface[2]"/>
  290. <connection dst="/virl:topology/virl:node[3]/virl:interface[1]" src="/virl:topology/virl:node[4]/virl:interface[3]"/>
  291. <connection dst="/virl:topology/virl:node[5]/virl:interface[1]" src="/virl:topology/virl:node[3]/virl:interface[2]"/>
  292. </topology>