Sebastian Rieger
9 years ago
1 changed files with 244 additions and 0 deletions
@ -0,0 +1,244 @@ |
|||||
|
<?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="client" type="SIMPLE" subtype="server" location="387,214" ipv4="10.10.20.10"> |
||||
|
<extensions> |
||||
|
<entry key="config" type="String">#cloud-config
 |
||||
|
bootcmd:
 |
||||
|
- ln -s -t /etc/rc.d /etc/rc.local
 |
||||
|
hostname: client
 |
||||
|
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.10.20.10 netmask 255.255.255.0
 |
||||
|
exit 0
 |
||||
|
</entry> |
||||
|
</extensions> |
||||
|
<interface id="0" name="eth1" ipv4="10.0.0.9" netPrefixLenV4="30"/> |
||||
|
</node> |
||||
|
<node name="server" type="SIMPLE" subtype="server" location="673,214" ipv4="10.10.20.20"> |
||||
|
<extensions> |
||||
|
<entry key="config" type="String">#cloud-config
 |
||||
|
bootcmd:
 |
||||
|
- ln -s -t /etc/rc.d /etc/rc.local
 |
||||
|
hostname: server
 |
||||
|
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.10.20.20 netmask 255.255.255.0
 |
||||
|
exit 0
 |
||||
|
</entry> |
||||
|
</extensions> |
||||
|
<interface id="0" name="eth1" ipv4="10.0.0.5" netPrefixLenV4="30"/> |
||||
|
</node> |
||||
|
<node name="controller" type="SIMPLE" subtype="server" location="506,54" ipv4="10.10.10.254"> |
||||
|
<extensions> |
||||
|
<entry key="config" type="String">#cloud-config
 |
||||
|
bootcmd:
 |
||||
|
- ln -s -t /etc/rc.d /etc/rc.local
 |
||||
|
hostname: controller
 |
||||
|
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.10.10.254 netmask 255.255.255.0
 |
||||
|
ifconfig eth2 up
 |
||||
|
dhclient -nw eth2
 |
||||
|
systemctl start dhclient@eth2.service
 |
||||
|
route del -net default
 |
||||
|
route add -net default gw 172.16.1.254
 |
||||
|
exit 0
 |
||||
|
</entry> |
||||
|
</extensions> |
||||
|
<interface id="0" name="eth1" ipv4="10.0.0.13" netPrefixLenV4="30"/> |
||||
|
<interface id="1" name="eth2"/> |
||||
|
</node> |
||||
|
<node name="veos-1" type="SIMPLE" subtype="vEOS" location="514,148"> |
||||
|
<extensions> |
||||
|
<entry key="Auto-generate config" type="Boolean">false</entry> |
||||
|
<entry key="config" type="String">! Command: show running-config
 |
||||
|
! device: vEOS-1 (vEOS, EOS-4.14.2F)
 |
||||
|
!
 |
||||
|
! boot system flash:/vEOS.swi
 |
||||
|
!
 |
||||
|
! AdvCompNet Lab 2 SDN
 |
||||
|
!
 |
||||
|
transceiver qsfp default-mode 4x10G
 |
||||
|
!
 |
||||
|
hostname vEOS-1
 |
||||
|
!
 |
||||
|
openflow
 |
||||
|
description SDN-OpenFlow-Lab
 |
||||
|
controller tcp:10.10.10.254:6633
 |
||||
|
bind interface Ethernet1
 |
||||
|
bind interface Ethernet2
 |
||||
|
!
 |
||||
|
spanning-tree mode mstp
 |
||||
|
!
 |
||||
|
no aaa root
 |
||||
|
!
 |
||||
|
username admin privilege 15 role network-admin secret 5 $1$S4W0XejC$69vFakMKc/k9N.nrrTiIY/
 |
||||
|
username cisco privilege 15 role network-admin secret 5 $1$rQS0W9wP$ZUzVG2XoGCCZCJopFp1aV/
 |
||||
|
!
 |
||||
|
vlan 10
 |
||||
|
!
 |
||||
|
interface Ethernet1
 |
||||
|
!
 |
||||
|
interface Ethernet2
 |
||||
|
!
 |
||||
|
interface Ethernet3
 |
||||
|
switchport access vlan 10
 |
||||
|
!
 |
||||
|
interface Management1
 |
||||
|
! ip of ma1 configured on launch
 |
||||
|
!
 |
||||
|
interface Vlan10
 |
||||
|
ip address 10.10.10.253/24
 |
||||
|
!
 |
||||
|
no ip routing
 |
||||
|
!
 |
||||
|
!
 |
||||
|
end</entry> |
||||
|
</extensions> |
||||
|
<interface id="0" name="Ethernet1" ipv4="10.0.0.10" netPrefixLenV4="30"/> |
||||
|
<interface id="1" name="Ethernet2" ipv4="10.0.0.6" netPrefixLenV4="30"/> |
||||
|
<interface id="2" name="Ethernet3" ipv4="10.0.0.14" netPrefixLenV4="30"/> |
||||
|
</node> |
||||
|
<node name="flat-1" type="ASSET" subtype="FLAT" location="411,38"> |
||||
|
<interface id="0" name="link0"/> |
||||
|
</node> |
||||
|
<connection dst="/virl:topology/virl:node[1]/virl:interface[1]" src="/virl:topology/virl:node[4]/virl:interface[1]"/> |
||||
|
<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[3]/virl:interface[1]" src="/virl:topology/virl:node[4]/virl:interface[3]"/> |
||||
|
<connection dst="/virl:topology/virl:node[5]/virl:interface[1]" src="/virl:topology/virl:node[3]/virl:interface[2]"/> |
||||
|
</topology> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue