Charles Chan | 3824087 | 2019-10-23 02:05:05 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | # Select topology to emulate |
| 4 | TOPO=${TOPO:-trellis} |
| 5 | ONOS_HOST=${ONOS_HOST:-localhost} |
| 6 | |
| 7 | # Resolve ONOS IP |
| 8 | ONOS_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 |
| 14 | ovs-vsctl set Open_vSwitch . other_config:vlan-limit=2 |
| 15 | |
| 16 | # Push netcfg to ONOS |
| 17 | cd routing/trellis |
| 18 | echo ${ONOS_IP} |
| 19 | head ${TOPO}.json |
| 20 | onos-netcfg ${ONOS_IP} ${TOPO}.json |
| 21 | |
| 22 | # Start mininet |
| 23 | ./${TOPO}.py -c ${ONOS_IP} |