A R Karthick | b7e8090 | 2016-05-17 09:38:31 -0700 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | dpid=${1:-001122334455} |
| 3 | num_ports=${2:-200} |
| 4 | controller=${3:-$ONOS_CONTROLLER_IP} |
| 5 | num_ports=$(($num_ports-1)) |
| 6 | my_ip=`ifconfig eth0 | grep "inet addr" | tr -s ' ' | cut -d":" -f2 |cut -d" " -f1` |
| 7 | if_list="veth1" |
| 8 | for port in $(seq 3 2 $num_ports); do |
| 9 | if_list="$if_list"",""veth$port" |
| 10 | done |
| 11 | service openvswitch-switch stop |
| 12 | nohup ofdatapath --no-slicing --datapath-id=$dpid --interfaces=$if_list ptcp:6653 2>&1 >/tmp/nohup.out & |
| 13 | nohup ofprotocol tcp:$my_ip:6653 tcp:$controller:6633 2>&1 >/tmp/nohup.out & |