2
ifconfig | grep onos_port
17
echo "create br-ex with ${external_port} in computer node"
18
sudo ovs-vsctl add-br br-ex
19
sudo ovs-vsctl add-port br-ex ${external_port}
22
echo "ready to create onos_port"
23
sudo ip link add onos_port1 type veth peer name onos_port2
24
sudo ifconfig onos_port1 up
25
sudo ifconfig onos_port2 up
27
external_mac=$(ifconfig ${external_port} | \
28
grep -Eo "[0-9a-f\]+:[0-9a-f\]+:[0-9a-f\]+:[0-9a-f\]+:[0-9a-f\]+:[0-9a-f\]+")
30
sudo ifconfig onos_port2 hw ether ${external_mac}
31
sudo ovs-vsctl add-port br-ex onos_port1
33
echo "onos_port already exist"