Skip to content

Instantly share code, notes, and snippets.

@aweiteka
Last active December 21, 2015 21:39
Show Gist options
  • Save aweiteka/6369724 to your computer and use it in GitHub Desktop.
Save aweiteka/6369724 to your computer and use it in GitHub Desktop.
openstack network commands
#!/usr/bin/env bash
# commands to run after packstack install with quantum ovs plugin
# see docs: https://access.redhat.com/site/documentation/en-US/Red_Hat_OpenStack/3/html-single/Getting_Started_Guide/index.html#sect-Working_with_Quantum_Networking
ovs-vsctl show
quantum net-create ext-net --router:external True --provider:network_type vlan --provider:physical_network physnet1 --provider:segmentation_id 140
quantum net-list
# 'ext-net' provider name from previous step. range must not include gateway but cider range must include gateway
quantum subnet-create --gateway 10.16.3.254 --allocation-pool start=10.16.0.1,end=10.16.0.254 --disable-dhcp ext-net 10.16.0.0/22
quantum router-create quantum_router1
quantum net-list
quantum net-show ext-net
quantum router-list
quantum router-gateway-set 28db346e-94cb-4348-b23b-c343377481ea 5e5120f1-9abd-48f0-b980-d7db1e2e9b12
quantum subnet-list
quantum router-list
# not working: Bad router request: Router already has a port on subnet 8e7f9022-dd60-474b-b820-6e098c1e1449
# which subnet? see https://bugzilla.redhat.com/show_bug.cgi?id=987711
# maybe covered later as "this this step is likely done as part of provisioning each new tenant's private network."
#quantum router-interface-add ROUTER SUBNET
###
# no output. hmm...
nova list
quantum port-list
quantum floatingip-create ext-net
nova-manage floating create 10.16.0.0/24
nova floating-ip-create
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment