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.

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