[ovs-discuss] How to create VLAN in the same Physical Machine

Dan Wendlandt dan at nicira.com
Thu Aug 5 21:31:28 UTC 2010


On Thu, Aug 5, 2010 at 1:59 PM, Nikos <nikos.bre at gmail.com> wrote:

> Ok and how will i connect the two interfaces? Using eth0 and eth1 as ports
> in a separate bridge is not allowed because they are already in use.. Any
> ideas? Thanks again!
>

My understanding is that you are using two different NICs on the same box to
mimic the two different physical servers show in:
http://openvswitch.org/?page_id=146

The easiest thing to do here is to connect both eth0 and eth1 to the same
physical switch (as I mentioned previously, this physical switch must
support VLAN forwarding).

If you are trying to do this whole setup without using a physical switch at
all, I guess you could try and use an OVS "patch" port to connect the two
bridges directly (I have never used the patch functionality personally, so
others on the list can correct me).

Doing something like this should link the two bridges with a VLAN trunking
"wire" (warning: I have not actually tested this):

ovs-vsctl add-port br0 patch-to-br1
ovs-vsctl set Interface patch-to-br1 type=patch
ovs-vsctl set Interface patch-to-br1 options:peer=patch-to-br0
ovs-vsctl add-port br1 patch-to-br0
ovs-vsctl set Interface patch-to-br0 type=patch
ovs-vsctl set Interface patch-to-br0 options:peer=patch-to-br1

In this patch scenario, the eth0 and eth1 interfaces are not needed at all,
since br0 and br1 communicate over a patch.  Of course, there would be no
need for such a setup in a real environment, as all interfaces on a single
host could just be connected to the same bridge.

Dan




>
> N.M
>
> On 5 Αυγ 2010, at 22:36, Dan Wendlandt <dan at nicira.com> wrote:
>
>
>
> On Thu, Aug 5, 2010 at 12:24 PM, Nikos Bregiannis < <nikos.bre at gmail.com>
> nikos.bre at gmail.com> wrote:
>
>>  I have a machine with 6 ethernet card inside.
>> I want to test the configuration you have in the site <http://openvswitch.org/?page_id=146>
>> http://openvswitch.org/?page_id=146 with the only difference that i dont
>> need the Management Network Cloud.
>>
>> My configuration
>>
>> ETH0: br0 with ports --tap0 (tag=1)
>>                      --tap1 (tag=2)
>>                      --eth0
>>
>> ETH1:br1 with ports --tap2 (tag=1)
>>                     --tap3 (tag-2)
>>                     --eth1
>>
>> Now you say that the ports that data network connects the 2 hosts (in my
>> case the two interfaces) must be configured as VLAN trunks. By default ovs
>> does that but how do i connect the two interfaces over a virtual switch ?
>>
>
> I believe you are referring to the text on the page that says "All switch
> ports on this physical network must be configured as VLAN trunks
> (configuring your physical switching hardware is beyond the scope of this
> document)."
>
> This is just a reminder that the physical switch connecting your two
> machines must be configured to carry VLAN tagged traffic.  Most VLAN-aware
> switches will let ports carry VLAN tagged traffic by default.  I will update
> the page to reflect this.
>
> You do not need to configure any virtual interfaces on the host.
>
> Dan
>
>
>
>>  Should I use virtual interfaces like eth1:1 eth2:1 or something like
>> that ? Any ideas ?
>> Thanks in advance.
>>
>>
>> +-------------+     +--------------+
>> | tap0   tap1 |     |  tap2   tap3 |
>> |  |      |   |     |   |      |   |
>> |  ovs-daemon |     |  ovs-daemon  |
>> |      |      |     |     |        |
>> |     eth0    |     |    eth1      |
>> +-------------+     +--------------+
>>        \                   /
>>         \                 /
>>          \               /
>>           \             /
>>            \           /
>>           +-------------+
>>           |             |
>>           |   DataNet   |
>>           |             |
>>           +-------------+
>> _______________________________________________
>> discuss mailing list
>>  <discuss at openvswitch.org>discuss at openvswitch.org
>>  <http://openvswitch.org/mailman/listinfo/discuss_openvswitch.org>
>> http://openvswitch.org/mailman/listinfo/discuss_openvswitch.org
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20100805/01e97310/attachment-0001.html>


More information about the discuss mailing list