blob: 481249f9b16188cb49674589677f6c9b3bce7da5 [file] [log] [blame]
Charles Chan38240872019-10-23 02:05:05 -07001#!/bin/bash
2
3# Select topology to emulate
4TOPO=${TOPO:-trellis}
5ONOS_HOST=${ONOS_HOST:-localhost}
6
7# Resolve ONOS IP
8ONOS_IP=`getent hosts $ONOS_HOSTNAME | awk '{ print $1 }'`
9
10# Start and configure OVS
11# Avoid using Linux service since it will attempt but fail the kernel module check
12/usr/share/openvswitch/scripts/ovs-ctl --no-ovs-vswitchd --no-monitor --system-id=random start
13/usr/sbin/ovs-vswitchd --detach
14ovs-vsctl set Open_vSwitch . other_config:vlan-limit=2
15
16# Push netcfg to ONOS
17cd routing/trellis
18echo ${ONOS_IP}
19head ${TOPO}.json
20onos-netcfg ${ONOS_IP} ${TOPO}.json
21
22# Start mininet
23./${TOPO}.py -c ${ONOS_IP}