blob: 98fe8b99bf24852207b612e8e2b01cc33bcf35aa [file] [log] [blame]
Andrea Campanella19090322017-08-22 10:31:37 +02001#!/bin/bash
2# -----------------------------------------------------------------------------
3# Creates a replica of the GEANT topology using ONOS null provider
4# -----------------------------------------------------------------------------
5
6# config
7host=${1:-localhost}
8nports=24
9sleepfor=5
10
11
12# start custom simulation..
13onos ${host} null-simulation start custom
14
15
16## unfortunately, it takes a time for the sim to start up
17# this is not ideal...
18
19echo
20echo "Sleeping while sim starts up... (${sleepfor} seconds)..."
21echo
22sleep ${sleepfor}
23
24# Add devices, links, and hosts
25onos ${1:-localhost} <<-EOF
26
27null-create-device switch ATH ${nports} 37.984149 23.7279843
28null-create-device switch LIS ${nports} 38.707792 -9.1365069
29
30
31null-create-link direct ATH LIS
32null-create-link direct LIS ATH
33
34null-create-host ATH 192.168.1.1 34.984149 24.7279843
35null-create-host LIS 192.168.1.2 37.707792 -7.1365069
36
37EOF