Jump to: navigation, search

Difference between revisions of "Neutron/TrunkPort"

(openvswitch vlan model)
(API-CLI mapping)
Line 13: Line 13:
  
 
{| class="wikitable sortable"
 
{| class="wikitable sortable"
! CLI verb
+
! CLI verb (as in the spec)
 +
! CLI verb (openstack client)
 
! HTTP method
 
! HTTP method
 
! URL
 
! URL
 
|-
 
|-
 
| trunk-create
 
| trunk-create
 +
| network trunk create
 
| POST
 
| POST
 
| /v2.0/trunks
 
| /v2.0/trunks
 
|-
 
|-
 
| trunk-delete
 
| trunk-delete
 +
| network trunk delete
 
| DELETE
 
| DELETE
 
| /v2.0/trunks/$trunk_id
 
| /v2.0/trunks/$trunk_id
 
|-
 
|-
 
| trunk-list
 
| trunk-list
 +
| network trunk list
 
| GET
 
| GET
 
| /v2.0/trunks
 
| /v2.0/trunks
 
|-
 
|-
 
| trunk-show
 
| trunk-show
 +
| network trunk show
 
| GET
 
| GET
 
| /v2.0/trunks/$trunk_id
 
| /v2.0/trunks/$trunk_id
 
|-
 
|-
 
| trunk-subport-add
 
| trunk-subport-add
 +
| network trunk set
 
| PUT
 
| PUT
 
| /v2.0/trunks/$trunk_id/add_subports
 
| /v2.0/trunks/$trunk_id/add_subports
 
|-
 
|-
 
| trunk-subport-delete
 
| trunk-subport-delete
 +
| network trunk unset
 
| PUT
 
| PUT
 
| /v2.0/trunks/$trunk_id/remove_subports
 
| /v2.0/trunks/$trunk_id/remove_subports
 
|-
 
|-
 
| trunk-subport-list
 
| trunk-subport-list
 +
| network subport list
 
| GET
 
| GET
 
| /v2.0/trunks/$trunk_id/get_subports
 
| /v2.0/trunks/$trunk_id/get_subports

Revision as of 14:49, 17 August 2016

This page mostly describes v4 of the trunk port spec, however it is slightly out-of-date.

Overview

Neutron extension to access lots of neutron networks over a single vNIC as tagged/encapsulated traffic.

API

API-CLI mapping

CLI verb (as in the spec) CLI verb (openstack client) HTTP method URL
trunk-create network trunk create POST /v2.0/trunks
trunk-delete network trunk delete DELETE /v2.0/trunks/$trunk_id
trunk-list network trunk list GET /v2.0/trunks
trunk-show network trunk show GET /v2.0/trunks/$trunk_id
trunk-subport-add network trunk set PUT /v2.0/trunks/$trunk_id/add_subports
trunk-subport-delete network trunk unset PUT /v2.0/trunks/$trunk_id/remove_subports
trunk-subport-list network subport list GET /v2.0/trunks/$trunk_id/get_subports

Network dump

Dump of the Work-in-Progress API: https://etherpad.openstack.org/p/trunk-api-dump-2016-07-20

other

FIXME Special values to legacy port attributes, eg: device_owner, device_id

FIXME Ignored and/or problematic neutron port attributes for subports:

attribute name reason
mac_address no mechanism to tell the guest os/app what mac to use
binding:* FIXME

CLI usage example

# Legacy ports.
neutron port-create net0 --name port0
neutron port-create net1 --name port1

# Turn port0 into a trunk port, add port1 as a subport to it.
neutron trunk-create --port-id PORT0-UUID --subport PORT1-UUID,vlan,101 --name trunk0

# The only vNIC in your instance corresponds to the legacy port (turned into a trunk),
# so boot your instance with the trunk port given. Do not add subports as NICs to 'nova boot'.
# Use an image with support for vlan interfaces. CirrOS will not cut it.
# eg: sudo ip link add ... type vlan ...
nova boot ... --image VLAN-CAPABLE-IMAGE --nic port-id=PORT0-UUID --poll vm0

# The typical cloud image will auto-configure eth0 only and not the vlan interfaces (eth0.VLAN-ID).
ssh VM0-ADDRESS sudo ip link add link eth0 name eth0.101 type vlan id 101

# Further subports can be created at any time, including after boot.
neutron port-create net2 --name port2
neutron trunk-subport-add TRUNK0-UUID PORT2-UUID,vlan,102

# Again you need to bring your subport vlan interfaces up.
ssh VM0-ADDRESS sudo ip link add link eth0 name eth0.102 type vlan id 102

# Subports can be deleted at runtime too.
ssh VM0-ADDRESS sudo ip link delete dev eth0.102
neutron trunk-subport-delete PORT2-UUID
neutron port-delete port2

# Delete stuff when you're all done.
neutron trunk-delete TRUNK0-UUID
nova delete vm0
neutron port-delete port1
neutron port-delete port0

openvswitch vlan model

FIXME draw picture of wiring of tap interfaces, trunk and integration bridges

https://etherpad.openstack.org/p/trunk-bridge-tagged-patch-ovs-firewall-experiment

Drawings

Links