6033c42c36aeab41d1fbd7b8d23281909f115fea
[vpp.git] / vnet / etc / scripts / virl / simple.virl
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">flat</entry>
5     </extensions>
6     <node name="iosv-1" type="SIMPLE" subtype="IOSv" location="427,219" ipv4="192.168.0.2">
7         <extensions>
8             <entry key="config" type="string">!
9 ! Last configuration change at 14:27:32 UTC Fri Mar 27 2015
10 !
11 version 15.4
12 service timestamps debug datetime msec
13 service timestamps log datetime msec
14 no service password-encryption
15 !
16 hostname iosv-1
17 !
18 boot-start-marker
19 boot-end-marker
20 !
21 !
22 enable password cisco
23 !
24 no aaa new-model
25 !
26 !
27 !
28 mmi polling-interval 60
29 no mmi auto-configure
30 no mmi pvc
31 mmi snmp-timeout 180
32 !
33 !
34 !
35 !
36 !
37 !
38 !
39 !
40 !
41 !
42 !
43 !
44 !
45 no ip domain lookup
46 ip cef
47 ipv6 unicast-routing
48 ipv6 cef
49 !
50 multilink bundle-name authenticated
51 !
52 !
53 cts logging verbose
54 !
55 !
56 !
57 redundancy
58 !
59 !
60
61 !
62 !
63 !
64 !
65 !
66 !
67 !
68 !
69 !
70 !
71 !
72 !
73 interface Loopback0
74  description Loopback
75  ip address 192.168.0.2 255.255.255.255
76 !
77 interface GigabitEthernet0/0
78  description OOB Management
79  ip address 172.16.1.167 255.255.255.0
80  duplex auto
81  speed auto
82  media-type rj45
83 !
84 interface GigabitEthernet0/1
85  description to vpp-1
86  ip address 10.0.0.5 255.255.255.252
87  ip ospf cost 1
88  duplex auto
89  speed auto
90  media-type rj45
91 !
92 router ospf 1
93  passive-interface Loopback0
94  network 10.0.0.4 0.0.0.3 area 0
95  network 192.168.0.2 0.0.0.0 area 0
96 !
97 router bgp 1
98  bgp router-id 192.168.0.2
99  bgp log-neighbor-changes
100  neighbor 192.168.0.3 remote-as 1
101  neighbor 192.168.0.3 description iBGP peer iosv-2
102  neighbor 192.168.0.3 update-source Loopback0
103  !
104  address-family ipv4
105   network 192.168.0.2 mask 255.255.255.255
106   neighbor 192.168.0.3 activate
107  exit-address-family
108 !
109 ip forward-protocol nd
110 !
111 !
112 no ip http server
113 no ip http secure-server
114 ip route 10.0.0.9 255.255.255.255 10.0.0.6
115 !
116 !
117 !
118 !
119 control-plane
120 !
121 banner exec `
122 **************************************************************************
123 * IOSv is strictly limited to use for evaluation, demonstration and IOS  *
124 * education. IOSv is provided as-is and is not supported by Cisco's      *
125 * Technical Advisory Center. Any use or disclosure, in whole or in part, *
126 * of the IOSv Software or Documentation to any third party for any       *
127 * purposes is expressly prohibited except as otherwise authorized by     *
128 * Cisco in writing.                                                      *
129 **************************************************************************`
130 banner incoming `
131 **************************************************************************
132 * IOSv is strictly limited to use for evaluation, demonstration and IOS  *
133 * education. IOSv is provided as-is and is not supported by Cisco's      *
134 * Technical Advisory Center. Any use or disclosure, in whole or in part, *
135 * of the IOSv Software or Documentation to any third party for any       *
136 * purposes is expressly prohibited except as otherwise authorized by     *
137 * Cisco in writing.                                                      *
138 **************************************************************************`
139 banner login `
140 **************************************************************************
141 * IOSv is strictly limited to use for evaluation, demonstration and IOS  *
142 * education. IOSv is provided as-is and is not supported by Cisco's      *
143 * Technical Advisory Center. Any use or disclosure, in whole or in part, *
144 * of the IOSv Software or Documentation to any third party for any       *
145 * purposes is expressly prohibited except as otherwise authorized by     *
146 * Cisco in writing.                                                      *
147 **************************************************************************`
148 !
149 line con 0
150  password cisco
151 line aux 0
152 line vty 0 4
153  exec-timeout 720 0
154  password cisco
155  login
156  transport input telnet ssh
157 !
158 no scheduler allocate
159 !
160 end</entry>
161             <entry key="AutoNetkit.mgmt_ip" type="string"></entry>
162         </extensions>
163         <interface id="0" name="GigabitEthernet0/1" ipv4="10.0.0.5" netPrefixLenV4="30"/>
164     </node>
165     <node name="iosv-2" type="SIMPLE" subtype="IOSv" location="704,221" ipv4="192.168.0.3">
166         <extensions>
167             <entry key="config" type="string">!
168 ! Last configuration change at 14:26:58 UTC Fri Mar 27 2015
169 !
170 version 15.4
171 service timestamps debug datetime msec
172 service timestamps log datetime msec
173 no service password-encryption
174 !
175 hostname iosv-2
176 !
177 boot-start-marker
178 boot-end-marker
179 !
180 !
181 enable password cisco
182 !
183 no aaa new-model
184 !
185 !
186 !
187 mmi polling-interval 60
188 no mmi auto-configure
189 no mmi pvc
190 mmi snmp-timeout 180
191 !
192 !
193 !
194 !
195 !
196 !
197 !
198 !
199 !
200 !
201 !
202 !
203 !
204 no ip domain lookup
205 ip cef
206 ipv6 unicast-routing
207 ipv6 cef
208 !
209 multilink bundle-name authenticated
210 !
211 !
212 cts logging verbose
213 !
214 !
215 !
216 redundancy
217 !
218 !
219
220 !
221 !
222 !
223 !
224 !
225 !
226 !
227 !
228 !
229 !
230 !
231 !
232 interface Loopback0
233  description Loopback
234  ip address 192.168.0.3 255.255.255.255
235 !
236 interface GigabitEthernet0/0
237  description OOB Management
238  ip address 172.16.1.164 255.255.255.0
239  duplex auto
240  speed auto
241  media-type rj45
242 !
243 interface GigabitEthernet0/1
244  description to vpp-1
245  ip address 10.0.0.9 255.255.255.252
246  ip ospf cost 1
247  duplex auto
248  speed auto
249  media-type rj45
250 !
251 router ospf 1
252  passive-interface Loopback0
253  network 10.0.0.8 0.0.0.3 area 0
254  network 192.168.0.3 0.0.0.0 area 0
255 !
256 router bgp 1
257  bgp router-id 192.168.0.3
258  bgp log-neighbor-changes
259  neighbor 192.168.0.2 remote-as 1
260  neighbor 192.168.0.2 description iBGP peer iosv-1
261  neighbor 192.168.0.2 update-source Loopback0
262  !
263  address-family ipv4
264   network 192.168.0.3 mask 255.255.255.255
265   neighbor 192.168.0.2 activate
266  exit-address-family
267 !
268 ip forward-protocol nd
269 !
270 !
271 no ip http server
272 no ip http secure-server
273 ip route 10.0.0.5 255.255.255.255 10.0.0.10
274 !
275 !
276 !
277 !
278 control-plane
279 !
280 banner exec `
281 **************************************************************************
282 * IOSv is strictly limited to use for evaluation, demonstration and IOS  *
283 * education. IOSv is provided as-is and is not supported by Cisco's      *
284 * Technical Advisory Center. Any use or disclosure, in whole or in part, *
285 * of the IOSv Software or Documentation to any third party for any       *
286 * purposes is expressly prohibited except as otherwise authorized by     *
287 * Cisco in writing.                                                      *
288 **************************************************************************`
289 banner incoming `
290 **************************************************************************
291 * IOSv is strictly limited to use for evaluation, demonstration and IOS  *
292 * education. IOSv is provided as-is and is not supported by Cisco's      *
293 * Technical Advisory Center. Any use or disclosure, in whole or in part, *
294 * of the IOSv Software or Documentation to any third party for any       *
295 * purposes is expressly prohibited except as otherwise authorized by     *
296 * Cisco in writing.                                                      *
297 **************************************************************************`
298 banner login `
299 **************************************************************************
300 * IOSv is strictly limited to use for evaluation, demonstration and IOS  *
301 * education. IOSv is provided as-is and is not supported by Cisco's      *
302 * Technical Advisory Center. Any use or disclosure, in whole or in part, *
303 * of the IOSv Software or Documentation to any third party for any       *
304 * purposes is expressly prohibited except as otherwise authorized by     *
305 * Cisco in writing.                                                      *
306 **************************************************************************`
307 !
308 line con 0
309  password cisco
310 line aux 0
311 line vty 0 4
312  exec-timeout 720 0
313  password cisco
314  login
315  transport input telnet ssh
316 !
317 no scheduler allocate
318 !
319 end</entry>
320             <entry key="AutoNetkit.mgmt_ip" type="string"></entry>
321         </extensions>
322         <interface id="0" name="GigabitEthernet0/1" ipv4="10.0.0.9" netPrefixLenV4="30"/>
323     </node>
324     <node name="vpp-1" type="SIMPLE" subtype="vPP" location="561,217">
325         <extensions>
326             <entry key="config" type="string">#cloud-config
327 bootcmd:
328 - ln -s -t /etc/rc.d /etc/rc.local
329 hostname: vpp-1
330 manage_etc_hosts: true
331 runcmd:
332 - start ttyS0
333 - systemctl start getty@ttyS0.service
334 - systemctl start rc-local
335 - sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config
336 - echo "UseDNS no" &gt;&gt; /etc/ssh/sshd_config
337 - service ssh restart
338 - service sshd restart
339 - sed -i 's/no-pci//' /cisco/etc/qn.conf
340 - sed -i 's/1024/1024 decimal-interface-names/g' /cisco/etc/qn.conf
341 users:
342 - default
343 - gecos: User configured by VIRL Configuration Engine 0.15.3
344   lock-passwd: false
345   name: cisco
346   plain-text-passwd: cisco
347   shell: /bin/bash
348   ssh-authorized-keys:
349   - VIRL-USER-SSH-PUBLIC-KEY
350   sudo: ALL=(ALL) ALL
351 write_files:
352 - path: /etc/init/ttyS0.conf
353   owner: root:root
354   content: |
355     # ttyS0 - getty
356     # This service maintains a getty on ttyS0 from the point the system is
357     # started until it is shut down again.
358     start on stopped rc or RUNLEVEL=[12345]
359     stop on runlevel [!12345]
360     respawn
361     exec /sbin/getty -L 115200 ttyS0 vt102
362   permissions: '0644'
363 - path: /etc/systemd/system/dhclient@.service
364   content: |
365     [Unit]
366     Description=Run dhclient on %i interface
367     After=network.target
368     [Service]
369     Type=oneshot
370     ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease
371     RemainAfterExit=yes
372   owner: root:root
373   permissions: '0644'
374 - path: /cisco/etc/vpp-server.conf
375   owner: root:root
376   permissions: '0644'
377   content: |-
378     set interface ip address GigabitEthernet0/4/0 10.0.0.6/30
379     set interface state GigabitEthernet0/4/0 up
380     set interface ip address GigabitEthernet0/5/0 10.0.0.10/30
381     set interface state GigabitEthernet0/5/0 up
382 </entry>
383         </extensions>
384         <interface id="0" name="GigabitEthernet0/4/0" ipv4="10.0.0.6" netPrefixLenV4="30"/>
385         <interface id="1" name="GigabitEthernet0/5/0" ipv4="10.0.0.10" netPrefixLenV4="30"/>
386     </node>
387     <connection dst="/virl:topology/virl:node[3]/virl:interface[1]" src="/virl:topology/virl:node[1]/virl:interface[1]"/>
388     <connection dst="/virl:topology/virl:node[2]/virl:interface[1]" src="/virl:topology/virl:node[3]/virl:interface[2]"/>
389 </topology>