[ovs-discuss] Open vSwitch openflow example

Raymond Burkholder ray at oneunified.net
Thu Jul 4 21:34:19 UTC 2019


Your question is somewhat vague.  But for what it is worth, to provide 
an idea of what can be done, this is an extract from a bash script which 
maps the flows in each direction from one vlan on one port to another 
vlan on another port.

VLANA=$(ovs-vsctl get Interface {{ mapping.a.port }} ofport)
VLANZ=$(ovs-vsctl get Interface {{ mapping.z.port }} ofport)
ovs-ofctl add-flow {{ bridge.name }} 
priority=100,in_port=${VLANA},dl_vlan={{ mapping.a.vlan 
}},actions=mod_vlan_vid:{{ mapping.z.vlan }},output:${VLANZ}
ovs-ofctl add-flow {{ bridge.name }} 
priority=100,in_port=${VLANZ},dl_vlan={{ mapping.z.vlan 
}},actions=mod_vlan_vid:{{ mapping.a.vlan }},output:${VLANA}


But you mention you have an open flow controller, which may inject flows 
directly via the control channel.

If you would like more assistance, please let me know directly.

On 2019-07-04 2:58 p.m., Heim, Dennis wrote:
>
> I am trying to do a vlan trunk from my open vSwitch when connected 
> with an openflow controller. Does anyone have any examples of what an 
> openflow rule should look like to do that?
>
> *Dennis Heim | Domain Architect (Collaboration Labs)*
>
> World Wide Technology, Inc. | +1 314-212-1814
>
> <sip:dennis.heim at wwtatc.com>
>
> _______________________________________________
> discuss mailing list
> discuss at openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-discuss/attachments/20190704/aad02e0a/attachment.html>


More information about the discuss mailing list