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.

156 lines
5.5 KiB

<?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" simulationEngine="OPENSTACK" xsi:schemaLocation="http://www.cisco.com/VIRL https://raw.github.com/CiscoVIRL/schema/v0.9/virl.xsd">
<node name="lxc-iperf-1" type="SIMPLE" subtype="lxc-iperf" location="235,162">
<extensions>
<entry key="config" type="string"> </entry>
</extensions>
<interface id="0" name="eth1" ipv4="10.0.0.6" netPrefixLenV4="30"/>
</node>
<node name="lxc-iperf-2" type="SIMPLE" subtype="lxc-iperf" location="785,162">
<extensions>
<entry key="config" type="string"> </entry>
</extensions>
<interface id="0" name="eth1" ipv4="10.0.0.14" netPrefixLenV4="30"/>
</node>
<node name="VPN-Gateway1" type="SIMPLE" subtype="server" location="374,162">
<extensions>
<entry key="config" type="String">#cloud-config&#xD;
bootcmd:&#xD;
- ln -s -t /etc/rc.d /etc/rc.local&#xD;
hostname: VPN-Gateway1&#xD;
manage_etc_hosts: true&#xD;
runcmd:&#xD;
- start ttyS0&#xD;
- systemctl start getty@ttyS0.service&#xD;
- systemctl start rc-local&#xD;
- sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config&#xD;
- echo "UseDNS no" &gt;&gt; /etc/ssh/sshd_config&#xD;
- service ssh restart&#xD;
- service sshd restart&#xD;
users:&#xD;
- default&#xD;
- gecos: User configured by VIRL Configuration Engine 0.18.10&#xD;
lock-passwd: false&#xD;
name: cisco&#xD;
plain-text-passwd: cisco&#xD;
shell: /bin/bash&#xD;
ssh-authorized-keys:&#xD;
- VIRL-USER-SSH-PUBLIC-KEY&#xD;
sudo: ALL=(ALL) ALL&#xD;
write_files:&#xD;
- path: /etc/init/ttyS0.conf&#xD;
owner: root:root&#xD;
content: |&#xD;
# ttyS0 - getty&#xD;
# This service maintains a getty on ttyS0 from the point the system is&#xD;
# started until it is shut down again.&#xD;
start on stopped rc or RUNLEVEL=[12345]&#xD;
stop on runlevel [!12345]&#xD;
respawn&#xD;
exec /sbin/getty -L 115200 ttyS0 vt102&#xD;
permissions: '0644'&#xD;
- path: /etc/systemd/system/dhclient@.service&#xD;
content: |&#xD;
[Unit]&#xD;
Description=Run dhclient on %i interface&#xD;
After=network.target&#xD;
[Service]&#xD;
Type=oneshot&#xD;
ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease&#xD;
RemainAfterExit=yes&#xD;
owner: root:root&#xD;
permissions: '0644'&#xD;
- path: /etc/rc.local&#xD;
owner: root:root&#xD;
permissions: '0755'&#xD;
content: |-&#xD;
#!/bin/sh -e&#xD;
ifconfig eth1 down&#xD;
ifconfig eth2 up 10.0.0.5 netmask 255.255.255.252&#xD;
ifconfig eth3 up&#xD;
dhclient -nw eth3&#xD;
systemctl start dhclient@eth3.service&#xD;
sleep 5&#xD;
apt-get update&#xD;
apt-get install openvpn&#xD;
exit 0&#xD;
</entry>
</extensions>
<interface id="0" name="eth1"/>
<interface id="1" name="eth2" ipv4="10.0.0.5" netPrefixLenV4="30"/>
<interface id="2" name="eth3"/>
</node>
<node name="VPN-Gateway2" type="SIMPLE" subtype="server" location="592,162">
<extensions>
<entry key="config" type="string">#cloud-config
bootcmd:
- ln -s -t /etc/rc.d /etc/rc.local
hostname: VPN-Gateway2
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" &gt;&gt; /etc/ssh/sshd_config
- service ssh restart
- service sshd restart
users:
- default
- gecos: User configured by VIRL Configuration Engine 0.18.10
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 down
ifconfig eth2 up 10.0.0.13 netmask 255.255.255.252
ifconfig eth3 up
dhclient -nw eth3
systemctl start dhclient@eth3.service
exit 0
</entry>
</extensions>
<interface id="0" name="eth1"/>
<interface id="1" name="eth2" ipv4="10.0.0.13" netPrefixLenV4="30"/>
<interface id="2" name="eth3"/>
</node>
<node name="flat-1" type="ASSET" subtype="FLAT" location="498,126">
<interface id="0" name="link0"/>
<interface id="1" name="link1"/>
</node>
<connection dst="/virl:topology/virl:node[1]/virl:interface[1]" src="/virl:topology/virl:node[3]/virl:interface[2]"/>
<connection dst="/virl:topology/virl:node[2]/virl:interface[1]" src="/virl:topology/virl:node[4]/virl:interface[2]"/>
<connection dst="/virl:topology/virl:node[5]/virl:interface[1]" src="/virl:topology/virl:node[3]/virl:interface[3]"/>
<connection dst="/virl:topology/virl:node[5]/virl:interface[2]" src="/virl:topology/virl:node[4]/virl:interface[3]"/>
</topology>