Hi,

I came across this thread:

"[ovs-dev] OVN based distributed virtual routing for VLAN backed networks"

In which *Mark Michelson *suggested it was possible to add a tag to a localnet port as follows:
*
Essentially, you can do the following:
1) On a logical switch, create a logical switch port of type "localnet"
and set its addresses to "unknown".
2) On the localnet port, set options:network_name to a network name.
3) On the localnet port, set tag_request to the VLAN identifier you want
to use.
4) On the hypervisor where ovn-controller runs, create the br-pif bridge.
5) On the hypervisor where ovn-controller runs, in the Open_vSwitch
table's record, set external-ids:ovn-bridge-mappings =
<network_name>:br-pif. "network_name" in this case is the network_name
you set on the localnet port in step 2.

With this setup, ovn-controller will automatically create the patch
ports between br-int and br-pif, and will use the VLAN tag from the
localnet port for two purposes:
1) On traffic sent out of br-int over the patch port, the tag will be
added to the packet.
2) On traffic received from the patch port into br-int, the VLAN tag
must match the configured VLAN tag on the localnet port. If it matches,
the tag is stripped.

The only aspect of the above I'm not 100% sure about is the logical
switch ingress and egress pipelines being run on both source and
destination hypervisor. But I *think* that's how it works in this case.
*My question is what do you set the parent port to? from ovn-nbctl man page:*

[--may-exist] lsp-add switch port parent tag_request
Creates on switch a logical switch port named port that is a child of parent that is  iden‐ tified  with  VLAN  ID  tag_request,
**
*If I have a configuration shown below where***ln-ls_vcn3_external_stgw *is the localnet port If I want to add a VLAN tag of 3901 what is the command to create this port ?
*

*
ovn-nbctl lsp-add ls_vcn3_external_stgw **ln-ls_vcn3_external_stgw*<what parent?>* 3901

Thanks
Brendan

        +------------------+
        |       VM           |
        | 192.16.1.6    |
        +------------------+
                | 284195d2-9280-4334-900e-571ecd00327a
      +---------------------+
      |    ls_vcn3_net1 |
      +---------------------+
                | ls_vcn3_net1-lr_vcn3_net1
                |
                | lr_vcn3_net1-ls_vcn3_net1
       /----------------\
      ( lr_vcn3_net1 )
        \----------------/
                | lr_vcn3_net1-lsb_vcn3_net1
                |
                | lsb_vcn3_net1-lr_vcn3_net1
     +-----------------------------+
     |  ls_vcn3_backbone     |
     +-----------------------------+
                | lsb_vcn4_stgw-lr_vcn3_stgw**
                |
                | lr_vcn3_stgw-lsb_vcn3_stgw
    /-----------------\
   ( lr_vcn3_stgw )
    \-----------------/
                | lr_vcn3_stgw-ls_vcn3_external_stgw
                |
                | ls_vcn3_external_stgw-lr_vcn3_stgw
   +-------------------------------+
   | ls_vcn3_external_stgw |
   +-------------------------------+
                | ln-ls_vcn3_external_stgw (localnet)
          +---------+
          | br-ext  | Physical OVS on chassis
          +----------+


_______________________________________________
discuss mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

Reply via email to