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.

541 lines
14 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="Router-A" type="SIMPLE" subtype="IOSv" location="220,198">
  4. <extensions>
  5. <entry key="AutoNetkit.mgmt_ip" type="string"></entry>
  6. <entry key="AutoNetkit.IGP" type="String">eigrp</entry>
  7. <entry key="Auto-generate config" type="Boolean">false</entry>
  8. <entry key="config" type="String">! IOS Config generated on 2015-09-06 21:22
  9. ! by autonetkit_0.18.1
  10. !
  11. hostname iosv-1
  12. boot-start-marker
  13. boot-end-marker
  14. !
  15. vrf definition Mgmt-intf
  16. !
  17. address-family ipv4
  18. exit-address-family
  19. !
  20. address-family ipv6
  21. exit-address-family
  22. !
  23. !
  24. !
  25. no aaa new-model
  26. !
  27. !
  28. ip cef
  29. ipv6 unicast-routing
  30. ipv6 cef
  31. !
  32. !
  33. service timestamps debug datetime msec
  34. service timestamps log datetime msec
  35. no service password-encryption
  36. no service config
  37. enable password cisco
  38. ip classless
  39. ip subnet-zero
  40. no ip domain lookup
  41. line vty 0 4
  42. transport input ssh telnet
  43. exec-timeout 720 0
  44. password cisco
  45. login
  46. line con 0
  47. password cisco
  48. !
  49. no cdp run
  50. !
  51. !
  52. interface Loopback0
  53. description Loopback
  54. ip address 192.168.0.2 255.255.255.255
  55. !
  56. interface GigabitEthernet0/0
  57. description OOB Management
  58. vrf forwarding Mgmt-intf
  59. ! Configured on launch
  60. no ip address
  61. duplex full
  62. speed auto
  63. no shutdown
  64. !
  65. interface GigabitEthernet0/1
  66. description to wanEM
  67. ip address 192.168.101.2 255.255.255.252
  68. duplex full
  69. speed auto
  70. no shutdown
  71. !
  72. interface GigabitEthernet0/2
  73. description to server-1
  74. ip address 192.168.1.1 255.255.255.0
  75. duplex full
  76. speed auto
  77. no shutdown
  78. !
  79. !
  80. !
  81. !
  82. ip route 0.0.0.0 0.0.0.0 192.168.101.1
  83. !
  84. end
  85. </entry>
  86. </extensions>
  87. <interface id="0" name="GigabitEthernet0/1" ipv4="192.168.101.2" netPrefixLenV4="24"/>
  88. <interface id="1" name="GigabitEthernet0/2" ipv4="192.168.1.1" netPrefixLenV4="24"/>
  89. <interface id="2" name="GigabitEthernet0/3"/>
  90. <interface id="3" name="GigabitEthernet0/4"/>
  91. </node>
  92. <node name="Client" type="SIMPLE" subtype="server" location="158,285">
  93. <extensions>
  94. <entry key="Auto-generate config" type="Boolean">false</entry>
  95. <entry key="config" type="String">#cloud-config
  96. bootcmd:
  97. - ln -s -t /etc/rc.d /etc/rc.local
  98. hostname: server-1
  99. manage_etc_hosts: true
  100. runcmd:
  101. - start ttyS0
  102. - systemctl start getty@ttyS0.service
  103. - systemctl start rc-local
  104. - sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config
  105. - echo "UseDNS no" &gt;&gt; /etc/ssh/sshd_config
  106. - service ssh restart
  107. - service sshd restart
  108. users:
  109. - default
  110. - gecos: User configured by VIRL Configuration Engine 0.18.9
  111. lock-passwd: false
  112. name: cisco
  113. plain-text-passwd: cisco
  114. shell: /bin/bash
  115. ssh-authorized-keys:
  116. - VIRL-USER-SSH-PUBLIC-KEY
  117. sudo: ALL=(ALL) ALL
  118. write_files:
  119. - path: /etc/init/ttyS0.conf
  120. owner: root:root
  121. content: |
  122. # ttyS0 - getty
  123. # This service maintains a getty on ttyS0 from the point the system is
  124. # started until it is shut down again.
  125. start on stopped rc or RUNLEVEL=[12345]
  126. stop on runlevel [!12345]
  127. respawn
  128. exec /sbin/getty -L 115200 ttyS0 vt102
  129. permissions: '0644'
  130. - path: /etc/systemd/system/dhclient@.service
  131. content: |
  132. [Unit]
  133. Description=Run dhclient on %i interface
  134. After=network.target
  135. [Service]
  136. Type=oneshot
  137. ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease
  138. RemainAfterExit=yes
  139. owner: root:root
  140. permissions: '0644'
  141. - path: /etc/rc.local
  142. owner: root:root
  143. permissions: '0755'
  144. content: |-
  145. !/bin/sh -e
  146. ifconfig eth1 up 192.168.1.100 netmask 255.255.255.0
  147. route del default
  148. route add default gw 192.168.1.1
  149. arp -i eth1 -s 192.168.1.1 aa:aa:aa:aa:aa:aa
  150. exit 0
  151. - path: /etc/resolv.conf
  152. owner: root:root
  153. permissions: '0644'
  154. content: |
  155. #by Patrick.
  156. nameserver 8.8.8.8
  157. </entry>
  158. </extensions>
  159. <interface id="0" name="eth1" ipv4="192.168.1.100" netPrefixLenV4="24"/>
  160. </node>
  161. <node name="ISP" type="SIMPLE" subtype="wanEM" location="340,139" vmImage="wanEM-bash-init-aktuell [d38b887a-e92a-41ad-9f86-f6d81d7afeb8]" vmFlavor="m1.small [2]">
  162. <extensions>
  163. <entry key="Auto-generate config" type="Boolean">false</entry>
  164. <entry key="config" type="String"> ifconfig eth1 up 192.168.101.1 netmask 255.255.255.252
  165. ifconfig eth2 up 192.168.102.1 netmask 255.255.255.252
  166. dhclient eth0
  167. dhclient eth3
  168. route add default gw 172.16.1.254 eth3
  169. route add -net 192.168.101.0/30 gw 192.168.101.2 dev eth1
  170. route add -net 192.168.1.0/24 gw 192.168.101.2 dev eth1
  171. route add -net 192.168.102.0/30 gw 192.168.102.2 dev eth2
  172. route add -net 192.168.2.0/24 gw 192.168.102.2 dev eth2
  173. iptables -t nat -A POSTROUTING -o eth3 -j MASQUERADE
  174. iptables -A FORWARD -i eth2 -j ACCEPT
  175. iptables -A FORWARD -i eth1 -j ACCEPT
  176. /sbin/tc qdisc add dev eth3 root handle 1:1 netem delay 100ms
  177. service ssh start
  178. exit 0
  179. </entry>
  180. </extensions>
  181. <interface id="0" name="Ethernet1" ipv4="192.168.101.1" netPrefixLenV4="24"/>
  182. <interface id="1" name="Ethernet2" ipv4="192.168.102.1" netPrefixLenV4="24"/>
  183. <interface id="2" name="Ethernet3"/>
  184. </node>
  185. <node name="Router-B" type="SIMPLE" subtype="IOSv" location="442,185">
  186. <extensions>
  187. <entry key="AutoNetkit.mgmt_ip" type="string"></entry>
  188. <entry key="Auto-generate config" type="Boolean">false</entry>
  189. <entry key="config" type="String">! IOS Config generated on 2015-09-06 21:22
  190. ! by autonetkit_0.18.1
  191. !
  192. hostname iosv-2
  193. boot-start-marker
  194. boot-end-marker
  195. !
  196. vrf definition Mgmt-intf
  197. !
  198. address-family ipv4
  199. exit-address-family
  200. !
  201. address-family ipv6
  202. exit-address-family
  203. !
  204. !
  205. !
  206. no aaa new-model
  207. !
  208. !
  209. ip cef
  210. ipv6 unicast-routing
  211. ipv6 cef
  212. !
  213. !
  214. service timestamps debug datetime msec
  215. service timestamps log datetime msec
  216. no service password-encryption
  217. no service config
  218. enable password cisco
  219. ip classless
  220. ip subnet-zero
  221. no ip domain lookup
  222. line vty 0 4
  223. transport input ssh telnet
  224. exec-timeout 720 0
  225. password cisco
  226. login
  227. line con 0
  228. password cisco
  229. !
  230. no cdp run
  231. !
  232. !
  233. interface Loopback0
  234. description Loopback
  235. ip address 192.168.0.3 255.255.255.255
  236. !
  237. interface GigabitEthernet0/0
  238. description OOB Management
  239. vrf forwarding Mgmt-intf
  240. ! Configured on launch
  241. no ip address
  242. duplex full
  243. speed auto
  244. no shutdown
  245. !
  246. interface GigabitEthernet0/1
  247. description to wanEM
  248. ip address 192.168.102.2 255.255.255.252
  249. ip ospf cost 1
  250. duplex full
  251. speed auto
  252. no shutdown
  253. !
  254. interface GigabitEthernet0/2
  255. description to server-2
  256. ip address 192.168.2.1 255.255.255.0
  257. ip ospf cost 1
  258. duplex full
  259. speed auto
  260. no shutdown
  261. !
  262. !
  263. !
  264. ip route 0.0.0.0 0.0.0.0 192.168.102.1
  265. !
  266. end
  267. </entry>
  268. </extensions>
  269. <interface id="0" name="GigabitEthernet0/1"/>
  270. <interface id="1" name="GigabitEthernet0/2" netPrefixLenV4="24"/>
  271. </node>
  272. <node name="Server-B" type="SIMPLE" subtype="server" location="405,302" vmImage="server-uwmadmin-server-Server-B-aktuell [df1463d4-87d0-439f-96d6-ea7aeacccaf3]">
  273. <extensions>
  274. <entry key="Auto-generate config" type="Boolean">false</entry>
  275. <entry key="config" type="String">#cloud-config
  276. bootcmd:
  277. - ln -s -t /etc/rc.d /etc/rc.local
  278. hostname: Server-B
  279. manage_etc_hosts: true
  280. runcmd:
  281. - start ttyS0
  282. - systemctl start getty@ttyS0.service
  283. - systemctl start rc-local
  284. - sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config
  285. - echo "UseDNS no" &gt;&gt; /etc/ssh/sshd_config
  286. - service ssh restart
  287. - service sshd restart
  288. users:
  289. - default
  290. - gecos: User configured by VIRL Configuration Engine 0.18.9
  291. lock-passwd: false
  292. name: cisco
  293. plain-text-passwd: cisco
  294. shell: /bin/bash
  295. ssh-authorized-keys:
  296. - VIRL-USER-SSH-PUBLIC-KEY
  297. sudo: ALL=(ALL) ALL
  298. write_files:
  299. - path: /etc/init/ttyS0.conf
  300. owner: root:root
  301. content: |
  302. # ttyS0 - getty
  303. # This service maintains a getty on ttyS0 from the point the system is
  304. # started until it is shut down again.
  305. start on stopped rc or RUNLEVEL=[12345]
  306. stop on runlevel [!12345]
  307. respawn
  308. exec /sbin/getty -L 115200 ttyS0 vt102
  309. permissions: '0644'
  310. - path: /etc/systemd/system/dhclient@.service
  311. content: |
  312. [Unit]
  313. Description=Run dhclient on %i interface
  314. After=network.target
  315. [Service]
  316. Type=oneshot
  317. ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease
  318. RemainAfterExit=yes
  319. owner: root:root
  320. permissions: '0644'
  321. - path: /etc/rc.local
  322. owner: root:root
  323. permissions: '0755'
  324. content: |-
  325. #!/bin/sh -e
  326. ifconfig eth1 up 192.168.2.100 netmask 255.255.255.0
  327. route del default
  328. route add default gw 192.168.2.1
  329. echo "nameserver 8.8.8.8" &gt;/etc/resolv.conf
  330. exit 0
  331. </entry>
  332. </extensions>
  333. <interface id="0" name="eth1" ipv4="192.168.2.100" netPrefixLenV4="24"/>
  334. </node>
  335. <node name="flat-1" type="ASSET" subtype="FLAT" location="358,16">
  336. <interface id="0" name="link0"/>
  337. </node>
  338. <node name="Server-A" type="SIMPLE" subtype="server" location="650,215">
  339. <extensions>
  340. <entry key="Auto-generate config" type="Boolean">false</entry>
  341. <entry key="config" type="String">#cloud-config
  342. bootcmd:
  343. - ln -s -t /etc/rc.d /etc/rc.local
  344. hostname: Server-B
  345. manage_etc_hosts: true
  346. runcmd:
  347. - start ttyS0
  348. - systemctl start getty@ttyS0.service
  349. - systemctl start rc-local
  350. - sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config
  351. - echo "UseDNS no" &gt;&gt; /etc/ssh/sshd_config
  352. - service ssh restart
  353. - service sshd restart
  354. users:
  355. - default
  356. - gecos: User configured by VIRL Configuration Engine 0.18.9
  357. lock-passwd: false
  358. name: cisco
  359. plain-text-passwd: cisco
  360. shell: /bin/bash
  361. ssh-authorized-keys:
  362. - VIRL-USER-SSH-PUBLIC-KEY
  363. sudo: ALL=(ALL) ALL
  364. write_files:
  365. - path: /etc/init/ttyS0.conf
  366. owner: root:root
  367. content: |
  368. # ttyS0 - getty
  369. # This service maintains a getty on ttyS0 from the point the system is
  370. # started until it is shut down again.
  371. start on stopped rc or RUNLEVEL=[12345]
  372. stop on runlevel [!12345]
  373. respawn
  374. exec /sbin/getty -L 115200 ttyS0 vt102
  375. permissions: '0644'
  376. - path: /etc/systemd/system/dhclient@.service
  377. content: |
  378. [Unit]
  379. Description=Run dhclient on %i interface
  380. After=network.target
  381. [Service]
  382. Type=oneshot
  383. ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease
  384. RemainAfterExit=yes
  385. owner: root:root
  386. permissions: '0644'
  387. - path: /etc/rc.local
  388. owner: root:root
  389. permissions: '0755'
  390. content: |-
  391. #!/bin/sh -e
  392. ifconfig eth1 up 192.168.2.200 netmask 255.255.255.0
  393. route del default
  394. route add default gw 192.168.2.1
  395. exit 0
  396. - path: /etc/resolv.conf
  397. owner: root:root
  398. permissions: '0644'
  399. content: |
  400. # ttyS0 - getty
  401. # This service maintains a getty on ttyS0 from the point the system is
  402. # started until it is shut down again.
  403. nameserver 8.8.8.8</entry>
  404. </extensions>
  405. <interface id="0" name="eth1" ipv4="10.0.0.14" netPrefixLenV4="30"/>
  406. </node>
  407. <node name="Switch-A" type="SIMPLE" subtype="IOSvL2" location="578,316">
  408. <extensions>
  409. <entry key="AutoNetkit.mgmt_ip" type="string"></entry>
  410. <entry key="config" type="String">! IOSvL2 Config generated on 2015-12-11 21:04
  411. ! by autonetkit_0.18.1
  412. !
  413. version 15.2
  414. service timestamps debug datetime msec
  415. service timestamps log datetime msec
  416. no service password-encryption
  417. service compress-config
  418. no service config
  419. enable password cisco
  420. ip classless
  421. ip subnet-zero
  422. no ip domain lookup
  423. !
  424. line vty 0 4
  425. transport input ssh telnet
  426. exec-timeout 720 0
  427. password cisco
  428. login
  429. !
  430. line con 0
  431. password cisco
  432. !
  433. hostname Switch-A
  434. !
  435. boot-start-marker
  436. boot-end-marker
  437. !
  438. !
  439. !
  440. no aaa new-model
  441. !
  442. !
  443. !
  444. !
  445. !
  446. !
  447. !
  448. !
  449. ip cef
  450. no ipv6 cef
  451. !
  452. !
  453. spanning-tree mode pvst
  454. spanning-tree extend system-id
  455. !
  456. vlan internal allocation policy ascending
  457. !
  458. !
  459. !
  460. !
  461. vrf definition Mgmt-intf
  462. !
  463. address-family ipv4
  464. exit-address-family
  465. !
  466. address-family ipv6
  467. exit-address-family
  468. !
  469. !
  470. !
  471. !
  472. !
  473. interface Loopback0
  474. description Loopback
  475. !
  476. interface GigabitEthernet0/0
  477. description OOB management
  478. ! Configured on launch
  479. no switchport
  480. no ip address
  481. no shutdown
  482. !
  483. interface GigabitEthernet0/1
  484. description to Router-B
  485. switchport access vlan 2
  486. switchport mode access
  487. no shutdown
  488. !
  489. interface GigabitEthernet0/2
  490. description to Server-A
  491. switchport access vlan 2
  492. switchport mode access
  493. no shutdown
  494. !
  495. interface GigabitEthernet0/3
  496. description to Server-B
  497. switchport access vlan 2
  498. switchport mode access
  499. no shutdown
  500. !
  501. !
  502. ip forward-protocol nd
  503. !
  504. no ip http server
  505. no ip http secure-server
  506. !
  507. !
  508. !
  509. !
  510. !
  511. !
  512. control-plane
  513. !
  514. !
  515. !
  516. end
  517. </entry>
  518. </extensions>
  519. <interface id="0" name="GigabitEthernet0/1"/>
  520. <interface id="1" name="GigabitEthernet0/2"/>
  521. <interface id="2" name="GigabitEthernet0/3"/>
  522. </node>
  523. <connection dst="/virl:topology/virl:node[3]/virl:interface[1]" src="/virl:topology/virl:node[1]/virl:interface[1]"/>
  524. <connection dst="/virl:topology/virl:node[4]/virl:interface[1]" src="/virl:topology/virl:node[3]/virl:interface[2]"/>
  525. <connection dst="/virl:topology/virl:node[3]/virl:interface[3]" src="/virl:topology/virl:node[6]/virl:interface[1]"/>
  526. <connection dst="/virl:topology/virl:node[2]/virl:interface[1]" src="/virl:topology/virl:node[1]/virl:interface[2]"/>
  527. <connection dst="/virl:topology/virl:node[8]/virl:interface[1]" src="/virl:topology/virl:node[4]/virl:interface[2]"/>
  528. <connection dst="/virl:topology/virl:node[8]/virl:interface[2]" src="/virl:topology/virl:node[7]/virl:interface[1]"/>
  529. <connection dst="/virl:topology/virl:node[8]/virl:interface[3]" src="/virl:topology/virl:node[5]/virl:interface[1]"/>
  530. </topology>