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.
|
|
<?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"> <extensions> <entry key="management_network" type="String">exclusive</entry> </extensions> <node name="cumulusvx-1" type="SIMPLE" subtype="CumulusVX" location="386,146"> <extensions> <entry key="config" type="String">#!/bin/bash
 
 # vars
 IP="10.0.0.1"
 HOSTNAME="cumulusvx-1"
 
 # test touch
 touch /tmp/cumulusvx-config
 
 # add VIRL user
 useradd -m cisco -s /bin/bash
 echo "cisco:cisco" | chpasswd
 addgroup cisco sudo
 
 # set hostname
 echo "$IP $HOSTNAME" >>/etc/hosts
 echo "$HOSTNAME" >/etc/hostname
 hostname $HOSTNAME
 
 # add network interface config
 cat << EOF >>/etc/network/interfaces
 
 auto lo:1
 iface lo:1
 address $IP/32
 
 auto swp1
 iface swp1
 address $IP/32
 
 auto swp2
 iface swp2
 address $IP/32
 EOF
 
 ifup -a
 
 # add ospf daemon to quagga
 sed -i.bak -e s/"ospfd=no"/"ospfd=yes"/g /etc/quagga/daemons
 sed -i.bak -e s/"zebra=no"/"zebra=yes"/g /etc/quagga/daemons
 service quagga restart
 
 # add quagga config
 cat << EOF > /etc/quagga/Quagga.conf
 hostname $HOSTNAME
 log file /var/log/quagga/ospfd.log
 log timestamp precision 6
 username cumulus nopassword
 !
 service integrated-vtysh-config
 !
 password cn321
 enable password cn321
 !
 interface swp1
 ip ospf network point-to-point
 !
 interface swp2
 ip ospf network point-to-point
 !
 router ospf
 ospf router-id $IP
 network $IP/32 area 0.0.0.0
 !
 line vty
 !
 EOF
 
 service quagga restart</entry> </extensions> <interface id="0" name="swp1"/> <interface id="1" name="swp2"/> </node> <node name="cumulusvx-2" type="SIMPLE" subtype="CumulusVX" location="629,146"> <extensions> <entry key="config" type="String">#!/bin/bash
 
 # vars
 IP="10.0.0.2"
 HOSTNAME="cumulusvx-2"
 
 # test touch
 touch /tmp/cumulusvx-config
 
 # add VIRL user
 useradd -m cisco -s /bin/bash
 echo "cisco:cisco" | chpasswd
 addgroup cisco sudo
 
 # set hostname
 echo "$IP $HOSTNAME" >>/etc/hosts
 echo "$HOSTNAME" >/etc/hostname
 hostname $HOSTNAME
 
 # add network interface config
 cat << EOF >>/etc/network/interfaces
 
 auto lo:1
 iface lo:1
 address $IP/32
 
 auto swp1
 iface swp1
 address $IP/32
 
 auto swp2
 iface swp2
 address $IP/32
 EOF
 
 ifup -a
 
 # add ospf daemon to quagga
 sed -i.bak -e s/"ospfd=no"/"ospfd=yes"/g /etc/quagga/daemons
 sed -i.bak -e s/"zebra=no"/"zebra=yes"/g /etc/quagga/daemons
 service quagga restart
 
 # add quagga config
 cat << EOF > /etc/quagga/Quagga.conf
 hostname $HOSTNAME
 log file /var/log/quagga/ospfd.log
 log timestamp precision 6
 username cumulus nopassword
 !
 service integrated-vtysh-config
 !
 password cn321
 enable password cn321
 !
 interface swp1
 ip ospf network point-to-point
 !
 interface swp2
 ip ospf network point-to-point
 !
 router ospf
 ospf router-id $IP
 network $IP/32 area 0.0.0.0
 !
 line vty
 !
 EOF
 
 service quagga restart</entry> </extensions> <interface id="0" name="swp1"/> <interface id="1" name="swp2"/> </node> <node name="cumulusvx-3" type="SIMPLE" subtype="CumulusVX" location="629,275"> <extensions> <entry key="config" type="String">#!/bin/bash
 
 # vars
 IP="10.0.0.3"
 LEAF_IP="10.21.0.1"
 HOSTNAME="cumulusvx-3"
 
 # test touch
 touch /tmp/cumulusvx-config
 
 # add VIRL user
 useradd -m cisco -s /bin/bash
 echo "cisco:cisco" | chpasswd
 addgroup cisco sudo
 
 # set hostname
 echo "$IP $HOSTNAME" >>/etc/hosts
 echo "$HOSTNAME" >/etc/hostname
 hostname $HOSTNAME
 
 # add network interface config
 cat << EOF >>/etc/network/interfaces
 
 auto lo:1
 iface lo:1
 address $IP/32
 
 auto lo:2
 iface lo:2
 address $LEAF_IP/24
 
 auto swp1
 iface swp1
 address $IP/32
 
 auto swp2
 iface swp2
 address $IP/32
 EOF
 
 ifup -a
 
 # add ospf daemon to quagga
 sed -i.bak -e s/"ospfd=no"/"ospfd=yes"/g /etc/quagga/daemons
 sed -i.bak -e s/"zebra=no"/"zebra=yes"/g /etc/quagga/daemons
 service quagga restart
 
 # add quagga config
 cat << EOF > /etc/quagga/Quagga.conf
 hostname $HOSTNAME
 log file /var/log/quagga/ospfd.log
 log timestamp precision 6
 username cumulus nopassword
 !
 service integrated-vtysh-config
 !
 password cn321
 enable password cn321
 !
 interface swp1
 ip ospf network point-to-point
 !
 interface swp2
 ip ospf network point-to-point
 !
 router ospf
 ospf router-id $IP
 network $IP/32 area 0.0.0.0
 network $LEAF_IP/24 area 0.0.0.0
 !
 line vty
 !
 EOF
 
 service quagga restart</entry> </extensions> <interface id="0" name="swp1"/> <interface id="1" name="swp2"/> </node> <node name="cumulusvx-4" type="SIMPLE" subtype="CumulusVX" location="386,275"> <extensions> <entry key="config" type="String">#!/bin/bash
 
 # vars
 IP="10.0.0.4"
 LEAF_IP="10.11.0.1"
 HOSTNAME="cumulusvx-4"
 
 # test touch
 touch /tmp/cumulusvx-config
 
 # add VIRL user
 useradd -m cisco -s /bin/bash
 echo "cisco:cisco" | chpasswd
 addgroup cisco sudo
 
 # set hostname
 echo "$IP $HOSTNAME" >>/etc/hosts
 echo "$HOSTNAME" >/etc/hostname
 hostname $HOSTNAME
 
 # add network interface config
 cat << EOF >>/etc/network/interfaces
 
 auto lo:1
 iface lo:1
 address $IP/32
 
 auto lo:2
 iface lo:2
 address $LEAF_IP/24
 
 auto swp1
 iface swp1
 address $IP/32
 
 auto swp2
 iface swp2
 address $IP/32
 EOF
 
 ifup -a
 
 # add ospf daemon to quagga
 sed -i.bak -e s/"ospfd=no"/"ospfd=yes"/g /etc/quagga/daemons
 sed -i.bak -e s/"zebra=no"/"zebra=yes"/g /etc/quagga/daemons
 service quagga restart
 
 # add quagga config
 cat << EOF > /etc/quagga/Quagga.conf
 hostname $HOSTNAME
 log file /var/log/quagga/ospfd.log
 log timestamp precision 6
 username cumulus nopassword
 !
 service integrated-vtysh-config
 !
 password cn321
 enable password cn321
 !
 interface swp1
 ip ospf network point-to-point
 !
 interface swp2
 ip ospf network point-to-point
 !
 router ospf
 ospf router-id $IP
 network $IP/32 area 0.0.0.0
 network $LEAF_IP/24 area 0.0.0.0
 !
 line vty
 !
 EOF
 
 service quagga restart</entry> </extensions> <interface id="0" name="swp1"/> <interface id="1" name="swp2"/> </node> <connection dst="/virl:topology/virl:node[4]/virl:interface[1]" src="/virl:topology/virl:node[1]/virl:interface[1]"/> <connection dst="/virl:topology/virl:node[3]/virl:interface[1]" src="/virl:topology/virl:node[1]/virl:interface[2]"/> <connection dst="/virl:topology/virl:node[3]/virl:interface[2]" src="/virl:topology/virl:node[2]/virl:interface[1]"/> <connection dst="/virl:topology/virl:node[4]/virl:interface[2]" src="/virl:topology/virl:node[2]/virl:interface[2]"/> </topology>
|