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.

258 lines
9.0 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="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="lxc" location="508,70" ipv4="10.10.10.254">
  156. <extensions>
  157. <entry key="Auto-generate config" type="Boolean">false</entry>
  158. <entry key="config" type="String">#cloud-config&#xD;
  159. bootcmd:&#xD;
  160. - ln -s -t /etc/rc.d /etc/rc.local&#xD;
  161. hostname: controller&#xD;
  162. manage_etc_hosts: true&#xD;
  163. runcmd:&#xD;
  164. - systemctl start rc-local&#xD;
  165. - sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config&#xD;
  166. - echo "UseDNS no" &gt;&gt; /etc/ssh/sshd_config&#xD;
  167. - service ssh restart&#xD;
  168. - service sshd restart&#xD;
  169. users:&#xD;
  170. - default&#xD;
  171. - gecos: User configured by VIRL Configuration Engine 0.20.22&#xD;
  172. lock-passwd: false&#xD;
  173. name: cisco&#xD;
  174. plain-text-passwd: cisco&#xD;
  175. shell: /bin/bash&#xD;
  176. ssh-authorized-keys:&#xD;
  177. - VIRL-USER-SSH-PUBLIC-KEY&#xD;
  178. sudo: ALL=(ALL) ALL&#xD;
  179. write_files:&#xD;
  180. - path: /etc/systemd/system/dhclient@.service&#xD;
  181. content: |&#xD;
  182. [Unit]&#xD;
  183. Description=Run dhclient on %i interface&#xD;
  184. After=network.target&#xD;
  185. [Service]&#xD;
  186. Type=oneshot&#xD;
  187. ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease&#xD;
  188. RemainAfterExit=yes&#xD;
  189. owner: root:root&#xD;
  190. permissions: '0644'&#xD;
  191. - path: /etc/rc.local&#xD;
  192. owner: root:root&#xD;
  193. permissions: '0755'&#xD;
  194. content: |-&#xD;
  195. #!/bin/sh&#xD;
  196. ifconfig eth2 up&#xD;
  197. dhclient -nw eth2&#xD;
  198. systemctl start dhclient@eth2.service&#xD;
  199. ifconfig eth1 up 10.0.128.2 netmask 255.255.255.252&#xD;
  200. exit 0&#xD;
  201. - path: /etc/rc.local&#xD;
  202. owner: root:root&#xD;
  203. permissions: '0755'&#xD;
  204. content: |-&#xD;
  205. #!/bin/sh -e&#xD;
  206. ifconfig eth1 up 10.10.10.254 netmask 255.255.255.0&#xD;
  207. ifconfig eth2 up&#xD;
  208. dhclient eth2&#xD;
  209. # set default gateway to VIRL host in flat1 &#xD;
  210. route del -net default&#xD;
  211. route add -net default gw 172.16.1.254&#xD;
  212. # enable routing and NAT for 10.10.0.0/16&#xD;
  213. sysctl -w net.ipv4.ip_forward=1&#xD;
  214. iptables -A POSTROUTING -t nat -s 10.10.0.0/16 -o eth2 -j MASQUERADE&#xD;
  215. exit 0&#xD;
  216. - path: /tmp/install-odl&#xD;
  217. owner: root:root&#xD;
  218. permissions: '0755'&#xD;
  219. content: |-&#xD;
  220. #!/bin/sh -e&#xD;
  221. mkdir /tmp/d&#xD;ebs&#xD;
  222. cd /tmp/debs&#xD;
  223. wget http://mmnet.informatik.hs-fulda.de/opendaylight-dep-debs.tar.gz&#xD;
  224. tar zxvf opendaylight-dep-debs.tar.gz&#xD;
  225. dpkg -i *.deb&#xD;
  226. export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/jre/&#xD;
  227. echo "export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/jre/" &gt;/etc/profile.d/Z99-java-home.sh&#xD;
  228. # setup opendaylight controller&#xD;
  229. #################&#xD;
  230. # Hydrogen&#xD;
  231. #################&#xD;
  232. cd /tmp&#xD;
  233. wget http://mmnet.informatik.hs-fulda.de/distributions-base-0.1.1-osgipackage.zip&#xD;
  234. unzip distributions-base-0.1.1-osgipackage.zip&#xD;
  235. #################&#xD;
  236. # Lithium&#xD;
  237. #################&#xD;
  238. #wget http://mmnet.informatik.hs-fulda.de/distribution-karaf-0.3.0-Lithium.tar.gz&#xD;
  239. #tar zxf distribution-karaf-0.3.0-Lithium.tar.gz&#xD;
  240. #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;
  241. #./distribution-karaf-0.3.0-Lithium/bin/start&#xD;
  242. #&#xD;
  243. #################&#xD;
  244. # LXDE&#xD;
  245. #################&#xD;
  246. # apt-get -y install midori lxde wireshark&#xD;
  247. exit 0&#xD;
  248. </entry>
  249. </extensions>
  250. <interface id="0" name="eth1" ipv4="10.0.128.2" netPrefixLenV4="30"/>
  251. <interface id="1" name="eth2"/>
  252. </node>
  253. <connection dst="/virl:topology/virl:node[3]/virl:interface[1]" src="/virl:topology/virl:node[1]/virl:interface[1]"/>
  254. <connection dst="/virl:topology/virl:node[4]/virl:interface[1]" src="/virl:topology/virl:node[1]/virl:interface[2]"/>
  255. <connection dst="/virl:topology/virl:node[1]/virl:interface[3]" src="/virl:topology/virl:node[5]/virl:interface[1]"/>
  256. <connection dst="/virl:topology/virl:node[2]/virl:interface[1]" src="/virl:topology/virl:node[5]/virl:interface[2]"/>
  257. </topology>