Atom feed of this document
 

 Common L3 Workflow

Create external networks (admin-only)

quantum net-create public --router:external=True
quantum subnet-create public 172.16.1.0/24 

Viewing external networks:

quantum net-list -- --router:external=True

Creating routers

Internal-only router to connect multiple L2 networks privately. 

quantum net-create net1
quantum subnet-create net1 10.0.0.0/24
quantum net-create net2
quantum subnet-create net2 10.0.1.0/24
quantum router-create router1
quantum router-interface-add router1 <subnet1-uuid>
quantum router-interface-add router1 <subnet2-uuid>

The router will get an interface with the gateway_ip address of the subnet, and this interface will be attached to a port on the L2 Quantum network associated with the subnet. The router will also get an gateway interface to the specified external network.  This will provide SNAT connectivity to the external network as well as support for floating IPs allocated on that external networks (see below).  Commonly an external network maps to a network in the provider

A router can also be connected to an “external network”, allowing that router to act as a NAT gateway for external connectivity. 

quantum router-gateway-set router1 <ext-net-id> 

Viewing routers:

List all routers:

quantum router-list

Show a specific router:

quantum router-show <router_id>

Show all internal interfaces for a router:

quantum port-list -- --device_id=<router_id>

Associating / Disassociating Floating IPs:

First, identify the port-id representing the VM NIC that the floating IP should map to:

quantum port-list -c id -c fixed_ips -- --device_id=ZZZ

This port must be on a Quantum subnet that is attached to a router uplinked to the external network that will be used to create the floating IP.  Conceptually, this is because the router must be able to perform the Destination NAT (DNAT) rewriting of packets from the Floating IP address (chosen from a subnet on the external network) to the internal Fixed IP (chosen from a private subnet that is “behind” the router). 

Create floating IP unassociated, then associate

quantum floatingip-create <ext-net-id>
quantum floatingip-associate <floatingip-id> <internal VM port-id> 

create floating IP and associate in a single step

quantum floatingip-create --port_id <internal VM port-id> <ext-net-id> 

Viewing Floating IP State:

quantum floatingip-list

Find floating IP for a particular VM port:

quantum floatingip-list -- --port_id=ZZZ

Disassociate a Floating IP:

quantum floatingip-disassociate <floatingip-id>

L3 Tear Down

Delete the Floating IP:

quantum floatingip-delete <floatingip-id> 

Then clear the any gateway:

quantum router-gateway-clear router1

Then remove the interfaces from the router (deleting the network and subnet will do this as well):

quantum router-interface-delete router1 <subnet-id> 

Finally, delete the router:

quantum router-delete router1


loading table of contents...