Sebastian Rieger
10 years ago
1 changed files with 714 additions and 0 deletions
@ -0,0 +1,714 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> |
||||
|
<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"> |
||||
|
<node name="flat-1" type="ASSET" subtype="FLAT" location="288,78"> |
||||
|
<interface id="0" name="link0"/> |
||||
|
</node> |
||||
|
<node name="iosv-1" type="SIMPLE" subtype="IOSv" location="397,74" ipv4="192.168.0.1"> |
||||
|
<extensions> |
||||
|
<entry key="config" type="string">! |
||||
|
! Last configuration change at 12:23:28 UTC Sat Jun 27 2015 |
||||
|
! |
||||
|
version 15.5 |
||||
|
service timestamps debug datetime msec |
||||
|
service timestamps log datetime msec |
||||
|
no service password-encryption |
||||
|
! |
||||
|
hostname iosv-1 |
||||
|
! |
||||
|
boot-start-marker |
||||
|
boot-end-marker |
||||
|
! |
||||
|
! |
||||
|
enable password cisco |
||||
|
! |
||||
|
no aaa new-model |
||||
|
ethernet lmi ce |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
bsd-client server url https://cloudsso.cisco.com/as/token.oauth2 |
||||
|
mmi polling-interval 60 |
||||
|
no mmi auto-configure |
||||
|
no mmi pvc |
||||
|
mmi snmp-timeout 180 |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
no ip domain lookup |
||||
|
ip cef |
||||
|
ipv6 unicast-routing |
||||
|
ipv6 cef |
||||
|
! |
||||
|
multilink bundle-name authenticated |
||||
|
! |
||||
|
! |
||||
|
cts logging verbose |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
redundancy |
||||
|
! |
||||
|
no cdp run |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
interface Loopback0 |
||||
|
description Loopback |
||||
|
ip address 192.168.0.1 255.255.255.255 |
||||
|
! |
||||
|
interface GigabitEthernet0/0 |
||||
|
description OOB Management |
||||
|
ip address 10.255.0.253 255.255.0.0 |
||||
|
duplex auto |
||||
|
speed auto |
||||
|
media-type rj45 |
||||
|
! |
||||
|
interface GigabitEthernet0/1 |
||||
|
description to iosvl2-3 |
||||
|
ip address 10.0.0.1 255.255.0.0 |
||||
|
ip nat inside |
||||
|
ip virtual-reassembly in |
||||
|
ip ospf cost 1 |
||||
|
duplex auto |
||||
|
speed auto |
||||
|
media-type rj45 |
||||
|
! |
||||
|
interface GigabitEthernet0/2 |
||||
|
description to flat-1 |
||||
|
ip address 172.16.1.148 255.255.255.0 |
||||
|
ip nat outside |
||||
|
ip nat enable |
||||
|
ip virtual-reassembly in |
||||
|
duplex auto |
||||
|
speed auto |
||||
|
media-type rj45 |
||||
|
! |
||||
|
router ospf 1 |
||||
|
passive-interface Loopback0 |
||||
|
network 10.0.0.0 0.0.255.255 area 0 |
||||
|
network 192.168.0.1 0.0.0.0 area 0 |
||||
|
! |
||||
|
ip forward-protocol nd |
||||
|
! |
||||
|
! |
||||
|
no ip http server |
||||
|
no ip http secure-server |
||||
|
ip nat inside source list 1 interface GigabitEthernet0/2 overload |
||||
|
ip default-network 172.16.1.0 |
||||
|
ip route 0.0.0.0 0.0.0.0 172.16.1.1 |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
access-list 1 permit 10.0.0.0 0.0.255.255 |
||||
|
! |
||||
|
control-plane |
||||
|
! |
||||
|
banner exec ` |
||||
|
************************************************************************** |
||||
|
* IOSv is strictly limited to use for evaluation, demonstration and IOS * |
||||
|
* education. IOSv is provided as-is and is not supported by Cisco's * |
||||
|
* Technical Advisory Center. Any use or disclosure, in whole or in part, * |
||||
|
* of the IOSv Software or Documentation to any third party for any * |
||||
|
* purposes is expressly prohibited except as otherwise authorized by * |
||||
|
* Cisco in writing. * |
||||
|
**************************************************************************` |
||||
|
banner incoming ` |
||||
|
************************************************************************** |
||||
|
* IOSv is strictly limited to use for evaluation, demonstration and IOS * |
||||
|
* education. IOSv is provided as-is and is not supported by Cisco's * |
||||
|
* Technical Advisory Center. Any use or disclosure, in whole or in part, * |
||||
|
* of the IOSv Software or Documentation to any third party for any * |
||||
|
* purposes is expressly prohibited except as otherwise authorized by * |
||||
|
* Cisco in writing. * |
||||
|
**************************************************************************` |
||||
|
banner login ` |
||||
|
************************************************************************** |
||||
|
* IOSv is strictly limited to use for evaluation, demonstration and IOS * |
||||
|
* education. IOSv is provided as-is and is not supported by Cisco's * |
||||
|
* Technical Advisory Center. Any use or disclosure, in whole or in part, * |
||||
|
* of the IOSv Software or Documentation to any third party for any * |
||||
|
* purposes is expressly prohibited except as otherwise authorized by * |
||||
|
* Cisco in writing. * |
||||
|
**************************************************************************` |
||||
|
! |
||||
|
line con 0 |
||||
|
password cisco |
||||
|
line aux 0 |
||||
|
line vty 0 4 |
||||
|
exec-timeout 720 0 |
||||
|
password cisco |
||||
|
login |
||||
|
transport input telnet ssh |
||||
|
! |
||||
|
no scheduler allocate |
||||
|
! |
||||
|
end</entry> |
||||
|
<entry key="AutoNetkit.mgmt_ip" type="string"></entry> |
||||
|
</extensions> |
||||
|
<interface id="0" name="GigabitEthernet0/1" ipv4="10.0.0.1" netPrefixLenV4="16"/> |
||||
|
<interface id="1" name="GigabitEthernet0/2"/> |
||||
|
</node> |
||||
|
<node name="iosvl2-1" type="SIMPLE" subtype="IOSvL2" location="251,242"> |
||||
|
<extensions> |
||||
|
<entry key="config" type="string">! |
||||
|
! Last configuration change at 19:34:48 UTC Fri Jun 26 2015 |
||||
|
! |
||||
|
version 15.2 |
||||
|
service timestamps debug datetime msec |
||||
|
service timestamps log datetime msec |
||||
|
no service password-encryption |
||||
|
service compress-config |
||||
|
! |
||||
|
hostname iosvl2-1 |
||||
|
! |
||||
|
boot-start-marker |
||||
|
boot-end-marker |
||||
|
! |
||||
|
! |
||||
|
enable password cisco |
||||
|
! |
||||
|
no aaa new-model |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
no ip domain-lookup |
||||
|
ip cef |
||||
|
no ipv6 cef |
||||
|
! |
||||
|
! |
||||
|
spanning-tree mode pvst |
||||
|
spanning-tree extend system-id |
||||
|
! |
||||
|
vlan internal allocation policy ascending |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
interface Loopback0 |
||||
|
description Loopback |
||||
|
no ip address |
||||
|
! |
||||
|
interface GigabitEthernet0/0 |
||||
|
description Mapped to Vlan1 for management |
||||
|
switchport mode access |
||||
|
media-type rj45 |
||||
|
negotiation auto |
||||
|
! |
||||
|
interface GigabitEthernet0/1 |
||||
|
description to iosvl2-3 |
||||
|
switchport trunk encapsulation dot1q |
||||
|
switchport mode trunk |
||||
|
media-type rj45 |
||||
|
negotiation auto |
||||
|
! |
||||
|
interface GigabitEthernet0/2 |
||||
|
description to server-1 |
||||
|
switchport access vlan 2 |
||||
|
switchport mode access |
||||
|
media-type rj45 |
||||
|
negotiation auto |
||||
|
! |
||||
|
interface Vlan1 |
||||
|
description OOB Management |
||||
|
ip address 10.255.0.252 255.255.0.0 |
||||
|
! |
||||
|
ip forward-protocol nd |
||||
|
! |
||||
|
no ip http server |
||||
|
no ip http secure-server |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
control-plane |
||||
|
! |
||||
|
banner exec ` |
||||
|
************************************************************************** |
||||
|
* IOSv is strictly limited to use for evaluation, demonstration and IOS * |
||||
|
* education. IOSv is provided as-is and is not supported by Cisco's * |
||||
|
* Technical Advisory Center. Any use or disclosure, in whole or in part, * |
||||
|
* of the IOSv Software or Documentation to any third party for any * |
||||
|
* purposes is expressly prohibited except as otherwise authorized by * |
||||
|
* Cisco in writing. * |
||||
|
**************************************************************************` |
||||
|
banner incoming ` |
||||
|
************************************************************************** |
||||
|
* IOSv is strictly limited to use for evaluation, demonstration and IOS * |
||||
|
* education. IOSv is provided as-is and is not supported by Cisco's * |
||||
|
* Technical Advisory Center. Any use or disclosure, in whole or in part, * |
||||
|
* of the IOSv Software or Documentation to any third party for any * |
||||
|
* purposes is expressly prohibited except as otherwise authorized by * |
||||
|
* Cisco in writing. * |
||||
|
**************************************************************************` |
||||
|
banner login ` |
||||
|
************************************************************************** |
||||
|
* IOSv is strictly limited to use for evaluation, demonstration and IOS * |
||||
|
* education. IOSv is provided as-is and is not supported by Cisco's * |
||||
|
* Technical Advisory Center. Any use or disclosure, in whole or in part, * |
||||
|
* of the IOSv Software or Documentation to any third party for any * |
||||
|
* purposes is expressly prohibited except as otherwise authorized by * |
||||
|
* Cisco in writing. * |
||||
|
**************************************************************************` |
||||
|
! |
||||
|
line con 0 |
||||
|
password cisco |
||||
|
line aux 0 |
||||
|
line vty 0 4 |
||||
|
exec-timeout 720 0 |
||||
|
password cisco |
||||
|
login |
||||
|
transport input telnet ssh |
||||
|
! |
||||
|
! |
||||
|
end</entry> |
||||
|
<entry key="AutoNetkit.mgmt_ip" type="string"></entry> |
||||
|
</extensions> |
||||
|
<interface id="0" name="GigabitEthernet0/1"/> |
||||
|
<interface id="1" name="GigabitEthernet0/2"/> |
||||
|
</node> |
||||
|
<node name="iosvl2-2" type="SIMPLE" subtype="IOSvL2" location="517,242"> |
||||
|
<extensions> |
||||
|
<entry key="config" type="string">! |
||||
|
! Last configuration change at 19:34:48 UTC Fri Jun 26 2015 |
||||
|
! |
||||
|
version 15.2 |
||||
|
service timestamps debug datetime msec |
||||
|
service timestamps log datetime msec |
||||
|
no service password-encryption |
||||
|
service compress-config |
||||
|
! |
||||
|
hostname iosvl2-2 |
||||
|
! |
||||
|
boot-start-marker |
||||
|
boot-end-marker |
||||
|
! |
||||
|
! |
||||
|
enable password cisco |
||||
|
! |
||||
|
no aaa new-model |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
no ip domain-lookup |
||||
|
ip cef |
||||
|
no ipv6 cef |
||||
|
! |
||||
|
! |
||||
|
spanning-tree mode pvst |
||||
|
spanning-tree extend system-id |
||||
|
! |
||||
|
vlan internal allocation policy ascending |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
interface Loopback0 |
||||
|
description Loopback |
||||
|
no ip address |
||||
|
! |
||||
|
interface GigabitEthernet0/0 |
||||
|
description Mapped to Vlan1 for management |
||||
|
switchport mode access |
||||
|
media-type rj45 |
||||
|
negotiation auto |
||||
|
! |
||||
|
interface GigabitEthernet0/1 |
||||
|
description to iosvl2-3 |
||||
|
switchport trunk encapsulation dot1q |
||||
|
switchport mode trunk |
||||
|
media-type rj45 |
||||
|
negotiation auto |
||||
|
! |
||||
|
interface GigabitEthernet0/2 |
||||
|
description to server-2 |
||||
|
switchport access vlan 2 |
||||
|
switchport mode access |
||||
|
media-type rj45 |
||||
|
negotiation auto |
||||
|
! |
||||
|
interface Vlan1 |
||||
|
description OOB Management |
||||
|
ip address 10.255.0.247 255.255.0.0 |
||||
|
! |
||||
|
ip forward-protocol nd |
||||
|
! |
||||
|
no ip http server |
||||
|
no ip http secure-server |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
control-plane |
||||
|
! |
||||
|
banner exec ` |
||||
|
************************************************************************** |
||||
|
* IOSv is strictly limited to use for evaluation, demonstration and IOS * |
||||
|
* education. IOSv is provided as-is and is not supported by Cisco's * |
||||
|
* Technical Advisory Center. Any use or disclosure, in whole or in part, * |
||||
|
* of the IOSv Software or Documentation to any third party for any * |
||||
|
* purposes is expressly prohibited except as otherwise authorized by * |
||||
|
* Cisco in writing. * |
||||
|
**************************************************************************` |
||||
|
banner incoming ` |
||||
|
************************************************************************** |
||||
|
* IOSv is strictly limited to use for evaluation, demonstration and IOS * |
||||
|
* education. IOSv is provided as-is and is not supported by Cisco's * |
||||
|
* Technical Advisory Center. Any use or disclosure, in whole or in part, * |
||||
|
* of the IOSv Software or Documentation to any third party for any * |
||||
|
* purposes is expressly prohibited except as otherwise authorized by * |
||||
|
* Cisco in writing. * |
||||
|
**************************************************************************` |
||||
|
banner login ` |
||||
|
************************************************************************** |
||||
|
* IOSv is strictly limited to use for evaluation, demonstration and IOS * |
||||
|
* education. IOSv is provided as-is and is not supported by Cisco's * |
||||
|
* Technical Advisory Center. Any use or disclosure, in whole or in part, * |
||||
|
* of the IOSv Software or Documentation to any third party for any * |
||||
|
* purposes is expressly prohibited except as otherwise authorized by * |
||||
|
* Cisco in writing. * |
||||
|
**************************************************************************` |
||||
|
! |
||||
|
line con 0 |
||||
|
password cisco |
||||
|
line aux 0 |
||||
|
line vty 0 4 |
||||
|
exec-timeout 720 0 |
||||
|
password cisco |
||||
|
login |
||||
|
transport input telnet ssh |
||||
|
! |
||||
|
! |
||||
|
end</entry> |
||||
|
<entry key="AutoNetkit.mgmt_ip" type="string"></entry> |
||||
|
</extensions> |
||||
|
<interface id="0" name="GigabitEthernet0/1"/> |
||||
|
<interface id="1" name="GigabitEthernet0/2"/> |
||||
|
</node> |
||||
|
<node name="iosvl2-3" type="SIMPLE" subtype="IOSvL2" location="391,172"> |
||||
|
<extensions> |
||||
|
<entry key="config" type="string">! |
||||
|
! Last configuration change at 19:34:50 UTC Fri Jun 26 2015 |
||||
|
! |
||||
|
version 15.2 |
||||
|
service timestamps debug datetime msec |
||||
|
service timestamps log datetime msec |
||||
|
no service password-encryption |
||||
|
service compress-config |
||||
|
! |
||||
|
hostname iosvl2-3 |
||||
|
! |
||||
|
boot-start-marker |
||||
|
boot-end-marker |
||||
|
! |
||||
|
! |
||||
|
enable password cisco |
||||
|
! |
||||
|
no aaa new-model |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
no ip domain-lookup |
||||
|
ip cef |
||||
|
no ipv6 cef |
||||
|
! |
||||
|
! |
||||
|
spanning-tree mode pvst |
||||
|
spanning-tree extend system-id |
||||
|
! |
||||
|
vlan internal allocation policy ascending |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
interface Loopback0 |
||||
|
description Loopback |
||||
|
no ip address |
||||
|
! |
||||
|
interface GigabitEthernet0/0 |
||||
|
description Mapped to Vlan1 for management |
||||
|
switchport mode access |
||||
|
media-type rj45 |
||||
|
negotiation auto |
||||
|
! |
||||
|
interface GigabitEthernet0/1 |
||||
|
description to iosvl2-2 |
||||
|
switchport trunk encapsulation dot1q |
||||
|
switchport mode trunk |
||||
|
media-type rj45 |
||||
|
negotiation auto |
||||
|
! |
||||
|
interface GigabitEthernet0/2 |
||||
|
description to iosvl2-1 |
||||
|
switchport trunk encapsulation dot1q |
||||
|
switchport mode trunk |
||||
|
media-type rj45 |
||||
|
negotiation auto |
||||
|
! |
||||
|
interface GigabitEthernet0/3 |
||||
|
description to iosv-1 |
||||
|
switchport access vlan 2 |
||||
|
switchport mode access |
||||
|
media-type rj45 |
||||
|
negotiation auto |
||||
|
! |
||||
|
interface Vlan1 |
||||
|
description OOB Management |
||||
|
ip address 10.255.0.250 255.255.0.0 |
||||
|
! |
||||
|
ip forward-protocol nd |
||||
|
! |
||||
|
no ip http server |
||||
|
no ip http secure-server |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
! |
||||
|
control-plane |
||||
|
! |
||||
|
banner exec ` |
||||
|
************************************************************************** |
||||
|
* IOSv is strictly limited to use for evaluation, demonstration and IOS * |
||||
|
* education. IOSv is provided as-is and is not supported by Cisco's * |
||||
|
* Technical Advisory Center. Any use or disclosure, in whole or in part, * |
||||
|
* of the IOSv Software or Documentation to any third party for any * |
||||
|
* purposes is expressly prohibited except as otherwise authorized by * |
||||
|
* Cisco in writing. * |
||||
|
**************************************************************************` |
||||
|
banner incoming ` |
||||
|
************************************************************************** |
||||
|
* IOSv is strictly limited to use for evaluation, demonstration and IOS * |
||||
|
* education. IOSv is provided as-is and is not supported by Cisco's * |
||||
|
* Technical Advisory Center. Any use or disclosure, in whole or in part, * |
||||
|
* of the IOSv Software or Documentation to any third party for any * |
||||
|
* purposes is expressly prohibited except as otherwise authorized by * |
||||
|
* Cisco in writing. * |
||||
|
**************************************************************************` |
||||
|
banner login ` |
||||
|
************************************************************************** |
||||
|
* IOSv is strictly limited to use for evaluation, demonstration and IOS * |
||||
|
* education. IOSv is provided as-is and is not supported by Cisco's * |
||||
|
* Technical Advisory Center. Any use or disclosure, in whole or in part, * |
||||
|
* of the IOSv Software or Documentation to any third party for any * |
||||
|
* purposes is expressly prohibited except as otherwise authorized by * |
||||
|
* Cisco in writing. * |
||||
|
**************************************************************************` |
||||
|
! |
||||
|
line con 0 |
||||
|
password cisco |
||||
|
line aux 0 |
||||
|
line vty 0 4 |
||||
|
exec-timeout 720 0 |
||||
|
password cisco |
||||
|
login |
||||
|
transport input telnet ssh |
||||
|
! |
||||
|
! |
||||
|
end</entry> |
||||
|
<entry key="AutoNetkit.mgmt_ip" type="string"></entry> |
||||
|
</extensions> |
||||
|
<interface id="0" name="GigabitEthernet0/1"/> |
||||
|
<interface id="1" name="GigabitEthernet0/2"/> |
||||
|
<interface id="2" name="GigabitEthernet0/3"/> |
||||
|
</node> |
||||
|
<node name="server-1" type="SIMPLE" subtype="server" location="251,336"> |
||||
|
<extensions> |
||||
|
<entry key="config" type="String">#cloud-config
 |
||||
|
bootcmd:
 |
||||
|
- ln -s -t /etc/rc.d /etc/rc.local
 |
||||
|
hostname: server-1
 |
||||
|
manage_etc_hosts: true
 |
||||
|
runcmd:
 |
||||
|
- start ttyS0
 |
||||
|
- systemctl start getty@ttyS0.service
 |
||||
|
- systemctl start rc-local
 |
||||
|
- sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config
 |
||||
|
- echo "UseDNS no" >> /etc/ssh/sshd_config
 |
||||
|
- service ssh restart
 |
||||
|
- service sshd restart
 |
||||
|
users:
 |
||||
|
- default
 |
||||
|
- gecos: User configured by VIRL Configuration Engine 0.15.8
 |
||||
|
lock-passwd: false
 |
||||
|
name: cisco
 |
||||
|
plain-text-passwd: cisco
 |
||||
|
shell: /bin/bash
 |
||||
|
ssh-authorized-keys:
 |
||||
|
- VIRL-USER-SSH-PUBLIC-KEY
 |
||||
|
sudo: ALL=(ALL) ALL
 |
||||
|
write_files:
 |
||||
|
- path: /etc/init/ttyS0.conf
 |
||||
|
owner: root:root
 |
||||
|
content: |
 |
||||
|
# ttyS0 - getty
 |
||||
|
# This service maintains a getty on ttyS0 from the point the system is
 |
||||
|
# started until it is shut down again.
 |
||||
|
start on stopped rc or RUNLEVEL=[12345]
 |
||||
|
stop on runlevel [!12345]
 |
||||
|
respawn
 |
||||
|
exec /sbin/getty -L 115200 ttyS0 vt102
 |
||||
|
permissions: '0644'
 |
||||
|
- path: /etc/systemd/system/dhclient@.service
 |
||||
|
content: |
 |
||||
|
[Unit]
 |
||||
|
Description=Run dhclient on %i interface
 |
||||
|
After=network.target
 |
||||
|
[Service]
 |
||||
|
Type=oneshot
 |
||||
|
ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease
 |
||||
|
RemainAfterExit=yes
 |
||||
|
owner: root:root
 |
||||
|
permissions: '0644'
 |
||||
|
- path: /etc/rc.local
 |
||||
|
owner: root:root
 |
||||
|
permissions: '0755'
 |
||||
|
content: |-
 |
||||
|
#!/bin/sh -e
 |
||||
|
ifconfig eth1 up 10.0.0.2 netmask 255.255.0.0
 |
||||
|
route add -net 10.0.0.0/16 gw 10.0.0.1 dev eth1
 |
||||
|
route add -net 192.168.0.0/29 gw 10.0.0.1 dev eth1
 |
||||
|
route del default
 |
||||
|
route add default gw 10.0.0.1
 |
||||
|
route del -net 10.0.0.0 netmask 255.255.0.0 gw 10.0.0.1
 |
||||
|
exit 0
 |
||||
|
</entry> |
||||
|
</extensions> |
||||
|
<interface id="0" name="eth1" ipv4="10.0.0.2" netPrefixLenV4="16"/> |
||||
|
</node> |
||||
|
<node name="server-2" type="SIMPLE" subtype="server" location="517,336"> |
||||
|
<extensions> |
||||
|
<entry key="config" type="String">#cloud-config
 |
||||
|
bootcmd:
 |
||||
|
- ln -s -t /etc/rc.d /etc/rc.local
 |
||||
|
hostname: server-2
 |
||||
|
manage_etc_hosts: true
 |
||||
|
runcmd:
 |
||||
|
- start ttyS0
 |
||||
|
- systemctl start getty@ttyS0.service
 |
||||
|
- systemctl start rc-local
 |
||||
|
- sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config
 |
||||
|
- echo "UseDNS no" >> /etc/ssh/sshd_config
 |
||||
|
- service ssh restart
 |
||||
|
- service sshd restart
 |
||||
|
users:
 |
||||
|
- default
 |
||||
|
- gecos: User configured by VIRL Configuration Engine 0.15.8
 |
||||
|
lock-passwd: false
 |
||||
|
name: cisco
 |
||||
|
plain-text-passwd: cisco
 |
||||
|
shell: /bin/bash
 |
||||
|
ssh-authorized-keys:
 |
||||
|
- VIRL-USER-SSH-PUBLIC-KEY
 |
||||
|
sudo: ALL=(ALL) ALL
 |
||||
|
write_files:
 |
||||
|
- path: /etc/init/ttyS0.conf
 |
||||
|
owner: root:root
 |
||||
|
content: |
 |
||||
|
# ttyS0 - getty
 |
||||
|
# This service maintains a getty on ttyS0 from the point the system is
 |
||||
|
# started until it is shut down again.
 |
||||
|
start on stopped rc or RUNLEVEL=[12345]
 |
||||
|
stop on runlevel [!12345]
 |
||||
|
respawn
 |
||||
|
exec /sbin/getty -L 115200 ttyS0 vt102
 |
||||
|
permissions: '0644'
 |
||||
|
- path: /etc/systemd/system/dhclient@.service
 |
||||
|
content: |
 |
||||
|
[Unit]
 |
||||
|
Description=Run dhclient on %i interface
 |
||||
|
After=network.target
 |
||||
|
[Service]
 |
||||
|
Type=oneshot
 |
||||
|
ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease
 |
||||
|
RemainAfterExit=yes
 |
||||
|
owner: root:root
 |
||||
|
permissions: '0644'
 |
||||
|
- path: /etc/rc.local
 |
||||
|
owner: root:root
 |
||||
|
permissions: '0755'
 |
||||
|
content: |-
 |
||||
|
#!/bin/sh -e
 |
||||
|
ifconfig eth1 up 10.0.0.3 netmask 255.255.0.0
 |
||||
|
route add -net 10.0.0.0/16 gw 10.0.0.1 dev eth1
 |
||||
|
route add -net 192.168.0.0/29 gw 10.0.0.1 dev eth1
 |
||||
|
route del default
 |
||||
|
route add default gw 10.0.0.1
 |
||||
|
route del -net 10.0.0.0 netmask 255.255.0.0 gw 10.0.0.1
 |
||||
|
exit 0
 |
||||
|
</entry> |
||||
|
</extensions> |
||||
|
<interface id="0" name="eth1" ipv4="10.0.0.3" netPrefixLenV4="16"/> |
||||
|
</node> |
||||
|
<connection dst="/virl:topology/virl:node[5]/virl:interface[1]" src="/virl:topology/virl:node[4]/virl:interface[1]"/> |
||||
|
<connection dst="/virl:topology/virl:node[3]/virl:interface[1]" src="/virl:topology/virl:node[5]/virl:interface[2]"/> |
||||
|
<connection dst="/virl:topology/virl:node[2]/virl:interface[1]" src="/virl:topology/virl:node[5]/virl:interface[3]"/> |
||||
|
<connection dst="/virl:topology/virl:node[1]/virl:interface[1]" src="/virl:topology/virl:node[2]/virl:interface[2]"/> |
||||
|
<connection dst="/virl:topology/virl:node[3]/virl:interface[2]" src="/virl:topology/virl:node[6]/virl:interface[1]"/> |
||||
|
<connection dst="/virl:topology/virl:node[7]/virl:interface[1]" src="/virl:topology/virl:node[4]/virl:interface[2]"/> |
||||
|
</topology> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue