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.

287 lines
10 KiB

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