4
Most read
6
Most read
7
Most read
OpenStack
Trunk Port
Bence Romsics, Ericsson
OpenStack Summit, Tokyo
2015-10
Use Cases
●
Do you want to connect an OpenStack instance to hundreds or
thousands of networks without having eth1000?
●
Do you virtualize telco NFV applications?
●
Do you want to connect and disconnect networks dynamically to
an already running OpenStack instance?
●
Do you want to run containers inside instances?
Lots of Networks and vNICs
Lots of Networks with Trunk Port
Legacy Port API
You all know this.
Trunk Port API
New neutron resource:
Trunk Port
Trunk ports are not
connected to any
networks.
Subports are owned by
a trunk port instead of
an instance.
CLI example# Trunk ports are created independently of networks.
neutron trunk-port-create --name trunk-port0
# Networks for later subports.
neutron net-create net0
neutron net-create net1
# Optional subnets.
neutron subnet-create net0 10.0.0.0/24
neutron subnet-create net1 10.0.1.0/24
# Ports having --device-owner 'network:trunk-port' are subports of the trunk port given by uuid.
# The subport without --trunk-port:* options is the default subport.
# The default subport's traffic will be seen as untagged inside the instance.
# You likely want network connectivity during boot, so you should create at least the default subport before booting.
neutron port-create net0 --name port0 --device-owner network:trunk-port --device-id TRUNK-PORT0-UUID
# Other subports can be created at any time, including before boot.
# The traffic of further subports has to be differentiated inside the instance by encapsulation, so you need to provide a segmentation type and id.
neutron port-create net1 --name port1 --device-owner network:trunk-port --device-id TRUNK-PORT0-UUID --trunk-port:segmentation-type vlan --trunk-port:segmentation-id 101
# The only vNIC in your instance corresponds to the trunk port, 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 trunk-port-id=TRUNK-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
# Other subports can be created at any time, including after boot.
neutron net-create net2
neutron subnet-create net2 10.0.2.0/24
neutron port-create net2 --name port2 --device-owner network:trunk-port --device-id TRUNK-PORT0-UUID --trunk-port:segmentation-type vlan --trunk-port:segmentation-id 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 port-delete port1
# When you're all done, deleting the trunk port deletes all the subports too.
nova delete vm0
neutron trunk-port-delete trunk-port0
neutron net-delete net2
neutron net-delete net1
neutron net-delete net0
Join Us
●
Target release: Mitaka, 2016.1
●
Some changes already available on review.openstack.org
●
In the queue:
●
neutron-server
●
changes to MAC uniqueness
●
trunk port binding
●
neutron-openvswitch-agent
●
nova boot –nic trunk-port-id=...
Contacts and links
●
bence.romsics@ericsson.com
●
ildiko.vancsa@ericsson.com
●
petr.savelyev@ericsson.com
●
●
https://wiki.openstack.org/wiki/Neutron/TrunkPort
●
https://review.openstack.org/#/q/project:openstack/neutron+topic:b
p/vlan-aware-vms,n,z
●
https://review.openstack.org/#/q/topic:bp/trunk-port,n,z
Openstack Trunk Port

Openstack Trunk Port

  • 1.
    OpenStack Trunk Port Bence Romsics,Ericsson OpenStack Summit, Tokyo 2015-10
  • 2.
    Use Cases ● Do youwant to connect an OpenStack instance to hundreds or thousands of networks without having eth1000? ● Do you virtualize telco NFV applications? ● Do you want to connect and disconnect networks dynamically to an already running OpenStack instance? ● Do you want to run containers inside instances?
  • 3.
  • 4.
    Lots of Networkswith Trunk Port
  • 5.
    Legacy Port API Youall know this.
  • 6.
    Trunk Port API Newneutron resource: Trunk Port Trunk ports are not connected to any networks. Subports are owned by a trunk port instead of an instance.
  • 7.
    CLI example# Trunkports are created independently of networks. neutron trunk-port-create --name trunk-port0 # Networks for later subports. neutron net-create net0 neutron net-create net1 # Optional subnets. neutron subnet-create net0 10.0.0.0/24 neutron subnet-create net1 10.0.1.0/24 # Ports having --device-owner 'network:trunk-port' are subports of the trunk port given by uuid. # The subport without --trunk-port:* options is the default subport. # The default subport's traffic will be seen as untagged inside the instance. # You likely want network connectivity during boot, so you should create at least the default subport before booting. neutron port-create net0 --name port0 --device-owner network:trunk-port --device-id TRUNK-PORT0-UUID # Other subports can be created at any time, including before boot. # The traffic of further subports has to be differentiated inside the instance by encapsulation, so you need to provide a segmentation type and id. neutron port-create net1 --name port1 --device-owner network:trunk-port --device-id TRUNK-PORT0-UUID --trunk-port:segmentation-type vlan --trunk-port:segmentation-id 101 # The only vNIC in your instance corresponds to the trunk port, 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 trunk-port-id=TRUNK-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 # Other subports can be created at any time, including after boot. neutron net-create net2 neutron subnet-create net2 10.0.2.0/24 neutron port-create net2 --name port2 --device-owner network:trunk-port --device-id TRUNK-PORT0-UUID --trunk-port:segmentation-type vlan --trunk-port:segmentation-id 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 port-delete port1 # When you're all done, deleting the trunk port deletes all the subports too. nova delete vm0 neutron trunk-port-delete trunk-port0 neutron net-delete net2 neutron net-delete net1 neutron net-delete net0
  • 8.
    Join Us ● Target release:Mitaka, 2016.1 ● Some changes already available on review.openstack.org ● In the queue: ● neutron-server ● changes to MAC uniqueness ● trunk port binding ● neutron-openvswitch-agent ● nova boot –nic trunk-port-id=...
  • 9.