Yes,My configuration is as follows: 
        [root@node50 ~]# ovs-vsctl add-port br0 vlan10 tag=10 -- set interface 
vlan10 type=internal
        [root@node50 ~]# ovs-vsctl add-port br0 vlan20 tag=20 -- set interface 
vlan20 type=internal

        [root@node50 ~]# ifconfig vlan10 192.168.10.254 netmask 255.255.255.0
        [root@node50 ~]# ifconfig vlan20 192.168.20.254 netmask 255.255.255.0
        
       [root@node50 ~]#  sysctl -w net.ipv4.ip_forward=1

[root@node50 ~]# ovs-vsctl show
98dd8985-540b-4838-a321-11006fa96694
    Bridge "br0"
        Port "vnet1"
            tag: 10
            Interface "vnet1"
        Port "vlan10"
            tag: 10
            Interface "vlan10"
                type: internal
        Port "eth0"
            Interface "eth0"
        Port "br0"
            Interface "br0"
                type: internal
        Port "vnet2"
            tag: 20
            Interface "vnet2"
        Port "vlan20"
            tag: 20
            Interface "vlan20"
                type: internal
    ovs_version: "1.7.1"
    ping from PC1 (VLAN10) to interface vlan20
tc@PC1:~$ ping 192.168.20.254
PING 192.168.20.254 (192.168.20.254): 56 data bytes
64 bytes from 192.168.20.254: seq=0 ttl=64 time=3.333 ms
64 bytes from 192.168.20.254: seq=1 ttl=64 time=0.000 ms
64 bytes from 192.168.20.254: seq=2 ttl=64 time=0.000 ms
64 bytes from 192.168.20.254: seq=3 ttl=64 time=3.333 ms
if vms in different hosts , you need to be configured on each host vlan10 
vlan20 can ping through vm. 
If I have thousands of hosts, I need to configure vlan isolation.Whether there 
are other ways to configure vlans routing. 
Thanks!







韩金朋

From: Ben Pfaff
Date: 2012-12-24 13:17
To: ??????
CC: discuss
Subject: Re: [ovs-discuss] Vlans questions
On Mon, Dec 24, 2012 at 12:14:04PM +0800, ?????? wrote:
> I have a question on how to configure VLANs between forwards??I have multiple 
> virtual machines on different hosts, 
> and how to make two cross Vlans virtual machine communication, and they are 
> on different hosts. Thanks.

Did you read the VLAN section of the FAQ?
---------------------------------------------------------------------------------------------------
Confidentiality Notice: The information contained in this e-mail and any 
accompanying attachment(s) 
is intended only for the use of the intended recipient and may be confidential 
and/or privileged of 
Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of 
this communication is 
not the intended recipient, unauthorized use, forwarding, printing,  storing, 
disclosure or copying 
is strictly prohibited, and may be unlawful.If you have received this 
communication in error,please 
immediately notify the sender by return e-mail, and delete the original message 
and all copies from 
your system. Thank you. 
---------------------------------------------------------------------------------------------------
_______________________________________________
discuss mailing list
discuss@openvswitch.org
http://openvswitch.org/mailman/listinfo/discuss

Reply via email to