Created
September 20, 2016 05:35
-
-
Save yuuichi-fujioka/671b92dd2e2cb6d8e092246d9072ba19 to your computer and use it in GitHub Desktop.
inject port to neutron
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# tenant user | |
neutron port-create ${NET_NAME} --name my_port | |
# run on ovs-agent node | |
PORT_ADDR=$(...) | |
PORT_ID=$(neutron port-show my_port | awk '/ id /{print $4}') | |
PORT_MAC=$(neutron port-show my_port | awk '/ mac_address /{print $4}') | |
sudo ovs-vsctl add-port br-int injected_port -- set interface injected_port type=internal 'external_ids={attached-mac="'${PORT_MAC}'", iface-id="'${PORT_ID}'", iface-status=active}' | |
sudo ip link set up injected_port | |
sudo ip addr add ${PORT_ADDR} dev injected_port | |
# admin user | |
neutron port-update --name my_port --bind:host_id=${name_of_the_node} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment