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.

262 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="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.1&#xD;
  212. # change dns&#xD;
  213. echo "nameserver 8.8.8.8" &gt;/etc/resolv.conf&#xD;
  214. echo "nameserver 8.8.4.4" &gt;&gt;/etc/resolv.conf&#xD;
  215. # enable routing and NAT for 10.10.0.0/16&#xD;
  216. sysctl -w net.ipv4.ip_forward=1&#xD;
  217. iptables -A POSTROUTING -t nat -s 10.10.0.0/16 -o eth2 -j MASQUERADE&#xD;
  218. exit 0&#xD;
  219. - path: /tmp/install-odl&#xD;
  220. owner: root:root&#xD;
  221. permissions: '0755'&#xD;
  222. content: |-&#xD;
  223. #!/bin/sh -e&#xD;
  224. mkdir /tmp/d&#xD;ebs&#xD;
  225. cd /tmp/debs&#xD;
  226. wget http://mmnet.informatik.hs-fulda.de/opendaylight-dep-debs.tar.gz&#xD;
  227. tar zxvf opendaylight-dep-debs.tar.gz&#xD;
  228. dpkg -i *.deb&#xD;
  229. export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/jre/&#xD;
  230. echo "export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/jre/" &gt;/etc/profile.d/Z99-java-home.sh&#xD;
  231. # setup opendaylight controller&#xD;
  232. #################&#xD;
  233. # Hydrogen&#xD;
  234. #################&#xD;
  235. cd /tmp&#xD;
  236. wget http://mmnet.informatik.hs-fulda.de/distributions-base-0.1.1-osgipackage.zip&#xD;
  237. unzip distributions-base-0.1.1-osgipackage.zip&#xD;
  238. #################&#xD;
  239. # Lithium&#xD;
  240. #################&#xD;
  241. #wget http://mmnet.informatik.hs-fulda.de/distribution-karaf-0.3.0-Lithium.tar.gz&#xD;
  242. #tar zxf distribution-karaf-0.3.0-Lithium.tar.gz&#xD;
  243. #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;
  244. #./distribution-karaf-0.3.0-Lithium/bin/start&#xD;
  245. #&#xD;
  246. #################&#xD;
  247. # LXDE&#xD;
  248. #################&#xD;
  249. # apt-get -y install midori lxde wireshark&#xD;
  250. exit 0&#xD;
  251. </entry>
  252. </extensions>
  253. <interface id="0" name="eth1" ipv4="10.0.128.2" netPrefixLenV4="30"/>
  254. <interface id="1" name="eth2"/>
  255. </node>
  256. <annotations/>
  257. <connection dst="/virl:topology/virl:node[3]/virl:interface[1]" src="/virl:topology/virl:node[1]/virl:interface[1]"/>
  258. <connection dst="/virl:topology/virl:node[4]/virl:interface[1]" src="/virl:topology/virl:node[1]/virl:interface[2]"/>
  259. <connection dst="/virl:topology/virl:node[1]/virl:interface[3]" src="/virl:topology/virl:node[5]/virl:interface[1]"/>
  260. <connection dst="/virl:topology/virl:node[2]/virl:interface[1]" src="/virl:topology/virl:node[5]/virl:interface[2]"/>
  261. </topology>