i get it, but the performance between SVM and VMs is very bad :(

here show the details, it is a bit longer :)


1, add br1.
ovs-vsctl add-br br1


2, create ovs-br1.xml.
<network>
 <name>ovs-br1</name>
 <forward mode='bridge' />
 <bridge name='br1' />
 <virtualport type='openvswitch' />
 <portgroup name='vlan-01' default='yes'>
 </portgroup>
 <portgroup name='vlan-02'>
   <vlan>
    <tag id='2'/>
   </vlan>
  </portgroup>
  <portgroup name='vlan-03'>
   <vlan>
    <tag id='3'/>
   </vlan>
  </portgroup>
  <portgroup name='vlan-all'>
   <vlan trunk='yes'>
    <tag id='2'/>
     <tag id='3'/>
    </vlan>
  </portgroup>
</network>



3, start network ovs-br1.
virsh create ovs-br1.xml


4, start 3 VMs.
ovs-br1-centos7x64min1511      vlan-all  eth0 NON-IPADDR        as SVM 
vlan-trunks=2,3
_ovs-br1-centos7x64min1511    vlan-02  eth0 192.168.111.92    as VM vlan-tag=2
__ovs-br1-centos7x64min1511  vlan-03  eth0 192.168.111.93    as VM vlan-tag=3

# then enable sshd on each VM.


5, configure SVM.
modprobe 8021q
systemctl stop NetworkManager
chkconfig NetworkManager off
vconfig add eth0 2
vconfig add eth0 3
vconfig set_name_type DEV_PLUS_VID_NO_PAD
# add ifcfg-eth0.2 and ifcfg-eth0.3 in /etc/sysconfig/network-scripts/
set IPADDR=192.168.111.102 VLAN=yes DEVICE=eth0.2 in ifcfg-eth0.2
set IPADDR=192.168.111.103 VLAN=yes DEVICE=eth0.3 in ifcfg-eth0.3
systemctl restart network
ip addr ls # will show eth0.2@eth0 192.168.111.102 and eth0.3@eth0 
192.168.111.103, their mac is same as eth0 itself.


6, add routes for SVM.
ip route add 192.168.111.92/32 via 192.168.111.102 dev eth0.2
ip route add 192.168.111.93/32 via 192.168.111.103 dev eth0.3


7, test connectivity.
# ping from 192.168.111.92(VM vlan-tag=2) to 192.168.111.102(SVM 
vlan-trunks=2,3) is ok, v.v. :)
# ping from 192.168.111.93(VM vlan-tag=3) to 192.168.111.103(SVM 
vlan-trunks=2,3) is ok, v.v. :)
# ping from 192.168.111.92(VM vlan-tag=2) to 192.168.111.103(SVM 
vlan-trunks=2,3) is ok, v.v. :)
# ping from 192.168.111.93(VM vlan-tag=3) to 192.168.111.102(SVM 
vlan-trunks=2,3) is ok, v.v. :)
#
# ping from 192.168.111.92(VM vlan-tag=2) to 192.168.111.93(VM vlan-tag=3) is 
not ok, v.v. :)
#
# so, it seems to meet requirements now :)


8, test performance.
# @SVM, iperf -s.
# @VMs, iperf -c 192.168.111.102 -d -t 60 or iperf -c 192.168.111.103 -d -t 60, 
up and down bandwidths are only tens KBps :(
# next, i scp a 3.3GB size file from VM to SVM, speed is only tens KBps, even 
stalled !
# then i start another vm A(ovs-br1, tag=2) and scp the same file from VM to A, 
speed is up to hundreds MBps !


what is the bottleneck ?


i guess that SVM can not deal 8021q fast enough may be the reason ?


i need help, thanks for anyone who check this email :)


regards !


------------------ Original ------------------
From:  "Ben Pfaff";<b...@ovn.org>;
Date:  Mon, Feb 6, 2017 12:42 PM
To:  "xiucai"<hualing...@foxmail.com>; 
Cc:  "dev"<d...@openvswitch.org>; 
Subject:  Re: [ovs-dev] [urgent] is there anyway to enable multi-vlan for onevm 
upon ovs ?



I don't think it normally makes sense to have IP addresses on the same
subnet on different VLANs.  If you do that, then how would the kernel
know, when it sends a packet to that subnet, which VLAN to use?

On Mon, Feb 06, 2017 at 10:17:31AM +0800, xiucai wrote:
> thanks a lot.
> i am very sorry about my delay, because i have take the Chinese spring 
> festival holidays :)
> 
> 
> in SVM, i had configured vlan as below:
>   modprobe 8021q
>   vconfig add eth0 2
>   vconfig add eth0 3
>   # add ifcfg-eth0.2/ifcfg-eth0.3 to /etc/sysconfig/network-scripts/ and 
> modify them.
>   systemctl restart network
>   # eth0/192.168.111.1 eth0.2@eth0/192.168.111.102 
> eth0.3@eth0/192.168.111.103 will appear.
> 
> 
> but, it still does not work :(
> 
> 
> so, could you give me details of "how to enable multi-vlan for one vm upon 
> openvswitch" :)
> 
> 
> regards!
> 
> 
> ------------------ Original ------------------
> From:  "Ben Pfaff";<b...@ovn.org>;
> Date:  Tue, Jan 24, 2017 00:21 AM
> To:  "xiucai"<hualing...@foxmail.com>; 
> Cc:  "ovs-dev"<ovs-dev@openvswitch.org>; 
> Subject:  Re: [ovs-dev] [urgent] is there anyway to enable multi-vlan for 
> onvm upon ovs ?
> 
> 
> 
> On Sun, Jan 22, 2017 at 05:18:48PM +0800, xiucai wrote:
> > hi,
> >     everyone :)
> > 
> > 
> >     in my case, there is one vm for storage sharing, we name it SVM, and 
> > several VMs as testing client.
> >     for historic reasons, i can not modify the network which uses vlan upon 
> > ovs.
> > 
> > 
> >     the SVM is corresponding to vnet0, make it as trunk for tag-2 and tag-3;
> >     the VM1 is corresponding to vnet2/tag-2 and the VM2 is corresponding to 
> > vnet4/tag-3.
> >     i wanna all VMx can connect to SVM, but VMx can not communicate with 
> > each other!
> > 
> > 
> >     ==============configurations==============
> >     SVM's eth0: 192.168.1.1 static 52:54:01:CB:35:C4
> >     VM1's eth0: 192.168.1.2 static 52:54:02:CB:35:C4
> >     VM2's eth0: 192.168.1.3 static 52:54:03:CB:35:C4
> > 
> > 
> >     Bridge "br1"
> >         Port "vnet4"
> >             tag: 3
> >             Interface "vnet4"
> >         Port "vnet0"
> >             trunks: [2, 3]
> >             Interface "vnet0"
> >         Port "vnet2"
> >             tag: 2
> >             Interface "vnet2"
> >         Port "br1"
> >             Interface "br1"
> >                 type: internal
> >     ovs_version: "2.5.0"
> >     =====================================
> > 
> > 
> >     but it does not work :(
> >     they can not ping through each other!
> > 
> > 
> >     i use tcpdump to monitor eth0 on SVM, and ping SVM from VM1, it said 
> > "ARP Request who-has SVM-IP to tell VM1-IP".
> >     and i use arp to add entry for each other, then it only said "VM1-IP > 
> > SVM-IP: ICMP echo request, id xxxx, seq x, length xx", but no "reply".
> > 
> > 
> >     i have got no idea about this case, i do not know i have mistaken the 
> > concept of trunk on ovs or my config is wrong :(
> 
> Does your VM connected to vnet0 understand VLAN trunks?  Do you have
> VLAN interfaces configured there?
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to