Jump to: navigation, search

Difference between revisions of "Neutron/TrunkPort"

(Overview)
(Design)
Line 7: Line 7:
 
* [https://etherpad.openstack.org/p/trunkport-design open design questions (etherpad.openstack.org)]
 
* [https://etherpad.openstack.org/p/trunkport-design open design questions (etherpad.openstack.org)]
 
* [https://etherpad.openstack.org/p/trunk-port-design-log log of design decisions (etherpad.openstack.org)]
 
* [https://etherpad.openstack.org/p/trunk-port-design-log log of design decisions (etherpad.openstack.org)]
 +
 +
=== openvswitch vlan model ===
 +
 +
<pre>
 +
# create trunk bridge
 +
ovs-vsctl --may-exist add-br TRUNK-BRIDGE -- del-flows TRUNK-BRIDGE
 +
 +
# patch trunk bridge to integration bridge
 +
ovs-vsctl add-port TRUNK-BRIDGE PATCH-TRUNK-END-PORT -- set Interface PATCH-TRUNK-END-PORT type=patch options:peer=PATCH-INT-END-PORT
 +
ovs-vsctl add-port br-int PATCH-INT-END-PORT -- set Interface PATCH-INT-END-PORT type=patch options:peer=PATCH-TRUNK-END-PORT
 +
 +
# install default drop flows on patch ports
 +
ovs-ofctl add-flow TRUNK-BRIDGE hard_timeout=0,idle_timeout=0,priority=2,in_port=PATCH-TRUNK-END-OFPORT,actions=drop
 +
ovs-ofctl add-flow br-int hard_timeout=0,idle_timeout=0,priority=2,in_port=PATCH-INT-END-OFPORT,actions=drop
 +
 +
# install remap flows for untagged traffic (default subport)
 +
ovs-ofctl add-flow TRUNK-BRIDGE hard_timeout=0,idle_timeout=0,priority=3,dl_vlan=COMPUTE-INTERNAL-VLAN-ID,in_port=PATCH-TRUNK-END-OFPORT,actions=strip_vlan,normal
 +
ovs-ofctl add-flow br-int hard_timeout=0,idle_timeout=0,priority=3,dl_vlan=0xffff,in_port=PATCH-INT-END-OFPORT,actions=mod_vlan_vid:COMPUTE-INTERNAL-VLAN-ID,normal
 +
 +
# install remap flows for tagged traffic (other subports)
 +
ovs-ofctl add-flow TRUNK-BRIDGE hard_timeout=0,idle_timeout=0,priority=3,dl_vlan=COMPUTE-INTERNAL-VLAN-ID,in_port=PATCH-TRUNK-END-OFPORT,actions=mod_vlan_vid:INNER-VLAN-ID,normal
 +
ovs-ofctl add-flow br-int hard_timeout=0,idle_timeout=0,priority=3,dl_vlan=INNER-VLAN-ID,in_port=PATCH-INT-END-OFPORT,actions=mod_vlan_vid:COMPUTE-INTERNAL-VLAN-ID,normal
 +
 +
# make the tap port pass all tags
 +
ovs-vsctl set Port TAP-PORT vlan_mode=trunk
 +
</pre>
  
 
== Work Items ==
 
== Work Items ==

Revision as of 14:25, 18 August 2015

Overview

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

Design

openvswitch vlan model

# create trunk bridge
ovs-vsctl --may-exist add-br TRUNK-BRIDGE -- del-flows TRUNK-BRIDGE

# patch trunk bridge to integration bridge
ovs-vsctl add-port TRUNK-BRIDGE PATCH-TRUNK-END-PORT -- set Interface PATCH-TRUNK-END-PORT type=patch options:peer=PATCH-INT-END-PORT
ovs-vsctl add-port br-int PATCH-INT-END-PORT -- set Interface PATCH-INT-END-PORT type=patch options:peer=PATCH-TRUNK-END-PORT

# install default drop flows on patch ports
ovs-ofctl add-flow TRUNK-BRIDGE hard_timeout=0,idle_timeout=0,priority=2,in_port=PATCH-TRUNK-END-OFPORT,actions=drop
ovs-ofctl add-flow br-int hard_timeout=0,idle_timeout=0,priority=2,in_port=PATCH-INT-END-OFPORT,actions=drop

# install remap flows for untagged traffic (default subport)
ovs-ofctl add-flow TRUNK-BRIDGE hard_timeout=0,idle_timeout=0,priority=3,dl_vlan=COMPUTE-INTERNAL-VLAN-ID,in_port=PATCH-TRUNK-END-OFPORT,actions=strip_vlan,normal
ovs-ofctl add-flow br-int hard_timeout=0,idle_timeout=0,priority=3,dl_vlan=0xffff,in_port=PATCH-INT-END-OFPORT,actions=mod_vlan_vid:COMPUTE-INTERNAL-VLAN-ID,normal

# install remap flows for tagged traffic (other subports)
ovs-ofctl add-flow TRUNK-BRIDGE hard_timeout=0,idle_timeout=0,priority=3,dl_vlan=COMPUTE-INTERNAL-VLAN-ID,in_port=PATCH-TRUNK-END-OFPORT,actions=mod_vlan_vid:INNER-VLAN-ID,normal
ovs-ofctl add-flow br-int hard_timeout=0,idle_timeout=0,priority=3,dl_vlan=INNER-VLAN-ID,in_port=PATCH-INT-END-OFPORT,actions=mod_vlan_vid:COMPUTE-INTERNAL-VLAN-ID,normal

# make the tap port pass all tags
ovs-vsctl set Port TAP-PORT vlan_mode=trunk

Work Items

Links